mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
Add progressive video download option
Buffer download whole network video during playback to allow fast seeking for online media. Can be disabled in prefs (enabled by default).
This commit is contained in:
@@ -127,6 +127,17 @@ class ClapperPrefsGrid extends Gtk.Grid
|
||||
return this.addToGrid(widget);
|
||||
}
|
||||
|
||||
addPlayFlagCheckButton(text, flag)
|
||||
{
|
||||
let checkButton = this.addCheckButton(text);
|
||||
let playFlags = settings.get_int('play-flags');
|
||||
|
||||
checkButton.active = ((playFlags & flag) === flag);
|
||||
checkButton.connect('toggled', this._onPlayFlagToggled.bind(this, flag));
|
||||
|
||||
return checkButton;
|
||||
}
|
||||
|
||||
addFontButton(text, setting)
|
||||
{
|
||||
let label = this.getLabel(text + ':');
|
||||
@@ -188,7 +199,9 @@ class ClapperPrefsGrid extends Gtk.Grid
|
||||
let checkButton = new Gtk.CheckButton({
|
||||
label: text || null,
|
||||
});
|
||||
settings.bind(setting, checkButton, 'active', this.flag);
|
||||
|
||||
if(setting)
|
||||
settings.bind(setting, checkButton, 'active', this.flag);
|
||||
|
||||
return checkButton;
|
||||
}
|
||||
@@ -204,6 +217,18 @@ class ClapperPrefsGrid extends Gtk.Grid
|
||||
return fontButton;
|
||||
}
|
||||
|
||||
_onPlayFlagToggled(flag, button)
|
||||
{
|
||||
let playFlags = settings.get_int('play-flags');
|
||||
|
||||
if(button.active)
|
||||
playFlags |= flag;
|
||||
else
|
||||
playFlags &= ~flag;
|
||||
|
||||
settings.set_int('play-flags', playFlags);
|
||||
}
|
||||
|
||||
_onClose(name)
|
||||
{
|
||||
if(name)
|
||||
|
Reference in New Issue
Block a user