Add preferences dialog

Allows customizing various settings. For now it includes player seeking times and mode customization. More options will be added in the future.
This commit is contained in:
Rafostar
2020-10-25 10:14:14 +01:00
parent 576440faff
commit 9354042379
13 changed files with 460 additions and 111 deletions

View File

@@ -1,7 +1,9 @@
const { GObject, Gst, Gtk } = imports.gi;
const Misc = imports.clapper_src.misc;
const { Prefs } = imports.clapper_src.prefs;
var actions = [
prefs,
about
];
@@ -9,6 +11,21 @@ var accels = [
['app.quit', ['q']],
];
function prefs(window, appName)
{
let prefs = new Prefs();
let prefsDialog = new Gtk.Dialog({
title: 'Preferences',
modal: true,
transient_for: window,
child: prefs,
default_width: 400,
default_height: 320,
});
prefsDialog.connect('close-request', () => prefsDialog.run_dispose());
prefsDialog.present();
}
function about(window, appName)
{
let gstVer = [
@@ -37,6 +54,6 @@ function about(window, appName)
system_information: osInfo,
transient_for: window
});
aboutDialog.connect('close-request', () => aboutDialog.run_dispose());
aboutDialog.present();
}