mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Add initial ClapperRemote app
This commit is contained in:
12
bin/com.github.rafostar.ClapperRemote.in
Normal file
12
bin/com.github.rafostar.ClapperRemote.in
Normal file
@@ -0,0 +1,12 @@
|
||||
#!@GJS@
|
||||
|
||||
const Package = imports.package;
|
||||
|
||||
Package.init({
|
||||
name: '@PACKAGE_NAME@',
|
||||
version: '@PACKAGE_VERSION@',
|
||||
prefix: '@prefix@',
|
||||
libdir: '@libdir@',
|
||||
datadir: '@datadir@',
|
||||
});
|
||||
Package.run(imports.clapper_src.mainRemote);
|
@@ -6,11 +6,15 @@ bin_conf.set('prefix', get_option('prefix'))
|
||||
bin_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
|
||||
bin_conf.set('datadir', join_paths(get_option('prefix'), get_option('datadir')))
|
||||
|
||||
configure_file(
|
||||
input: 'com.github.rafostar.Clapper.in',
|
||||
output: 'com.github.rafostar.Clapper',
|
||||
configuration: bin_conf,
|
||||
install: true,
|
||||
install_dir: get_option('bindir'),
|
||||
install_mode: 'rwxr-xr-x'
|
||||
)
|
||||
clapper_apps = [ '', 'Remote' ]
|
||||
|
||||
foreach id_postfix : clapper_apps
|
||||
configure_file(
|
||||
input: 'com.github.rafostar.Clapper' + id_postfix + '.in',
|
||||
output: 'com.github.rafostar.Clapper' + id_postfix,
|
||||
configuration: bin_conf,
|
||||
install: true,
|
||||
install_dir: get_option('bindir'),
|
||||
install_mode: 'rwxr-xr-x'
|
||||
)
|
||||
endforeach
|
||||
|
17
clapper_src/appRemote.js
Normal file
17
clapper_src/appRemote.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const { GObject } = imports.gi;
|
||||
const { AppBase } = imports.clapper_src.appBase;
|
||||
const { HeaderBarBase } = imports.clapper_src.headerbarBase;
|
||||
|
||||
var AppRemote = GObject.registerClass(
|
||||
class ClapperAppRemote extends AppBase
|
||||
{
|
||||
vfunc_startup()
|
||||
{
|
||||
super.vfunc_startup();
|
||||
|
||||
let headerBar = new HeaderBarBase(this.active_window);
|
||||
this.active_window.set_titlebar(headerBar);
|
||||
|
||||
this.active_window.maximize();
|
||||
}
|
||||
});
|
17
clapper_src/mainRemote.js
Normal file
17
clapper_src/mainRemote.js
Normal file
@@ -0,0 +1,17 @@
|
||||
imports.gi.versions.Gdk = '4.0';
|
||||
imports.gi.versions.Gtk = '4.0';
|
||||
|
||||
const { AppRemote } = imports.clapper_src.appRemote;
|
||||
const Misc = imports.clapper_src.misc;
|
||||
|
||||
const opts = {
|
||||
idPostfix: 'Remote',
|
||||
};
|
||||
|
||||
Misc.clapperPath = pkg.datadir + '/' +
|
||||
pkg.name.substring(0, pkg.name.lastIndexOf(opts.idPostfix));
|
||||
|
||||
function main()
|
||||
{
|
||||
new AppRemote(opts).run();
|
||||
}
|
Reference in New Issue
Block a user