aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-30 19:08:31 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-30 19:16:12 +0800
commitd1576b8556b86b7eb0ade9c80e2747cfeb44f0c3 (patch)
tree421bd93d03cad00761ffd3490afbc11c14a663e4 /src/empathy-accounts-dialog.c
parenta3c14d3f22f4f1a07cf72e3200ac5f1f3b4c843d (diff)
downloadgsoc2013-empathy-d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3.tar
gsoc2013-empathy-d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3.tar.gz
gsoc2013-empathy-d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3.tar.bz2
gsoc2013-empathy-d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3.tar.lz
gsoc2013-empathy-d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3.tar.xz
gsoc2013-empathy-d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3.tar.zst
gsoc2013-empathy-d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3.zip
empathy-accounts: disable 'Enable' menu entry if not supported
https://bugzilla.gnome.org/show_bug.cgi?id=673141
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index c21db2bc7..b776e1640 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1771,16 +1771,24 @@ accounts_dialog_treeview_button_press_event_cb (GtkTreeView *view,
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item_enable);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item_disable);
- if (tp_account_is_enabled (account))
+ if (account_can_be_enabled (account))
{
- tp_g_signal_connect_object (item_disable, "activate",
- G_CALLBACK (accounts_dialog_treeview_enabled_cb), account, 0);
- gtk_widget_set_sensitive (item_enable, FALSE);
+ if (tp_account_is_enabled (account))
+ {
+ tp_g_signal_connect_object (item_disable, "activate",
+ G_CALLBACK (accounts_dialog_treeview_enabled_cb), account, 0);
+ gtk_widget_set_sensitive (item_enable, FALSE);
+ }
+ else
+ {
+ tp_g_signal_connect_object (item_enable, "activate",
+ G_CALLBACK (accounts_dialog_treeview_enabled_cb), account, 0);
+ gtk_widget_set_sensitive (item_disable, FALSE);
+ }
}
else
{
- tp_g_signal_connect_object (item_enable, "activate",
- G_CALLBACK (accounts_dialog_treeview_enabled_cb), account, 0);
+ gtk_widget_set_sensitive (item_enable, FALSE);
gtk_widget_set_sensitive (item_disable, FALSE);
}