[recipes] Remove uninstalled hack
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Remove uninstalled hack
- Date: Wed, 15 Mar 2017 03:17:02 +0000 (UTC)
commit 967d91495368932d375946935532ee0f5b5848ee
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Mar 14 22:55:47 2017 -0400
Remove uninstalled hack
Instead of looking around in various places on disk,
always load css from a resource.
src/gr-app.c | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/src/gr-app.c b/src/gr-app.c
index bafbe54..320c492 100644
--- a/src/gr-app.c
+++ b/src/gr-app.c
@@ -286,19 +286,7 @@ load_application_css (GApplication *application)
{
GrApp *app = GR_APP (application);
gboolean dark;
- const char *css_file[2] = {
- "recipes-light.css",
- "recipes-dark.css"
- };
- const char *src_file[2] = {
- "src/recipes-light.css",
- "src/recipes-dark.css"
- };
- const char *resource[2] = {
- "resource:///org/gnome/Recipes/recipes-light.css",
- "resource:///org/gnome/Recipes/recipes-dark.css"
- };
- const char *path;
+ g_autofree char *path = NULL;
g_autofree char *css = NULL;
if (!app->css_provider) {
@@ -311,14 +299,7 @@ load_application_css (GApplication *application)
"gtk-application-prefer-dark-theme", &dark,
NULL);
- /* Let designers test css tweaks in the build tree without rebuilding */
- if (g_file_test (css_file[dark], G_FILE_TEST_EXISTS))
- path = css_file[dark];
- else if (g_file_test (src_file[dark], G_FILE_TEST_EXISTS))
- path = src_file[dark];
- else
- path = resource[dark];
-
+ path = g_strdup_printf ("resource:///org/gnome/Recipes/recipes-%s.css", dark ? "dark" : "light");
g_info ("Loading application CSS from %s", path);
css = gr_cuisine_get_css (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]