# HG changeset patch
# Node ID 88d19bd343f3
# Parent  d19ef491d1aa
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -710,6 +710,7 @@
 		* PALETTE_NUM_COLORS renamed to PIDGIN_PALETTE_NUM_COLORS
 		* pidgin_account_option_menu_* renamed to
 		  pidgin_account_chooser_*
+		* pidgin_conversations_get_unseen_all removed hidden_only parameter.
 		* pidgin_make_mini_dialog renamed to
 		  pidgin_mini_dialog_new_with_buttons; note the argument order
 		  has changed to match pidgin_mini_dialog_new
@@ -721,6 +722,7 @@
 
 		Removed:
 		* conversation-timestamp (gtkconv signal)
+		* conversation-hiding (gtkconv signal)
 		* GtkIMHtml.clipboard_html_string
 		* GtkIMHtml.clipboard_text_string
 		* GtkIMHtmlFontDetail
@@ -777,6 +779,7 @@
 		* PidginConversation.sg
 		* PidginConvPlacementFunc
 		* pidgin_conv_get_tab_icon, use PidginPresenceIcon instead.
+		* pidgin_conv_is_hidden
 		* pidgin_conv_placement_get_name
 		* pidgin_conv_placement_add_fnc
 		* pidgin_conv_placement_remove_fnc
diff --git a/doc/reference/pidgin/signals_gtkconv.xml b/doc/reference/pidgin/signals_gtkconv.xml
--- a/doc/reference/pidgin/signals_gtkconv.xml
+++ b/doc/reference/pidgin/signals_gtkconv.xml
@@ -14,7 +14,6 @@
   &quot;<link linkend="gtkconvs-displaying-chat-msg">displaying-chat-msg</link>&quot;
   &quot;<link linkend="gtkconvs-displayed-chat-msg">displayed-chat-msg</link>&quot;
   &quot;<link linkend="gtkconvs-conversation-switched">conversation-switched</link>&quot;
-  &quot;<link linkend="gtkconvs-conversation-hiding">conversation-hiding</link>&quot;
   &quot;<link linkend="gtkconvs-conversation-displayed">conversation-displayed</link>&quot;
 </synopsis>
 </refsect1>
@@ -248,27 +247,6 @@
   </variablelist>
 </refsect2>
 
-<refsect2 id="gtkconvs-conversation-hiding" role="signal">
- <title>The <literal>&quot;conversation-hiding&quot;</literal> signal</title>
-<programlisting>
-void                user_function                      (PidginConversation *gtkconv,
-                                                        gpointer user_data)
-</programlisting>
-  <para>
-Emitted immediately before an existing conversation is hidden.
-  </para>
-  <variablelist role="params">
-  <varlistentry>
-    <term><parameter>gtkconv</parameter>&#160;:</term>
-    <listitem><simpara>The PidginConversation.</simpara></listitem>
-  </varlistentry>
-  <varlistentry>
-    <term><parameter>user_data</parameter>&#160;:</term>
-    <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem>
-  </varlistentry>
-  </variablelist>
-</refsect2>
-
 <refsect2 id="gtkconvs-conversation-displayed" role="signal">
  <title>The <literal>&quot;conversation-displayed&quot;</literal> signal</title>
 <programlisting>
@@ -276,7 +254,7 @@
                                                         gpointer user_data)
 </programlisting>
   <para>
-Emitted right after the Pidgin UI is attached to a new or a hidden conversation.
+Emitted right after the Pidgin UI is attached to a new conversation.
   </para>
   <variablelist role="params">
   <varlistentry>
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -178,20 +178,12 @@
 static void pidgin_blist_expand_contact_cb(GtkWidget *w, PurpleBlistNode *node);
 static void set_urgent(void);
 
