[evolution-patches] A patch for calender
- From: "kidd.wang" <kidd wang sun com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] A patch for calender
- Date: Wed, 31 Dec 2003 17:42:24 +0800
JPR and Rodrigo,
Hi. Encolsed is a remaining portion of the patch for Bug#45775. A
new menu item named 'Open Task' is added for the tasks component, as
Rodrigo suggested. Would you like to spend a little time to review it?
Wish you a happy new year:-)
Kidd
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2032
diff -u -r1.2032 ChangeLog
--- calendar/ChangeLog 29 Dec 2003 09:58:31 -0000 1.2032
+++ calendar/ChangeLog 31 Dec 2003 09:34:29 -0000
@@ -1,3 +1,13 @@
+2003-12-31 Kidd Wang <kidd wang sun com>
+
+ * gui/e-calendar-table.[ch] (e_calendar_table_open_selected):
+ open a dialog for the selected task.
+
+ * gui/e-tasks.[ch] (e_tasks_open_task): ditto.
+
+ * gui/tasks-control.c (tasks_control_sensitize_commands),
+ (tasks_control_open_task_cmd): add a menu item for "Open Task".
+
2003-12-29 Kidd Wang <kidd wang sun com>
* gui/calendar-commands.c (file_open_event_cb): add a menu item
Index: calendar/gui/e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.104
diff -u -r1.104 e-calendar-table.c
--- calendar/gui/e-calendar-table.c 29 Dec 2003 09:58:32 -0000 1.104
+++ calendar/gui/e-calendar-table.c 31 Dec 2003 09:34:34 -0000
@@ -589,6 +589,16 @@
return e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
}
+void
+e_calendar_table_open_selected (ECalendarTable *cal_table)
+{
+ ECalModelComponent *comp_data;
+
+ comp_data = get_selected_comp (cal_table);
+ if (comp_data != NULL)
+ open_task (cal_table, comp_data, FALSE);
+}
+
/**
* e_calendar_table_complete_selected:
* @cal_table: A calendar table
Index: calendar/gui/e-calendar-table.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.h,v
retrieving revision 1.20
diff -u -r1.20 e-calendar-table.h
--- calendar/gui/e-calendar-table.h 16 Dec 2003 23:29:07 -0000 1.20
+++ calendar/gui/e-calendar-table.h 31 Dec 2003 09:34:34 -0000
@@ -76,6 +76,7 @@
ETable *e_calendar_table_get_table (ECalendarTable *cal_table);
+void e_calendar_table_open_selected (ECalendarTable *cal_table);
void e_calendar_table_complete_selected (ECalendarTable *cal_table);
void e_calendar_table_delete_selected (ECalendarTable *cal_table);
Index: calendar/gui/e-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-tasks.c,v
retrieving revision 1.67
diff -u -r1.67 e-tasks.c
--- calendar/gui/e-tasks.c 22 Dec 2003 15:57:23 -0000 1.67
+++ calendar/gui/e-tasks.c 31 Dec 2003 09:34:37 -0000
@@ -804,6 +804,15 @@
}
void
+e_tasks_open_task (ETasks *tasks)
+{
+ ECalendarTable *cal_table;
+
+ cal_table = e_tasks_get_calendar_table (tasks);
+ e_calendar_table_open_selected (cal_table);
+}
+
+void
e_tasks_new_task (ETasks *tasks)
{
ETasksPrivate *priv;
Index: calendar/gui/e-tasks.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-tasks.h,v
retrieving revision 1.21
diff -u -r1.21 e-tasks.h
--- calendar/gui/e-tasks.h 17 Nov 2003 01:20:38 -0000 1.21
+++ calendar/gui/e-tasks.h 31 Dec 2003 09:34:37 -0000
@@ -69,6 +69,7 @@
gboolean e_tasks_set_default_uri (ETasks *tasks, const char *str_uri);
ECal *e_tasks_get_default_client (ETasks *tasks);
+void e_tasks_open_task (ETasks *tasks);
void e_tasks_new_task (ETasks *tasks);
void e_tasks_complete_selected (ETasks *tasks);
void e_tasks_delete_selected (ETasks *tasks);
Index: calendar/gui/tasks-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-control.c,v
retrieving revision 1.71
diff -u -r1.71 tasks-control.c
--- calendar/gui/tasks-control.c 19 Dec 2003 19:50:50 -0000 1.71
+++ calendar/gui/tasks-control.c 31 Dec 2003 09:34:40 -0000
@@ -71,6 +71,9 @@
static void tasks_control_activate_cb (BonoboControl *control,
gboolean activate,
gpointer user_data);
+static void tasks_control_open_task_cmd (BonoboUIComponent *uic,
+ gpointer data,
+ const char *path);
static void tasks_control_new_task_cmd (BonoboUIComponent *uic,
gpointer data,
const char *path);
@@ -246,6 +249,9 @@
model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
e_cal_is_read_only (e_cal_model_get_default_client (model), &read_only, NULL);
+ bonobo_ui_component_set_prop (uic, "/commands/TasksOpenTask", "sensitive",
+ n_selected != 1 || read_only ? "0" : "1",
+ NULL);
bonobo_ui_component_set_prop (uic, "/commands/TasksCut", "sensitive",
n_selected == 0 || read_only ? "0" : "1",
NULL);
@@ -278,6 +284,7 @@
}
static BonoboUIVerb verbs [] = {
+ BONOBO_UI_VERB ("TasksOpenTask", tasks_control_open_task_cmd),
BONOBO_UI_VERB ("TasksNewTask", tasks_control_new_task_cmd),
BONOBO_UI_VERB ("TasksCut", tasks_control_cut_cmd),
BONOBO_UI_VERB ("TasksCopy", tasks_control_copy_cmd),
@@ -359,6 +366,15 @@
bonobo_ui_component_unset_container (uic, NULL);
}
+static void tasks_control_open_task_cmd (BonoboUIComponent *uic,
+ gpointer data,
+ const char *path)
+{
+ ETasks *tasks;
+
+ tasks = E_TASKS (data);
+ e_tasks_open_task (tasks);
+}
static void
tasks_control_new_task_cmd (BonoboUIComponent *uic,
Index: ui/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ui/ChangeLog,v
retrieving revision 1.369
diff -u -r1.369 ChangeLog
--- ui/ChangeLog 29 Dec 2003 09:59:08 -0000 1.369
+++ ui/ChangeLog 31 Dec 2003 09:35:47 -0000
@@ -1,3 +1,8 @@
+2003-12-31 Kidd Wang <kidd wang sun com>
+
+ * evolution-tasks.xml: Add a menu item [Open Task] to [File] for
+ the tasks component.
+
2003-12-23 Kidd Wang <kidd wang sun com>
* evolution-calendar.xml: Add a menu item [Open Appointment] to [File].
Index: ui/evolution-tasks.xml
===================================================================
RCS file: /cvs/gnome/evolution/ui/evolution-tasks.xml,v
retrieving revision 1.32
diff -u -r1.32 evolution-tasks.xml
--- ui/evolution-tasks.xml 17 Jul 2003 10:43:21 -0000 1.32
+++ ui/evolution-tasks.xml 31 Dec 2003 09:35:47 -0000
@@ -1,5 +1,6 @@
<Root>
<commands>
+ <cmd name="TasksOpenTask" _tip="View the selected task" accel="*Control*o"/>
<cmd name="TasksPrint" _tip="Print the list of tasks" pixtype="stock" pixname="gtk-print"
accel="*Control*p"/>
<cmd name="TasksPrintPreview" _tip="Previews the list of tasks to be printed" pixtype="stock" pixname="gtk-print-preview"/>
@@ -16,6 +17,9 @@
<menu>
<submenu name="File">
+ <placeholder name="FileOps">
+ <menuitem name="OpenTask" verb="TasksOpenTask" _label="_Open Task"/>
+ </placeholder>
<placeholder name="Print">
<menuitem name="PrintPreview" verb="TasksPrintPreview" _label="Print Pre_view"/>
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]