changeset a960791e8c1f in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a960791e8c1f description: Set focus on close button when switch preferences window page.
diffstat:
data/gui/preferences_window.ui | 53 +++++++++++++++++++++-------------------- src/config.py | 4 +++ 2 files changed, 31 insertions(+), 26 deletions(-)
diffs (249 lines):
diff -r f2b9adc8be9d -r a960791e8c1f data/gui/preferences_window.ui --- a/data/gui/preferences_window.ui Thu Jun 28 12:49:54 2012 +0400 +++ b/data/gui/preferences_window.ui Thu Jun 28 13:03:56 2012 +0400 @@ -166,6 +166,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="show_border">False</property> + <signal name="switch_page" handler="on_preferences_notebook_switch_page"/> <child> <object class="GtkVBox" id="vbox41"> <property name="visible">True</property> @@ -1059,7 +1060,7 @@ </object> <packing> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1077,7 +1078,7 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1090,7 +1091,7 @@ <property name="left_attach">2</property> <property name="right_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1105,7 +1106,7 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1168,7 +1169,7 @@ <packing> <property name="left_attach">3</property> <property name="right_attach">4</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1185,7 +1186,7 @@ <property name="right_attach">4</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> </object> @@ -1698,7 +1699,7 @@ </object> <packing> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1713,7 +1714,7 @@ <property name="left_attach">2</property> <property name="right_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1728,7 +1729,7 @@ <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1744,7 +1745,7 @@ <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1827,7 +1828,7 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1842,7 +1843,7 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1881,8 +1882,8 @@ <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> + <property name="x_options"/> + <property name="y_options"/> </packing> </child> <child> @@ -1921,8 +1922,8 @@ <property name="right_attach">4</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> + <property name="x_options"/> + <property name="y_options"/> </packing> </child> <child> @@ -1951,7 +1952,7 @@ <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -1982,7 +1983,7 @@ <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -2011,7 +2012,7 @@ <property name="left_attach">3</property> <property name="right_attach">4</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -2042,7 +2043,7 @@ <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> </object> @@ -2447,7 +2448,7 @@ <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -2462,7 +2463,7 @@ <property name="top_attach">2</property> <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -2474,7 +2475,7 @@ <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -2488,7 +2489,7 @@ <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -2503,7 +2504,7 @@ <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> @@ -2516,7 +2517,7 @@ </object> <packing> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> </object> diff -r f2b9adc8be9d -r a960791e8c1f src/config.py --- a/src/config.py Thu Jun 28 12:49:54 2012 +0400 +++ b/src/config.py Thu Jun 28 13:03:56 2012 +0400 @@ -582,10 +582,14 @@ 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()