[evolution-patches] Patch for bug #310985 (separate patches for Calendar and Exchange components)



Hi,

I am attaching 2 patches for bug #310985. Basically it is to move the 'Subscribe to Other's User <comp-name>' menu-item from 'Folder' menu to 'File' menu. Here <comp-name> stands for the corresponding components like 'Folder' for mail component, 'Calendar' for calendar component etc...

It contains 2 patches:
1) For calendar component.
         There was no menu controller for 'Tasks'. So, I added that.
2) For exchange:
         Added few xml files and modified the Makefile.am

Both the patches together fixes bug #310985. Please review the patches.

Thanks,
Shakti

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2771
diff -u -p -r1.2771 ChangeLog
--- ChangeLog	20 Jul 2005 05:38:50 -0000	1.2771
+++ ChangeLog	20 Jul 2005 12:45:24 -0000
@@ -1,3 +1,12 @@
+2005-07-20  Shakti Sen <shprasad novell com>
+
+	* gui/tasks-component.c (tasks_component_init): Creating tasks-menu.
+	* gui/tasks-control.c (tasks_control_activate): Activating the 
+	task-menu.
+	In brief, added support for 'menu controler' for 'Tasks'. 
+
+	Fixes bug #310985.
+
 2005-07-20  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #309680
Index: gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.88
diff -u -p -r1.88 tasks-component.c
--- gui/tasks-component.c	23 Jun 2005 09:11:05 -0000	1.88
+++ gui/tasks-component.c	20 Jul 2005 12:45:28 -0000
@@ -50,6 +50,7 @@
 #include "misc/e-info-label.h"
 #include "e-util/e-error.h"
 #include "e-util/e-icon-factory.h"
+#include "e-cal-menu.h"
 
 #define CREATE_TASK_ID               "task"
 #define CREATE_TASK_ASSIGNED_ID      "task-assigned"
@@ -113,6 +114,8 @@ struct _TasksComponentPrivate {
 	ECal *create_ecal;
 	
 	GList *notifications;
+	
+	ECalMenu    *tasks_menu;
 };
 
 static void
@@ -1286,6 +1289,7 @@ tasks_component_init (TasksComponent *co
 	priv->config_directory = g_build_filename (g_get_home_dir (),
 						   ".evolution", "tasks", "config",
 						   NULL);
+	priv->tasks_menu =  e_cal_menu_new ("org.gnome.evolution.tasks.view");
 	
 	component->priv = priv;
 	ensure_sources (component);
@@ -1310,6 +1314,12 @@ tasks_component_peek (void)
 	}
 
 	return component;
+}
+
+ECalMenu *
+get_tasks_menu (TasksComponent *component)
+{
+	return component->priv->tasks_menu;
 }
 
 const char *
Index: gui/tasks-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-control.c,v
retrieving revision 1.79
diff -u -p -r1.79 tasks-control.c
--- gui/tasks-control.c	21 Jan 2005 18:15:42 -0000	1.79
+++ gui/tasks-control.c	20 Jul 2005 12:45:28 -0000
@@ -53,6 +53,8 @@
 #include "print.h"
 #include "tasks-control.h"
 #include "evolution-shell-component-utils.h"
+#include "tasks-component.h"
+#include "e-util/e-menu.h"
 
 #define FIXED_MARGIN                            .05
 