-typedef enum {
-	PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE            =  1 << 0,  /* Whether there's pending message in a conversation */
-	PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK	 =  1 << 1,  /* Whether there's a pending message in a chat that mentions our nick */
-} PidginBlistNodeFlags;
-
 typedef struct {
 	GtkTreeRowReference *row;
 	gboolean contact_expanded;
 	gboolean recent_signonoff;
 	gint recent_signonoff_timer;
-	struct {
-		PurpleConversation *conv;
-		PidginBlistNodeFlags flags;
-	} conv;
+	PurpleConversation *conv;
 } PidginBlistNode;
 
 /***************************************************
@@ -349,22 +341,6 @@
 			gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)));
 }
 
-static PurpleConversation *
-find_conversation_with_buddy(PurpleBuddy *buddy)
-{
-	PurpleConversationManager *manager;
-	PidginBlistNode *ui = g_object_get_data(G_OBJECT(buddy), UI_DATA);
-
-	if(ui) {
-		return ui->conv.conv;
-	}
-
-	manager = purple_conversation_manager_get_default();
-	return purple_conversation_manager_find_im(manager,
-	                                           purple_buddy_get_account(buddy),
-	                                           purple_buddy_get_name(buddy));
-}
-
 static void gtk_blist_join_chat(PurpleChat *chat)
 {
 	PurpleAccount *account;
@@ -3111,8 +3087,8 @@
 			g_free(tmp);
 		}
 
-		if (bnode && bnode->conv.conv) {
-			conv = PURPLE_CHAT_CONVERSATION(bnode->conv.conv);
+		if (bnode && bnode->conv) {
+			conv = PURPLE_CHAT_CONVERSATION(bnode->conv);
 		} else {
 			PurpleConversation *chat_conv;
 			PurpleConversationManager *manager;
@@ -3559,18 +3535,6 @@
 	}
 
 	if(buddy) {
-		PurpleConversation *conv = find_conversation_with_buddy(buddy);
-
-		if(conv != NULL) {
-			PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
-			if (gtkconv == NULL && size == PIDGIN_STATUS_ICON_SMALL) {
-				PidginBlistNode *ui = g_object_get_data(G_OBJECT(buddy), UI_DATA);
-				if (ui == NULL || (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE)) {
-					icon = "message-new";
-				}
-			}
-		}
-
 		if (icon == NULL) { /* The conversation didn't have a new message. */
 			PurplePresence *p = purple_buddy_get_presence(buddy);
 			trans = purple_presence_is_idle(p);
@@ -3620,22 +3584,9 @@
 	PurplePresence *presence;
 	PidginBlistNode *gtkcontactnode = NULL;
 	char *idletime = NULL, *statustext = NULL, *nametext = NULL;
-	PurpleConversation *conv = find_conversation_with_buddy(b);
-	gboolean hidden_conv = FALSE;
 	gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
 	gchar *contact_alias;
 
-	if (conv != NULL) {
-		PidginBlistNode *ui = g_object_get_data(G_OBJECT(b), UI_DATA);
-		if (ui) {
-			if (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE)
-				hidden_conv = TRUE;
-		} else {
-			if (PIDGIN_CONVERSATION(conv) == NULL)
-				hidden_conv = TRUE;
-		}
-	}
-
 	/* XXX Good luck cleaning up this crap */
 	contact = PURPLE_CONTACT(PURPLE_BLIST_NODE(b)->parent);
 	if(contact) {
@@ -3731,12 +3682,6 @@
 		status_color = NULL;
 	}
 
-	if (hidden_conv) {
-		char *tmp = nametext;
-		nametext = g_strdup_printf("<b>%s</b>", tmp);
-		g_free(tmp);
-	}
-
 	/* Put it all together */
 	if ((!aliased || biglist) && (statustext || idletime)) {
 		/* using <span size='smaller'> breaks the status, so it must be seperated into <small><span>*/
@@ -3773,12 +3718,6 @@
 	g_free(idletime);
 	g_free(contact_alias);
 
-	if (hidden_conv) {
-		char *tmp = text;
-		text = g_strdup_printf("<b>%s</b>", tmp);
-		g_free(tmp);
-	}
-
 	return text;
 }
 
