More generic use of event. master
authorRafał Długołęcki <rafal@dlugolecki.net.pl>
Sun, 25 Jan 2015 23:44:18 +0000 (00:44 +0100)
committerRafał Długołęcki <rafal@dlugolecki.net.pl>
Sun, 25 Jan 2015 23:44:18 +0000 (00:44 +0100)
src/ui/drawing_area.c

index 3457998930fa9fcf661cf9d3dadfe6b22f5ee03a..16448474091ed73e66c535cb5477e5ef3a713bbd 100644 (file)
@@ -156,7 +156,7 @@ void drawing_area_unrealize (GtkWidget *widget, gpointer data)
  * drawing area using mouse or touchpad.
  */
 void drawing_area_event_scroll (GtkWidget *widget,
-                               GdkEventScroll *event, FamiliaData *data)
+                               GdkEvent *event, FamiliaData *data)
 {
        GtkAdjustment *adjustment = NULL;
        gdouble value = 0;
@@ -164,7 +164,7 @@ void drawing_area_event_scroll (GtkWidget *widget,
 
        assert(event->type == GDK_SCROLL);
 
-       switch(event->direction) {
+       switch(event->scroll.direction) {
                case GDK_SCROLL_UP:
                        adjustment = data->vadjustment;
                        step = 1;
@@ -181,6 +181,8 @@ void drawing_area_event_scroll (GtkWidget *widget,
                        adjustment = data->hadjustment;
                        step = 1;
                        break;
+               default:
+                       break;
        }
 
        if (adjustment != NULL) {