aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-07-29 04:30:01 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-07-29 04:30:01 +0800
commitbd9979c0dec6ae7abe770199a67906f3b188fd47 (patch)
treefbc252421291a3872d2e8d76daa0b4bdaea0abb1 /libempathy-gtk/empathy-accounts-dialog.c
parent19eacf8730a0ae8abb9fb7db4696ff4d67d86c5d (diff)
downloadgsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.gz
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.bz2
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.lz
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.xz
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.tar.zst
gsoc2013-empathy-bd9979c0dec6ae7abe770199a67906f3b188fd47.zip
Update the Enable/Disable button even if there is no account selected. Set
2007-07-28 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-accounts-dialog.glade: * libempathy-gtk/empathy-accounts-dialog.c: Update the Enable/Disable button even if there is no account selected. Set it insensitive if no account is selected. Fixes bug #459012. svn path=/trunk/; revision=207
Diffstat (limited to 'libempathy-gtk/empathy-accounts-dialog.c')
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index 888b14c4d..2c1225eb4 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -159,15 +159,13 @@ static void accounts_dialog_destroy_cb (GtkWidget
static void
accounts_dialog_setup (EmpathyAccountsDialog *dialog)
{
- GtkTreeView *view;
- GtkListStore *store;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GList *accounts, *l;
+ GtkTreeView *view;
+ GtkListStore *store;
+ GtkTreeIter iter;
+ GList *accounts, *l;
view = GTK_TREE_VIEW (dialog->treeview);
store = GTK_LIST_STORE (gtk_tree_view_get_model (view));
- selection = gtk_tree_view_get_selection (view);
accounts = mc_accounts_list ();
@@ -215,12 +213,9 @@ accounts_dialog_update_connect_button (EmpathyAccountsDialog *dialog)
account = accounts_dialog_model_get_selected (dialog);
- if (!account) {
- gtk_widget_set_sensitive (dialog->button_connect, FALSE);
- return;
- }
+ gtk_widget_set_sensitive (dialog->button_connect, account != NULL);
- if (mc_account_is_enabled (account)) {
+ if (account && mc_account_is_enabled (account)) {
label = _("Disable");
stock_id = GTK_STOCK_DISCONNECT;
} else {