chore: update libcosmic
This commit is contained in:
parent
de1884e032
commit
f0ca9e7aee
13 changed files with 27 additions and 4 deletions
|
|
@ -915,6 +915,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
};
|
||||
let popup_task =
|
||||
cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup = Some(Popup {
|
||||
|
|
@ -995,6 +996,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
});
|
||||
let popup_task =
|
||||
cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let mut popup_settings = app.core.applet.get_popup_settings(
|
||||
parent_window_id,
|
||||
|
|
@ -1617,6 +1619,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
|
||||
let popup_task =
|
||||
cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let mut popup_settings = app.core.applet.get_popup_settings(
|
||||
app.core.main_window_id().unwrap(),
|
||||
|
|
@ -1684,6 +1687,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
|
||||
let popup_task =
|
||||
cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let mut popup_settings = app.core.applet.get_popup_settings(
|
||||
app.core.main_window_id().unwrap(),
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ impl cosmic::Application for CosmicA11yApplet {
|
|||
));
|
||||
} else {
|
||||
return cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut CosmicA11yApplet| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ impl cosmic::Application for Audio {
|
|||
));
|
||||
} else {
|
||||
return cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Self| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -373,6 +373,7 @@ impl cosmic::Application for CosmicBatteryApplet {
|
|||
}
|
||||
let mut tasks = vec![cosmic::surface::surface_task(
|
||||
cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Self| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ impl cosmic::Application for CosmicBluetoothApplet {
|
|||
|
||||
let get_popup_task =
|
||||
cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ impl cosmic::Application for Window {
|
|||
return crate::surface::surface_task(crate::surface::action::destroy_popup(p));
|
||||
} else {
|
||||
return crate::surface::surface_task(crate::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Window| {
|
||||
let new_id = Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ impl cosmic::Application for Minimize {
|
|||
));
|
||||
} else {
|
||||
return cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Self| {
|
||||
let new_id = window::Id::unique();
|
||||
let pos = app.max_icon_count().unwrap_or_default();
|
||||
|
|
|
|||
|
|
@ -731,21 +731,26 @@ impl cosmic::Application for CosmicNetworkApplet {
|
|||
} else {
|
||||
let mut tasks = Vec::with_capacity(2);
|
||||
if let Some(conn) = self.conn.clone() {
|
||||
tasks.push(update_state(conn.clone()));
|
||||
tasks.push(update_devices(conn.clone()));
|
||||
tasks.push(load_vpns(conn));
|
||||
tasks.push(update_state(conn.clone()).map(cosmic::Action::App));
|
||||
tasks.push(update_devices(conn.clone()).map(cosmic::Action::App));
|
||||
tasks.push(load_vpns(conn).map(cosmic::Action::App));
|
||||
let uuid = uuid::Uuid::new_v4().to_string().replace("-", "_");
|
||||
|
||||
let my_id = format!(
|
||||
"com.system76.CosmicSettings.Applet._{uuid}.NetworkManager.SecretAgent",
|
||||
);
|
||||
tasks.push(secret_agent_task(my_id).map(Message::SecretAgent));
|
||||
tasks.push(
|
||||
secret_agent_task(my_id)
|
||||
.map(Message::SecretAgent)
|
||||
.map(cosmic::Action::App),
|
||||
);
|
||||
}
|
||||
|
||||
tasks.push(system_conn().map(cosmic::Action::App));
|
||||
|
||||
tasks.push(cosmic::surface::surface_task(
|
||||
cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Self| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ impl cosmic::Application for Notifications {
|
|||
return destroy_popup(p);
|
||||
} else {
|
||||
return cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Self| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ impl cosmic::Application for Power {
|
|||
));
|
||||
} else {
|
||||
return cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Power| {
|
||||
let new_id = window::Id::unique();
|
||||
app.popup.replace(new_id);
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ impl cosmic::Application for App {
|
|||
|
||||
let popup_task =
|
||||
cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let popup_id = app.next_popup_id();
|
||||
let i = app.menus.keys().position(|&i| i == id).unwrap();
|
||||
|
|
@ -337,6 +338,7 @@ impl cosmic::Application for App {
|
|||
return Task::none();
|
||||
}
|
||||
let popup_task = cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let popup_id = app.next_popup_id();
|
||||
let i = app.menus.keys().position(|&i| i == id).unwrap();
|
||||
|
|
@ -394,6 +396,7 @@ impl cosmic::Application for App {
|
|||
// If we don't have an overflow, create it
|
||||
let popup_task =
|
||||
cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let popup_id = app.next_popup_id();
|
||||
let mut popup_settings = app.core.applet.get_popup_settings(
|
||||
|
|
@ -447,6 +450,7 @@ impl cosmic::Application for App {
|
|||
return Task::batch(cmds);
|
||||
};
|
||||
let popup_task = cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
move |app: &mut Self| {
|
||||
let popup_id = app.next_popup_id();
|
||||
let mut popup_settings = app.core.applet.get_popup_settings(
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ impl cosmic::Application for Window {
|
|||
destroy_popup(p)
|
||||
} else {
|
||||
return cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Self| {
|
||||
let new_id = Id::unique();
|
||||
app.popup = Some(new_id);
|
||||
|
|
|
|||
|
|
@ -521,6 +521,7 @@ impl cosmic::Application for Window {
|
|||
destroy_popup(p)
|
||||
} else {
|
||||
return cosmic::surface::surface_task(cosmic::surface::action::app_popup(
|
||||
|_| Default::default(),
|
||||
|app: &mut Self| {
|
||||
app.date_today = app.now.date();
|
||||
app.date_selected = app.date_today;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue