store a couple things in gsettings
This commit is contained in:
parent
206c21ef3f
commit
3017ee3ee4
2 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,11 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<schemalist gettext-domain="audrey">
|
<schemalist gettext-domain="audrey">
|
||||||
<schema id="eu.callcc.audrey" path="/eu/callcc/audrey/">
|
<schema id="eu.callcc.audrey" path="/eu/callcc/audrey/">
|
||||||
|
<key name="mute" type="b">
|
||||||
|
<default>false</default>
|
||||||
|
</key>
|
||||||
|
<key name="volume" type="i">
|
||||||
|
<default>100</default>
|
||||||
|
</key>
|
||||||
</schema>
|
</schema>
|
||||||
</schemalist>
|
</schemalist>
|
||||||
|
|
|
@ -170,6 +170,10 @@ mod imp {
|
||||||
fn constructed(&self) {
|
fn constructed(&self) {
|
||||||
self.parent_constructed();
|
self.parent_constructed();
|
||||||
|
|
||||||
|
let settings = gio::Settings::new(crate::APP_ID);
|
||||||
|
settings.bind("mute", self.obj().as_ref(), "mute").build();
|
||||||
|
settings.bind("volume", self.obj().as_ref(), "volume").build();
|
||||||
|
|
||||||
// update time-pos every 100 ms
|
// update time-pos every 100 ms
|
||||||
let window = self.obj().downgrade();
|
let window = self.obj().downgrade();
|
||||||
self.time_pos_notify_timeout
|
self.time_pos_notify_timeout
|
||||||
|
|
Loading…
Reference in a new issue