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 @@
<object class="GtkTable" id="findbar">
<property name="can_focus">False</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="row_spacing">6</property>
<child>
<object class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
......@@ -59,8 +58,8 @@
</child>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">5</property>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
......@@ -110,8 +109,8 @@
</child>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">5</property>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
......@@ -126,11 +125,8 @@
<property name="mnemonic_widget">find_entry</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">3</property>
</packing>
</child>
<child>
......@@ -140,8 +136,8 @@
<property name="width_chars">32</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
......@@ -156,13 +152,10 @@
<property name="mnemonic_widget">replace_entry</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">3</property>
</packing>
</child>
<child>
......@@ -172,8 +165,8 @@
<property name="width_chars">32</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
......@@ -238,8 +231,8 @@
</child>
</object>
<packing>
<property name="left_attach">5</property>
<property name="right_attach">6</property>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
<property name="x_padding">7</property>
......@@ -248,12 +241,6 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
......
......@@ -47,10 +47,10 @@ class FindBar(gnomeglade.Component):
self.textview = textview
self.replace_label.hide()
self.replace_entry.hide()
self.replace_button.hide()
self.replace_all_button.hide()
self.hbuttonbox2.hide()
if text:
self.find_entry.set_text(text)
self.widget.set_row_spacings(0)
self.widget.show()
self.find_entry.grab_focus()
......@@ -72,6 +72,7 @@ class FindBar(gnomeglade.Component):
self.textview = textview
if text:
self.find_entry.set_text(text)
self.widget.set_row_spacings(6)
self.widget.show_all()
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