aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-04-09 01:20:23 +0800
committerMilan Crha <mcrha@redhat.com>2013-04-09 01:21:04 +0800
commit2dfd548d26e179dfb12d836b57a88c215d76a926 (patch)
tree4b829ce2d938a4bb3737e0ce6c8def28497adc3c /modules/mail
parent94372b5f1857b66d1ae7e14a37075122b5c8336c (diff)
downloadgsoc2013-evolution-2dfd548d26e179dfb12d836b57a88c215d76a926.tar
gsoc2013-evolution-2dfd548d26e179dfb12d836b57a88c215d76a926.tar.gz
gsoc2013-evolution-2dfd548d26e179dfb12d836b57a88c215d76a926.tar.bz2
gsoc2013-evolution-2dfd548d26e179dfb12d836b57a88c215d76a926.tar.lz
gsoc2013-evolution-2dfd548d26e179dfb12d836b57a88c215d76a926.tar.xz
gsoc2013-evolution-2dfd548d26e179dfb12d836b57a88c215d76a926.tar.zst
gsoc2013-evolution-2dfd548d26e179dfb12d836b57a88c215d76a926.zip
Bug #271262 - Allow Send/Receive of local stores in offline
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c20
-rw-r--r--modules/mail/e-mail-shell-view-private.c20
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));