def _on_preferences_button(self, button): """Bring up, process and shut down preferences dialog.""" def get_initial(): """Return current values as a dict.""" return self._app._config parent = get_parent_window(self) dialog = PreferencesDialog(parent, parent.app, get_initial()) response = dialog.run() if response == Gtk.ResponseType.APPLY: config = dialog.get_config() self._app.save_config(config) else: pass dialog.destroy()
def _on_preferences_action(self, action, parameter): """Bring up, process and shut down preferences dialog.""" def get_initial(): """Return current values as a dict.""" return self._config dialog = PreferencesDialog(self.window, self, get_initial()) response = dialog.run() if response == Gtk.ResponseType.APPLY: config = dialog.get_config() self.save_config(config) else: pass dialog.destroy()
def _on_preferences_button(self, button): """Bring up, process and shut down preferences dialog.""" def get_initial(): """Return current values as a dict.""" return self._app._config parent = get_parent_window(self) dialog = PreferencesDialog(parent, parent.app, get_initial()) response = dialog.run() if response == Gtk.ResponseType.APPLY: config = dialog.get_config() self._app.save_config(config) else: pass dialog.destroy()