Commit 42adff1b authored by Sophie Herold's avatar Sophie Herold Committed by Philipp Hörist

Rework Preferences Dialog

parent 835bffd8
...@@ -89,9 +89,6 @@ class PreferencesWindow: ...@@ -89,9 +89,6 @@ class PreferencesWindow:
""" """
del app.interface.instances['preferences'] del app.interface.instances['preferences']
def on_close_button_clicked(self, widget):
self.window.destroy()
def __init__(self): def __init__(self):
""" """
Initialize Preferences window Initialize Preferences window
...@@ -519,17 +516,13 @@ class PreferencesWindow: ...@@ -519,17 +516,13 @@ class PreferencesWindow:
self.sounds_preferences = None self.sounds_preferences = None
self.notebook.set_current_page(0) self.notebook.set_current_page(0)
self.xml.get_object('close_button').grab_focus()
self.window.show_all() self.window.show_all()
gtkgui_helpers.possibly_move_window_in_current_desktop(self.window) gtkgui_helpers.possibly_move_window_in_current_desktop(self.window)
def on_preferences_notebook_switch_page(self, widget, page, page_num):
GLib.idle_add(self.xml.get_object('close_button').grab_focus)
def on_preferences_window_key_press_event(self, widget, event): def on_preferences_window_key_press_event(self, widget, event):
if event.keyval == Gdk.KEY_Escape: if event.keyval == Gdk.KEY_Escape:
self.window.hide() self.window.destroy()
def get_per_account_option(self, opt): def get_per_account_option(self, opt):
""" """
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment