Update dependencies
This commit is contained in:
parent
d637688699
commit
d11501c43d
4 changed files with 520 additions and 495 deletions
865
Cargo.lock
generated
865
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -21,13 +21,13 @@ xdg = "2.5.2"
|
||||||
tokio = { workspace = true, features = ["full"] }
|
tokio = { workspace = true, features = ["full"] }
|
||||||
wayland-client = "0.31.2"
|
wayland-client = "0.31.2"
|
||||||
# For network status using networkmanager feature
|
# For network status using networkmanager feature
|
||||||
cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings", rev = "3644bc909984842f35adb1057ef6e0a277c1aa6a", optional = true }
|
cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings", rev = "badfc6a", optional = true }
|
||||||
# For logind integration using logind feature
|
# For logind integration using logind feature
|
||||||
logind-zbus = { version = "3.1.2", optional = true }
|
logind-zbus = { version = "4", optional = true }
|
||||||
# Fix zbus compilation by manually adding nix with user feature
|
# Fix zbus compilation by manually adding nix with user feature
|
||||||
nix = { workspace = true, optional = true }
|
nix = { workspace = true, optional = true }
|
||||||
# For power status with upower feature
|
# For power status with upower feature
|
||||||
upower_dbus = { git = "https://github.com/pop-os/dbus-settings-bindings", rev = "3644bc909984842f35adb1057ef6e0a277c1aa6a", optional = true }
|
upower_dbus = { git = "https://github.com/pop-os/dbus-settings-bindings", rev = "badfc6a", optional = true }
|
||||||
# Required for some features
|
# Required for some features
|
||||||
zbus = { workspace = true, optional = true }
|
zbus = { workspace = true, optional = true }
|
||||||
# Internationalization
|
# Internationalization
|
||||||
|
|
@ -58,7 +58,7 @@ pwd = "1.4.0"
|
||||||
ron = "0.8"
|
ron = "0.8"
|
||||||
serde = "1"
|
serde = "1"
|
||||||
tokio = "1.33.0"
|
tokio = "1.33.0"
|
||||||
zbus = "3.14.1"
|
zbus = "4"
|
||||||
|
|
||||||
[workspace.dependencies.cosmic-bg-config]
|
[workspace.dependencies.cosmic-bg-config]
|
||||||
git = "https://github.com/pop-os/cosmic-bg"
|
git = "https://github.com/pop-os/cosmic-bg"
|
||||||
|
|
|
||||||
|
|
@ -738,8 +738,7 @@ impl cosmic::Application for App {
|
||||||
Message::DialogCancel => {
|
Message::DialogCancel => {
|
||||||
self.dialog_page_opt = None;
|
self.dialog_page_opt = None;
|
||||||
}
|
}
|
||||||
Message::DialogConfirm => {
|
Message::DialogConfirm => match self.dialog_page_opt.take() {
|
||||||
match self.dialog_page_opt.take() {
|
|
||||||
Some(DialogPage::Restart(_)) => {
|
Some(DialogPage::Restart(_)) => {
|
||||||
#[cfg(feature = "logind")]
|
#[cfg(feature = "logind")]
|
||||||
return Command::perform(
|
return Command::perform(
|
||||||
|
|
@ -754,7 +753,7 @@ impl cosmic::Application for App {
|
||||||
},
|
},
|
||||||
|x| x,
|
|x| x,
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
Some(DialogPage::Shutdown(_)) => {
|
Some(DialogPage::Shutdown(_)) => {
|
||||||
#[cfg(feature = "logind")]
|
#[cfg(feature = "logind")]
|
||||||
return Command::perform(
|
return Command::perform(
|
||||||
|
|
@ -769,10 +768,9 @@ impl cosmic::Application for App {
|
||||||
},
|
},
|
||||||
|x| x,
|
|x| x,
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
None => {}
|
None => {}
|
||||||
}
|
},
|
||||||
}
|
|
||||||
Message::Suspend => {
|
Message::Suspend => {
|
||||||
#[cfg(feature = "logind")]
|
#[cfg(feature = "logind")]
|
||||||
return Command::perform(
|
return Command::perform(
|
||||||
|
|
@ -794,16 +792,14 @@ impl cosmic::Application for App {
|
||||||
Message::Shutdown => {
|
Message::Shutdown => {
|
||||||
self.dialog_page_opt = Some(DialogPage::Shutdown(Instant::now()));
|
self.dialog_page_opt = Some(DialogPage::Shutdown(Instant::now()));
|
||||||
}
|
}
|
||||||
Message::Heartbeat => {
|
Message::Heartbeat => match self.dialog_page_opt {
|
||||||
match self.dialog_page_opt {
|
|
||||||
Some(DialogPage::Restart(instant)) | Some(DialogPage::Shutdown(instant)) => {
|
Some(DialogPage::Restart(instant)) | Some(DialogPage::Shutdown(instant)) => {
|
||||||
if DialogPage::remaining(instant).is_none() {
|
if DialogPage::remaining(instant).is_none() {
|
||||||
return self.update(Message::DialogConfirm);
|
return self.update(Message::DialogConfirm);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
None => {}
|
None => {}
|
||||||
}
|
},
|
||||||
}
|
|
||||||
Message::Exit => {
|
Message::Exit => {
|
||||||
let mut commands = Vec::new();
|
let mut commands = Vec::new();
|
||||||
for (_output, surface_id) in self.surface_ids.drain() {
|
for (_output, surface_id) in self.surface_ids.drain() {
|
||||||
|
|
@ -1111,13 +1107,17 @@ impl cosmic::Application for App {
|
||||||
widget::dialog(fl!("restart-now"))
|
widget::dialog(fl!("restart-now"))
|
||||||
.icon(widget::icon::from_name("system-restart-symbolic").size(64))
|
.icon(widget::icon::from_name("system-restart-symbolic").size(64))
|
||||||
.body(fl!("restart-timeout", seconds = remaining.as_secs()))
|
.body(fl!("restart-timeout", seconds = remaining.as_secs()))
|
||||||
.primary_action(widget::button::suggested(fl!("restart")).on_press(Message::DialogConfirm))
|
.primary_action(
|
||||||
|
widget::button::suggested(fl!("restart"))
|
||||||
|
.on_press(Message::DialogConfirm),
|
||||||
|
)
|
||||||
.secondary_action(
|
.secondary_action(
|
||||||
widget::button::standard(fl!("cancel")).on_press(Message::DialogCancel),
|
widget::button::standard(fl!("cancel"))
|
||||||
|
.on_press(Message::DialogCancel),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.into()
|
.into()
|
||||||
},
|
}
|
||||||
Some(DialogPage::Shutdown(instant)) => {
|
Some(DialogPage::Shutdown(instant)) => {
|
||||||
let remaining = DialogPage::remaining(instant).unwrap_or_default();
|
let remaining = DialogPage::remaining(instant).unwrap_or_default();
|
||||||
popover
|
popover
|
||||||
|
|
@ -1125,13 +1125,17 @@ impl cosmic::Application for App {
|
||||||
widget::dialog(fl!("shutdown-now"))
|
widget::dialog(fl!("shutdown-now"))
|
||||||
.icon(widget::icon::from_name("system-shutdown-symbolic").size(64))
|
.icon(widget::icon::from_name("system-shutdown-symbolic").size(64))
|
||||||
.body(fl!("shutdown-timeout", seconds = remaining.as_secs()))
|
.body(fl!("shutdown-timeout", seconds = remaining.as_secs()))
|
||||||
.primary_action(widget::button::suggested(fl!("shutdown")).on_press(Message::DialogConfirm))
|
.primary_action(
|
||||||
|
widget::button::suggested(fl!("shutdown"))
|
||||||
|
.on_press(Message::DialogConfirm),
|
||||||
|
)
|
||||||
.secondary_action(
|
.secondary_action(
|
||||||
widget::button::standard(fl!("cancel")).on_press(Message::DialogCancel),
|
widget::button::standard(fl!("cancel"))
|
||||||
|
.on_press(Message::DialogCancel),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.into()
|
.into()
|
||||||
},
|
}
|
||||||
None => popover.into(),
|
None => popover.into(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,7 @@ use logind_zbus::{
|
||||||
manager::{InhibitType, ManagerProxy},
|
manager::{InhibitType, ManagerProxy},
|
||||||
session::SessionProxy,
|
session::SessionProxy,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{any::TypeId, error::Error, os::fd::OwnedFd, process, sync::Arc};
|
||||||
any::TypeId,
|
|
||||||
error::Error,
|
|
||||||
os::fd::{FromRawFd, IntoRawFd, OwnedFd},
|
|
||||||
process,
|
|
||||||
sync::Arc,
|
|
||||||
};
|
|
||||||
use tokio::time;
|
use tokio::time;
|
||||||
use zbus::Connection;
|
use zbus::Connection;
|
||||||
|
|
||||||
|
|
@ -47,7 +41,7 @@ async fn inhibit(manager: &ManagerProxy<'_>) -> zbus::Result<OwnedFd> {
|
||||||
.call("Inhibit", &(what, who, why, mode))
|
.call("Inhibit", &(what, who, why, mode))
|
||||||
.await?;
|
.await?;
|
||||||
// Have to convert to std type to avoid leaking zbus dependency
|
// Have to convert to std type to avoid leaking zbus dependency
|
||||||
Ok(unsafe { OwnedFd::from_raw_fd(fd.into_raw_fd()) })
|
Ok(fd.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn subscription() -> Subscription<Message> {
|
pub fn subscription() -> Subscription<Message> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue