From c150a409d44428073347bf5da033d0290cda4d4d Mon Sep 17 00:00:00 2001 From: Nat Friedman Date: Tue, 25 May 1999 17:09:56 +0000 Subject: This is the fix Miguel and I hacked in the car at Expo to make the year view work in low-resolution displays. This isn't the proper fix, but it's better than the way things were. 1999-05-25 Nat Friedman * doc/C/gnomecal.sgml: Fixed a typo. * gnome-cal.c (setup_widgets): Added a scrolled window widget into which the year view is placed. * year-view.c (CALENDAR_HEIGHT): The height of the total year view inside the scrolled window. (idle_handler): Set the height of the year view to CALENDAR_HEIGHT. (year_view_size_allocate): Set the scroll region of the year view canvas to allocation->width, CALENDAR_HEIGHT. svn path=/trunk/; revision=938 --- calendar/gnome-cal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'calendar/gnome-cal.c') diff --git a/calendar/gnome-cal.c b/calendar/gnome-cal.c index 89d6998e3e..3558f58347 100644 --- a/calendar/gnome-cal.c +++ b/calendar/gnome-cal.c @@ -44,6 +44,7 @@ gnome_calendar_get_type (void) static void setup_widgets (GnomeCalendar *gcal) { + GtkWidget *sw; time_t now; now = time (NULL); @@ -54,10 +55,13 @@ 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_container_add (GTK_CONTAINER (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), gcal->year_view, gtk_label_new (_("Year View"))); + gtk_notebook_append_page (GTK_NOTEBOOK (gcal->notebook), sw, gtk_label_new (_("Year View"))); gtk_widget_show_all (gcal->notebook); -- cgit v1.2.3