Re: [evolution-patches] calendar, mail and exchange: patch for bug #231968



Hi,

I have added a check for exchange account and also removed CAMEL_LIBS
from Makefile.am.

Please review the new patch for exchange.

Thanks,
Shakti

On Wed, 2005-07-27 at 17:07 +0530, Sarfraaz Ahmed wrote:
> Hi,
> 
> Some comments here for the exchange part.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/ChangeLog,v
retrieving revision 1.35
diff -u -p -r1.35 ChangeLog
--- ChangeLog	27 Jul 2005 09:12:38 -0000	1.35
+++ ChangeLog	27 Jul 2005 12:45:52 -0000
@@ -1,3 +1,12 @@
+2005-07-26  Shakti Sen <shprasad 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.
+
+	Fixes bug #231968.
+
 2005-07-27  Harry Lu  <harry lu sun com>
 
 	Only show the unsubscribe menu if it is an exchange folder.
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/Makefile.am,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile.am
--- Makefile.am	25 Jul 2005 07:37:03 -0000	1.12
+++ Makefile.am	27 Jul 2005 12:45:52 -0000
@@ -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_SOUR
 	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
 
Index: exchange-folder-permission.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-folder-permission.c,v
retrieving revision 1.5
diff -u -p -r1.5 exchange-folder-permission.c
--- exchange-folder-permission.c	25 Jul 2005 07:37:03 -0000	1.5
+++ exchange-folder-permission.c	27 Jul 2005 12:45:52 -0000
@@ -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"
@@ -227,37 +228,104 @@ org_gnome_exchange_menu_folder_permissio
 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);
-	
-
-	if (target == NULL)
-		return;
+	ECalModel *model = NULL;
+	ECal *ecal = NULL;
+	gchar *uri = NULL;
 
 	account = exchange_operations_get_exchange_account ();
 
 	if (!account)
 		return;
 
-	//folder = exchange_account_get_folder (account, target->target->uri);
-	//if (folder)
-	//	exchange_permissions_dialog_new (account, folder, NULL);
-#endif
+	if (!target)
+		return;
+
+	if (target->model)
+		model = E_CAL_MODEL (target->model);
+
+	if (model)
+		ecal = e_cal_model_get_default_client (model);
+
+	if (ecal)
+		uri = (gchar *) e_cal_get_uri (ecal);
+
+	if (uri && !g_str_has_prefix (uri, "exchange://"))
+		return;
+
+	if (uri)
+		folder = exchange_account_get_folder (account, uri);
+
+	if (folder)
+		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)
+		return;
+
+	if (!target)
+		return;
+
+	if (target->model)
+		model = E_CAL_MODEL (target->model);
+
+	if (model)
+		ecal = e_cal_model_get_default_client (model);
+
+	if (ecal)
+		uri = (gchar *) e_cal_get_uri (ecal);
+
+	if (uri && !g_str_has_prefix (uri, "exchange://"))
+		return;
+
+	if (uri)
+		folder = exchange_account_get_folder (account, uri);
+
+	if (folder)
+		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;
+
+	if (!target)
+		return;
 
+	account = exchange_operations_get_exchange_account ();
+
+	if (!account)
+		return;
+
+	if (target->book)
+		ebook = E_BOOK (target->book);
+
+	if (ebook)
+		uri = (gchar *) e_book_get_uri (ebook);
+
+	if (uri && !g_str_has_prefix (uri, "exchange://"))
+		return;
+
+	if (uri)
+		folder = exchange_account_get_folder (account, uri);
+
+	if (folder)
+		exchange_permissions_dialog_new (account, folder, NULL);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]