comparison pidgin/gtkconv.c @ 32737:2efee7ca90be

Fix some boring asserts when using the Default conversation theme.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 04 Mar 2012 03:49:49 +0000
parents 01741f87cc1e
children b37309823450
comparison
equal deleted inserted replaced
32736:cc361e897c41 32737:2efee7ca90be
5712 **************************************************************************/ 5712 **************************************************************************/
5713 static void 5713 static void
5714 private_gtkconv_new(PurpleConversation *conv, gboolean hidden) 5714 private_gtkconv_new(PurpleConversation *conv, gboolean hidden)
5715 { 5715 {
5716 PidginConversation *gtkconv; 5716 PidginConversation *gtkconv;
5717 PurpleTheme *theme; 5717 const char *theme_name;
5718 PurpleTheme *theme = NULL;
5718 PurpleConversationType conv_type = purple_conversation_get_type(conv); 5719 PurpleConversationType conv_type = purple_conversation_get_type(conv);
5719 GtkWidget *pane = NULL; 5720 GtkWidget *pane = NULL;
5720 GtkWidget *tab_cont; 5721 GtkWidget *tab_cont;
5721 PurpleBlistNode *convnode; 5722 PurpleBlistNode *convnode;
5722 5723
5738 #if !GTK_CHECK_VERSION(2,12,0) 5739 #if !GTK_CHECK_VERSION(2,12,0)
5739 gtkconv->tooltips = gtk_tooltips_new(); 5740 gtkconv->tooltips = gtk_tooltips_new();
5740 #endif 5741 #endif
5741 gtkconv->unseen_state = PIDGIN_UNSEEN_NONE; 5742 gtkconv->unseen_state = PIDGIN_UNSEEN_NONE;
5742 gtkconv->unseen_count = 0; 5743 gtkconv->unseen_count = 0;
5743 theme = purple_theme_manager_find_theme(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/theme"), "conversation"); 5744 theme_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/theme");
5745 if (theme_name && *theme_name)
5746 theme = purple_theme_manager_find_theme(theme_name, "conversation");
5744 if (!theme) 5747 if (!theme)
5745 theme = default_conv_theme; 5748 theme = default_conv_theme;
5746 gtkconv->theme = PIDGIN_CONV_THEME(g_object_ref(theme)); 5749 gtkconv->theme = PIDGIN_CONV_THEME(g_object_ref(theme));
5747 gtkconv->last_flags = 0; 5750 gtkconv->last_flags = 0;
5748 5751