pidgin: 607e111e: Fix some boring asserts when using the D...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Mar 3 22:55:50 EST 2012
----------------------------------------------------------------------
Revision: 607e111e6c0089eb2b27a1046427c3688ee4424b
Parent: 5d8d63e7d68aa0789528e7f8de1304998ef0f670
Author: qulogic at pidgin.im
Date: 03/03/12 22:49:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/607e111e6c0089eb2b27a1046427c3688ee4424b
Changelog:
Fix some boring asserts when using the Default conversation theme.
Changes against parent 5d8d63e7d68aa0789528e7f8de1304998ef0f670
patched pidgin/gtkconv.c
patched pidgin/gtkprefs.c
-------------- next part --------------
============================================================
--- pidgin/gtkconv.c 36e46362b0fd6d2e5dfe87ed97abc26f42ee68ef
+++ pidgin/gtkconv.c f775baf0cb5998d792944cf0090b27300d78d40d
@@ -5714,7 +5714,8 @@ private_gtkconv_new(PurpleConversation *
private_gtkconv_new(PurpleConversation *conv, gboolean hidden)
{
PidginConversation *gtkconv;
- PurpleTheme *theme;
+ const char *theme_name;
+ PurpleTheme *theme = NULL;
PurpleConversationType conv_type = purple_conversation_get_type(conv);
GtkWidget *pane = NULL;
GtkWidget *tab_cont;
@@ -5740,7 +5741,9 @@ private_gtkconv_new(PurpleConversation *
#endif
gtkconv->unseen_state = PIDGIN_UNSEEN_NONE;
gtkconv->unseen_count = 0;
- theme = purple_theme_manager_find_theme(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/theme"), "conversation");
+ theme_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/theme");
+ if (theme_name && *theme_name)
+ theme = purple_theme_manager_find_theme(theme_name, "conversation");
if (!theme)
theme = default_conv_theme;
gtkconv->theme = PIDGIN_CONV_THEME(g_object_ref(theme));
============================================================
--- pidgin/gtkprefs.c 1c86cb33387d2eb7c5025075c87d7ff71ad664b3
+++ pidgin/gtkprefs.c 35c88c44bfa05654a5c8359cadcf1ef0c03f0e54
@@ -1097,6 +1097,27 @@ prefs_set_blist_theme_cb(GtkComboBox *co
}
}
+/* sets the current conversation theme variant */
+static void
+prefs_set_conv_variant_cb(GtkComboBox *combo_box, gpointer user_data)
+{
+ PidginConvTheme *theme = NULL;
+ GtkTreeIter iter;
+ gchar *name = NULL;
+
+ 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"));
+ g_free(name);
+
+ if (gtk_combo_box_get_active_iter(combo_box, &iter)) {
+ gtk_tree_model_get(GTK_TREE_MODEL(prefs_conv_variants), &iter, 0, &name, -1);
+ pidgin_conversation_theme_set_variant(theme, name);
+ g_free(name);
+ }
+ }
+}
+
/* sets the current conversation theme */
static void
prefs_set_conv_theme_cb(GtkComboBox *combo_box, gpointer user_data)
@@ -1110,6 +1131,9 @@ prefs_set_conv_theme_cb(GtkComboBox *com
purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/theme", name);
+ g_signal_handlers_block_by_func(prefs_conv_variants_combo_box,
+ prefs_set_conv_variant_cb, NULL);
+
/* Update list of variants */
gtk_list_store_clear(prefs_conv_variants);
@@ -1137,31 +1161,12 @@ prefs_set_conv_theme_cb(GtkComboBox *com
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);
g_free(name);
}
}
-/* sets the current conversation theme variant */
-static void
-prefs_set_conv_variant_cb(GtkComboBox *combo_box, gpointer user_data)
-{
- PidginConvTheme *theme = NULL;
- GtkTreeIter iter;
- gchar *name = NULL;
-
- 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"));
- g_free(name);
-
- if (gtk_combo_box_get_active_iter(combo_box, &iter)) {
- gtk_tree_model_get(GTK_TREE_MODEL(prefs_conv_variants), &iter, 0, &name, -1);
- pidgin_conversation_theme_set_variant(theme, name);
- g_free(name);
- }
- }
-}
-
/* sets the current icon theme */
static void
prefs_set_status_icon_theme_cb(GtkComboBox *combo_box, gpointer user_data)
More information about the Commits
mailing list