# HG changeset patch # User Elliott Sales de Andrade # Date 1316464565 0 # Node ID 1caf1317503940aebc83e784773c8f6dd7db58cc # Parent a56483e407d4f5a8d27616c22e9568a6f201142c Be a bit stricter about types in Info.plist. diff -r a56483e407d4 -r 1caf13175039 pidgin/gtkconv-theme-loader.c --- a/pidgin/gtkconv-theme-loader.c Mon Sep 19 20:31:33 2011 +0000 +++ b/pidgin/gtkconv-theme-loader.c Mon Sep 19 20:36:05 2011 +0000 @@ -134,9 +134,9 @@ /* Check for required keys: CFBundleName */ val = g_hash_table_lookup(info, "CFBundleName"); - if (!val) { + if (!val || !G_VALUE_HOLDS_STRING(val)) { purple_debug_error("gtkconv-theme-loader", - "%s/Contents/Info.plist missing required key CFBundleName.\n", + "%s/Contents/Info.plist missing required string key CFBundleName.\n", dir); g_hash_table_destroy(info); return NULL; @@ -145,9 +145,9 @@ /* Check for required keys: CFBundleIdentifier */ val = g_hash_table_lookup(info, "CFBundleIdentifier"); - if (!val) { + if (!val || !G_VALUE_HOLDS_STRING(val)) { purple_debug_error("gtkconv-theme-loader", - "%s/Contents/Info.plist missing required key CFBundleIdentifier.\n", + "%s/Contents/Info.plist missing required string key CFBundleIdentifier.\n", dir); g_hash_table_destroy(info); return NULL; @@ -156,9 +156,9 @@ /* Check for required keys: MessageViewVersion */ val = g_hash_table_lookup(info, "MessageViewVersion"); - if (!val) { + if (!val || !G_VALUE_HOLDS_INT(val)) { purple_debug_error("gtkconv-theme-loader", - "%s/Contents/Info.plist missing required key MessageViewVersion.\n", + "%s/Contents/Info.plist missing required integer key MessageViewVersion.\n", dir); g_hash_table_destroy(info); return NULL; diff -r a56483e407d4 -r 1caf13175039 pidgin/gtkconv-theme.c --- a/pidgin/gtkconv-theme.c Mon Sep 19 20:31:33 2011 +0000 +++ b/pidgin/gtkconv-theme.c Mon Sep 19 20:36:05 2011 +0000 @@ -494,15 +494,15 @@ g_object_get(G_OBJECT(webview), "settings", &settings, NULL); val = get_key(priv, "DefaultFontFamily", TRUE); - if (val) + if (val && G_VALUE_HOLDS_STRING(val)) g_object_set(G_OBJECT(settings), "default-font-family", g_value_get_string(val), NULL); val = get_key(priv, "DefaultFontSize", TRUE); - if (val) + if (val && G_VALUE_HOLDS_INT(val)) g_object_set(G_OBJECT(settings), "default-font-size", GINT_TO_POINTER(g_value_get_int(val)), NULL); val = get_key(priv, "DefaultBackgroundIsTransparent", TRUE); - if (val) + if (val && G_VALUE_HOLDS_BOOLEAN(val)) /* this does not work :( */ webkit_web_view_set_transparent(webview, g_value_get_boolean(val)); }