mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user