From f4b4da4fcb6a59f56c1fff88ba08a6c9995b807c Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sun, 18 Mar 2001 08:16:40 +0000 Subject: Added ShowWeekView, ShowMonthView, ShowDay, ShowWorkWeek to the View menu. 2001-03-17 Miguel de Icaza * evolution-calendar.xml: Added ShowWeekView, ShowMonthView, ShowDay, ShowWorkWeek to the View menu. * evolution.xml, evolution-mail.xml: Provide "Actions" in the toplevel evolution. Fill in Actions/Component in Evolution-mail (no visual changes, just internal changes). * evolution-calendar.xml: Added Actions menu. Added New Verb EditNewEvent. 2001-03-17 Miguel de Icaza * gui/e-day-view.c (e_day_view_on_new_event, e_day_view_on_new_appointment): Simplifed this function to use the shared code. * gui/e-week-view.c (e_week_view_on_new_event, e_week_view_on_new_appointment): ditto. * gui/gnome-cal.c (gnome_calendar_new_appointment_for): New function used to launch editor components with a time range. A bunch of functions use this code now instead of duplicating code all over the place svn path=/trunk/; revision=8794 --- calendar/gui/calendar-commands.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'calendar/gui/calendar-commands.c') diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index dfffed9b63..a35dfcd21e 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -62,6 +62,17 @@ new_appointment_cb (BonoboUIComponent *uic, gpointer data, const char *path) gnome_calendar_new_appointment (gcal); } +static void +new_event_cb (BonoboUIComponent *uic, gpointer data, const char *path) +{ + GnomeCalendar *gcal; + time_t dtstart, dtend; + + gcal = GNOME_CALENDAR (data); + gnome_calendar_get_current_time_range (gcal, &dtstart, &dtend); + gnome_calendar_new_appointment_for (gcal, dtstart, dtend, TRUE); +} + /* Prints the calendar at its current view and time range */ static void print (GnomeCalendar *gcal, gboolean preview) @@ -97,6 +108,14 @@ file_print_cb (BonoboUIComponent *uic, gpointer data, const char *path) print (gcal, FALSE); } +static void +file_print_preview_cb (BonoboUIComponent *uic, gpointer data, const char *path) +{ + GnomeCalendar *gcal; + + gcal = GNOME_CALENDAR (data); + print (gcal, TRUE); +} /* This iterates over each calendar telling them to update their config settings. */ @@ -335,7 +354,9 @@ static BonoboUIVerb verbs [] = { BONOBO_UI_VERB ("CalendarOpen", open_calendar_cmd), BONOBO_UI_VERB ("CalendarSaveAs", save_as_calendar_cmd), BONOBO_UI_VERB ("CalendarPrint", file_print_cb), + BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb), BONOBO_UI_VERB ("EditNewAppointment", new_appointment_cb), + BONOBO_UI_VERB ("EditNewEvent", new_event_cb), BONOBO_UI_VERB ("CalendarPreferences", properties_cmd), BONOBO_UI_VERB ("CalendarPrev", previous_clicked), -- cgit v1.2.3