diff options
author | Kidd Wang <kidd.wang@sun.com> | 2003-12-29 17:58:32 +0800 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2003-12-29 17:58:32 +0800 |
commit | 68a053e3d3626de202240e9f9344e4d3afe78246 (patch) | |
tree | ad5aedc23ff1eb4f9a97ae0c1c785886d4495bb1 /calendar/gui/calendar-commands.c | |
parent | 4d52f684219df276a621cf7a40fea3f3112c578b (diff) | |
download | gsoc2013-evolution-68a053e3d3626de202240e9f9344e4d3afe78246.tar.gz gsoc2013-evolution-68a053e3d3626de202240e9f9344e4d3afe78246.tar.zst gsoc2013-evolution-68a053e3d3626de202240e9f9344e4d3afe78246.zip |
add a menu item for "open appointment".
2003-12-29 Kidd Wang <kidd.wang@sun.com>
* gui/calendar-commands.c (file_open_event_cb): add a menu item
for "open appointment".
* gui/e-cal-view.[ch] (e_calendar_view_open_event): add a signal
"open_event" and bind it to "ctrl+o". When the signal is delivered,
a dialog will be opened to edit the selected event.
* gui/e-calendar-table.c (e_calendar_table_on_key_press): press "ctrl-o"
to open a dialog.
svn path=/trunk/; revision=24012
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r-- | calendar/gui/calendar-commands.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index c03b722de9..9127ab8d84 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -71,6 +71,17 @@ typedef struct { guint taskpad_focused : 1; } FocusData; +static void +file_open_event_cb (BonoboUIComponent *uic, gpointer data, const char *path) +{ + GnomeCalendar *gcal; + + gcal = GNOME_CALENDAR (data); + + e_calendar_view_open_event (gnome_calendar_get_current_view_widget (gcal)); +} + + /* Prints the calendar at its current view and time range */ static void print (GnomeCalendar *gcal, gboolean preview) @@ -532,6 +543,9 @@ calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalen read_only = TRUE; } + bonobo_ui_component_set_prop (uic, "/commands/EventOpen", "sensitive", + n_selected == 0 || read_only ? "0" : "1", + NULL); bonobo_ui_component_set_prop (uic, "/commands/Cut", "sensitive", n_selected == 0 || read_only ? "0" : "1", NULL); @@ -685,6 +699,7 @@ gcal_taskpad_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data) static BonoboUIVerb verbs [] = { + BONOBO_UI_VERB ("EventOpen", file_open_event_cb), BONOBO_UI_VERB ("CalendarPrint", file_print_cb), BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb), |