aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/year-view.c
diff options
context:
space:
mode:
authorNat Friedman <nat@nat.org>1999-05-26 01:09:56 +0800
committerNat Friedman <nat@src.gnome.org>1999-05-26 01:09:56 +0800
commitc150a409d44428073347bf5da033d0290cda4d4d (patch)
tree0338f6c67a2f113f9e25affb675b7aa201874be1 /calendar/year-view.c
parent3be2b5f40a41f1a375d07ed7eba5d388ca699e7d (diff)
downloadgsoc2013-evolution-c150a409d44428073347bf5da033d0290cda4d4d.tar
gsoc2013-evolution-c150a409d44428073347bf5da033d0290cda4d4d.tar.gz
gsoc2013-evolution-c150a409d44428073347bf5da033d0290cda4d4d.tar.bz2
gsoc2013-evolution-c150a409d44428073347bf5da033d0290cda4d4d.tar.lz
gsoc2013-evolution-c150a409d44428073347bf5da033d0290cda4d4d.tar.xz
gsoc2013-evolution-c150a409d44428073347bf5da033d0290cda4d4d.tar.zst
gsoc2013-evolution-c150a409d44428073347bf5da033d0290cda4d4d.zip
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 <nat@nat.org> * 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
Diffstat (limited to 'calendar/year-view.c')
-rw-r--r--calendar/year-view.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/calendar/year-view.c b/calendar/year-view.c
index efd22a475f..ebfc6d2e44 100644
--- a/calendar/year-view.c
+++ b/calendar/year-view.c
@@ -21,6 +21,8 @@
#define TITLE_SPACING 1 /* Spacing between title and calendar */
#define SPACING 4 /* Spacing between months */
+#define CALENDAR_HEIGHT 600 /* Height of the entire year view. */
+
static void year_view_class_init (YearViewClass *class);
static void year_view_init (YearView *yv);
@@ -105,9 +107,8 @@ idle_handler (gpointer data)
title_height = GTK_VALUE_DOUBLE (arg);
/* Space for the titles and months */
-
width = GTK_WIDGET (yv)->allocation.width;
- height = GTK_WIDGET (yv)->allocation.height - head_height;
+ height = CALENDAR_HEIGHT;
/* Offsets */
@@ -569,6 +570,7 @@ year_view_new (GnomeCalendar *calendar, time_t year)
year_view_colors_changed (yv);
year_view_set (yv, year);
compute_min_size (yv);
+
return GTK_WIDGET (yv);
}
@@ -601,7 +603,7 @@ year_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
(* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
- gnome_canvas_set_scroll_region (GNOME_CANVAS (yv), 0, 0, allocation->width, allocation->height);
+ gnome_canvas_set_scroll_region (GNOME_CANVAS (yv), 0, 0, allocation->width, CALENDAR_HEIGHT);
need_resize (yv);
}