@@ -3876,41 +3815,18 @@
 static void
 conversation_deleted_update_ui_cb(PurpleConversation *conv, PidginBlistNode *ui)
 {
-	if (ui->conv.conv != conv)
-		return;
-	ui->conv.conv = NULL;
-	ui->conv.flags = 0;
-}
-
-static void
-written_msg_update_ui_cb(PurpleConversation *conv, PurpleMessage *msg, PurpleBlistNode *node)
-{
-	PidginBlistNode *ui = g_object_get_data(G_OBJECT(node), UI_DATA);
-
-	if (ui->conv.conv != conv)
+	if (ui->conv != conv)
 		return;
-
-	if (!pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv)))
-		return;
-
-	if (!(purple_message_get_flags(msg) & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV)))
-		return;
-
-	ui->conv.flags |= PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE;
-	if (PURPLE_IS_CHAT_CONVERSATION(conv) && (purple_message_get_flags(msg) & PURPLE_MESSAGE_NICK))
-		ui->conv.flags |= PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK;
-
-	pidgin_blist_update(purple_blist_get_default(), node);
+	ui->conv = NULL;
 }
 
 static void
 displayed_msg_update_ui_cb(PidginConversation *gtkconv, PurpleBlistNode *node)
 {
 	PidginBlistNode *ui = g_object_get_data(G_OBJECT(node), UI_DATA);
-	if (ui->conv.conv != gtkconv->active_conv)
+	if (ui->conv != gtkconv->active_conv)
 		return;
-	ui->conv.flags &= ~(PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE |
-	                    PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK);
+
 	pidgin_blist_update(purple_blist_get_default(), node);
 }
 
@@ -3927,12 +3843,10 @@
 			buddies = g_slist_delete_link(buddies, buddies);
 			if (!ui)
 				continue;
-			ui->conv.conv = conv;
-			ui->conv.flags = 0;
+			ui->conv = conv;
+
 			purple_signal_connect(purple_conversations_get_handle(), "deleting-conversation",
 					ui, PURPLE_CALLBACK(conversation_deleted_update_ui_cb), ui);
-			purple_signal_connect(purple_conversations_get_handle(), "wrote-im-msg",
-					ui, PURPLE_CALLBACK(written_msg_update_ui_cb), buddy);
 			purple_signal_connect(pidgin_conversations_get_handle(), "conversation-displayed",
 					ui, PURPLE_CALLBACK(displayed_msg_update_ui_cb), buddy);
 		}
@@ -3944,12 +3858,10 @@
 		ui = g_object_get_data(G_OBJECT(chat), UI_DATA);
 		if (!ui)
 			return;
-		ui->conv.conv = conv;
-		ui->conv.flags = 0;
+		ui->conv = conv;
+
 		purple_signal_connect(purple_conversations_get_handle(), "deleting-conversation",
 				ui, PURPLE_CALLBACK(conversation_deleted_update_ui_cb), ui);
-		purple_signal_connect(purple_conversations_get_handle(), "wrote-chat-msg",
-				ui, PURPLE_CALLBACK(written_msg_update_ui_cb), chat);
 		purple_signal_connect(pidgin_conversations_get_handle(), "conversation-displayed",
 				ui, PURPLE_CALLBACK(displayed_msg_update_ui_cb), chat);
 	}
@@ -5662,22 +5574,12 @@
 		gchar *mark, *tmp;
 		gboolean showicons = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
 		gboolean biglist = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons");
-		PidginBlistNode *ui;
-		PurpleConversation *conv;
-		gboolean hidden = FALSE;
 		gboolean selected = (gtkblist->selected_node == node);
 		gboolean nick_said = FALSE;
 
 		if (!insert_node(list, node, &iter))
 			return;
 
-		ui = g_object_get_data(G_OBJECT(node), UI_DATA);
-		conv = ui->conv.conv;
-		if (conv && pidgin_conv_is_hidden(PIDGIN_CONVERSATION(conv))) {
-			hidden = (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE);
-			nick_said = (ui->conv.flags & PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK);
-		}
-
 		status = pidgin_blist_get_status_icon(node,
 				 biglist ? PIDGIN_STATUS_ICON_LARGE : PIDGIN_STATUS_ICON_SMALL);
 		emblem = pidgin_blist_get_emblem(node);
@@ -5696,11 +5598,9 @@
 		}
 
 		if(color) {
-			tmp = g_strdup_printf("<span color='%s' weight='%s'>%s</span>",
-			                      color, hidden ? "bold" : "normal", mark);
+			tmp = g_strdup_printf("<span color='%s'>%s</span>", color, mark);
 		} else {
-			tmp = g_strdup_printf("<span weight='%s'>%s</span>",
-			                      hidden ? "bold" : "normal", mark);
+			tmp = g_strdup_printf("%s", mark);
 		}
 		g_free(mark);
 		mark = tmp;
