summaryrefslogtreecommitdiff
path: root/src/gpm-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpm-common.c')
-rw-r--r--src/gpm-common.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/src/gpm-common.c b/src/gpm-common.c
index fedc594..5a9d964 100644
--- a/src/gpm-common.c
+++ b/src/gpm-common.c
@@ -157,11 +157,9 @@ gpm_help_display (const gchar *link_id)
g_free (uri);
}
-/**
- * gpm_dialog_page_scroll_event_cb:
- **/
gboolean
-gpm_dialog_page_scroll_event_cb (GtkWidget *widget, GdkEventScroll *event, GtkWindow *window)
+gpm_notebook_scroll_event_cb (GtkWidget *widget,
+ GdkEventScroll *event)
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
GtkWidget *child, *event_widget, *action_widget;
@@ -180,37 +178,38 @@ gpm_dialog_page_scroll_event_cb (GtkWidget *widget, GdkEventScroll *event, GtkWi
action_widget = gtk_notebook_get_action_widget (notebook, GTK_PACK_START);
if (event_widget == action_widget || (action_widget != NULL && gtk_widget_is_ancestor (event_widget, action_widget)))
return FALSE;
+
action_widget = gtk_notebook_get_action_widget (notebook, GTK_PACK_END);
if (event_widget == action_widget || (action_widget != NULL && gtk_widget_is_ancestor (event_widget, action_widget)))
return FALSE;
switch (event->direction) {
- case GDK_SCROLL_RIGHT:
- case GDK_SCROLL_DOWN:
- gtk_notebook_next_page (notebook);
- break;
- case GDK_SCROLL_LEFT:
- case GDK_SCROLL_UP:
- gtk_notebook_prev_page (notebook);
- break;
- case GDK_SCROLL_SMOOTH:
- switch (gtk_notebook_get_tab_pos (notebook)) {
- case GTK_POS_LEFT:
- case GTK_POS_RIGHT:
- if (event->delta_y > 0)
- gtk_notebook_next_page (notebook);
- else if (event->delta_y < 0)
- gtk_notebook_prev_page (notebook);
+ case GDK_SCROLL_RIGHT:
+ case GDK_SCROLL_DOWN:
+ gtk_notebook_next_page (notebook);
+ break;
+ case GDK_SCROLL_LEFT:
+ case GDK_SCROLL_UP:
+ gtk_notebook_prev_page (notebook);
break;
- case GTK_POS_TOP:
- case GTK_POS_BOTTOM:
- if (event->delta_x > 0)
- gtk_notebook_next_page (notebook);
- else if (event->delta_x < 0)
- gtk_notebook_prev_page (notebook);
+ case GDK_SCROLL_SMOOTH:
+ switch (gtk_notebook_get_tab_pos (notebook)) {
+ case GTK_POS_LEFT:
+ case GTK_POS_RIGHT:
+ if (event->delta_y > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_y < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ case GTK_POS_TOP:
+ case GTK_POS_BOTTOM:
+ if (event->delta_x > 0)
+ gtk_notebook_next_page (notebook);
+ else if (event->delta_x < 0)
+ gtk_notebook_prev_page (notebook);
+ break;
+ }
break;
- }
- break;
}
return TRUE;