Commit 7afa4ea8 authored by Kai Willadsen's avatar Kai Willadsen

Clean up FindBar table and work around gtk.Table row spacing brokenness

In a gtk.Table, row_spacing is displayed regardless of whether a row is
visible or not. This was affecting FindBar when the Replace row was not
shown. This commit cleans up the FindBar table somewhat and adds a hack
to get rid of the undesired row spacing in Find mode.
parent 47b3e8d0
...@@ -17,9 +17,8 @@ ...@@ -17,9 +17,8 @@
<object class="GtkTable" id="findbar"> <object class="GtkTable" id="findbar">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="n_rows">2</property> <property name="n_rows">2</property>
<property name="n_columns">6</property> <property name="n_columns">5</property>
<property name="column_spacing">6</property> <property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child> <child>
<object class="GtkHButtonBox" id="hbuttonbox2"> <object class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -59,8 +58,8 @@ ...@@ -59,8 +58,8 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="left_attach">3</property> <property name="left_attach">2</property>
<property name="right_attach">5</property> <property name="right_attach">4</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
...@@ -110,8 +109,8 @@ ...@@ -110,8 +109,8 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="left_attach">3</property> <property name="left_attach">2</property>
<property name="right_attach">5</property> <property name="right_attach">4</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
</packing> </packing>
...@@ -126,11 +125,8 @@ ...@@ -126,11 +125,8 @@
<property name="mnemonic_widget">find_entry</property> <property name="mnemonic_widget">find_entry</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
<property name="x_padding">3</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -140,8 +136,8 @@ ...@@ -140,8 +136,8 @@
<property name="width_chars">32</property> <property name="width_chars">32</property>
</object> </object>
<packing> <packing>
<property name="left_attach">2</property> <property name="left_attach">1</property>
<property name="right_attach">3</property> <property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
</packing> </packing>
...@@ -156,13 +152,10 @@ ...@@ -156,13 +152,10 @@
<property name="mnemonic_widget">replace_entry</property> <property name="mnemonic_widget">replace_entry</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
<property name="x_padding">3</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -172,8 +165,8 @@ ...@@ -172,8 +165,8 @@
<property name="width_chars">32</property> <property name="width_chars">32</property>
</object> </object>
<packing> <packing>
<property name="left_attach">2</property> <property name="left_attach">1</property>
<property name="right_attach">3</property> <property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
...@@ -238,8 +231,8 @@ ...@@ -238,8 +231,8 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="left_attach">5</property> <property name="left_attach">4</property>
<property name="right_attach">6</property> <property name="right_attach">5</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
<property name="x_padding">7</property> <property name="x_padding">7</property>
...@@ -248,12 +241,6 @@ ...@@ -248,12 +241,6 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
</child> </child>
</object> </object>
......
...@@ -47,10 +47,10 @@ class FindBar(gnomeglade.Component): ...@@ -47,10 +47,10 @@ class FindBar(gnomeglade.Component):
self.textview = textview self.textview = textview
self.replace_label.hide() self.replace_label.hide()
self.replace_entry.hide() self.replace_entry.hide()
self.replace_button.hide() self.hbuttonbox2.hide()
self.replace_all_button.hide()
if text: if text:
self.find_entry.set_text(text) self.find_entry.set_text(text)
self.widget.set_row_spacings(0)
self.widget.show() self.widget.show()
self.find_entry.grab_focus() self.find_entry.grab_focus()
...@@ -72,6 +72,7 @@ class FindBar(gnomeglade.Component): ...@@ -72,6 +72,7 @@ class FindBar(gnomeglade.Component):
self.textview = textview self.textview = textview
if text: if text:
self.find_entry.set_text(text) self.find_entry.set_text(text)
self.widget.set_row_spacings(6)
self.widget.show_all() self.widget.show_all()
self.find_entry.grab_focus() self.find_entry.grab_focus()
......
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