[empathy] empathy-accounts: disable 'Enable' menu entry if not supported
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy-accounts: disable 'Enable' menu entry if not supported
- Date: Fri, 30 Mar 2012 11:18:34 +0000 (UTC)
commit d1576b8556b86b7eb0ade9c80e2747cfeb44f0c3
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Mar 30 13:08:31 2012 +0200
empathy-accounts: disable 'Enable' menu entry if not supported
https://bugzilla.gnome.org/show_bug.cgi?id=673141
src/empathy-accounts-dialog.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index c21db2b..b776e16 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]