summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-icon-view.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-11-04 15:45:56 -0400
committerlukefromdc <[email protected]>2016-11-04 15:45:56 -0400
commit3e93f938000cdb24a6137daecd77fe010ae93f36 (patch)
treead437e6f3ba1691792c861fcf224bf1add9b6a24 /src/file-manager/fm-icon-view.c
parentae053dbf2cc26ae74df5e782261c3a3bc7126763 (diff)
downloadcaja-3e93f938000cdb24a6137daecd77fe010ae93f36.tar.bz2
caja-3e93f938000cdb24a6137daecd77fe010ae93f36.tar.xz
Fix GTK2 build
Diffstat (limited to 'src/file-manager/fm-icon-view.c')
-rw-r--r--src/file-manager/fm-icon-view.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index d5980511..c348cbd6 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -2493,7 +2493,7 @@ fm_icon_view_scroll_event (GtkWidget *widget,
gboolean ret;
icon_view = FM_ICON_VIEW (widget);
-
+#if GTK_CHECK_VERSION (3, 0, 0)
if (icon_view->details->compact &&
(scroll_event->direction == GDK_SCROLL_UP ||
scroll_event->direction == GDK_SCROLL_DOWN ||
@@ -2516,6 +2516,23 @@ fm_icon_view_scroll_event (GtkWidget *widget,
}
}
if ((scroll_event_copy->direction == GDK_SCROLL_UP) || (scroll_event_copy->delta_x == -1.0))
+
+#else
+
+ if (icon_view->details->compact &&
+ (scroll_event->direction == GDK_SCROLL_UP ||
+ scroll_event->direction == GDK_SCROLL_DOWN))
+ {
+ ret = fm_directory_view_handle_scroll_event (FM_DIRECTORY_VIEW (icon_view), scroll_event);
+ if (!ret)
+ {
+ /* in column-wise layout, re-emit vertical mouse scroll events as horizontal ones,
+ * if they don't bump zoom */
+ event_copy = gdk_event_copy ((GdkEvent *) scroll_event);
+
+ scroll_event_copy = (GdkEventScroll *) event_copy;
+ if (scroll_event_copy->direction == GDK_SCROLL_UP)
+#endif
{
scroll_event_copy->direction = GDK_SCROLL_LEFT;
}