aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations
diff options
context:
space:
mode:
authorShakti Sen <shprasad@blr.novell.com>2005-08-02 22:37:59 +0800
committerShakti Prasad Sen <shaktis@src.gnome.org>2005-08-02 22:37:59 +0800
commit44a81b14be6513a90cc71a2e425233cd5f17d9fe (patch)
tree36cb6d604a01e6eb37e92422f97e166ddb1887b1 /plugins/exchange-operations
parent5739bae429a2743066ad644dc9d32f1d8021e6da (diff)
downloadgsoc2013-evolution-44a81b14be6513a90cc71a2e425233cd5f17d9fe.tar.gz
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')
-rw-r--r--plugins/exchange-operations/ChangeLog11
-rw-r--r--plugins/exchange-operations/Makefile.am8
-rw-r--r--plugins/exchange-operations/exchange-folder-permission.c78
-rw-r--r--plugins/exchange-operations/exchange-permissions-dialog.c2
4 files changed, 84 insertions, 15 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 4311d9f265..79443617e1 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
2005-08-02 Sarfraaz Ahmed <asarfraaz@novell.com>
* exchange-calendar.c : Check for NULL target
diff --git a/plugins/exchange-operations/Makefile.am b/plugins/exchange-operations/Makefile.am
index fd1779c6fb..896eaf2d9b 100644
--- a/plugins/exchange-operations/Makefile.am
+++ b/plugins/exchange-operations/Makefile.am
@@ -1,6 +1,7 @@
INCLUDES = -I . \
-I$(top_srcdir) \
-I$(top_srcdir)/widgets \
+ -I$(top_srcdir)/calendar \
$(EVOLUTION_MAIL_CFLAGS) \
$(CAMEL_EXCHANGE_CFLAGS) \
$(CAMEL_CFLAGS) \
@@ -47,10 +48,13 @@ liborg_gnome_exchange_operations_la_SOURCES = \
exchange-folder.c
liborg_gnome_exchange_operations_la_LIBADD = \
+ $(EVOLUTION_MAIL_LIBS) \
+ $(CAMEL_EXCHANGE_LIBS) \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(CAMEL_LIBS) \
- $(CAMEL_EXCHANGE_LIBS)
+ $(top_builddir)/calendar/gui/libevolution-calendar.la \
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(top_builddir)/addressbook/gui/component/libevolution-addressbook.la
liborg_gnome_exchange_operations_la_LDFLAGS = -module -avoid-version
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);
}
diff --git a/plugins/exchange-operations/exchange-permissions-dialog.c b/plugins/exchange-operations/exchange-permissions-dialog.c
index 923f0ebae8..68b152bdfc 100644
--- a/plugins/exchange-operations/exchange-permissions-dialog.c
+++ b/plugins/exchange-operations/exchange-permissions-dialog.c
@@ -173,6 +173,8 @@ exchange_permissions_dialog_new (ExchangeAccount *account,
xmlNode *xml_form;
GByteArray *binary_form;
+ g_return_if_fail (folder);
+
ctx = exchange_account_get_context (account);
g_return_if_fail (ctx);
xml = glade_xml_new (