diff options
author | Shakti Sen <shprasad@blr.novell.com> | 2005-08-02 22:37:59 +0800 |
---|---|---|
committer | Shakti Prasad Sen <shaktis@src.gnome.org> | 2005-08-02 22:37:59 +0800 |
commit | 44a81b14be6513a90cc71a2e425233cd5f17d9fe (patch) | |
tree | 36cb6d604a01e6eb37e92422f97e166ddb1887b1 /plugins/exchange-operations/exchange-folder-permission.c | |
parent | 5739bae429a2743066ad644dc9d32f1d8021e6da (diff) | |
download | gsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.tar gsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.tar.gz gsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.tar.bz2 gsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.tar.lz gsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.tar.xz gsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.tar.zst gsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.zip |
Included 'calendar' in INCLUDES and some .la in
2005-08-02 Shakti Sen <shprasad@blr.novell.com>
* Makefile.am: Included 'calendar' in INCLUDES and some .la in
'liborg_gnome_exchange_operations_la_LIBADD'
* exchange-folder-permission.c: Added the functionality for
'File->Permissions' menu-item for Calendar, Tasks and Contacts.
* exchange-permissions-dialog.c (exchange_permissions_dialog_new):
Takes care of 'folder' is not-null.
Fixes bug #231968.
svn path=/trunk/; revision=29958
Diffstat (limited to 'plugins/exchange-operations/exchange-folder-permission.c')
-rw-r--r-- | plugins/exchange-operations/exchange-folder-permission.c | 78 |
1 files changed, 65 insertions, 13 deletions
diff --git a/plugins/exchange-operations/exchange-folder-permission.c b/plugins/exchange-operations/exchange-folder-permission.c index 11beb9e080..3c930ff026 100644 --- a/plugins/exchange-operations/exchange-folder-permission.c +++ b/plugins/exchange-operations/exchange-folder-permission.c @@ -34,6 +34,7 @@ #include <libedataserverui/e-source-selector.h> #include <mail/em-popup.h> #include <mail/em-menu.h> +#include <libebook/e-book.h> #include "exchange-config-listener.h" #include "exchange-operations.h" #include "exchange-permissions-dialog.h" @@ -204,37 +205,88 @@ org_gnome_exchange_menu_folder_permissions (EPlugin *ep, EMMenuTargetSelect *tar void org_gnome_exchange_menu_cal_permissions (EPlugin *ep, ECalMenuTargetSelect *target) { -#if 0 ExchangeAccount *account = NULL; EFolder *folder = NULL; - ECalModel *model = target->model; - ECal *ecal; - ecal = e_cal_model_get_default_client (model); - gchar *uri = e_cal_get_uri (ecal); - + ECalModel *model = NULL; + ECal *ecal = NULL; + gchar *uri = NULL; - if (target == NULL) + account = exchange_operations_get_exchange_account (); + + if (!account || !target) return; - account = exchange_operations_get_exchange_account (); + if (target->model) + model = E_CAL_MODEL (target->model); - if (!account) + 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; - //folder = exchange_account_get_folder (account, target->target->uri); - //if (folder) - // exchange_permissions_dialog_new (account, folder, NULL); -#endif + folder = exchange_account_get_folder (account, uri); + exchange_permissions_dialog_new (account, folder, NULL); } void org_gnome_exchange_menu_tasks_permissions (EPlugin *ep, ECalMenuTargetSelect *target) { + ExchangeAccount *account = NULL; + EFolder *folder = NULL; + ECalModel *model = NULL; + ECal *ecal = NULL; + gchar *uri = NULL; + + account = exchange_operations_get_exchange_account (); + + if (!account || !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; + + folder = exchange_account_get_folder (account, uri); + exchange_permissions_dialog_new (account, folder, NULL); } void org_gnome_exchange_menu_ab_permissions (EPlugin *ep, EABMenuTargetSelect *target) { + ExchangeAccount *account = NULL; + EFolder *folder = NULL; + EBook *ebook = NULL; + gchar *uri = NULL; + + account = exchange_operations_get_exchange_account (); + + if (!target || !account) + 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; + folder = exchange_account_get_folder (account, uri); + exchange_permissions_dialog_new (account, folder, NULL); } |