Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ImageViewerActivity.py
diff options
context:
space:
mode:
authorManuel QuiƱones <manuq@laptop.org>2013-05-15 03:48:53 (GMT)
committer Agustin Zubiaga <aguz@localhost.localdomain>2013-06-03 19:07:00 (GMT)
commite080cd8d3a45ceafe23067307373127b0a24081c (patch)
tree5356fa32c3fd51c83a367a5dd5f9e0330acca2cd /ImageViewerActivity.py
parent55632ae4a8c4c420677c78648159b527822516e3 (diff)
Make zoom buttons sensitivity work
Diffstat (limited to 'ImageViewerActivity.py')
-rw-r--r--ImageViewerActivity.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/ImageViewerActivity.py b/ImageViewerActivity.py
index 1a92015..7d73d42 100644
--- a/ImageViewerActivity.py
+++ b/ImageViewerActivity.py
@@ -273,19 +273,25 @@ class ImageViewerActivity(activity.Activity):
toolbar_box.toolbar.insert(stop_button, -1)
stop_button.show()
+ def _update_zoom_buttons(self):
+ self._zoom_in_button.set_sensitive(self.view.can_zoom_in())
+ self._zoom_out_button.set_sensitive(self.view.can_zoom_out())
+
def __zoom_in_cb(self, button):
- self._zoom_in_button.set_sensitive(self.view.zoom_in())
- self._zoom_out_button.set_sensitive(True)
+ self.view.zoom_in()
+ self._update_zoom_buttons()
def __zoom_out_cb(self, button):
- self._zoom_out_button.set_sensitive(self.view.zoom_out())
- self._zoom_in_button.set_sensitive(True)
+ self.view.zoom_out()
+ self._update_zoom_buttons()
def __zoom_tofit_cb(self, button):
self.view.zoom_to_fit()
+ self._update_zoom_buttons()
def __zoom_original_cb(self, button):
- self.view.zoom_equal()
+ self.view.zoom_original()
+ self._update_zoom_buttons()
def __rotate_anticlockwise_cb(self, button):
angle = self.view.angle - math.pi / 2