[gthumb/gthumb-3-2] Also use button 2 in gth-image-dragger
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-3-2] Also use button 2 in gth-image-dragger
- Date: Mon, 15 Apr 2013 07:59:38 +0000 (UTC)
commit 8dcae4006795d86d1b27d949f0af83c457ffc40a
Author: Adrian Knoth <adi drcomp erfurt thur de>
Date: Sun Apr 14 20:48:41 2013 +0200
Also use button 2 in gth-image-dragger
GIMP and inkscape both allow to drag the image around while holding down
button2 (mouse wheel).
For the sake of convenience (users who are familiar with those other
tools), implement the same in gthumb.
Button1 is not changed, so button1 and button2 now both allow to drag
the image.
Signed-off-by: Adrian Knoth <adi drcomp erfurt thur de>
gthumb/gth-image-dragger.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-image-dragger.c b/gthumb/gth-image-dragger.c
index 79976da..3201e58 100644
--- a/gthumb/gth-image-dragger.c
+++ b/gthumb/gth-image-dragger.c
@@ -216,7 +216,8 @@ gth_image_dragger_button_press (GthImageViewerTool *self,
if (! dragger->priv->draggable)
return FALSE;
- if ((event->button == 1) && ! viewer->dragging) {
+ if (((event->button == 1) || (event->button == 2)) &&
+ ! viewer->dragging) {
GdkCursor *cursor;
GdkGrabStatus retval;
@@ -254,7 +255,7 @@ gth_image_dragger_button_release (GthImageViewerTool *self,
GthImageDragger *dragger;
GthImageViewer *viewer;
- if (event->button != 1)
+ if ((event->button != 1) && (event->button != 2))
return FALSE;
dragger = (GthImageDragger *) self;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]