[meld] ui.findbar: Migrate away from magic gnomeglade connection
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] ui.findbar: Migrate away from magic gnomeglade connection
- Date: Fri, 27 Sep 2013 22:06:37 +0000 (UTC)
commit 3fc5175b87ccb6c0e28985a580aac382b02a560c
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Sep 7 16:19:33 2013 +1000
ui.findbar: Migrate away from magic gnomeglade connection
data/ui/findbar.ui | 7 +++++++
meld/ui/findbar.py | 16 +++++-----------
2 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/data/ui/findbar.ui b/data/ui/findbar.ui
index 34a66b6..a24bab6 100644
--- a/data/ui/findbar.ui
+++ b/data/ui/findbar.ui
@@ -40,6 +40,7 @@
<property name="relief">none</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
+ <signal name="clicked" handler="on_replace_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -57,6 +58,7 @@
<property name="relief">none</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
+ <signal name="clicked" handler="on_replace_all_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -90,6 +92,7 @@
<property name="relief">none</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
+ <signal name="clicked" handler="on_find_previous_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -108,6 +111,7 @@
<property name="relief">none</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
+ <signal name="clicked" handler="on_find_next_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -146,6 +150,8 @@
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
+ <signal name="changed" handler="on_find_entry_changed" swapped="no"/>
+ <signal name="activate" handler="on_find_next_button_clicked" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
@@ -179,6 +185,7 @@
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
+ <signal name="activate" handler="on_replace_button_clicked" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/meld/ui/findbar.py b/meld/ui/findbar.py
index b940616..8a2e900 100644
--- a/meld/ui/findbar.py
+++ b/meld/ui/findbar.py
@@ -86,19 +86,13 @@ class FindBar(gnomeglade.Component):
self.find_entry.grab_focus()
self.wrap_box.set_visible(False)
- def on_find_entry__activate(self, entry):
- self.find_next_button.activate()
-
- def on_replace_entry__activate(self, entry):
- self.replace_button.activate()
-
- def on_find_next_button__clicked(self, button):
+ def on_find_next_button_clicked(self, button):
self._find_text()
- def on_find_previous_button__clicked(self, button):
+ def on_find_previous_button_clicked(self, button):
self._find_text(backwards=True)
- def on_replace_button__clicked(self, entry):
+ def on_replace_button_clicked(self, entry):
buf = self.textview.get_buffer()
oldsel = buf.get_selection_bounds()
match = self._find_text(0)
@@ -111,7 +105,7 @@ class FindBar(gnomeglade.Component):
self._find_text( 0 )
buf.end_user_action()
- def on_replace_all_button__clicked(self, entry):
+ def on_replace_all_button_clicked(self, entry):
buf = self.textview.get_buffer()
saved_insert = buf.create_mark(None, buf.get_iter_at_mark(buf.get_insert()), True)
buf.begin_user_action()
@@ -123,7 +117,7 @@ class FindBar(gnomeglade.Component):
buf.place_cursor( buf.get_iter_at_mark(saved_insert) )
self.textview.scroll_to_mark(buf.get_insert(), 0.25)
- def on_find_entry__changed(self, entry):
+ def on_find_entry_changed(self, entry):
entry.modify_base( gtk.STATE_NORMAL, self.orig_base_color )
#
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]