Select root iter in the AccountsWindow treeview.

This commit is contained in:
Denis Fomin 2012-06-26 00:25:19 +04:00
parent fd9658021e
commit a64973d270
1 changed files with 5 additions and 1 deletions

View File

@ -1558,7 +1558,6 @@ class AccountsWindow:
self.update_proxy_list() self.update_proxy_list()
self.xml.connect_signals(self) self.xml.connect_signals(self)
self.init_accounts() self.init_accounts()
self.xml.get_object('close_button').grab_focus()
self.window.show_all() self.window.show_all()
# Merge accounts # Merge accounts
@ -1575,6 +1574,8 @@ class AccountsWindow:
except ImportError: except ImportError:
self.avahi_available = False self.avahi_available = False
self.xml.get_object('close_button').grab_focus()
def on_accounts_window_key_press_event(self, widget, event): def on_accounts_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape: if event.keyval == gtk.keysyms.Escape:
self.check_resend_relog() self.check_resend_relog()
@ -1603,6 +1604,9 @@ class AccountsWindow:
iter_ = model.append() iter_ = model.append()
model.set(iter_, 0, account) model.set(iter_, 0, account)
self.selection = self.accounts_treeview.get_selection()
self.selection.select_iter(model.get_iter_root())
def resend(self, account): def resend(self, account):
if not account in gajim.connections: if not account in gajim.connections:
return return