diff options
author | Robert Brady <rwb197@ecs.soton.ac.uk> | 1999-06-06 11:55:58 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-06-06 11:55:58 +0800 |
commit | 229005f6b1aad62105a6f6f7f529c3088cfb71cd (patch) | |
tree | 81e68270046d47c72c52d9159db609f5294104b4 /calendar/gui | |
parent | 3b1fe766a88f56bb10eb6dfe2a75e8ab211a5718 (diff) | |
download | gsoc2013-evolution-229005f6b1aad62105a6f6f7f529c3088cfb71cd.tar.gz gsoc2013-evolution-229005f6b1aad62105a6f6f7f529c3088cfb71cd.tar.zst gsoc2013-evolution-229005f6b1aad62105a6f6f7f529c3088cfb71cd.zip |
Fix abort() problem with the year view. (Bug #1367). Thanks to Owen Cliffe
1999-06-04 Robert Brady <rwb197@ecs.soton.ac.uk>
* gnome-cal.h, gnome-cal.c: Fix abort() problem with the year view.
(Bug #1367). Thanks to Owen Cliffe <oc197@ecs.soton.ac.uk> for
helping track it down.
svn path=/trunk/; revision=971
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/gnome-cal.c | 15 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.h | 1 |
2 files changed, 8 insertions, 8 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index d040a9b594..86900dd343 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -44,7 +44,6 @@ gnome_calendar_get_type (void) static void setup_widgets (GnomeCalendar *gcal) { - GtkWidget *sw; time_t now; now = time (NULL); @@ -55,16 +54,16 @@ setup_widgets (GnomeCalendar *gcal) gcal->month_view = month_view_new (gcal, now); gcal->year_view = year_view_new (gcal, now); - sw = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), + gcal->year_view_sw = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (gcal->year_view_sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - gtk_container_add (GTK_CONTAINER (sw), gcal->year_view); + gtk_container_add (GTK_CONTAINER (gcal->year_view_sw), gcal->year_view); gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->day_view, gtk_label_new (_("Day View"))); gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->week_view, gtk_label_new (_("Week View"))); gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->month_view, gtk_label_new (_("Month View"))); - gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), sw, gtk_label_new (_("Year View"))); + gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), gcal->year_view_sw, gtk_label_new (_("Year View"))); gtk_widget_show_all (gcal->notebook); @@ -93,7 +92,7 @@ gnome_calendar_get_current_view_name (GnomeCalendar *gcal) return "weekview"; else if (page == gcal->month_view) return "monthview"; - else if (page == gcal->year_view) + else if (page == gcal->year_view_sw) return "yearview"; else return "dayview"; @@ -117,7 +116,7 @@ gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time) gncal_week_view_set (GNCAL_WEEK_VIEW (gcal->week_view), new_time); else if (current == gcal->month_view) month_view_set (MONTH_VIEW (gcal->month_view), new_time); - else if (current == gcal->year_view) + else if (current == gcal->year_view_sw) year_view_set (YEAR_VIEW (gcal->year_view), new_time); else { g_warning ("My penguin is gone!"); @@ -139,7 +138,7 @@ gnome_calendar_direction (GnomeCalendar *gcal, int direction) new_time = time_add_week (time_week_begin (gcal->current_display), 1 * direction); else if (cp == gcal->month_view) new_time = time_add_month (time_month_begin (gcal->current_display), 1 * direction); - else if (cp == gcal->year_view) + else if (cp == gcal->year_view_sw) new_time = time_add_year (time_year_begin (gcal->current_display), 1 * direction); else { g_warning ("Weee! Where did the penguin go?"); diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h index 3939becc52..ae4e5292da 100644 --- a/calendar/gui/gnome-cal.h +++ b/calendar/gui/gnome-cal.h @@ -28,6 +28,7 @@ typedef struct { GtkWidget *week_view; GtkWidget *month_view; GtkWidget *year_view; + GtkWidget *year_view_sw; void *event_editor; } GnomeCalendar; |