diff --git a/pidgin/gtkconv.h b/pidgin/gtkconv.h
--- a/pidgin/gtkconv.h
+++ b/pidgin/gtkconv.h
@@ -166,7 +166,6 @@
 /**
  * pidgin_conversations_get_unseen_all:
  * @min_state:    The minimum unseen state.
- * @hidden_only:  If %TRUE, only consider hidden conversations.
  * @max_count:    Maximum number of conversations to return, or 0 for
  *                no maximum.
  *
@@ -180,9 +179,7 @@
  * Returns: (transfer container) (element-type PurpleConversation): List of PurpleConversation matching criteria, or %NULL.
  */
 GList *
-pidgin_conversations_get_unseen_all(PidginUnseenState min_state,
-										gboolean hidden_only,
-										guint max_count);
+pidgin_conversations_get_unseen_all(PidginUnseenState min_state, guint max_count);
 
 /**
  * pidgin_conversations_fill_menu:
@@ -244,14 +241,6 @@
  */
 int pidgin_conv_get_tab_at_xy(PidginConvWindow *win, int x, int y, gboolean *to_right);
 
-/**
- * pidgin_conv_is_hidden:
- * @gtkconv: The GTK+ conversation.
- *
- * Returns: %TRUE if the conversation is hidden, %FALSE otherwise.
- */
-gboolean pidgin_conv_is_hidden(PidginConversation *gtkconv);
-
 /**************************************************************************/
 /* GTK+ Conversations Subsystem                                           */
 /**************************************************************************/
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -132,7 +132,6 @@
 static GtkWidget *invite_dialog = NULL;
 static GtkWidget *warn_close_dialog = NULL;
 
-static PidginConvWindow *hidden_convwin = NULL;
 static GList *window_list = NULL;
 
 /* Lists of status icons at all available sizes for use as window icons */
@@ -158,7 +157,6 @@
 static void pidgin_conv_update_fields(PurpleConversation *conv, PidginConvFields fields);
 static void focus_out_from_menubar(GtkWidget *wid, PidginConvWindow *win);
 static void pidgin_conv_tab_pack(PidginConvWindow *win, PidginConversation *gtkconv);
-static void hide_conv(PidginConversation *gtkconv, gboolean closetimer);
 
 static void pidgin_conv_set_position_size(PidginConvWindow *win, int x, int y,
 		int width, int height);
@@ -202,21 +200,9 @@
 	 * For chats, close immediately if the chat is not in the buddylist, or if the chat is
 	 * not marked 'Persistent' */
 	PurpleConversation *conv = gtkconv->active_conv;
-	PurpleAccount *account = purple_conversation_get_account(conv);
-	const char *name = purple_conversation_get_name(conv);
-
-	if (PURPLE_IS_IM_CONVERSATION(conv)) {
-		if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/close_immediately"))
-			close_this_sucker(gtkconv);
-		else
-			hide_conv(gtkconv, TRUE);
-	} else if (PURPLE_IS_CHAT_CONVERSATION(conv)) {
-		PurpleChat *chat = purple_blist_find_chat(account, name);
-		if (!chat ||
-				!purple_blist_node_get_bool(&chat->node, "gtk-persistent"))
-			close_this_sucker(gtkconv);
-		else
-			hide_conv(gtkconv, FALSE);
+
+	if(PURPLE_IS_IM_CONVERSATION(conv) || PURPLE_IS_CHAT_CONVERSATION(conv)) {
+		close_this_sucker(gtkconv);
 	}
 
 	return TRUE;
@@ -797,35 +783,6 @@
 	add_remove_cb(NULL, PIDGIN_CONVERSATION(conv));
 }
 
