pidgin: ccfb262b: Add a conversation theme with no timesta...

qulogic at pidgin.im qulogic at pidgin.im
Mon May 28 22:20:49 EDT 2012


----------------------------------------------------------------------
Revision: ccfb262bb9e313a5281f05015530ef94fc58a573
Parent:   38625f49b97b3f2f7d7d57c1d4964d7e803b08fd
Author:   qulogic at pidgin.im
Date:     05/28/12 18:34:59
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ccfb262bb9e313a5281f05015530ef94fc58a573

Changelog: 

Add a conversation theme with no timestamps.

Changes against parent 38625f49b97b3f2f7d7d57c1d4964d7e803b08fd

  added    pidgin/themes/Contents/Resources/Variants/Default.css
  added    pidgin/themes/Contents/Resources/Variants/No-Timestamps.css
  patched  pidgin/gtkprefs.c
  patched  pidgin/themes/Makefile.am

-------------- next part --------------
============================================================
--- pidgin/gtkprefs.c	35c88c44bfa05654a5c8359cadcf1ef0c03f0e54
+++ pidgin/gtkprefs.c	715b951ca1f1e1b84f361645984857d66a74b0ae
@@ -1107,7 +1107,10 @@ prefs_set_conv_variant_cb(GtkComboBox *c
 
 	if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(prefs_conv_themes_combo_box), &iter)) {
 		gtk_tree_model_get(GTK_TREE_MODEL(prefs_conv_themes), &iter, 2, &name, -1);
-		theme = PIDGIN_CONV_THEME(purple_theme_manager_find_theme(name, "conversation"));
+		if (name && *name)
+			theme = PIDGIN_CONV_THEME(purple_theme_manager_find_theme(name, "conversation"));
+		else
+			theme = PIDGIN_CONV_THEME(pidgin_conversations_get_default_theme());
 		g_free(name);
 
 		if (gtk_combo_box_get_active_iter(combo_box, &iter)) {
@@ -1126,6 +1129,10 @@ prefs_set_conv_theme_cb(GtkComboBox *com
 
 	if (gtk_combo_box_get_active_iter(combo_box, &iter)) {
 		gchar *name = NULL;
+		PidginConvTheme *theme;
+		const char *current_variant;
+		const GList *variants;
+		gboolean unset = TRUE;
 
 		gtk_tree_model_get(GTK_TREE_MODEL(prefs_conv_themes), &iter, 2, &name, -1);
 
@@ -1137,29 +1144,26 @@ prefs_set_conv_theme_cb(GtkComboBox *com
 		/* Update list of variants */
 		gtk_list_store_clear(prefs_conv_variants);
 
-		if (name && *name) {
-			PidginConvTheme *theme;
-			const char *current_variant;
-			const GList *variants;
-			gboolean unset = TRUE;
+		if (name && *name)
+			theme = PIDGIN_CONV_THEME(purple_theme_manager_find_theme(name, "conversation"));
+		else
+			theme = PIDGIN_CONV_THEME(pidgin_conversations_get_default_theme());
 
-			theme = PIDGIN_CONV_THEME(purple_theme_manager_find_theme(name, "conversation"));
-			current_variant = pidgin_conversation_theme_get_variant(theme);
+		current_variant = pidgin_conversation_theme_get_variant(theme);
 
-			variants = pidgin_conversation_theme_get_variants(theme);
-			for (; variants && current_variant; variants = g_list_next(variants)) {
-				gtk_list_store_append(prefs_conv_variants, &iter);
-				gtk_list_store_set(prefs_conv_variants, &iter, 0, variants->data, -1);
+		variants = pidgin_conversation_theme_get_variants(theme);
+		for (; variants && current_variant; variants = g_list_next(variants)) {
+			gtk_list_store_append(prefs_conv_variants, &iter);
+			gtk_list_store_set(prefs_conv_variants, &iter, 0, variants->data, -1);
 	
-				if (g_str_equal(variants->data, current_variant)) {
-					gtk_combo_box_set_active_iter(GTK_COMBO_BOX(prefs_conv_variants_combo_box), &iter);
-					unset = FALSE;
-				}
+			if (g_str_equal(variants->data, current_variant)) {
+				gtk_combo_box_set_active_iter(GTK_COMBO_BOX(prefs_conv_variants_combo_box), &iter);
+				unset = FALSE;
 			}
+		}
 
-			if (unset)
-				gtk_combo_box_set_active(GTK_COMBO_BOX(prefs_conv_variants_combo_box), 0);
-		}
+		if (unset)
+			gtk_combo_box_set_active(GTK_COMBO_BOX(prefs_conv_variants_combo_box), 0);
 
 		g_signal_handlers_unblock_by_func(prefs_conv_variants_combo_box,
 		                                  prefs_set_conv_variant_cb, NULL);
============================================================
--- pidgin/themes/Makefile.am	86fd3035fe86267484d2903877fc07fa8343e0ea
+++ pidgin/themes/Makefile.am	6c3b11ae1f8f2deab38cfe7cb9f41966cd9ef5d4
@@ -8,7 +8,8 @@ themevariantsdir = $(themeresourcesdir)/
                       Contents/Resources/Status.html \
                       Contents/Resources/main.css
 themevariantsdir = $(themeresourcesdir)/Variants
-themevariants_DATA =
+themevariants_DATA = Contents/Resources/Variants/Default.css \
+                     Contents/Resources/Variants/No-Timestamps.css
 
 EXTRA_DIST = \
 	$(themetemplate_DATA) \
============================================================
--- /dev/null	
+++ pidgin/themes/Contents/Resources/Variants/Default.css	625b1e47afce3eceb6e3eee571e769bcd71834fc
@@ -0,0 +1,2 @@
+ at import ../main.css;
+
============================================================
--- /dev/null	
+++ pidgin/themes/Contents/Resources/Variants/No-Timestamps.css	3803ed2d28e3c786163882d555fcff9fdef17231
@@ -0,0 +1,8 @@
+ at import ../main.css;
+
+.x-container .x-time,
+.x-status_container .x-time
+{
+	display: none;
+}
+


More information about the Commits mailing list