soc.2009.webkitmessageview: a23e4b3f: some code to get a list of styles and bl...

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


-----------------------------------------------------------------
Revision: a23e4b3f8f1e225b31648a43ef388d8aba477ac6
Ancestor: ffe0696220cc252e516fa817a0e4f3f8c03414e0
Author: tdrhq at soc.pidgin.im
Date: 2009-08-10T08:59:09
Branch: im.pidgin.soc.2009.webkitmessageview
URL: http://d.pidgin.im/viewmtn/revision/info/a23e4b3f8f1e225b31648a43ef388d8aba477ac6

Modified files:
        pidgin/plugins/adiumthemes/webkit.c

ChangeLog: 

some code to get a list of styles and blah blah.

-------------- next part --------------
============================================================
--- pidgin/plugins/adiumthemes/webkit.c	e5e0a1d89f377f0c65c812d47c3bf86d721419e4
+++ pidgin/plugins/adiumthemes/webkit.c	a85e57402002d85629219beb7608dd9c9a5e944b
@@ -792,6 +792,27 @@ plugin_unload(PurplePlugin *plugin)
 }
 
 
+static GtkWidget*
+get_style_config_frame ()
+{
+	GtkWidget *combobox = gtk_combo_box_new_text ();
+	GList *styles = get_style_directory_list (), *iter;
+	int index = 0, selected = 0;
+
+	for (iter = styles; iter; iter = g_list_next (iter), index++) {
+		PidginMessageStyle *style = pidgin_message_style_load (iter->data);
+		
+		if (style) {
+			gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), iter->data);
+			if (g_str_equal (iter->data, cur_style_dir))
+				selected = index;
+			pidgin_message_style_unref (style);
+		}
+	}
+	gtk_combo_box_set_active (GTK_COMBO_BOX(combobox), selected);
+	return combobox;
+}
+
 static void
 variant_update_conversation (PurpleConversation *conv)
 {
@@ -914,6 +935,7 @@ get_config_frame(PurplePlugin* plugin)
 {
 	GtkWidget *vbox = gtk_vbox_new (TRUE, 0);
 
+	gtk_box_pack_start (GTK_BOX(vbox), get_style_config_frame (), TRUE, TRUE, 0);
 	gtk_box_pack_end (GTK_BOX(vbox), get_variant_config_frame (), TRUE, TRUE, 0);
 	return vbox;
 }


More information about the Commits mailing list