-static gboolean
-close_already(gpointer data)
-{
-	g_object_unref(data);
-	return FALSE;
-}
-
-static void
-hide_conv(PidginConversation *gtkconv, gboolean closetimer)
-{
-	GList *list;
-
-	purple_signal_emit(pidgin_conversations_get_handle(),
-			"conversation-hiding", gtkconv);
-
-	for (list = g_list_copy(gtkconv->convs); list; list = g_list_delete_link(list, list)) {
-		PurpleConversation *conv = list->data;
-		if (closetimer) {
-			guint timer = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(conv), "close-timer"));
-			if (timer)
-				g_source_remove(timer);
-			timer = g_timeout_add_seconds(CLOSE_CONV_TIMEOUT_SECS, close_already, conv);
-			g_object_set_data(G_OBJECT(conv), "close-timer", GINT_TO_POINTER(timer));
-		}
-		pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv);
-		pidgin_conv_window_add_gtkconv(hidden_convwin, gtkconv);
-	}
-}
-
 static void
 menu_close_conv_cb(GtkAction *action, gpointer data)
 {
@@ -1582,7 +1539,6 @@
 static GList *
 pidgin_conversations_get_unseen(GList *l,
 									PidginUnseenState min_state,
-									gboolean hidden_only,
 									guint max_count)
 {
 	GList *r = NULL;
@@ -1592,12 +1548,11 @@
 		PurpleConversation *conv = (PurpleConversation*)l->data;
 		PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
 
-		if(gtkconv == NULL || gtkconv->active_conv != conv)
+		if(gtkconv == NULL || gtkconv->active_conv != conv) {
 			continue;
-
-		if (gtkconv->unseen_state >= min_state &&
-		    (!hidden_only || gtkconv->win == hidden_convwin)) {
-
+		}
+
+		if (gtkconv->unseen_state >= min_state) {
 			r = g_list_prepend(r, conv);
 			c++;
 		}
@@ -1608,8 +1563,7 @@
 
 GList *
 pidgin_conversations_get_unseen_all(PidginUnseenState min_state,
-										gboolean hidden_only,
-										guint max_count)
+                                    guint max_count)
 {
 	PurpleConversationManager *manager;
 	GList *list, *ret = NULL;
@@ -1617,8 +1571,7 @@
 	manager = purple_conversation_manager_get_default();
 	list = purple_conversation_manager_get_all(manager);
 
-	ret = pidgin_conversations_get_unseen(list, min_state, hidden_only,
-	                                      max_count);
+	ret = pidgin_conversations_get_unseen(list, min_state, max_count);
 	g_list_free(list);
 
 	return ret;
@@ -2003,8 +1956,9 @@
 	PurpleConversation *conv;
 	GtkWidget *item;
 
-	if (win->window == NULL || win == hidden_convwin)
+	if (win->window == NULL) {
 		return;
+	}
 
 	gtkconv = pidgin_conv_window_get_active_gtkconv(win);
 	if (gtkconv == NULL)
@@ -3239,16 +3193,7 @@
 	                         G_CALLBACK(gtk_widget_grab_focus),
 	                         gtkconv->editor);
 
-	if (hidden)
-		pidgin_conv_window_add_gtkconv(hidden_convwin, gtkconv);
-	else
-		pidgin_conv_placement_place(gtkconv);
-}
-
-static void
-pidgin_conv_new_hidden(PurpleConversation *conv)
-{
-	private_gtkconv_new(conv, TRUE);
+	pidgin_conv_placement_place(gtkconv);
 }
 
 void
@@ -3264,33 +3209,8 @@
 received_im_msg_cb(PurpleAccount *account, char *sender, char *message,
 				   PurpleConversation *conv, PurpleMessageFlags flags)
 {
-	PurpleConversationUiOps *ui_ops = pidgin_conversations_get_conv_ui_ops();
-	gboolean hide = FALSE;
 	guint timer;
 
-	/* create hidden conv if hide_new pref is always */
-	if (purple_strequal(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "always"))
-		hide = TRUE;
-
-	/* create hidden conv if hide_new pref is away and account is away */
-	if (purple_strequal(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away") &&
-	    !purple_status_is_available(purple_account_get_active_status(account)))
-		hide = TRUE;
-
-	if (conv && PIDGIN_IS_PIDGIN_CONVERSATION(conv) && !hide) {
-		PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
-		if (gtkconv->win == hidden_convwin) {
-			pidgin_conv_attach_to_conversation(gtkconv->active_conv);
-		}
-		return;
-	}
-
-	if (hide) {
-		ui_ops->create_conversation = pidgin_conv_new_hidden;
-		purple_im_conversation_new(account, sender);
-		ui_ops->create_conversation = pidgin_conv_new;
-	}
-
 	/* Somebody wants to keep this conversation around, so don't time it out */
 	if (conv) {
 		timer = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(conv), "close-timer"));
@@ -4034,7 +3954,7 @@
 {
 	PidginConversation *gtkconv = conv ? PIDGIN_CONVERSATION(conv) : NULL;
 	PurpleMessageFlags flags;
-	if (conv == NULL || (gtkconv && gtkconv->win != hidden_convwin))
+	if (conv == NULL)
 		return;
 	flags = purple_message_get_flags(msg);
 	if (flags & (PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_RECV)) {
@@ -4265,74 +4185,6 @@
 	}
 }
 
-static void
-account_status_changed_cb(PurpleAccount *account, PurpleStatus *oldstatus,
-                          PurpleStatus *newstatus)
-{
-	GList *l;
-	PurpleConversation *conv = NULL;
-	PidginConversation *gtkconv;
-
-	if(!purple_strequal(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away"))
-		return;
-
-	if(purple_status_is_available(oldstatus) || !purple_status_is_available(newstatus))
-		return;
-
-	for (l = hidden_convwin->gtkconvs; l; ) {
-		gtkconv = l->data;
-		l = l->next;
-
-		conv = gtkconv->active_conv;
-		if (PURPLE_IS_CHAT_CONVERSATION(conv) ||
-				account != purple_conversation_get_account(conv))
-			continue;
-
-		pidgin_conv_attach_to_conversation(conv);
-
-		/* 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*/
-		purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_UNSEEN);
-	}
-}
-
-static void
-hide_new_pref_cb(const char *name, PurplePrefType type,
-				 gconstpointer value, gpointer data)
-{
-	GList *l;
-	PurpleConversation *conv = NULL;
-	PidginConversation *gtkconv;
-	gboolean when_away = FALSE;
-
-	if(!hidden_convwin)
-		return;
-
-	if(purple_strequal(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "always"))
-		return;
-
-	if(purple_strequal(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away"))
-		when_away = TRUE;
-
-	for (l = hidden_convwin->gtkconvs; l; )
-	{
-		gtkconv = l->data;
-		l = l->next;
-
-		conv = gtkconv->active_conv;
-
-		if (PURPLE_IS_CHAT_CONVERSATION(conv) ||
-				gtkconv->unseen_count == 0 ||
-				(when_away && !purple_status_is_available(
-							purple_account_get_active_status(
-							purple_conversation_get_account(conv)))))
-			continue;
-
-		pidgin_conv_attach_to_conversation(conv);
-	}
-}
-
-
 static PidginConversation *
 get_gtkconv_with_contact(PurpleContact *contact)
 {
@@ -4652,23 +4504,6 @@
 	GList *list;
 	PidginConversation *gtkconv;
 
-	if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) {
-		/* This is pretty much always the case now. */
-		gtkconv = PIDGIN_CONVERSATION(conv);
-		if (gtkconv->win != hidden_convwin)
-			return FALSE;
-		pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv);
-		pidgin_conv_placement_place(gtkconv);
-		purple_signal_emit(pidgin_conversations_get_handle(),
-				"conversation-displayed", gtkconv);
-		list = gtkconv->convs;
-		while (list) {
-			pidgin_conv_attach(list->data);
-			list = list->next;
-		}
-		return TRUE;
-	}
-
 	pidgin_conv_attach(conv);
 	gtkconv = PIDGIN_CONVERSATION(conv);
 
@@ -4784,9 +4619,6 @@
 
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height", 54);
 
-	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "never");
-	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/im/close_immediately", TRUE);
-
 #ifdef _WIN32
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/win32");
 	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/win32/minimize_new_convs", FALSE);
@@ -4800,10 +4632,6 @@
 	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/tab_side",
 								tab_side_pref_cb, NULL);
 
-	/* IM callbacks */
-	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/im/hide_new",
-								hide_new_pref_cb, NULL);
-
 	/**********************************************************************
 	 * Register signals
 	 **********************************************************************/
@@ -4832,10 +4660,6 @@
 						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
 						 PURPLE_TYPE_CONVERSATION);
 
