changeset 32087:1c84e102c8ee

some code to get a list of styles and blah blah.
author tdrhq@soc.pidgin.im
date Mon, 10 Aug 2009 08:59:09 +0000
parents 355b9461057f
children 7d8f8c6ebae2
files pidgin/plugins/adiumthemes/webkit.c
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/adiumthemes/webkit.c	Mon Aug 10 08:40:12 2009 +0000
+++ b/pidgin/plugins/adiumthemes/webkit.c	Mon Aug 10 08:59:09 2009 +0000
@@ -792,6 +792,27 @@
 }
 
 
+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 @@
 {
 	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;
 }