changeset 18509:c96a0d4a84e2

The app-specific style-reading was wrong. Thanks to wabz for noticing.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 13 Jul 2007 01:27:31 +0000
parents 902685705e4e
children f104e1d45d85
files finch/libgnt/gntstyle.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntstyle.c	Fri Jul 13 00:37:06 2007 +0000
+++ b/finch/libgnt/gntstyle.c	Fri Jul 13 01:27:31 2007 +0000
@@ -48,7 +48,11 @@
 char *gnt_style_get_from_name(const char *group, const char *key)
 {
 #if GLIB_CHECK_VERSION(2,6,0)
-	if ((group == NULL && (group = g_get_prgname()) == NULL) || *group == '\0')
+	if (group == NULL && (group = g_get_prgname()) != NULL && *group != '\0') {
+		return g_key_file_get_value(gkfile, group, key, NULL);
+	}
+
+	if (!group || !*group)
 		group = "general";
 	return g_key_file_get_value(gkfile, group, key, NULL);
 #endif