-	purple_signal_register(handle, "conversation-hiding",
-						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
-						 G_TYPE_POINTER); /* (PidginConversation *) */
-
 	purple_signal_register(handle, "conversation-displayed",
 						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
 						 G_TYPE_POINTER); /* (PidginConversation *) */
@@ -4878,12 +4702,6 @@
 
 	purple_conversations_set_ui_ops(&conversation_ui_ops);
 
-	hidden_convwin = pidgin_conv_window_new();
-	window_list = g_list_remove(window_list, hidden_convwin);
-
-	purple_signal_connect(purple_accounts_get_handle(), "account-status-changed",
-						handle, PURPLE_CALLBACK(account_status_changed_cb), NULL);
-
 	/* Callbacks to update a conversation */
 	purple_signal_connect(blist_handle, "blist-node-added", handle,
 						G_CALLBACK(buddy_update_cb), NULL);
@@ -5531,10 +5349,7 @@
 
 	g_return_if_fail(conv != NULL);
 
-	/* clear unseen flag if conversation is not hidden */
-	if(!pidgin_conv_is_hidden(gtkconv)) {
-		gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
-	}
+	gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
 
 	/* Update the menubar */
 
@@ -6058,11 +5873,13 @@
 	g_signal_handlers_disconnect_matched(win->window, G_SIGNAL_MATCH_DATA,
 			0, 0, NULL, NULL, gtkconv);
 
