Commit e708e5ff authored by Javier Hernández's avatar Javier Hernández

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.
parent 9f5bcaef
......@@ -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):
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment