# HG changeset patch # User Mark Doliner # Date 1075262958 0 # Node ID 4c34db6996d195efe1e906868dc019edb047d871 # Parent 62936f62d98e55a8bf09120530d14da2417296d2 [gaim-migrate @ 8888] On the disconnected dialog, hide the "remove" button if we only have notification of 1 disconnected account, and that account has been reconnected. committer: Tailor Script diff -r 62936f62d98e -r 4c34db6996d1 src/gtkconn.c --- a/src/gtkconn.c Wed Jan 28 03:32:39 2004 +0000 +++ b/src/gtkconn.c Wed Jan 28 04:09:18 2004 +0000 @@ -353,13 +353,19 @@ /* * Update the Reconnect/Remove button appropriately and set the - * label in the dialog to what it should be. + * label in the dialog to what it should be. If there is only + * one account in the tree model, and that account is connected, + * then we don't show the remove button. */ gtk_tree_model_get(model, &iter, 3, &label_text, 4, &account, -1); gtk_button_set_label(GTK_BUTTON(disconnect_window->reconnect_btn), gaim_account_is_connected(account) ? _("_Remove") : _("_Reconnect")); gtk_label_set_markup(GTK_LABEL(disconnect_window->label), label_text); gtk_dialog_set_response_sensitive(GTK_DIALOG(disconnect_window->window), GTK_RESPONSE_ACCEPT, TRUE); + if (gaim_account_is_connected(account) && !(gtk_tree_model_iter_next(model, &iter))) + gtk_widget_hide(disconnect_window->reconnect_btn); + else + gtk_widget_show(disconnect_window->reconnect_btn); } static void disconnect_response_cb(GtkDialog *dialog, gint id, GtkWidget *widget)