From 934b33e8c794cdd8522cd7967feb2c6b09614fbb Mon Sep 17 00:00:00 2001 From: Jens Granseuer Date: Sun, 10 Jun 2007 18:10:38 +0000 Subject: [PATCH] make it possible to skip engine information if we're not interested and 2007-06-10 Jens Granseuer * gtkrc-utils.c: (gtkrc_get_details), (gtkrc_get_color_scheme): make it possible to skip engine information if we're not interested and fix a warning svn path=/trunk/; revision=7712 --- capplets/common/ChangeLog | 6 ++++++ capplets/common/gtkrc-utils.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog index da2fde0ff..dc50ca361 100644 --- a/capplets/common/ChangeLog +++ b/capplets/common/ChangeLog @@ -1,3 +1,9 @@ +2007-06-10 Jens Granseuer + + * gtkrc-utils.c: (gtkrc_get_details), (gtkrc_get_color_scheme): + make it possible to skip engine information if we're not interested + and fix a warning + 2007-06-10 Jens Granseuer * gnome-theme-apply.c: (gnome_meta_theme_set): add some more checks so diff --git a/capplets/common/gtkrc-utils.c b/capplets/common/gtkrc-utils.c index af7b2b65d..ef4e072b8 100644 --- a/capplets/common/gtkrc-utils.c +++ b/capplets/common/gtkrc-utils.c @@ -63,7 +63,8 @@ gtkrc_get_details (gchar *filename, GSList **engines, GSList **symbolic_colors) GScanner *scanner = g_scanner_new (NULL); g_scanner_scope_add_symbol (scanner, 0, "include", INCLUDE_SYMBOL); - g_scanner_scope_add_symbol (scanner, 0, "engine", ENGINE_SYMBOL); + if (engines != NULL) + g_scanner_scope_add_symbol (scanner, 0, "engine", ENGINE_SYMBOL); files = g_slist_prepend (files, g_strdup (filename)); while (files != NULL) @@ -131,6 +132,8 @@ gtkrc_get_details (gchar *filename, GSList **engines, GSList **symbolic_colors) } } } + + g_scanner_destroy (scanner); } @@ -172,7 +175,7 @@ gtkrc_get_color_scheme (gchar *filename) g_scanner_input_file (scanner, file); while ((token = g_scanner_get_next_token (scanner)) != G_TOKEN_EOF) { - if (token == COLOR_SCHEME_SYMBOL) + if (GINT_TO_POINTER (token) == COLOR_SCHEME_SYMBOL) { if (g_scanner_get_next_token (scanner) != '=') continue;