Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Default apps] Add desktop entry #790

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions cosmic-settings/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,7 @@ impl cosmic::Application for SettingsApp {
app.insert_page::<input::Page>();
app.insert_page::<time::Page>();
app.insert_page::<system::Page>();
#[cfg(feature = "wayland")]
{
app.insert_page::<desktop::panel::Page>();
app.insert_page::<desktop::dock::Page>();
app.insert_page::<desktop::panel::applets_inner::Page>();
app.insert_page::<desktop::dock::applets::Page>();
}

let active_id = match flags.sub_command {
Some(p) => app.subtask_to_page(&p),
None => app
Expand Down
4 changes: 2 additions & 2 deletions cosmic-settings/src/pages/desktop/panel/applets_inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl Page {
space_xxxs,
space_xxs,
space_xs,
space_l,
space_s,
..
} = theme::active().cosmic().spacing;
let mut list_column = list_column();
Expand Down Expand Up @@ -295,7 +295,7 @@ impl Page {
.on_press(msg_map(Message::AddApplet(info.clone())))
.into(),
])
.padding([0, space_l])
.padding([0, space_s])
.spacing(space_xs)
.align_y(Alignment::Center),
);
Expand Down
2 changes: 1 addition & 1 deletion cosmic-settings/src/pages/system/default_apps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl page::Page<crate::pages::Message> for Page {
}

fn info(&self) -> page::Info {
page::Info::new("default-apps", "application-default-symbolic")
page::Info::new("default-apps", "preferences-default-applications-symbolic")
.title(fl!("default-apps"))
.description(fl!("default-apps", "desc"))
}
Expand Down
3 changes: 2 additions & 1 deletion debian/install
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/usr/bin/cosmic-settings
/usr/share/applications/com.system76.CosmicSettings.desktop
/usr/share/applications/com.system76.CosmicSettings.About.desktop
/usr/share/applications/com.system76.CosmicSettings.Appearance.desktop
/usr/share/applications/com.system76.CosmicSettings.Bluetooth.desktop
/usr/share/applications/com.system76.CosmicSettings.DateTime.desktop
/usr/share/applications/com.system76.CosmicSettings.desktop
/usr/share/applications/com.system76.CosmicSettings.DefaultApps.desktop
/usr/share/applications/com.system76.CosmicSettings.Desktop.desktop
/usr/share/applications/com.system76.CosmicSettings.Displays.desktop
/usr/share/applications/com.system76.CosmicSettings.Dock.desktop
Expand Down
2 changes: 1 addition & 1 deletion i18n/en/cosmic_settings.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ users = Users
## System: Default Applications

default-apps = Default Applications
.desc = Default applications and file associations.
.desc = Default web browser, mail client, file browser, and other applications.
.web-browser = Web browser
.file-manager = File manager
.mail-client = Mail client
Expand Down
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ entry-about := appid + '.About.desktop'
entry-appear := appid + '.Appearance.desktop'
entry-bluetooth := appid + '.Bluetooth.desktop'
entry-date-time := appid + '.DateTime.desktop'
entry-default-apps := appid + '.DefaultApps.desktop'
entry-desktop := appid + '.Desktop.desktop'
entry-displays := appid + '.Displays.desktop'
entry-dock := appid + '.Dock.desktop'
Expand Down Expand Up @@ -64,6 +65,7 @@ install-desktop-entries:
install -Dm0644 'resources/{{entry-appear}}' '{{appdir}}/{{entry-appear}}'
install -Dm0644 'resources/{{entry-bluetooth}}' '{{appdir}}/{{entry-bluetooth}}'
install -Dm0644 'resources/{{entry-date-time}}' '{{appdir}}/{{entry-date-time}}'
install -Dm0644 'resources/{{entry-default-apps}}' '{{appdir}}/{{entry-default-apps}}'
install -Dm0644 'resources/{{entry-desktop}}' '{{appdir}}/{{entry-desktop}}'
install -Dm0644 'resources/{{entry-displays}}' '{{appdir}}/{{entry-displays}}'
install -Dm0644 'resources/{{entry-dock}}' '{{appdir}}/{{entry-dock}}'
Expand Down Expand Up @@ -111,6 +113,7 @@ uninstall:
'{{appdir}}/{{entry-appear}}' \
'{{appdir}}/{{entry-bluetooth}}' \
'{{appdir}}/{{entry-date-time}}' \
'{{appdir}}/{{entry-default-apps}}' \
'{{appdir}}/{{entry-desktop}}' \
'{{appdir}}/{{entry-displays}}' \
'{{appdir}}/{{entry-dock}}' \
Expand Down
12 changes: 12 additions & 0 deletions resources/com.system76.CosmicSettings.DefaultApps.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
Name=Default applications
Comment=Default web browser, mail client, file browser, and other applications.
Type=Settings
Exec=cosmic-settings default-apps
Terminal=false
Categories=COSMIC
Keywords=COSMIC
NoDisplay=true
OnlyShowIn=COSMIC
Icon=preferences-default-applications
StartupNotify=true