soc.2009.webkitmessageview: 92ef7ff2: Read AllowTextColors key properly.

tdrhq at soc.pidgin.im tdrhq at soc.pidgin.im
Tue Aug 25 12:03:38 EDT 2009


-----------------------------------------------------------------
Revision: 92ef7ff2d3d0706e73113ff78aded4c9ce5559e4
Ancestor: d4f6fb837f984907c2d37941d93af9fd51aa0477
Author: tdrhq at soc.pidgin.im
Date: 2009-08-25T15:40:06
Branch: im.pidgin.soc.2009.webkitmessageview
URL: http://d.pidgin.im/viewmtn/revision/info/92ef7ff2d3d0706e73113ff78aded4c9ce5559e4

Modified files:
        pidgin/plugins/adiumthemes/message-style.c

ChangeLog: 

Read AllowTextColors key properly.

-------------- next part --------------
============================================================
--- pidgin/plugins/adiumthemes/message-style.c	9582aa34a87d6ebe5a39605045601d4d6ce6c97f
+++ pidgin/plugins/adiumthemes/message-style.c	3ddc889613a20911f1554099dd1a004fc8ec84cf
@@ -122,7 +122,7 @@ pidgin_message_style_save_state (const P
 	g_free (variant);
 }
 
-void
+static void
 pidgin_message_style_load_state (PidginMessageStyle *style)
 {
 	char *prefname = g_strdup_printf ("/plugins/gtk/adiumthemes/%s", style->cf_bundle_identifier);
@@ -220,12 +220,13 @@ pidgin_message_style_read_info_plist (Pi
 		else if (str_for_key ("DefaultBackgroundColor", key, variant))
 			pr = parse_info_plist_key_value (iter, &style->default_background_color, "string");
 		else if (str_for_key ("AllowTextColors", key, variant))
-			pr = parse_info_plist_key_value (iter, &style->allow_text_colors, "string");
+			pr = parse_info_plist_key_value (iter, &style->allow_text_colors, "integer");
 		else if (str_for_key ("ImageMask", key, variant))
 			pr = parse_info_plist_key_value (iter, &style->image_mask, "string");
 
+		if (!pr)
+			purple_debug_warning ("webkit", "Failed to parse key %s\n", key);
 		g_free (key);
-		if (!pr) break; /* does not make sense */
 	}
 
 	xmlnode_free (plist);
@@ -328,6 +329,7 @@ pidgin_message_style_load (const char* s
 
 	/* non variant dependent Info.plist checks */
 	if (style->message_view_version < 3) {
+		purple_debug_info ("webkit", "%s is a legacy style (version %d) and will not be loaded\n", style->cf_bundle_name, style->message_view_version);
 		pidgin_message_style_unref (style);
 		return NULL;
 	}


More information about the Commits mailing list