revert my previous fix, and just don't take into account the click on go button if jid hasn't changed

This commit is contained in:
Yann Leboulanger 2005-12-19 20:37:35 +00:00
parent 60eebb7888
commit 6003dc67e0
1 changed files with 4 additions and 4 deletions

View File

@ -620,6 +620,8 @@ _('This type of service does not contain any items to browse.')).get_response()
def on_go_button_clicked(self, widget):
jid = self.address_comboboxentry.child.get_text().decode('utf-8')
if jid == self.jid: # jid has not changed
return
if jid in self.latest_addresses:
self.latest_addresses.remove(jid)
self.latest_addresses.insert(0, jid)
@ -741,7 +743,7 @@ class AgentBrowser:
self.cache = window.cache
self._set_initial_title()
if not self._create_treemodel():
self._create_treemodel()
self._add_actions()
# This is a hack. The buttonbox apparently doesn't care about pack_start
@ -1036,8 +1038,6 @@ class ToplevelAgentBrowser(AgentBrowser):
# JID, node, icon, description, state
# State means 2 when error, 1 when fetching, 0 when succes.
view = self.window.services_treeview
if len(view.get_columns()):
return True # Returns an error not to draw buttons
model = gtk.TreeStore(str, str, gtk.gdk.Pixbuf, str, int)
model.set_sort_func(4, self._treemodel_sort_func)
model.set_sort_column_id(4, gtk.SORT_ASCENDING)