[recipes] Always load cuisine.css from a resource too
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Always load cuisine.css from a resource too
- Date: Wed, 15 Mar 2017 03:20:13 +0000 (UTC)
commit c39e1b13e149fc32b403249f0bae70aff4a99428
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 14 23:19:31 2017 -0400
Always load cuisine.css from a resource too
This was another place where we supported uninstalled
operation in some fashion.
src/gr-cuisine.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/src/gr-cuisine.c b/src/gr-cuisine.c
index 0972acc..485872f 100644
--- a/src/gr-cuisine.c
+++ b/src/gr-cuisine.c
@@ -164,18 +164,8 @@ gr_cuisine_get_css (const char *import_url)
GString *s = NULL;
char *p, *q;
- if (g_file_test ("cuisine.css", G_FILE_TEST_EXISTS)) {
- path = "cuisine.css";
- file = g_file_new_for_path (path);
- }
- else if (g_file_test ("src/cuisine.css", G_FILE_TEST_EXISTS)) {
- path = "src/cuisine.css";
- file = g_file_new_for_path (path);
- }
- else {
- path = "resource:///org/gnome/Recipes/cuisine.css";
- file = g_file_new_for_uri (path);
- }
+ path = "resource:///org/gnome/Recipes/cuisine.css";
+ file = g_file_new_for_uri (path);
g_file_load_contents (file, NULL, &css, NULL, NULL, NULL);
@@ -184,7 +174,7 @@ gr_cuisine_get_css (const char *import_url)
g_string_append_printf (s, "@import url(\"%s\");\n", import_url);
p = css;
- while (1) {
+ while (TRUE) {
q = strstr (p, "@pkgdatadir@");
if (!q) {
g_string_append (s, p);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]