mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Properly store and restore last volume value on startup
We cannot depend on the value saved by GStreamer, cause it is shared with all GStreamer based apps. Lets save the last value to gsettings instead to make sure this is the volume we used with this app. With this change we can also see the right volume on startup before media file is loaded (previously it was shown always as muted).
This commit is contained in:
@@ -628,10 +628,11 @@ class ClapperPlayer extends PlayerBase
|
||||
let clapperWidget = this.widget.get_ancestor(Gtk.Grid);
|
||||
if(!clapperWidget.fullscreenMode) {
|
||||
let size = window.get_size();
|
||||
if(size[0] > 0 && size[1] > 0) {
|
||||
if(size[0] > 0 && size[1] > 0)
|
||||
clapperWidget._saveWindowSize(size);
|
||||
}
|
||||
}
|
||||
settings.set_double('volume-last', this.volume);
|
||||
|
||||
clapperWidget.controls._onCloseRequest();
|
||||
|
||||
if(this.state === GstPlayer.PlayerState.STOPPED)
|
||||
|
Reference in New Issue
Block a user