diff options
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 20 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index ed5b30702c..16ad279629 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -1951,26 +1951,6 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view) ACTION (MAIL_STOP), "sensitive", G_BINDING_SYNC_CREATE); - g_object_bind_property ( - shell, "online", - ACTION (MAIL_SEND_RECEIVE), "sensitive", - G_BINDING_SYNC_CREATE); - - g_object_bind_property ( - shell, "online", - ACTION (MAIL_SEND_RECEIVE_RECEIVE_ALL), "sensitive", - G_BINDING_SYNC_CREATE); - - g_object_bind_property ( - shell, "online", - ACTION (MAIL_SEND_RECEIVE_SEND_ALL), "sensitive", - G_BINDING_SYNC_CREATE); - - g_object_bind_property ( - shell, "online", - ACTION (MAIL_SEND_RECEIVE_SUBMENU), "sensitive", - G_BINDING_SYNC_CREATE); - /* Keep the sensitivity of "Create Search Folder from Search" * in sync with "Save Search" so that its only selectable when * showing search results. */ diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index 6373e571a2..54f4d581e4 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -1215,10 +1215,13 @@ send_receive_add_to_menu (SendReceiveData *data, gint position) { GtkWidget *menu_item; + CamelProvider *provider; if (send_receive_find_menu_item (data, service) != NULL) return; + provider = camel_service_get_provider (service); + menu_item = gtk_menu_item_new (); gtk_widget_show (menu_item); @@ -1227,6 +1230,23 @@ send_receive_add_to_menu (SendReceiveData *data, menu_item, "label", G_BINDING_SYNC_CREATE); + if (provider && (provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0) { + gpointer object; + + if (CAMEL_IS_OFFLINE_STORE (service) || + CAMEL_IS_DISCO_STORE (service)) + object = g_object_ref (service); + else + object = camel_service_ref_session (service); + + g_object_bind_property ( + object, "online", + menu_item, "sensitive", + G_BINDING_SYNC_CREATE); + + g_object_unref (object); + } + g_hash_table_insert ( data->menu_items, menu_item, g_object_ref (service)); |