Mercurial > pidgin.yaz
comparison src/gtkconn.c @ 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 | fa6395637e2c |
children | 0a0501566843 |
comparison
equal
deleted
inserted
replaced
8173:62936f62d98e | 8174:4c34db6996d1 |
---|---|
351 gtk_tree_selection_select_iter(sel, &iter); | 351 gtk_tree_selection_select_iter(sel, &iter); |
352 } | 352 } |
353 | 353 |
354 /* | 354 /* |
355 * Update the Reconnect/Remove button appropriately and set the | 355 * Update the Reconnect/Remove button appropriately and set the |
356 * label in the dialog to what it should be. | 356 * label in the dialog to what it should be. If there is only |
357 * one account in the tree model, and that account is connected, | |
358 * then we don't show the remove button. | |
357 */ | 359 */ |
358 gtk_tree_model_get(model, &iter, 3, &label_text, 4, &account, -1); | 360 gtk_tree_model_get(model, &iter, 3, &label_text, 4, &account, -1); |
359 gtk_button_set_label(GTK_BUTTON(disconnect_window->reconnect_btn), | 361 gtk_button_set_label(GTK_BUTTON(disconnect_window->reconnect_btn), |
360 gaim_account_is_connected(account) ? _("_Remove") : _("_Reconnect")); | 362 gaim_account_is_connected(account) ? _("_Remove") : _("_Reconnect")); |
361 gtk_label_set_markup(GTK_LABEL(disconnect_window->label), label_text); | 363 gtk_label_set_markup(GTK_LABEL(disconnect_window->label), label_text); |
362 gtk_dialog_set_response_sensitive(GTK_DIALOG(disconnect_window->window), GTK_RESPONSE_ACCEPT, TRUE); | 364 gtk_dialog_set_response_sensitive(GTK_DIALOG(disconnect_window->window), GTK_RESPONSE_ACCEPT, TRUE); |
365 if (gaim_account_is_connected(account) && !(gtk_tree_model_iter_next(model, &iter))) | |
366 gtk_widget_hide(disconnect_window->reconnect_btn); | |
367 else | |
368 gtk_widget_show(disconnect_window->reconnect_btn); | |
363 } | 369 } |
364 | 370 |
365 static void disconnect_response_cb(GtkDialog *dialog, gint id, GtkWidget *widget) | 371 static void disconnect_response_cb(GtkDialog *dialog, gint id, GtkWidget *widget) |
366 { | 372 { |
367 GtkTreeIter iter; | 373 GtkTreeIter iter; |