pidgin: 74d121b6: gtkconv: Remove the close-timer when a n...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Aug 7 13:16:05 EDT 2009


-----------------------------------------------------------------
Revision: 74d121b6673d769eb89a8ddcab15d8e31cbee94a
Ancestor: 84289cafb705d202e2c87aa0b5b6a00aa796b7f5
Author: darkrain42 at pidgin.im
Date: 2009-08-07T17:11:12
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/74d121b6673d769eb89a8ddcab15d8e31cbee94a

Modified files:
        ChangeLog pidgin/gtkconv.c

ChangeLog: 

gtkconv: Remove the close-timer when a new message comes in. Fixes #8512.

This will happen if I "close" a conversation window (hide it), which
starts the close-timer. A new IM then comes in, which is hidden because
I have "Hide new IM conversations" set to Always (or When away) and then
the timer triggers a few minutes later.

-------------- next part --------------
============================================================
--- ChangeLog	ebce0f432bb93f74558e28da8f1bb14774a524c4
+++ ChangeLog	a5786f9df9c5685f84a863c5a1c6a5059a77bbfd
@@ -182,6 +182,9 @@ version 2.6.0 (??/??/2009):
 	* Fix a crash when closing the New Mail dialog if an account with new
 	  mail was previously disconnected while the dialog was open.
 	* Fix incorrect unread message counts for the new mail notifications.
+	* Do not lose unread messages with a hidden conversation window when
+	  new IM conversations are hidden and "Close IMs immediately when the tab
+	  is closed" is unset.
 
 	Finch:
 	* The hardware cursor is updated correctly. This will be useful
============================================================
--- pidgin/gtkconv.c	b3126c754a927c60dd657fdd73454f8db42861e2
+++ pidgin/gtkconv.c	45e5b9a1288691bad8d9217ef4fab368efb78291
@@ -5437,6 +5437,7 @@ received_im_msg_cb(PurpleAccount *accoun
 {
 	PurpleConversationUiOps *ui_ops = pidgin_conversations_get_conv_ui_ops();
 	gboolean hide = FALSE;
+	guint timer;
 
 	/* create hidden conv if hide_new pref is always */
 	if (strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "always") == 0)
@@ -5460,6 +5461,13 @@ received_im_msg_cb(PurpleAccount *accoun
 		purple_conversation_new(PURPLE_CONV_TYPE_IM, account, sender);
 		ui_ops->create_conversation = pidgin_conv_new;
 	}
+
+	/* Somebody wants to keep this conversation around, so don't time it out */
+	timer = GPOINTER_TO_INT(purple_conversation_get_data(conv, "close-timer"));
+	if (timer) {
+		purple_timeout_remove(timer);
+		purple_conversation_set_data(conv, "close-timer", GINT_TO_POINTER(0));
+	}
 }
 
 static void


More information about the Commits mailing list