-	if (win->gtkconvs && win->gtkconvs->next == NULL)
+	if (win->gtkconvs && win->gtkconvs->next == NULL) {
 		pidgin_conv_tab_pack(win, win->gtkconvs->data);
-
-	if (!win->gtkconvs && win != hidden_convwin)
+	}
+
+	if (!win->gtkconvs) {
 		pidgin_conv_window_destroy(win);
+	}
 }
 
 PidginConversation *
@@ -6153,14 +5970,6 @@
 	return g_list_length(win->gtkconvs);
 }
 
-gboolean
-pidgin_conv_is_hidden(PidginConversation *gtkconv)
-{
-	g_return_val_if_fail(gtkconv != NULL, FALSE);
-
-	return (gtkconv->win == hidden_convwin);
-}
-
 void
 pidgin_conv_placement_place(PidginConversation *conv) {
        PidginConvWindow *win;
diff --git a/pidgin/prefs/pidginprefs.c b/pidgin/prefs/pidginprefs.c
--- a/pidgin/prefs/pidginprefs.c
+++ b/pidgin/prefs/pidginprefs.c
@@ -97,9 +97,6 @@
 	/* Interface page */
 	struct {
 		struct {
-			PidginPrefCombo hide_new;
-		} im;
-		struct {
 			GtkWidget *minimize_new_convs;
 		} win32;
 		struct {
@@ -115,7 +112,6 @@
 		PidginPrefCombo notification_chat;
 		GtkWidget *show_incoming_formatting;
 		struct {
-			GtkWidget *close_immediately;
 			GtkWidget *send_typing;
 		} im;
 		GtkWidget *use_smooth_scrolling;
@@ -1329,11 +1325,6 @@
 static void
 bind_interface_page(PidginPrefsWindow *win)
 {
-	/* System Tray */
-	win->iface.im.hide_new.type = PURPLE_PREF_STRING;
-	win->iface.im.hide_new.key = PIDGIN_PREFS_ROOT "/conversations/im/hide_new";
-	pidgin_prefs_bind_dropdown(&win->iface.im.hide_new);
-
 #ifdef _WIN32
 	pidgin_prefs_bind_checkbox(PIDGIN_PREFS_ROOT "/win32/minimize_new_convs",
 			win->iface.win32.minimize_new_convs);
@@ -1399,8 +1390,6 @@
 
 	pidgin_prefs_bind_checkbox(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting",
 			win->conversations.show_incoming_formatting);
-	pidgin_prefs_bind_checkbox(PIDGIN_PREFS_ROOT "/conversations/im/close_immediately",
-			win->conversations.im.close_immediately);
 
 	pidgin_prefs_bind_checkbox("/purple/conversations/im/send_typing",
 			win->conversations.im.send_typing);
@@ -2336,9 +2325,6 @@
 	/* Interface page */
 	gtk_widget_class_bind_template_child(
 			widget_class, PidginPrefsWindow,
-			iface.im.hide_new.combo);
-	gtk_widget_class_bind_template_child(
-			widget_class, PidginPrefsWindow,
 			iface.win32.minimize_new_convs);
 	gtk_widget_class_bind_template_child(
 			widget_class, PidginPrefsWindow,
@@ -2362,9 +2348,6 @@
 			conversations.show_incoming_formatting);
 	gtk_widget_class_bind_template_child(
 			widget_class, PidginPrefsWindow,
-			conversations.im.close_immediately);
-	gtk_widget_class_bind_template_child(
-			widget_class, PidginPrefsWindow,
 			conversations.im.send_typing);
 	gtk_widget_class_bind_template_child(
 			widget_class, PidginPrefsWindow,
@@ -2670,17 +2653,6 @@
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/theme");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound");
 
-	/* Convert old queuing prefs to hide_new 3-way pref. */
-	if (purple_prefs_exists("/plugins/gtk/docklet/queue_messages") &&
-	    purple_prefs_get_bool("/plugins/gtk/docklet/queue_messages"))
-	{
-		purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "always");
-	}
-	else if (purple_prefs_exists(PIDGIN_PREFS_ROOT "/away/queue_messages") &&
-	         purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/away/queue_messages"))
-	{
-		purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "away");
-	}
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/away/queue_messages");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/away");
 	purple_prefs_remove("/plugins/gtk/docklet/queue_messages");
diff --git a/pidgin/resources/Prefs/prefs.ui b/pidgin/resources/Prefs/prefs.ui
--- a/pidgin/resources/Prefs/prefs.ui
+++ b/pidgin/resources/Prefs/prefs.ui
@@ -348,50 +348,6 @@
                                 <property name="orientation">vertical</property>
                                 <property name="spacing">6</property>
                                 <child>
-                                  <object class="GtkBox">
-                                    <property name="visible">True</property>
-                                    <property name="can-focus">False</property>
-                                    <property name="spacing">6</property>
-                                    <child>
-                                      <object class="GtkLabel" id="label2">
-                                        <property name="visible">True</property>
-                                        <property name="can-focus">False</property>
-                                        <property name="label" translatable="yes">_Hide new IM conversations:</property>
-                                        <property name="use-underline">True</property>
-                                        <property name="xalign">0</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkComboBox" id="iface.im.hide_new.combo">
-                                        <property name="visible">True</property>
-                                        <property name="can-focus">False</property>
-                                        <property name="model">iface.im.hide_new.store</property>
-                                        <child>
-                                          <object class="GtkCellRendererText"/>
-                                          <attributes>
-                                            <attribute name="text">0</attribute>
-                                          </attributes>
-                                        </child>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
                                   <object class="GtkCheckButton" id="iface.win32.minimize_new_convs">
                                     <property name="label" translatable="yes">Minimi_ze new conversation windows</property>
                                     <property name="visible">True</property>
@@ -403,7 +359,7 @@
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
-                                    <property name="position">1</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                               </object>
@@ -642,20 +598,6 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkCheckButton" id="conversations.im.close_immediately">
-                                    <property name="label" translatable="yes">Close IMs immediately when the tab is closed</property>
-                                    <property name="visible">True</property>
-                                    <property name="can-focus">True</property>
-                                    <property name="receives-default">False</property>
-                                    <property name="draw-indicator">True</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">True</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                                <child>
                                   <object class="GtkCheckButton" id="conversations.im.send_typing">
                                     <property name="label" translatable="yes">_Notify buddies that you are typing to them</property>
                                     <property name="visible">True</property>
@@ -667,7 +609,7 @@
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
-                                    <property name="position">3</property>
+                                    <property name="position">2</property>
                                   </packing>
                                 </child>
                                 <child>
@@ -681,7 +623,7 @@
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
-                                    <property name="position">4</property>
+                                    <property name="position">3</property>
                                   </packing>
                                 </child>
                                 <child>
@@ -696,7 +638,7 @@
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
-                                    <property name="position">5</property>
+                                    <property name="position">4</property>
                                   </packing>
                                 </child>
                                 <child>
@@ -734,7 +676,7 @@
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">True</property>
-                                    <property name="position">6</property>
+                                    <property name="position">5</property>
                                   </packing>
                                 </child>
                               </object>
