[accerciser] Fix for bug 660971 - Fixing iv plugin's caret offset value



commit e708e5ff9e29dd00cab71230c606d0474db9fff7
Author: Javier Hernández <jhernandez emergya com>
Date:   Fri Mar 7 14:51:25 2014 +0100

    Fix for bug 660971 - Fixing iv plugin's caret offset value
    
    * Updating the spinner to use an adjustement to hold the values.
    * Updating the spinner to automatically raise the upper value up/down.

 plugins/interface_view.py |    1 +
 plugins/interface_view.ui |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/interface_view.py b/plugins/interface_view.py
index 437d0c5..7a65364 100644
--- a/plugins/interface_view.py
+++ b/plugins/interface_view.py
@@ -1322,6 +1322,7 @@ class _SectionText(_InterfaceSection):
     @type text_buffer: gtk.TextBuffer
     '''
     self.offset_spin.get_adjustment().upper = text_buffer.get_char_count()
+    self.offset_spin.set_range(0, text_buffer.get_char_count())
     text_buffer.set_modified(False)
 
   def _onTextMarkSet(self, text_buffer, iter, text_mark):
diff --git a/plugins/interface_view.ui b/plugins/interface_view.ui
index 554e0a7..97b74ad 100644
--- a/plugins/interface_view.ui
+++ b/plugins/interface_view.ui
@@ -43,6 +43,11 @@
       <column type="gboolean"/>
     </columns>
   </object>
+  <object class="GtkAdjustment" id="spin_button_adjustement">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkListStore" id="states_liststore">
     <columns>
       <!-- column-name State -->
@@ -2489,6 +2494,7 @@
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="invisible_char">●</property>
+                                            <property name="adjustment">spin_button_adjustement</property>
                                             <accessibility>
                                               <relation type="labelled-by" target="label18"/>
                                             </accessibility>


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