From a9b1af2b26c0be96173149078b4e98b2b1d3aac2 Mon Sep 17 00:00:00 2001 From: Arturo Espinosa Date: Sat, 9 May 1998 00:04:08 +0000 Subject: 1. Fix: `New Appointment' defaults to the current day. 2. Add `New 1. Fix: `New Appointment' defaults to the current day. 2. Add `New appointment today' entry. 3. Use the new freeze/thaw changes to avoid the extensive flicker. Miguel. svn path=/trunk/; revision=209 --- calendar/main.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'calendar/main.c') diff --git a/calendar/main.c b/calendar/main.c index 64b58cb1fc..dec25e737c 100644 --- a/calendar/main.c +++ b/calendar/main.c @@ -141,7 +141,23 @@ static void display_objedit (GtkWidget *widget, GnomeCalendar *gcal) { GtkWidget *ee; + iCalObject *ico; + + /* Default to the day the user is looking at */ + ico = ical_new ("", user_name, ""); + ico->new = 1; + ico->dtstart = time_add_minutes (gcal->current_display, day_begin * 60); + ico->dtend = time_add_minutes (ico->dtstart, day_begin * 60 + 30 ); + + ee = event_editor_new (gcal, ico); + gtk_widget_show (ee); +} +static void +display_objedit_today (GtkWidget *widget, GnomeCalendar *gcal) +{ + GtkWidget *ee; + ee = event_editor_new (gcal, NULL); gtk_widget_show (ee); } @@ -330,6 +346,7 @@ static GnomeUIInfo gnome_cal_about_menu [] = { static GnomeUIInfo gnome_cal_edit_menu [] = { { GNOME_APP_UI_ITEM, N_("New appointment..."), NULL, display_objedit }, + { GNOME_APP_UI_ITEM, N_("New appointment for today..."), NULL, display_objedit_today }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, N_("Properties..."), NULL, properties, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PROP }, -- cgit v1.2.3