[gnome-music/wip/jfelder/application-settings: 4/4] windowplacement: Do not instantiate new settings
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/application-settings: 4/4] windowplacement: Do not instantiate new settings
- Date: Fri, 12 Apr 2019 15:20:54 +0000 (UTC)
commit 61ce4f298ba63d70ef00458b94c8fc3b8682d86e
Author: Jean Felder <jfelder src gnome org>
Date: Fri Apr 12 16:07:59 2019 +0200
windowplacement: Do not instantiate new settings
Use the GObject property from the Application.
gnomemusic/window.py | 2 +-
gnomemusic/windowplacement.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 5d8e26df..dbf1ff7c 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -86,7 +86,7 @@ class Window(Gtk.ApplicationWindow):
self.add_action(select_none)
self.set_size_request(200, 100)
- WindowPlacement(self, self._settings)
+ WindowPlacement(self)
self.prev_view = None
self.curr_view = None
diff --git a/gnomemusic/windowplacement.py b/gnomemusic/windowplacement.py
index 83273a54..60c87034 100644
--- a/gnomemusic/windowplacement.py
+++ b/gnomemusic/windowplacement.py
@@ -40,16 +40,16 @@ class WindowPlacement(GObject.GObject):
return '<WindowPlacement>'
@log
- def __init__(self, window, gsettings):
+ def __init__(self, window):
"""Initialize WindowPlacement
:param Gtk.Window window: Main window
- :param Gio.Settings gsettings: GSettings instance to use
"""
super().__init__()
self._window = window
- self._settings = gsettings
+ application = window.props.application
+ self._settings = application.props.settings
self._restore_window_state()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]