pidgin/purple-plugin-pack

1c9869eb9748
Parents 8cdd143d61ee
Children 75a5bd5b20ab
Fix a bug where the infopane plugin would not show the tab for a single
conversation in a window, especially after closing a background tab.
Fixes #430 (or so I think!)
--- a/infopane/infopane.c Sun Aug 03 01:49:15 2008 -0400
+++ b/infopane/infopane.c Sun Aug 03 02:17:43 2008 -0400
@@ -100,18 +100,11 @@
return;
}
-#if 0
-static void setup_callback(PurpleConversation *conv, gboolean (*callback)(gpointer data))
-{
- if (callback(conv))
- g_timeout_add(1000, callback, conv);
-}
-
static void conversation_deleted(PurpleConversation *conv)
{
PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
PidginWindow *win = gtkconv->win;
- if (win->gtkconvs->next) {
+ if (win->gtkconvs->next && !win->gtkconvs->next->next) { /* There are only two tabs in the window */
PidginConversation *p = win->gtkconvs->data;
int id;
if (p == gtkconv)
@@ -121,13 +114,6 @@
G_CALLBACK(g_source_remove), GINT_TO_POINTER(id));
}
}
-#endif
-
-static void
-call_ensure_tabs_are_showing(PurpleConversation *conv)
-{
- g_timeout_add(0, (GSourceFunc)ensure_tabs_are_showing, conv);
-}
static void
pref_changed(gpointer data, ...)
@@ -159,14 +145,12 @@
return FALSE;
}
-#if 0
purple_signal_connect(purple_conversations_get_handle(),
"deleting-conversation",
plugin, PURPLE_CALLBACK(conversation_deleted), NULL);
-#endif
purple_signal_connect(pidgin_conversations_get_handle(),
"conversation-switched",
- plugin, PURPLE_CALLBACK(call_ensure_tabs_are_showing), NULL);
+ plugin, PURPLE_CALLBACK(ensure_tabs_are_showing), NULL);
purple_prefs_connect_callback(plugin, PREF_POSITION, (PurplePrefCallback)pref_changed, NULL);
purple_prefs_connect_callback(plugin, PREF_DRAG, (PurplePrefCallback)pref_changed, NULL);