Don't handle the mouse buttons 4/5, this is handled by

2002-07-29  Jens Finke  <jens@triq.net>

	* libeog/image-view.c (image_view_button_press_event): Don't
	handle the mouse buttons 4/5, this is handled by
	image_view_scroll_event.
	(image_view_scroll_event): Made the scroll wheel and modifier
	behaviour more consistent with other applications: scroll wheel =
	scroll vertical, shift + scroll wheel = zoom in/out, ctrl + scroll
	wheel = scroll horizontal.
This commit is contained in:
Jens Finke 2002-07-29 18:00:50 +00:00 committed by Jens Finke
parent b03df9c1ce
commit b15e148d4a
2 changed files with 13 additions and 16 deletions

View file

@ -1,3 +1,13 @@
2002-07-29 Jens Finke <jens@triq.net>
* libeog/image-view.c (image_view_button_press_event): Don't
handle the mouse buttons 4/5, this is handled by
image_view_scroll_event.
(image_view_scroll_event): Made the scroll wheel and modifier
behaviour more consistent with other applications: scroll wheel =
scroll vertical, shift + scroll wheel = zoom in/out, ctrl + scroll
wheel = scroll horizontal.
2002-07-28 Christian Rose <menthos@menthos.com>
* configure.in: Added "sq" to ALL_LINGUAS.

View file

@ -1120,21 +1120,6 @@ image_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
priv->drag_ofs_y = priv->yofs;
return TRUE;
case 4:
image_view_set_zoom (view,
priv->zoomx * IMAGE_VIEW_ZOOM_MULTIPLIER,
priv->zoomy * IMAGE_VIEW_ZOOM_MULTIPLIER,
TRUE, event->x, event->y);
return TRUE;
case 5:
image_view_set_zoom (view,
priv->zoomx / IMAGE_VIEW_ZOOM_MULTIPLIER,
priv->zoomy / IMAGE_VIEW_ZOOM_MULTIPLIER,
TRUE, event->x, event->y);
return TRUE;
default:
break;
}
@ -1235,9 +1220,11 @@ image_view_scroll_event (GtkWidget *widget, GdkEventScroll *event)
return FALSE;
}
if ((event->state & GDK_SHIFT_MASK) == 0)
if ((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
image_view_set_zoom (view, priv->zoomx * zoom_factor, priv->zoomy * zoom_factor,
TRUE, event->x, event->y);
else if ((event->state & GDK_CONTROL_MASK) == GDK_CONTROL_MASK)
scroll_by (view, yofs, xofs);
else
scroll_by (view, xofs, yofs);