From 3017ee3ee41d35bf9fbd83a503868c911df28756 Mon Sep 17 00:00:00 2001 From: Erica Z Date: Wed, 13 Nov 2024 18:32:20 +0100 Subject: [PATCH] store a couple things in gsettings --- data/eu.callcc.audrey.gschema.xml | 6 ++++++ src/ui/window.rs | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/data/eu.callcc.audrey.gschema.xml b/data/eu.callcc.audrey.gschema.xml index ba0ae72..a68f494 100644 --- a/data/eu.callcc.audrey.gschema.xml +++ b/data/eu.callcc.audrey.gschema.xml @@ -1,5 +1,11 @@ + + false + + + 100 + diff --git a/src/ui/window.rs b/src/ui/window.rs index b16ee93..03861b4 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -170,6 +170,10 @@ mod imp { fn constructed(&self) { 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 let window = self.obj().downgrade(); self.time_pos_notify_timeout