changeset 8174:4c34db6996d1

[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 <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 28 Jan 2004 04:09:18 +0000
parents 62936f62d98e
children f347c8d25cf5
files src/gtkconn.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)