save/restore window maximized state

This commit is contained in:
Martin Wagner 2020-05-21 21:33:39 +02:00
parent 2090e33810
commit fe93835f7d
2 changed files with 8 additions and 0 deletions

View File

@ -3192,6 +3192,8 @@ class MainWindow(Gtk.ApplicationWindow):
self.add(self.vbox)
self.show_all()
if self.settings.get_boolean("maximize"):
self.maximize()
self.on_settings_changed() #hide profiles button
self.client.start() #connect client
@ -3280,6 +3282,7 @@ class MainWindow(Gtk.ApplicationWindow):
size=self.get_size()
self.settings.set_int("width", size[0])
self.settings.set_int("height", size[1])
self.settings.set_boolean("maximize", self.is_maximized())
self.browser.save_settings()
def on_settings(self, action, param):

View File

@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema id="org.mpdevil" path="/org/mpdevil/">
<key type="b" name="maximize">
<default>false</default>
<summary>Maximize mpdevil on startup</summary>
<description></description>
</key>
<key type="i" name="width">
<default>1050</default>
<summary>Default width of window</summary>