chore: add startup applications command and desktop entry

This commit is contained in:
Vukašin Vojinović 2025-09-13 15:53:09 +02:00 committed by Michael Murphy
parent 0d555db0dd
commit ee34b79359
6 changed files with 26 additions and 7 deletions

View file

@ -120,6 +120,7 @@ impl SettingsApp {
PageCommands::RegionLanguage => self.pages.page_id::<time::region::Page>(),
#[cfg(feature = "page-sound")]
PageCommands::Sound => self.pages.page_id::<sound::Page>(),
PageCommands::StartupApps => self.pages.page_id::<applications::startup_apps::Page>(),
PageCommands::System => self.pages.page_id::<system::Page>(),
PageCommands::Time => self.pages.page_id::<time::Page>(),
#[cfg(feature = "page-input")]
@ -548,6 +549,12 @@ impl cosmic::Application for SettingsApp {
}
}
crate::pages::Message::StartupApps(message) => {
if let Some(page) = self.pages.page_mut::<applications::startup_apps::Page>() {
return page.update(message).map(Into::into);
}
}
#[cfg(feature = "page-users")]
crate::pages::Message::User(message) => {
if let Some(page) = self.pages.page_mut::<system::users::Page>() {
@ -638,12 +645,6 @@ impl cosmic::Application for SettingsApp {
return page.update(message).map(Into::into);
}
}
crate::pages::Message::StartupApps(message) => {
if let Some(page) = self.pages.page_mut::<applications::startup_apps::Page>() {
return page.update(message).map(Into::into);
}
}
},
#[cfg(feature = "wayland")]

View file

@ -103,6 +103,8 @@ pub enum PageCommands {
/// Sound settings page
#[cfg(feature = "page-sound")]
Sound,
/// Startup applications settings page
StartupApps,
/// System & Accounts settings page
System,
/// Time & Language settings page

View file

@ -99,7 +99,7 @@ impl page::AutoBind<crate::pages::Message> for Page {}
impl page::Page<crate::pages::Message> for Page {
fn info(&self) -> Info {
page::Info::new("startup-apps", "system-reboot-symbolic")
page::Info::new("startup-apps", "preferences-startup-applications-symbolic")
.title(fl!("startup-apps"))
.description(fl!("startup-apps", "desc"))
}