aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-07-29 04:30:01 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-07-29 04:30:01 +0800
commit2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef (patch)
treefbc252421291a3872d2e8d76daa0b4bdaea0abb1 /libempathy-gtk/empathy-accounts-dialog.c
parent4cbde51c762cc732c8cfcd81b878ab54535fb02c (diff)
downloadgsoc2013-empathy-2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef.tar
gsoc2013-empathy-2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef.tar.gz
gsoc2013-empathy-2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef.tar.bz2
gsoc2013-empathy-2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef.tar.lz
gsoc2013-empathy-2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef.tar.xz
gsoc2013-empathy-2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef.tar.zst
gsoc2013-empathy-2ff9bedb2c529c07e74a3acdd384e7c67cbcd5ef.zip
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. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@207 4ee84921-47dd-4033-b63a-18d7a039a3e4
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 {