# HG changeset patch # User Sadrul Habib Chowdhury # Date 1195760090 0 # Node ID 85fc97ffe5388adbabe36b425a818db22ea5357c # Parent 4ddc6e16c3edff7c9355fc271483452831bc9b7e Workarounds to fix some issues with the minidialog and scrollbook. diff -r 4ddc6e16c3ed -r 85fc97ffe538 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Thu Nov 22 19:09:32 2007 +0000 +++ b/pidgin/gtkblist.c Thu Nov 22 19:34:50 2007 +0000 @@ -4441,8 +4441,12 @@ PurpleAccount *account) { GList *l = NULL; - GList *children = gtk_container_get_children(container); + GList *children = NULL; GtkWidget *ret = NULL; + /* XXX: Workaround for the currently incomplete implementation of PidginScrollBook */ + if (PIDGIN_IS_SCROLL_BOOK(container)) + container = PIDGIN_SCROLL_BOOK(container)->notebook; + children = gtk_container_get_children(container); l = g_list_find_custom(children, account, (GCompareFunc) find_account_widget); if (l) ret = GTK_WIDGET(l->data); @@ -4456,7 +4460,6 @@ { GtkWidget *widget = find_child_widget_by_account(container, account); if(widget) { - gtk_container_remove(container, widget); gtk_widget_destroy(widget); } } @@ -4620,7 +4623,7 @@ if(priv->signed_on_elsewhere) return; - + mini_dialog = priv->signed_on_elsewhere = pidgin_mini_dialog_new(NULL, NULL, PIDGIN_STOCK_DISCONNECT); @@ -4649,6 +4652,10 @@ return; accounts = pidgin_mini_dialog_get_num_children(mini_dialog); + if (accounts == 0) { + gtk_widget_destroy(GTK_WIDGET(mini_dialog)); + return; + } title = g_strdup_printf( ngettext("%d account was disabled because you signed on from another location.",