Re: [evolution-patches] Patch for bug #310985 (separate patches for Calendar and Exchange components)
- From: shakti <shprasad novell com>
- To: Not Zed <notzed ximian com>
- Cc: Evolution Patches List <evolution-patches lists ximian com>
- Subject: Re: [evolution-patches] Patch for bug #310985 (separate patches for Calendar and Exchange components)
- Date: Thu, 21 Jul 2005 20:35:20 +0530
Hi,
I am sending a new patch for evo-calendar part. Please review it.
Thanks,
Shakti
Not Zed wrote:
On Wed, 2005-07-20 at 18:28 +0530, shakti wrote:
===================================================================
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;
}
If this is to exist, it MUST be namespaced.
But anyway you can't do this, so it doesn't need to exist anymore.
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);
No this is no good. You need one e-cal-menu object per view. You cannot
have a global one. You can have multiple windows open (file->new
window).
Just copy the calendar code exactly, dont try to do something different.
tasks_control_sensitize_commands (control, tasks, n_selected);
bonobo_ui_component_thaw (uic, NULL);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2774
diff -u -p -r1.2774 ChangeLog
--- ChangeLog 21 Jul 2005 11:54:48 -0000 1.2774
+++ ChangeLog 21 Jul 2005 15:03:19 -0000
@@ -1,3 +1,12 @@
+2005-07-21 Shakti Sen <shprasad novell com>
+
+ * gui/e-tasks.c (e_tasks_init): Creating the tasks-menu.
+ * gui/tasks-control.c (tasks_control_activate, tasks_control_activate):
+ Activated the menu.
+ In brief, added support for 'Tasks' menu creation.
+
+ Fixes bug #310985.
+
2005-07-21 Harish Krishnaswamy <kharish novell com>
* gui/gnome-cal.c (gnome_calendar_class_init),
Index: gui/e-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-tasks.c,v
retrieving revision 1.116
diff -u -p -r1.116 e-tasks.c
--- gui/e-tasks.c 2 Jul 2005 14:54:44 -0000 1.116
+++ gui/e-tasks.c 21 Jul 2005 15:03:20 -0000
@@ -54,6 +54,7 @@
#include "e-cal-component-preview.h"
#include "e-tasks.h"
#include "common/authentication.h"
+#include "e-cal-menu.h"
/* Private part of the GnomeCalendar structure */
@@ -74,6 +75,9 @@ struct _ETasksPrivate {
/* Calendar search bar for tasks */
GtkWidget *search_bar;
+ /* Tasks menu */
+ ECalMenu *tasks_menu;
+
/* Paned widget */
GtkWidget *paned;
@@ -161,6 +165,14 @@ table_cursor_change_cb (ETable *etable,
g_object_unref (comp);
}
+ECalMenu *gnome_tasks_get_tasks_menu (ETasks *tasks)
+{
+ g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
+
+ return tasks->priv->tasks_menu;
+}
+
+
/* Callback used when the selection changes in the table. */
static void
table_selection_change_cb (ETable *etable, gpointer data)
@@ -654,6 +666,7 @@ e_tasks_init (ETasks *tasks)
priv->current_uid = NULL;
priv->sexp = g_strdup ("#t");
priv->default_client = NULL;
+ priv->tasks_menu = e_cal_menu_new ("org.gnome.evolution.tasks.view");
update_view (tasks);
}
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 21 Jul 2005 15:03:20 -0000
@@ -53,6 +53,7 @@
#include "print.h"
#include "tasks-control.h"
#include "evolution-shell-component-utils.h"
+#include "e-util/e-menu.h"
#define FIXED_MARGIN .05
@@ -235,6 +236,7 @@ tasks_control_activate (BonoboControl *c
g_signal_connect (tasks, "selection_changed", G_CALLBACK (selection_changed_cb), control);
+ e_menu_activate ((EMenu *)gnome_tasks_get_tasks_menu (tasks), uic, 1);
cal_table = e_tasks_get_calendar_table (tasks);
etable = e_calendar_table_get_table (cal_table);
n_selected = e_table_selected_count (etable);
@@ -259,6 +261,7 @@ tasks_control_deactivate (BonoboControl
g_assert (uic != NULL);
+ e_menu_activate ((EMenu *)gnome_tasks_get_tasks_menu (tasks), uic, 1);
e_tasks_set_ui_component (tasks, NULL);
e_tasks_discard_view_menus (tasks);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]