aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-05-09 08:04:08 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-05-09 08:04:08 +0800
commita9b1af2b26c0be96173149078b4e98b2b1d3aac2 (patch)
tree457f1242ed55d2503a3e8cca55c35e597fa0bd2d /calendar/gui
parentca6dd05c600cfbaf6c9b16059b2377932463ea0d (diff)
downloadgsoc2013-evolution-a9b1af2b26c0be96173149078b4e98b2b1d3aac2.tar
gsoc2013-evolution-a9b1af2b26c0be96173149078b4e98b2b1d3aac2.tar.gz
gsoc2013-evolution-a9b1af2b26c0be96173149078b4e98b2b1d3aac2.tar.bz2
gsoc2013-evolution-a9b1af2b26c0be96173149078b4e98b2b1d3aac2.tar.lz
gsoc2013-evolution-a9b1af2b26c0be96173149078b4e98b2b1d3aac2.tar.xz
gsoc2013-evolution-a9b1af2b26c0be96173149078b4e98b2b1d3aac2.tar.zst
gsoc2013-evolution-a9b1af2b26c0be96173149078b4e98b2b1d3aac2.zip
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
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/eventedit.c2
-rw-r--r--calendar/gui/gnome-cal.c2
-rw-r--r--calendar/gui/main.c17
-rw-r--r--calendar/gui/year-view.c6
4 files changed, 25 insertions, 2 deletions
diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c
index 30068867a3..b843ad049c 100644
--- a/calendar/gui/eventedit.c
+++ b/calendar/gui/eventedit.c
@@ -1437,7 +1437,7 @@ static void
event_editor_init (EventEditor *ee)
{
ee->ical = 0;
- gnome_dialog_set_destroy(GNOME_DIALOG(ee), TRUE);
+ gnome_dialog_set_close (GNOME_DIALOG(ee), TRUE);
}
static void
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index e4312e9341..5db24e9828 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -377,6 +377,8 @@ gnome_calendar_tag_calendar (GnomeCalendar *cal, GtkCalendar *gtk_cal)
tm.tm_mon++;
month_end = mktime (&tm);
+ gtk_calendar_freeze (gtk_cal);
gtk_calendar_clear_marks (gtk_cal);
calendar_iterate (cal->cal, month_begin, month_end, mark_gtk_calendar_day, gtk_cal);
+ gtk_calendar_thaw (gtk_cal);
}
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 64b58cb1fc..dec25e737c 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/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 },
diff --git a/calendar/gui/year-view.c b/calendar/gui/year-view.c
index d28130bb6f..bc03b4f36e 100644
--- a/calendar/gui/year-view.c
+++ b/calendar/gui/year-view.c
@@ -198,8 +198,9 @@ gncal_year_view_set_year (GncalYearView *yview, int year)
snprintf(buff, 20, "%d", yview->year + 1900);
gtk_label_set(GTK_LABEL(yview->year_label), buff);
-
+
for (i = 0; i < 12; i++) {
+ gtk_calendar_freeze (GTK_CALENDAR (yview->calendar [i]));
gtk_calendar_select_month (GTK_CALENDAR(yview->calendar[i]), i, yview->year + 1900);
gtk_calendar_clear_marks (GTK_CALENDAR (yview->calendar[i]));
}
@@ -213,6 +214,9 @@ gncal_year_view_set_year (GncalYearView *yview, int year)
year_view_mark_day (co->ico, co->ev_start, co->ev_end, yview);
}
+ for (i = 0; i < 12; i++)
+ gtk_calendar_thaw (GTK_CALENDAR (yview->calendar [i]));
+
calendar_destroy_event_list (l);
}