aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2006-02-27 14:54:16 +0800
committerSushma Rai <rsushma@src.gnome.org>2006-02-27 14:54:16 +0800
commit02f4fc54372fa72cfbbd59344be31800472fce2e (patch)
tree17b712e4c80f5c98ca89dc0be4657b6b1404a4fb /plugins
parent9e4a5e053f2e3686d7a2eccf61d1c9cac296595a (diff)
downloadgsoc2013-evolution-02f4fc54372fa72cfbbd59344be31800472fce2e.tar
gsoc2013-evolution-02f4fc54372fa72cfbbd59344be31800472fce2e.tar.gz
gsoc2013-evolution-02f4fc54372fa72cfbbd59344be31800472fce2e.tar.bz2
gsoc2013-evolution-02f4fc54372fa72cfbbd59344be31800472fce2e.tar.lz
gsoc2013-evolution-02f4fc54372fa72cfbbd59344be31800472fce2e.tar.xz
gsoc2013-evolution-02f4fc54372fa72cfbbd59344be31800472fce2e.tar.zst
gsoc2013-evolution-02f4fc54372fa72cfbbd59344be31800472fce2e.zip
Trying to get the exchange account, only when invoked for exchange account
and also not showing the folder permissions dialog when invoked in offline mode. See #332514. svn path=/trunk/; revision=31585
Diffstat (limited to 'plugins')
-rw-r--r--plugins/exchange-operations/ChangeLog15
-rw-r--r--plugins/exchange-operations/exchange-folder-permission.c86
2 files changed, 68 insertions, 33 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 4031428a65..524f9be733 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,5 +1,20 @@
2006-02-27 Sushma Rai <rsushma@novell.com>
+ * exchange-folder-permission.c
+ (org_gnome_exchange_calendar_permissions): Trying to get the exchange
+ account only if one tries to see the folder permissions for the
+ exchange account. Also, not showing the folder permissions dialog if
+ the account is in offline mode.
+ (org_gnome_exchange_addressbook_permissions): Similar.
+ (org_gnome_exchange_folder_permissions): similar.
+ (org_gnome_exchange_menu_folder_permissions): Similar.
+ (org_gnome_exchange_menu_cal_permissions): Similar.
+ (org_gnome_exchange_menu_tasks_permissions): Similar.
+ (org_gnome_exchange_menu_ab_permissions): Similar.
+ See #332514.
+
+2006-02-27 Sushma Rai <rsushma@novell.com>
+
* exchange-config-listener.c (add_defaults_for_account): Not trying to
set autocompletion folders here, which is done somewhere else.
(account_added): Invoking add_defaults_for_account() always on
diff --git a/plugins/exchange-operations/exchange-folder-permission.c b/plugins/exchange-operations/exchange-folder-permission.c
index 8a33d55f22..8760cf8d79 100644
--- a/plugins/exchange-operations/exchange-folder-permission.c
+++ b/plugins/exchange-operations/exchange-folder-permission.c
@@ -68,24 +68,24 @@ void
org_gnome_exchange_calendar_permissions (EPlugin *ep, ECalPopupTargetSource *target)
{
GSList *menus = NULL;
- int i = 0;
+ int i = 0, mode;
static int first =0;
ExchangeAccount *account = NULL;
ESource *source = NULL;
gchar *uri = NULL;
- account = exchange_operations_get_exchange_account ();
-
- if (!account)
- return;
-
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (target->selector));
uri = (gchar *) e_source_get_uri (source);
-
if (uri && ! g_strrstr (uri, "exchange://")) {
return;
}
+ account = exchange_operations_get_exchange_account ();
+ if (!account)
+ return;
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
+ return;
if (!exchange_account_get_folder (account, uri))
return;
@@ -109,23 +109,24 @@ void
org_gnome_exchange_addressbook_permissions (EPlugin *ep, EABPopupTargetSource *target)
{
GSList *menus = NULL;
- int i = 0;
+ int i = 0, mode;
static int first =0;
ExchangeAccount *account = NULL;
ESource *source = NULL;
gchar *uri = NULL;
- account = exchange_operations_get_exchange_account ();
-
- if (!account)
- return;
-
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (target->selector));
uri = (gchar *) e_source_get_uri (source);
-
if (!g_strrstr (uri, "exchange://"))
return;
+ account = exchange_operations_get_exchange_account ();
+ if (!account)
+ return;
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
+ return;
+
if (!exchange_account_get_folder (account, uri))
return;
@@ -147,7 +148,7 @@ void
org_gnome_exchange_folder_permissions (EPlugin *ep, EMPopupTargetFolder *target)
{
GSList *menus = NULL;
- int i = 0;
+ int i = 0, mode;
static int first =0;
gchar *path = NULL;
ExchangeAccount *account = NULL;
@@ -156,7 +157,10 @@ org_gnome_exchange_folder_permissions (EPlugin *ep, EMPopupTargetFolder *target)
return;
account = exchange_operations_get_exchange_account ();
- if (!account)
+ if (!account )
+ return;
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
return;
path = target->uri + strlen ("exchange://") + strlen (account->account_filename);
@@ -201,11 +205,17 @@ org_gnome_exchange_menu_folder_permissions (EPlugin *ep, EMMenuTargetSelect *tar
ExchangeAccount *account = NULL;
EFolder *folder = NULL;
gchar *path = NULL;
+ int mode;
- account = exchange_operations_get_exchange_account ();
+ if (!g_str_has_prefix (target->uri, "exchange://"))
+ return;
+ account = exchange_operations_get_exchange_account ();
if (!account)
return;
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
+ return;
path = target->uri + strlen ("exchange://") + strlen (account->account_filename);
folder = exchange_account_get_folder (account, path);
@@ -221,24 +231,28 @@ org_gnome_exchange_menu_cal_permissions (EPlugin *ep, ECalMenuTargetSelect *targ
ECalModel *model = NULL;
ECal *ecal = NULL;
gchar *uri = NULL;
+ int mode;
- account = exchange_operations_get_exchange_account ();
-
- if (!account || !target)
+ if (!target)
return;
-
if (target->model)
model = E_CAL_MODEL (target->model);
ecal = e_cal_model_get_default_client (model);
uri = (gchar *) e_cal_get_uri (ecal);
-
if (!uri)
return;
else
if (!g_str_has_prefix (uri, "exchange://"))
return;
+ account = exchange_operations_get_exchange_account ();
+ if (!account)
+ return;
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
+ return;
+
folder = exchange_account_get_folder (account, uri);
exchange_permissions_dialog_new (account, folder, NULL);
}
@@ -251,27 +265,29 @@ org_gnome_exchange_menu_tasks_permissions (EPlugin *ep, ECalMenuTargetSelect *ta
ECalModel *model = NULL;
ECal *ecal = NULL;
gchar *uri = NULL;
+ int mode;
- account = exchange_operations_get_exchange_account ();
-
- if (!account || !target)
+ if (!target)
return;
-
if (target->model)
model = E_CAL_MODEL (target->model);
ecal = e_cal_model_get_default_client (model);
uri = (gchar *) e_cal_get_uri (ecal);
-
if (!uri)
return;
else
if (!g_str_has_prefix (uri, "exchange://"))
return;
+ account = exchange_operations_get_exchange_account ();
+ if (!account)
+ return;
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
+ return;
folder = exchange_account_get_folder (account, uri);
exchange_permissions_dialog_new (account, folder, NULL);
-
}
void
@@ -281,23 +297,27 @@ org_gnome_exchange_menu_ab_permissions (EPlugin *ep, EABMenuTargetSelect *target
EFolder *folder = NULL;
EBook *ebook = NULL;
gchar *uri = NULL;
+ int mode;
- account = exchange_operations_get_exchange_account ();
-
- if (!target || !account)
+ if (!target)
return;
-
if (target->book)
ebook = E_BOOK (target->book);
uri = (gchar *) e_book_get_uri (ebook);
-
if (!uri)
return;
else
if (!g_str_has_prefix (uri, "exchange://"))
return;
+ account = exchange_operations_get_exchange_account ();
+ if (!account)
+ return;
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
+ return;
+
folder = exchange_account_get_folder (account, uri);
exchange_permissions_dialog_new (account, folder, NULL);
}