Fixed ticket #117 ("double-click on scrollbars surrounding zoomed
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Sep 2006 20:22:34 +0000 (20:22 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Sep 2006 20:22:34 +0000 (20:22 +0000)
image triggers full screen mode").

src/packages/kofoto/gkofoto/imageview.py
src/packages/kofoto/gkofoto/singleobjectview.py

index 7ae0c06..a0aae88 100644 (file)
@@ -126,6 +126,14 @@ class ImageView(gtk.ScrolledWindow):
         self._image_widget.queue_draw()
         gc.collect() # Help GTK to get rid of the old pixbuf.
 
+    def get_image_widget(self):
+        """Get the wrapped image widget.
+
+        Returns the wrapped image widget. This widget is the widget to
+        which mouse event handlers should be connected.
+        """
+        return self._eventbox_widget
+
     def get_prescale_mode(self):
         """Whether the widget should prescale a resized image."""
 
index 6fc248b..f9b3e5a 100644 (file)
@@ -22,7 +22,8 @@ class SingleObjectView(ObjectCollectionView, gtk.HPaned):
         self.__imageView = ImageView()
         self.__imageView.set_error_pixbuf(
             gtk.gdk.pixbuf_new_from_file(env.unknownImageIconFileName))
-        self.__imageView.connect("button_press_event", self._mouse_button_pressed)
+        self.__imageView.get_image_widget().connect(
+            "button_press_event", self._mouse_button_pressed)
         self.pack1(self.__imageView, resize=True)
         self.__imageVersionsFrame = gtk.Frame("Image versions")
         self.__imageVersionsFrame.set_size_request(162, -1)