mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
save/restore window maximized state
This commit is contained in:
parent
2090e33810
commit
fe93835f7d
@ -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):
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user