Sat, 26 Apr 2014 21:08:57 +0200
Finch: fix glib warnings
| finch/gntpounce.c | file | annotate | diff | comparison | revisions | |
| finch/libgnt/gntcolors.c | file | annotate | diff | comparison | revisions |
--- a/finch/gntpounce.c Sat Apr 26 20:39:33 2014 +0200 +++ b/finch/gntpounce.c Sat Apr 26 21:08:57 2014 +0200 @@ -977,11 +977,11 @@ PURPLE_CALLBACK(signed_on_off_cb), NULL); } -/* XXX: There's no such thing in pidgin. Perhaps there should be? */ +/* XXX: There's no such thing in pidgin. Perhaps there should be? + * For sure, we don't need purple_pounces_unregister_handler - + * it's wiped in purple_pounces_uninit. + */ void finch_pounces_uninit() { - purple_pounces_unregister_handler(FINCH_UI); - purple_signals_disconnect_by_handle(finch_pounces_get_handle()); } -
--- a/finch/libgnt/gntcolors.c Sat Apr 26 20:39:33 2014 +0200 +++ b/finch/libgnt/gntcolors.c Sat Apr 26 21:08:57 2014 +0200 @@ -177,10 +177,15 @@ { GError *error = NULL; gsize nkeys; - char **keys = g_key_file_get_keys(kfile, "colors", &nkeys, &error); + char **keys; - if (error) - { + if (!g_key_file_has_group(kfile, "colors")) { + gnt_color_pairs_parse(kfile); + return; + } + + keys = g_key_file_get_keys(kfile, "colors", &nkeys, &error); + if (error) { gnt_warning("%s", error->message); g_error_free(error); error = NULL; @@ -223,8 +228,12 @@ { GError *error = NULL; gsize nkeys; - char **keys = g_key_file_get_keys(kfile, "colorpairs", &nkeys, &error); + char **keys; + if (!g_key_file_has_group(kfile, "colorpairs")) + return; + + keys = g_key_file_get_keys(kfile, "colorpairs", &nkeys, &error); if (error) { gnt_warning("%s", error->message);