@@ -210,6 +212,7 @@ tasks_control_activate (BonoboControl *c
 	int n_selected;
 	ECalendarTable *cal_table;
 	ETable *etable;
+	TasksComponent *task;
 
 	uic = bonobo_control_get_ui_component (control);
 	g_assert (uic != NULL);
@@ -239,6 +242,8 @@ tasks_control_activate (BonoboControl *c
 	etable = e_calendar_table_get_table (cal_table);
 	n_selected = e_table_selected_count (etable);
 
+	task = tasks_component_peek ();
+	e_menu_activate ((EMenu *)get_tasks_menu (task), uic, 1);
 	tasks_control_sensitize_commands (control, tasks, n_selected);
 
 	bonobo_ui_component_thaw (uic, NULL);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/ChangeLog,v
retrieving revision 1.25
diff -u -p -r1.25 ChangeLog
--- ChangeLog	19 Jul 2005 09:36:43 -0000	1.25
+++ ChangeLog	20 Jul 2005 12:35:27 -0000
@@ -1,3 +1,16 @@
+2005-07-20  Shakti Sen <shprasad novell com>
+
+	* Makefile.am: Included files org-gnome-exchange-ab-subscription.xml,
+	org-gnome-exchange-tasks-subscription.xml and
+	org-gnome-exchange-cal-subscription.xml.
+	* org-gnome-exchange-ab-subscription.xml: Added newly to add 
+	"Subscribe to Other User's Contacts' menu-item in 'File' menu for 
+	address book.
+	* org-gnome-exchange-tasks-subscription.xml: Same for 'Tasks'.
+	* org-gnome-exchange-cal-subscription.xml: Same for 'Calendar'.
+
+	Fixes bug #310985.
+
 2005-07-19  Shakti Sen <shprasad novell com>
 
 	* exchange-permissions-dialog.c (display_role, get_widgets):
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/Makefile.am,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.am
--- Makefile.am	16 Jul 2005 11:14:25 -0000	1.10
+++ Makefile.am	20 Jul 2005 12:20:14 -0000
@@ -12,7 +12,10 @@ INCLUDES = -I .						\
 
 plugin_DATA = org-gnome-exchange-operations.eplug 	\
 	org-gnome-folder-permissions.xml		\
-	org-gnome-folder-subscription.xml
+	org-gnome-folder-subscription.xml		\
+	org-gnome-exchange-tasks-subscription.xml	\
+	org-gnome-exchange-cal-subscription.xml		\
+	org-gnome-exchange-ab-subscription.xml
 
 plugin_LTLIBRARIES = liborg-gnome-exchange-operations.la
 
@@ -64,6 +67,9 @@ EXTRA_DIST = 							\
 	org-gnome-exchange-operations.error.xml			\
 	org-gnome-folder-permissions.xml			\
 	org-gnome-folder-subscription.xml			\
+	org-gnome-exchange-tasks-subscription.xml		\
+	org-gnome-exchange-cal-subscription.xml			\
+	org-gnome-exchange-ab-subscription.xml			\
 	$(glade_DATA)						
 
 BUILT_SOURCES = $(error_DATA)
Index: org-gnome-exchange-operations.eplug.in
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/org-gnome-exchange-operations.eplug.in,v
retrieving revision 1.5
diff -u -p -r1.5 org-gnome-exchange-operations.eplug.in
--- org-gnome-exchange-operations.eplug.in	18 Jul 2005 11:57:37 -0000	1.5
+++ org-gnome-exchange-operations.eplug.in	20 Jul 2005 12:20:14 -0000
@@ -112,6 +112,39 @@
 			activate="org_gnome_exchange_folder_subscription"/>
 		</menu>
 	</hook>
+	<hook class="org.gnome.evolution.calendar.bonobomenu:1.0">
+		<menu id="org.gnome.evolution.calendar.view" target="select">
+		<ui file="@PLUGINDIR@/org-gnome-exchange-cal-subscription.xml"/>
+		<item
+			type="item"
+			verb="FolderSubscription"
+			path="/commands/FolderSubscription"
+			enable="all"
+			activate="org_gnome_exchange_folder_subscription"/>
+		</menu>
+	</hook>
+	<hook class="org.gnome.evolution.calendar.bonobomenu:1.0">
+		<menu id="org.gnome.evolution.tasks.view" target="select">
+		<ui file="@PLUGINDIR@/org-gnome-exchange-task-subscription.xml"/>
+		<item
+			type="item"
+			verb="FolderSubscription"
+			path="/commands/FolderSubscription"
+			enable="all"
+			activate="org_gnome_exchange_folder_subscription"/>
+		</menu>
+	</hook>
+	<hook class="org.gnome.evolution.addressbook.bonobomenu:1.0">
+		<menu id="org.gnome.evolution.addressbook.view" target="select">
+		<ui file="@PLUGINDIR@/org-gnome-exchange-ab-subscription.xml"/>
+		<item
+			type="item"
+			verb="FolderSubscription"
+			path="/commands/FolderSubscription"
+			enable="all"
+			activate="org_gnome_exchange_folder_subscription"/>
+		</menu>
+	</hook>
 	<hook class="org.gnome.evolution.calendar.popup:1.0">
 		<menu id="org.gnome.evolution.calendar.source.popup" target="source" factory="org_gnome_exchange_check_subscribed">
 		</menu>
Index: org-gnome-folder-subscription.xml
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/org-gnome-folder-subscription.xml,v
retrieving revision 1.1
diff -u -p -r1.1 org-gnome-folder-subscription.xml
--- org-gnome-folder-subscription.xml	8 Jul 2005 10:54:11 -0000	1.1
+++ org-gnome-folder-subscription.xml	20 Jul 2005 12:20:14 -0000
@@ -5,13 +5,15 @@
   </commands>
 
   <menu>
-    <placeholder name="FolderPlaceholder">
-      <submenu name="Folder">
-	<placeholder name="MessagesInFolder">
-	  <separator f="" name="emaillist5"/>
-	  <menuitem name="FolderSubscription" verb=""/>
-	</placeholder>
-      </submenu>
-    </placeholder>
+    <submenu name="File">
+      <placeholder name="FileOps">
+        <menuitem name="FolderSubscription" verb=""/>
+      </placeholder>
+    </submenu>
+    <submenu name="Tools">
+      <placeholder name="ComponentPlaceholder"/>
+    </submenu>
+
+
   </menu>
 </Root>
--- /dev/null	2004-08-25 23:04:59.000000000 +0530
+++ org-gnome-exchange-tasks-subscription.xml	2005-07-20 17:49:05.250618189 +0530
@@ -0,0 +1,18 @@
+<Root>
+  <commands>
+    <cmd name="FolderSubscription" _label="Subscribe to Other User's Tasks"
+      _tip="Subscribe to Other User's Tasks"/>
+  </commands>
+
+  <menu>
+    <submenu name="File">
+      <placeholder name="FileOps">
+        <menuitem name="FolderSubscription" verb=""/>
+      </placeholder>
+    </submenu>
+    <submenu name="Tools">
+      <placeholder name="ComponentPlaceholder"/>
+    </submenu>
+  </menu>
+
+</Root>
--- /dev/null	2004-08-25 23:04:59.000000000 +0530
+++ org-gnome-exchange-cal-subscription.xml	2005-07-20 17:48:27.354407356 +0530
@@ -0,0 +1,18 @@
+<Root>
+  <commands>
+    <cmd name="FolderSubscription" _label="Subscribe to Other User's Calendar"
+      _tip="Subscribe to Other User's Calendar"/>
+  </commands>
+
+  <menu>
+    <submenu name="File">
+      <placeholder name="FileOps">
+        <menuitem name="FolderSubscription" verb=""/>
+      </placeholder>
+    </submenu>
+    <submenu name="Tools">
+      <placeholder name="ComponentPlaceholder"/>
+    </submenu>
+  </menu>
+
+</Root>
--- /dev/null	2004-08-25 23:04:59.000000000 +0530
+++ org-gnome-exchange-ab-subscription.xml	2005-07-20 17:48:38.808657547 +0530
@@ -0,0 +1,18 @@
+<Root>
+  <commands>
+    <cmd name="FolderSubscription" _label="Subscribe to Other User's Contacts"
+      _tip="Subscribe to Other User's Contacts"/>
+  </commands>
+
+  <menu>
+    <submenu name="File">
+      <placeholder name="FileOps">
+        <menuitem name="FolderSubscription" verb=""/>
+      </placeholder>
+    </submenu>
+    <submenu name="Tools">
+      <placeholder name="ComponentPlaceholder"/>
+    </submenu>
+  </menu>
+
+</Root>


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