commit
9a76c6428a
@ -3,4 +3,11 @@
|
|||||||
install_data('org.gnome.Hammond.desktop', install_dir : datadir + '/applications')
|
install_data('org.gnome.Hammond.desktop', install_dir : datadir + '/applications')
|
||||||
install_data('org.gnome.Hammond.appdata.xml', install_dir : datadir + '/appdata')
|
install_data('org.gnome.Hammond.appdata.xml', install_dir : datadir + '/appdata')
|
||||||
install_data('org.gnome.Hammond.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
|
install_data('org.gnome.Hammond.gschema.xml', install_dir: join_paths(datadir, 'glib-2.0', 'schemas'))
|
||||||
meson.add_install_script('../../scripts/compile-gschema.py')
|
|
||||||
|
|
||||||
|
configure_file(input: 'org.gnome.Hammond.service.in',
|
||||||
|
output: 'org.gnome.Hammond.service',
|
||||||
|
configuration: hammond_conf,
|
||||||
|
install_dir: join_paths([datadir,'dbus-1/services']))
|
||||||
|
|
||||||
|
meson.add_install_script('../../scripts/compile-gschema.py')
|
||||||
|
|||||||
@ -9,3 +9,4 @@ Type=Application
|
|||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=AudioVideo;Audio;Video;
|
Categories=AudioVideo;Audio;Video;
|
||||||
Keywords=Podcast
|
Keywords=Podcast
|
||||||
|
DBusActivatable=true
|
||||||
|
|||||||
3
hammond-gtk/resources/org.gnome.Hammond.service.in
Normal file
3
hammond-gtk/resources/org.gnome.Hammond.service.in
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[D-BUS Service]
|
||||||
|
Name=org.gnome.Hammond
|
||||||
|
Exec=@BINDIR@/hammond --gapplication-service
|
||||||
@ -20,6 +20,7 @@ use widgets::appnotif::{InAppNotification, UndoState};
|
|||||||
use widgets::player;
|
use widgets::player;
|
||||||
use widgets::{about_dialog, mark_all_notif, remove_show_notif};
|
use widgets::{about_dialog, mark_all_notif, remove_show_notif};
|
||||||
|
|
||||||
|
use std::env;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
@ -78,9 +79,8 @@ impl App {
|
|||||||
|
|
||||||
let window = gtk::ApplicationWindow::new(application);
|
let window = gtk::ApplicationWindow::new(application);
|
||||||
window.set_title("Hammond");
|
window.set_title("Hammond");
|
||||||
window.connect_delete_event(clone!(application, settings => move |window, _| {
|
window.connect_delete_event(clone!(settings => move |window, _| {
|
||||||
WindowGeometry::from_window(&window).write(&settings);
|
WindowGeometry::from_window(&window).write(&settings);
|
||||||
application.quit();
|
|
||||||
Inhibit(false)
|
Inhibit(false)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -285,8 +285,12 @@ impl App {
|
|||||||
info!("CONNECT STARTUP RUN");
|
info!("CONNECT STARTUP RUN");
|
||||||
let app = Self::new(&application);
|
let app = Self::new(&application);
|
||||||
Self::init(&app);
|
Self::init(&app);
|
||||||
app.window.show_all();
|
info!("Init complete");
|
||||||
app.window.activate();
|
application.connect_activate(clone!(app => move |_| {
|
||||||
|
info!("GApplication::activate");
|
||||||
|
app.window.show_all();
|
||||||
|
app.window.activate();
|
||||||
|
}));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Weird magic I copy-pasted that sets the Application Name in the Shell.
|
// Weird magic I copy-pasted that sets the Application Name in the Shell.
|
||||||
@ -294,6 +298,7 @@ impl App {
|
|||||||
glib::set_prgname(Some("Hammond"));
|
glib::set_prgname(Some("Hammond"));
|
||||||
// We need out own org.gnome.Hammon icon
|
// We need out own org.gnome.Hammon icon
|
||||||
gtk::Window::set_default_icon_name("multimedia-player");
|
gtk::Window::set_default_icon_name("multimedia-player");
|
||||||
ApplicationExtManual::run(&application, &[]);
|
let args: Vec<String> = env::args().collect();
|
||||||
|
ApplicationExtManual::run(&application, &args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,9 @@ hammond_version_micro = version_array[2].to_int()
|
|||||||
hammond_prefix = get_option('prefix')
|
hammond_prefix = get_option('prefix')
|
||||||
hammond_bindir = join_paths(hammond_prefix, get_option('bindir'))
|
hammond_bindir = join_paths(hammond_prefix, get_option('bindir'))
|
||||||
|
|
||||||
|
hammond_conf = configuration_data()
|
||||||
|
hammond_conf.set('BINDIR', hammond_bindir)
|
||||||
|
|
||||||
datadir = get_option('datadir')
|
datadir = get_option('datadir')
|
||||||
icondir = join_paths(datadir, 'icons')
|
icondir = join_paths(datadir, 'icons')
|
||||||
subdir('hammond-gtk/resources')
|
subdir('hammond-gtk/resources')
|
||||||
@ -35,4 +38,4 @@ cargo_release = custom_target('cargo-build',
|
|||||||
|
|
||||||
run_target('release', command: ['scripts/release.sh',
|
run_target('release', command: ['scripts/release.sh',
|
||||||
meson.project_name() + '-' + hammond_version
|
meson.project_name() + '-' + hammond_version
|
||||||
])
|
])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user