changeset 27859:30bde00f1909

merge of '3ec6c363917ec3d2ab175d9e68ed1b9b8bb848fa' and '74d121b6673d769eb89a8ddcab15d8e31cbee94a'
author Paul Aurich <paul@darkrain42.org>
date Fri, 07 Aug 2009 17:12:11 +0000
parents c1687897825f (current diff) 6f27b4d8c1c3 (diff)
children da22b6d0151e ecfa71bc216d
files
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Aug 07 11:31:13 2009 +0000
+++ b/ChangeLog	Fri Aug 07 17:12:11 2009 +0000
@@ -182,6 +182,9 @@
 	* 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
--- a/pidgin/gtkconv.c	Fri Aug 07 11:31:13 2009 +0000
+++ b/pidgin/gtkconv.c	Fri Aug 07 17:12:11 2009 +0000
@@ -5437,6 +5437,7 @@
 {
 	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 @@
 		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