changeset 18533:79e27f0c6f05

merge of '2b537584bf70476b4ef78547c5000c361e9b7176' and 'e281de32313e50dbff5d4e48ff636a657de9a23e'
author Richard Nelson <wabz@pidgin.im>
date Sat, 14 Jul 2007 01:28:24 +0000
parents db00e554e768 (current diff) fbca9cd907a1 (diff)
children ffa46a399f3c
files
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntstyle.c	Sat Jul 14 01:32:45 2007 +0000
+++ b/finch/libgnt/gntstyle.c	Sat Jul 14 01:28:24 2007 +0000
@@ -48,11 +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') {
-		return g_key_file_get_value(gkfile, group, key, NULL);
-	}
-
-	if (!group || !*group)
+	const char *prg = g_get_prgname();
+	if ((group == NULL || *group != '\0') && prg &&
+			g_key_file_has_group(gkfile, prg))
+		group = prg;
+	if (!group)
 		group = "general";
 	return g_key_file_get_value(gkfile, group, key, NULL);
 #endif