diff --git a/data/gui/preferences_window.ui b/data/gui/preferences_window.ui
index 52cdbf33e..0136e037b 100644
--- a/data/gui/preferences_window.ui
+++ b/data/gui/preferences_window.ui
@@ -166,6 +166,7 @@
True
True
False
+
GTK_FILL
-
+
@@ -1077,7 +1078,7 @@
1
2
GTK_FILL
-
+
@@ -1090,7 +1091,7 @@
2
3
GTK_FILL
-
+
@@ -1105,7 +1106,7 @@
1
2
GTK_FILL
-
+
@@ -1168,7 +1169,7 @@ $T will be replaced by auto-away timeout
3
4
-
+
@@ -1185,7 +1186,7 @@ $T will be replaced by auto-not-available timeout
4
1
2
-
+
@@ -1698,7 +1699,7 @@ $T will be replaced by auto-not-available timeout
GTK_FILL
-
+
@@ -1713,7 +1714,7 @@ $T will be replaced by auto-not-available timeout
2
3
GTK_FILL
-
+
@@ -1728,7 +1729,7 @@ $T will be replaced by auto-not-available timeout
2
3
GTK_FILL
-
+
@@ -1744,7 +1745,7 @@ $T will be replaced by auto-not-available timeout
2
3
GTK_FILL
-
+
@@ -1827,7 +1828,7 @@ $T will be replaced by auto-not-available timeout
1
2
GTK_FILL
-
+
@@ -1842,7 +1843,7 @@ $T will be replaced by auto-not-available timeout
1
2
GTK_FILL
-
+
@@ -1881,8 +1882,8 @@ $T will be replaced by auto-not-available timeout
2
1
2
-
-
+
+
@@ -1921,8 +1922,8 @@ $T will be replaced by auto-not-available timeout
4
1
2
-
-
+
+
@@ -1951,7 +1952,7 @@ $T will be replaced by auto-not-available timeout
1
2
GTK_FILL
-
+
@@ -1982,7 +1983,7 @@ $T will be replaced by auto-not-available timeout
2
3
GTK_FILL
-
+
@@ -2011,7 +2012,7 @@ $T will be replaced by auto-not-available timeout
3
4
GTK_FILL
-
+
@@ -2042,7 +2043,7 @@ $T will be replaced by auto-not-available timeout
2
3
GTK_FILL
-
+
@@ -2447,7 +2448,7 @@ to discover one from server.
2
2
3
-
+
@@ -2462,7 +2463,7 @@ to discover one from server.
2
3
GTK_FILL
-
+
@@ -2474,7 +2475,7 @@ to discover one from server.
1
2
-
+
@@ -2488,7 +2489,7 @@ to discover one from server.
2
1
2
-
+
@@ -2503,7 +2504,7 @@ to discover one from server.
1
2
GTK_FILL
-
+
@@ -2516,7 +2517,7 @@ to discover one from server.
GTK_FILL
-
+
diff --git a/src/config.py b/src/config.py
index 6325909ff..a7000ea67 100644
--- a/src/config.py
+++ b/src/config.py
@@ -582,10 +582,14 @@ class PreferencesWindow:
self.sounds_preferences = None
self.notebook.set_current_page(0)
+ self.xml.get_object('close_button').grab_focus()
self.window.show_all()
gtkgui_helpers.possibly_move_window_in_current_desktop(self.window)
+ def on_preferences_notebook_switch_page(self, widget, page, page_num):
+ gobject.idle_add(self.xml.get_object('close_button').grab_focus)
+
def on_preferences_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape:
self.window.hide()