Move status area code into an applet
This commit is contained in:
parent
8df3019973
commit
f50ed504b1
16 changed files with 313 additions and 11 deletions
30
applets/cosmic-applet-status-area/src/main.rs
Normal file
30
applets/cosmic-applet-status-area/src/main.rs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
use gtk4::{glib, prelude::*};
|
||||
|
||||
mod dbus_service;
|
||||
mod deref_cell;
|
||||
mod popover_container;
|
||||
mod status_area;
|
||||
mod status_menu;
|
||||
mod status_notifier_watcher;
|
||||
|
||||
use status_area::StatusArea;
|
||||
|
||||
fn main() {
|
||||
gtk4::init().unwrap();
|
||||
|
||||
// XXX Implement DBus service somewhere other than applet?
|
||||
glib::MainContext::default().spawn_local(status_notifier_watcher::start());
|
||||
|
||||
let status_area = StatusArea::new();
|
||||
gtk4::Window::builder()
|
||||
.decorated(false)
|
||||
.child(&status_area)
|
||||
.resizable(false)
|
||||
.width_request(1)
|
||||
.height_request(1)
|
||||
.build()
|
||||
.show();
|
||||
|
||||
let main_loop = glib::MainLoop::new(None, false);
|
||||
main_loop.run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue