[orca] Fix for bgo#621800 - GUI: should not be possible to set the right coordinate of zoomer position to l



commit 7000aa8c97b80e59435725e431704156ca5bf409
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sat Jun 19 13:59:52 2010 -0400

    Fix for bgo#621800 - GUI: should not be possible to set the right coordinate of zoomer position to less than left (ditto for bottom less than top)

 src/orca/orca_gui_prefs.py |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 86eb625..531549a 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -3260,10 +3260,12 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if not (self.enableLiveUpdating and widget.is_focus()):
             return
 
+        bottomSpinButton = self.get_widget("magZoomerBottomSpinButton")
+        bottomSpinButton.get_adjustment().set_lower(top)
+
         left = self.get_widget("magZoomerLeftSpinButton").get_value_as_int()
         right = self.get_widget("magZoomerRightSpinButton").get_value_as_int()
-        bottom = \
-               self.get_widget("magZoomerBottomSpinButton").get_value_as_int()
+        bottom = bottomSpinButton.get_value_as_int()
         mag.setupMagnifier(settings.MAG_ZOOMER_TYPE_CUSTOM,
                            left, top, right, bottom, self.prefsDict)
 
@@ -3283,8 +3285,11 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if not (self.enableLiveUpdating and widget.is_focus()):
             return
 
+        topSpinButton = self.get_widget("magZoomerTopSpinButton")
+        topSpinButton.get_adjustment().set_upper(bottom)
+
         left = self.get_widget("magZoomerLeftSpinButton").get_value_as_int()
-        top = self.get_widget("magZoomerTopSpinButton").get_value_as_int()
+        top = topSpinButton.get_value_as_int()
         right = self.get_widget("magZoomerRightSpinButton").get_value_as_int()
         mag.setupMagnifier(settings.MAG_ZOOMER_TYPE_CUSTOM,
                            left, top, right, bottom, self.prefsDict)
@@ -3305,8 +3310,11 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if not (self.enableLiveUpdating and widget.is_focus()):
             return
 
+        rightSpinButton = self.get_widget("magZoomerRightSpinButton")
+        rightSpinButton.get_adjustment().set_lower(left)
+
         top = self.get_widget("magZoomerTopSpinButton").get_value_as_int()
-        right = self.get_widget("magZoomerRightSpinButton").get_value_as_int()
+        right = rightSpinButton.get_value_as_int()
         bottom = \
                self.get_widget("magZoomerBottomSpinButton").get_value_as_int()
         mag.setupMagnifier(settings.MAG_ZOOMER_TYPE_CUSTOM,
@@ -3328,7 +3336,10 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if not (self.enableLiveUpdating and widget.is_focus()):
             return
 
-        left = self.get_widget("magZoomerLeftSpinButton").get_value_as_int()
+        leftSpinButton = self.get_widget("magZoomerLeftSpinButton")
+        leftSpinButton.get_adjustment().set_upper(right)
+
+        left = leftSpinButton.get_value_as_int()
         top = self.get_widget("magZoomerTopSpinButton").get_value_as_int()
         bottom = \
                self.get_widget("magZoomerBottomSpinButton").get_value_as_int()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]