pidgin: 6351652d: Be a bit stricter about types in Info.pl...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Sep 19 17:21:01 EDT 2011
----------------------------------------------------------------------
Revision: 6351652d0cb8e97a78e1031633b72e0b87a03474
Parent: 1c1db17625295e1e44abe78e08b519903379f528
Author: qulogic at pidgin.im
Date: 09/19/11 16:36:05
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/6351652d0cb8e97a78e1031633b72e0b87a03474
Changelog:
Be a bit stricter about types in Info.plist.
Changes against parent 1c1db17625295e1e44abe78e08b519903379f528
patched pidgin/gtkconv-theme-loader.c
patched pidgin/gtkconv-theme.c
-------------- next part --------------
============================================================
--- pidgin/gtkconv-theme-loader.c 10e1c4af852fbe2718693d5fa36b9c9711137872
+++ pidgin/gtkconv-theme-loader.c cb2e7af50ab5b4c2502795216dab026f8876bd46
@@ -134,9 +134,9 @@ pidgin_conv_loader_build(const gchar *di
/* 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 @@ pidgin_conv_loader_build(const gchar *di
/* 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 @@ pidgin_conv_loader_build(const gchar *di
/* 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;
============================================================
--- pidgin/gtkconv-theme.c b4c57f34fcdf0e066c59fd4159e5c976e0e9597e
+++ pidgin/gtkconv-theme.c 63d3d3735d33c060ea83444728b2dc264e644fd7
@@ -494,15 +494,15 @@ set_theme_webkit_settings(WebKitWebView
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));
}
More information about the Commits
mailing list