From a64973d270ab9a09769dda8398937c7e7d24296b Mon Sep 17 00:00:00 2001
From: Denis Fomin <fominde@gmail.com>
Date: Tue, 26 Jun 2012 00:25:19 +0400
Subject: [PATCH] Select root iter in the AccountsWindow treeview.

---
 src/config.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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