From 72797decc12602b181f69dba7c54df7a0d1b9326 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 30 Jan 2010 14:03:19 -0500 Subject: Giant leap towards GSEAL compliance. --- calendar/gui/gnome-cal.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index b173bccff7..bc270d2d97 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -230,14 +230,17 @@ update_adjustment (GnomeCalendar *gcal, time_t lower; guint32 old_first_day_julian, new_first_day_julian; icaltimezone *timezone; + gdouble value; /* If we don't have a valid date set yet, just return. */ if (!g_date_valid (&week_view->first_day_shown)) return; + value = gtk_adjustment_get_value (adjustment); + /* Determine the first date shown. */ date = week_view->base_date; - week_offset = floor (adjustment->value + 0.5); + week_offset = floor (value + 0.5); g_date_add_days (&date, week_offset * 7); /* Convert the old & new first days shown to julian values. */ @@ -2088,11 +2091,7 @@ gnome_calendar_update_date_navigator (GnomeCalendar *gcal) return; /* If the ECalendar isn't visible, we just return. */ -#if GTK_CHECK_VERSION(2,19,7) if (!gtk_widget_get_visible (GTK_WIDGET (priv->date_navigator))) -#else - if (!GTK_WIDGET_VISIBLE (priv->date_navigator)) -#endif return; if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range) -- cgit