aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-calendar-view.h4
-rw-r--r--calendar/gui/e-week-view.c19
3 files changed, 30 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3ada63611e..3ccf847896 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2005-10-01 Viren.L <lviren@novell.com>
+
+ Fixes #257649
+ * gui/e-calendar-view.h:
+ Added E_CAL_VIEW_MOVE_PAGE_UP & E_CAL_VIEW_MOVE_PAGE_DOWN to ECalViewMoveDirection.
+ * gui/e-week-view.c (e_week_view_do_key_press), (e_week_view_scroll_a_step):
+ Handled PageUp & PageDown cases and compute new value for
+ adjustment using the current page size value.
+
2005-10-01 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #244981
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index dbcfbc55f7..17778e3a2b 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -54,7 +54,9 @@ typedef enum {
E_CAL_VIEW_MOVE_UP,
E_CAL_VIEW_MOVE_DOWN,
E_CAL_VIEW_MOVE_LEFT,
- E_CAL_VIEW_MOVE_RIGHT
+ E_CAL_VIEW_MOVE_RIGHT,
+ E_CAL_VIEW_MOVE_PAGE_UP,
+ E_CAL_VIEW_MOVE_PAGE_DOWN
} ECalViewMoveDirection;
#define E_CALENDAR_VIEW_EVENT_FIELDS \
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 7da1a891a2..a3cd52bba3 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3169,10 +3169,15 @@ e_week_view_scroll_a_step (EWeekView *week_view, ECalViewMoveDirection direction
case E_CAL_VIEW_MOVE_DOWN:
new_value = adj->value + adj->step_increment;
break;
+ case E_CAL_VIEW_MOVE_PAGE_UP:
+ new_value = adj->value - adj->page_size;
+ break;
+ case E_CAL_VIEW_MOVE_PAGE_DOWN:
+ new_value = adj->value + adj->page_size;
+ break;
default:
return;
}
-
new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
}
@@ -3735,6 +3740,18 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
&& !(event->state & GDK_MOD1_MASK)) {
stop_emission = TRUE;
switch (keyval) {
+ case GDK_Page_Up:
+ if (!week_view->multi_week_view)
+ e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_UP);
+ else
+ e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_PAGE_UP);
+ break;
+ case GDK_Page_Down:
+ if (!week_view->multi_week_view)
+ e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_DOWN);
+ else
+ e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_PAGE_DOWN);
+ break;
case GDK_Up:
e_week_view_cursor_key_up (week_view, view_type);
break;