diff options
author | Anders Carlsson <andersca@src.gnome.org> | 2000-07-08 15:18:47 +0800 |
---|---|---|
committer | Anders Carlsson <andersca@src.gnome.org> | 2000-07-08 15:18:47 +0800 |
commit | 2219b51a72c7c598777a64f1b39f329c12a7e9c6 (patch) | |
tree | a58246cb8ae77146198382c7ad8e8037531e7551 /calendar/gui/e-week-view.c | |
parent | d93826e6b32b5ab3fde15eaa5746df1fbff76a60 (diff) | |
download | gsoc2013-evolution-2219b51a72c7c598777a64f1b39f329c12a7e9c6.tar gsoc2013-evolution-2219b51a72c7c598777a64f1b39f329c12a7e9c6.tar.gz gsoc2013-evolution-2219b51a72c7c598777a64f1b39f329c12a7e9c6.tar.bz2 gsoc2013-evolution-2219b51a72c7c598777a64f1b39f329c12a7e9c6.tar.lz gsoc2013-evolution-2219b51a72c7c598777a64f1b39f329c12a7e9c6.tar.xz gsoc2013-evolution-2219b51a72c7c598777a64f1b39f329c12a7e9c6.tar.zst gsoc2013-evolution-2219b51a72c7c598777a64f1b39f329c12a7e9c6.zip |
Add mouse wheel scrolling support to the calendar day and week views
svn path=/trunk/; revision=3971
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index db27ef3404..ee237abffb 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -1355,6 +1355,20 @@ e_week_view_on_button_press (GtkWidget *widget, g_print ("In e_week_view_on_button_press\n"); #endif + /* Handle scroll wheel events */ + if (event->button == 4 || event->button == 5) { + GtkAdjustment *adj = GTK_RANGE (week_view->vscrollbar)->adjustment; + gfloat new_value; + + new_value = adj->value + ((event->button == 4) ? + -adj->page_increment: + adj->page_increment); + new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size); + gtk_adjustment_set_value (adj, new_value); + + return TRUE; + } + /* If an event is pressed just return. */ if (week_view->pressed_event_num != -1) return FALSE; |