changeset 15048:b44d6517e16c

[gaim-migrate @ 17832] Fix "Hide new IM conversations when away" to update the conv that gets show when you return. This makes the conv tab title, the "hidden" prpl icon overlay and the "hidden" blist indicator all update correctly. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 28 Nov 2006 00:15:31 +0000
parents 7ac8259f355d
children d0f5147753dd
files gtk/gtkblist.c gtk/gtkconv.c
diffstat 2 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkblist.c	Mon Nov 27 22:34:46 2006 +0000
+++ b/gtk/gtkblist.c	Tue Nov 28 00:15:31 2006 +0000
@@ -3424,17 +3424,18 @@
 	static GtkWidget *menu = NULL;
 	GList *convs = NULL;
 
-	if (menu)
+	if (menu) {
 		gtk_widget_destroy(menu);
-
-	menu = gtk_menu_new();
+		menu = NULL;
+	}
 
 	convs = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, GAIM_UNSEEN_TEXT, TRUE, 0);
-	if (!convs) {
+	if (!convs)
 		/* no conversations added, don't show the menu */
-		gtk_widget_destroy(menu);
 		return;
-	}
+
+	menu = gtk_menu_new();
+
 	gaim_gtk_conversations_fill_menu(menu, convs);
 	g_list_free(convs);
 	gtk_widget_show_all(menu);
--- a/gtk/gtkconv.c	Mon Nov 27 22:34:46 2006 +0000
+++ b/gtk/gtkconv.c	Tue Nov 28 00:15:31 2006 +0000
@@ -74,9 +74,9 @@
 {
 	GAIM_GTKCONV_SET_TITLE 			= 1 << 0,
 	GAIM_GTKCONV_BUDDY_ICON			= 1 << 1,
-	GAIM_GTKCONV_MENU				= 1 << 2,
+	GAIM_GTKCONV_MENU			= 1 << 2,
 	GAIM_GTKCONV_TAB_ICON			= 1 << 3,
-	GAIM_GTKCONV_TOPIC				= 1 << 4,
+	GAIM_GTKCONV_TOPIC			= 1 << 4,
 	GAIM_GTKCONV_SMILEY_THEME		= 1 << 5,
 	GAIM_GTKCONV_COLORIZE_TITLE		= 1 << 6
 }GaimGtkConvFields;
@@ -6356,6 +6356,10 @@
 
 		gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv);
 		gaim_gtkconv_placement_place(gtkconv);
+
+		/* TODO: do we need to do anything for any other conversations that are in the same gtkconv here?
+		 * I'm a little concerned that not doing so will cause the "pending" indicator in the gtkblist not to be cleared. -DAA*/
+		gaim_conversation_update(conv, GAIM_CONV_UPDATE_UNSEEN);
 	}
 }
 
@@ -7180,7 +7184,7 @@
 
 		if (tab_clicked == -1)
 			return FALSE;
-		
+
 		gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(win, tab_clicked);
 		close_conv_cb(NULL, gtkconv);
 		return TRUE;