From ee4272112e51f8de43b02906403f9492320a3f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Sat, 13 Sep 2025 10:51:33 +0200 Subject: [PATCH] chore: make dbus-config optional --- Cargo.lock | 4 ++-- Cargo.toml | 5 +++-- src/main.rs | 20 ++++++++++---------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3229d42..477c6ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2998,9 +2998,9 @@ dependencies = [ [[package]] name = "harfrust" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406a98b615ed380f2195fa8fb2ed3083e64b2a6329d710e06f95a42466f0f0c4" +checksum = "75a4c970f1a00edc1626f1e3cc039492b15b73df28b9fff70f95404a571b4fae" dependencies = [ "bitflags 2.9.4", "bytemuck", diff --git a/Cargo.toml b/Cargo.toml index 6f29ecc..637b94a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,13 +47,14 @@ features = ["syntect", "vi"] git = "https://github.com/pop-os/libcosmic.git" default-features = false #TODO: a11y feature crashes file choser dialog -features = ["about", "dbus-config", "multi-window", "tokio", "winit", "surface-message"] +features = ["about", "multi-window", "tokio", "winit", "surface-message"] [target.'cfg(unix)'.dependencies] fork = "0.2" [features] -default = ["gvfs", "wgpu", "wayland"] +default = ["dbus-config","gvfs", "wgpu", "wayland"] +dbus-config = ["libcosmic/dbus-config"] gvfs = ["cosmic-files/gvfs"] wgpu = ["libcosmic/wgpu", "cosmic-files/wgpu"] wayland = ["libcosmic/wayland", "cosmic-files/wayland"] diff --git a/src/main.rs b/src/main.rs index ec71de9..47a8104 100644 --- a/src/main.rs +++ b/src/main.rs @@ -850,7 +850,7 @@ impl App { ]) } - fn document_statistics(&self) -> Element { + fn document_statistics(&self) -> Element<'_, Message> { //TODO: calculate in the background let mut character_count = 0; let mut character_count_no_spaces = 0; @@ -902,7 +902,7 @@ impl App { .into() } - fn git_management(&self) -> Element { + fn git_management(&self) -> Element<'_, Message> { let spacing = self.core().system_theme().cosmic().spacing; if let Some(project_status) = &self.git_project_status { @@ -1082,7 +1082,7 @@ impl App { } } - fn project_search(&self) -> Element { + fn project_search(&self) -> Element<'_, Message> { let spacing = self.core().system_theme().cosmic().spacing; let search_input = widget::text_input::search_input( @@ -1167,7 +1167,7 @@ impl App { .into() } - fn settings(&self) -> Element { + fn settings(&self) -> Element<'_, Message> { let app_theme_selected = match self.config.app_theme { AppTheme::Dark => 1, AppTheme::Light => 2, @@ -1417,7 +1417,7 @@ impl Application for App { } // The default nav_bar widget needs to be condensed for cosmic-edit - fn nav_bar(&self) -> Option>> { + fn nav_bar(&self) -> Option>> { if !self.core().nav_bar_active() { return None; } @@ -1536,7 +1536,7 @@ impl Application for App { } } - fn dialog(&self) -> Option> { + fn dialog(&self) -> Option> { let Some(ref dialog) = self.dialog_page_opt else { return None; }; @@ -2719,7 +2719,7 @@ impl Application for App { Task::none() } - fn context_drawer(&self) -> Option> { + fn context_drawer(&self) -> Option> { if !self.core.window.show_context { return None; } @@ -2753,7 +2753,7 @@ impl Application for App { }) } - fn header_start(&self) -> Vec> { + fn header_start(&self) -> Vec> { vec![menu_bar( &self.core, &self.config, @@ -2763,7 +2763,7 @@ impl Application for App { )] } - fn view(&self) -> Element { + fn view(&self) -> Element<'_, Message> { let cosmic_theme::Spacing { space_none, space_xxs, @@ -3029,7 +3029,7 @@ impl Application for App { content } - fn view_window(&self, window_id: window::Id) -> Element { + fn view_window(&self, window_id: window::Id) -> Element<'_, Message> { match &self.dialog_opt { Some(dialog) => dialog.view(window_id), None => widget::text("Unknown window ID").into(),