wip: allow multiple instances of each applet

This commit is contained in:
Ashley Wulber 2022-07-27 15:41:33 -04:00
parent e87d101217
commit f6e5e04382
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
5 changed files with 10 additions and 8 deletions

View file

@ -2,14 +2,13 @@
// TODO: handle dbus service start/stop?
use futures::prelude::*;
use gtk4::{glib, prelude::*};
use relm4::{ComponentParts, ComponentSender, RelmApp, SimpleComponent, WidgetPlus};
use gtk4::{glib, prelude::*, gio::ApplicationFlags, Application};
use relm4::{ComponentParts, ComponentSender, RelmApp, SimpleComponent};
use std::{process::Command, time::Duration};
mod backlight;
use backlight::{backlight, Backlight, LogindSessionProxy};
mod power_daemon;
use power_daemon::PowerDaemonProxy;
mod upower;
use upower::UPowerProxy;
mod upower_device;
@ -358,6 +357,9 @@ impl SimpleComponent for AppModel {
}
fn main() {
let app = RelmApp::new("com.system76.CosmicAppletBattery");
let app = RelmApp::with_app(Application::new(
None,
ApplicationFlags::default(),
));
app.run::<AppModel>(());
}