event handling & state
This commit is contained in:
parent
d991f59c90
commit
3a41e58159
15 changed files with 212 additions and 68 deletions
|
|
@ -34,7 +34,9 @@ impl CosmicPanelAppButtonWindow {
|
|||
..add_css_class("root_window");
|
||||
};
|
||||
|
||||
if let Some(apps_desktop_info) = DesktopAppInfo::new(&format!("{}.desktop", app_desktop_file_name)) {
|
||||
if let Some(apps_desktop_info) =
|
||||
DesktopAppInfo::new(&format!("{}.desktop", app_desktop_file_name))
|
||||
{
|
||||
let app_button = cascade! {
|
||||
Button::new();
|
||||
..add_css_class("apps");
|
||||
|
|
|
|||
|
|
@ -44,7 +44,14 @@ fn main() {
|
|||
localize();
|
||||
gio::resources_register_include!("compiled.gresource").unwrap();
|
||||
let app = gtk4::Application::new(None, ApplicationFlags::default());
|
||||
app.add_main_option("id", glib::Char::from(b'i'), glib::OptionFlags::NONE, glib::OptionArg::String, "id of the launched application", None);
|
||||
app.add_main_option(
|
||||
"id",
|
||||
glib::Char::from(b'i'),
|
||||
glib::OptionFlags::NONE,
|
||||
glib::OptionArg::String,
|
||||
"id of the launched application",
|
||||
None,
|
||||
);
|
||||
app.connect_handle_local_options(|_app, args| {
|
||||
if let Ok(Some(id)) = args.lookup::<String>("id") {
|
||||
ID.set(id).unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue