aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-07-23 20:14:57 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-07-23 20:14:57 +0800
commit3be35526b66418c9ccd664523620c8c7cde550b5 (patch)
tree559eb54a4569725787a3a21440e4506f5fbdcb8e /calendar/gui/gnome-cal.c
parentc1a24b93ef371ae2d2aca8b905b9d3ed72b16083 (diff)
downloadgsoc2013-evolution-3be35526b66418c9ccd664523620c8c7cde550b5.tar
gsoc2013-evolution-3be35526b66418c9ccd664523620c8c7cde550b5.tar.gz
gsoc2013-evolution-3be35526b66418c9ccd664523620c8c7cde550b5.tar.bz2
gsoc2013-evolution-3be35526b66418c9ccd664523620c8c7cde550b5.tar.lz
gsoc2013-evolution-3be35526b66418c9ccd664523620c8c7cde550b5.tar.xz
gsoc2013-evolution-3be35526b66418c9ccd664523620c8c7cde550b5.tar.zst
gsoc2013-evolution-3be35526b66418c9ccd664523620c8c7cde550b5.zip
removed unneeded prototypes.
2003-07-23 Rodrigo Moya <rodrigo@ximian.com> * gui/e-day-view.h: * gui/e-week-view.h: removed unneeded prototypes. * gui/e-cal-view.[ch] (e_cal_view_get_visible_time_range): new function. (selection_received): deal correctly with the selected time range. * gui/e-week-view.c (e_week_view_get_visible_time_range): made it private as the implementation of the 'get_visible_time_range' virtual method. * gui/e-day-view.c (e_day_view_get_visible_time_range): ditto. * gui/gnome-cal.c (gnome_calendar_direction): merged redundant 'case'. (focus_current_view): removed redundant code. svn path=/trunk/; revision=21897
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c50
1 files changed, 3 insertions, 47 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index f405a16142..61b4980586 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1215,12 +1215,6 @@ gnome_calendar_direction (GnomeCalendar *gcal, int direction)
break;
case GNOME_CAL_WORK_WEEK_VIEW:
- start_time = time_add_week_with_zone (start_time, direction,
- priv->zone);
- end_time = time_add_week_with_zone (end_time, direction,
- priv->zone);
- break;
-
case GNOME_CAL_WEEK_VIEW:
start_time = time_add_week_with_zone (start_time, direction,
priv->zone);
@@ -1291,27 +1285,7 @@ focus_current_view (GnomeCalendar *gcal)
priv = gcal->priv;
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- gtk_widget_grab_focus (priv->day_view);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- gtk_widget_grab_focus (priv->work_week_view);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- gtk_widget_grab_focus (priv->week_view);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- gtk_widget_grab_focus (priv->month_view);
- break;
-
- default:
- g_warning ("A penguin fell on its face!");
- g_assert_not_reached ();
- }
+ gtk_widget_grab_focus (gnome_calendar_get_current_view_widget (gcal));
}
void
@@ -2555,26 +2529,8 @@ gnome_calendar_get_visible_time_range (GnomeCalendar *gcal,
priv = gcal->priv;
- switch (priv->current_view_type) {
- case GNOME_CAL_DAY_VIEW:
- retval = e_day_view_get_visible_time_range (E_DAY_VIEW (priv->day_view), start_time, end_time);
- break;
-
- case GNOME_CAL_WORK_WEEK_VIEW:
- retval = e_day_view_get_visible_time_range (E_DAY_VIEW (priv->work_week_view), start_time, end_time);
- break;
-
- case GNOME_CAL_WEEK_VIEW:
- retval = e_week_view_get_visible_time_range (E_WEEK_VIEW (priv->week_view), start_time, end_time);
- break;
-
- case GNOME_CAL_MONTH_VIEW:
- retval = e_week_view_get_visible_time_range (E_WEEK_VIEW (priv->month_view), start_time, end_time);
- break;
-
- default:
- g_assert_not_reached ();
- }
+ e_cal_view_get_visible_time_range (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)),
+ start_time, end_time);
return retval;
}