Commit 011a49e7 authored by roidelapluie's avatar roidelapluie

avoid multiple calls to self.xml.get_object

parent 390cea6c
......@@ -4185,11 +4185,11 @@ def on_roster_filter_entry_icon_press(self, widget, icon, event):
def on_show_roster_filter_menuitem_toggled(self, widget):
""" Show the roster filter entry """
self.search_enabled = widget.get_active()
self.xml.get_object('roster_filter_entry').set_visible(self.search_enabled)
self.xml.get_object('roster_filter_entry').set_editable(self.search_enabled)
self.roster_filter_entry.set_visible(self.search_enabled)
self.roster_filter_entry.set_editable(self.search_enabled)
if self.search_enabled:
self.xml.get_object('roster_filter_entry').set_text('')
self.xml.get_object('roster_filter_entry').grab_focus()
self.roster_filter_entry.set_text('')
self.roster_filter_entry.grab_focus()
def on_roster_hpaned_notify(self, pane, gparamspec):
"""
......@@ -6372,6 +6372,7 @@ def _open_wizard():
gtk.keysyms.n, gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE)
# Setting the search stuff
self.roster_filter_entry = self.xml.get_object('roster_filter_entry')
self.search_string = ''
self.search_enabled = False
......
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