Skip to content

Commit 0ae6f0b

Browse files
committed
chore: update libcosmic
1 parent 95e7749 commit 0ae6f0b

File tree

11 files changed

+88
-50
lines changed

11 files changed

+88
-50
lines changed

.vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"rust-analyzer.check.overrideCommand": ["just", "check-json"]
3-
}
2+
// "rust-analyzer.check.overrideCommand": ["just", "check-json"]
3+
}

Cargo.lock

+47-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+7-9
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,13 @@ cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//",
5656
# cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon//", branch = "input_nobuild" }
5757

5858
# For development and testing purposes
59-
# [patch.'https://github.com/pop-os/libcosmic']
60-
# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "font" }
61-
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "font" }
62-
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//", branch = "font" }
63-
# iced_futures = { git = "https://github.com/pop-os/libcosmic//", branch = "font" }
64-
65-
# libcosmic = { path = "../libcosmic" }
66-
# cosmic-config = { path = "../libcosmic/cosmic-config" }
67-
# cosmic-theme = { path = "../libcosmic/cosmic-theme" }
59+
[patch.'https://github.com/pop-os/libcosmic']
60+
# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "fontconfig" }
61+
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "fontconfig" }
62+
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//", branch = "fontconfig" }
63+
libcosmic = { path = "../libcosmic" }
64+
cosmic-config = { path = "../libcosmic/cosmic-config" }
65+
cosmic-theme = { path = "../libcosmic/cosmic-theme" }
6866

6967
# [patch.'https://github.com/pop-os/dbus-settings-bindings']
7068
# cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" }

cosmic-settings/src/app.rs

+21-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use cosmic::app::DbusActivationMessage;
2626
#[cfg(feature = "wayland")]
2727
use cosmic::cctk::{sctk::output::OutputInfo, wayland_client::protocol::wl_output::WlOutput};
2828
use cosmic::iced::Subscription;
29+
use cosmic::surface_message::SurfaceMessage;
2930
use cosmic::widget::{self, button, row, text_input};
3031
use cosmic::{
3132
app::{Core, Task},
@@ -139,6 +140,23 @@ impl SettingsApp {
139140
}
140141
}
141142

143+
#[cfg(feature = "wayland")]
144+
impl From<Message> for cosmic::surface_message::MessageWrapper<Message> {
145+
fn from(value: Message) -> Self {
146+
match value {
147+
Message::Surface(msg) => cosmic::surface_message::MessageWrapper::Surface(msg),
148+
msg => cosmic::surface_message::MessageWrapper::Message(msg),
149+
}
150+
}
151+
}
152+
153+
#[cfg(feature = "wayland")]
154+
impl From<SurfaceMessage> for Message {
155+
fn from(value: SurfaceMessage) -> Self {
156+
Message::Surface(value)
157+
}
158+
}
159+
142160
#[derive(Clone, Debug)]
143161
pub enum Message {
144162
CloseContextDrawer,
@@ -161,6 +179,7 @@ pub enum Message {
161179
SearchSubmit,
162180
SetTheme(cosmic::theme::Theme),
163181
SetWindowTitle,
182+
Surface(SurfaceMessage),
164183
}
165184

166185
impl cosmic::Application for SettingsApp {
@@ -240,7 +259,7 @@ impl cosmic::Application for SettingsApp {
240259
.id(self.search_id.clone())
241260
.on_clear(Message::SearchClear)
242261
.on_input(Message::SearchChanged)
243-
.on_submit(Message::SearchSubmit)
262+
.on_submit(|_| Message::SearchSubmit)
244263
.into()
245264
} else {
246265
icon::from_name("system-search-symbolic")
@@ -734,6 +753,7 @@ impl cosmic::Application for SettingsApp {
734753
Message::Error(error) => {
735754
tracing::error!(error, "error occurred");
736755
}
756+
Message::Surface(_) => {}
737757
}
738758

739759
Task::none()

cosmic-settings/src/pages/desktop/window_management.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ pub fn focus_navigation() -> Section<crate::pages::Message> {
310310
})
311311
.select_on_focus(true)
312312
.on_input(Message::SetFocusFollowsCursorDelay)
313-
.on_submit(Message::SaveFocusFollowsCursorDelay(true))
313+
.on_submit(|_| Message::SaveFocusFollowsCursorDelay(true))
314314
.width(Length::Fixed(80.0)),
315315
))
316316
.add(settings::item(

cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ fn context_drawer(
516516
})
517517
.select_on_focus(true)
518518
.on_input(move |text| ShortcutMessage::InputBinding(bind_id, text))
519-
.on_submit(ShortcutMessage::SubmitBinding(bind_id))
519+
.on_submit(move |_| ShortcutMessage::SubmitBinding(bind_id))
520520
.padding([0, space_xs])
521521
.id(shortcut.id.clone())
522522
.into();

cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ impl Page {
231231
let name_input = widget::text_input("", &self.add_shortcut.name)
232232
.padding([6, 12])
233233
.on_input(Message::NameInput)
234-
.on_submit(Message::NameSubmit)
234+
.on_submit(|_| Message::NameSubmit)
235235
.id(self.name_id.clone());
236236

237237
let task_input = widget::text_input("", &self.add_shortcut.task)
238238
.padding([6, 12])
239239
.on_input(Message::TaskInput)
240-
.on_submit(Message::EditCombination)
240+
.on_submit(|_| Message::EditCombination)
241241
.id(self.task_id.clone());
242242

243243
let name_control = widget::column()
@@ -267,7 +267,7 @@ impl Page {
267267
)
268268
.padding([0, 12])
269269
.on_input(move |input| Message::KeyInput(id, input))
270-
.on_submit(Message::AddKeybinding)
270+
.on_submit(|_| Message::AddKeybinding)
271271
.id(widget_id.clone())
272272
.apply(widget::container)
273273
.padding([8, 24]);

cosmic-settings/src/pages/networking/vpn/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl page::Page<crate::pages::Message> for Page {
250250
*password_hidden,
251251
)
252252
.on_input(|input| Message::PasswordUpdate(SecureString::from(input)))
253-
.on_submit(Message::ConnectWithPassword);
253+
.on_submit(|_| Message::ConnectWithPassword);
254254

255255
let controls = widget::column::with_capacity(2)
256256
.spacing(12)

cosmic-settings/src/pages/networking/wifi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl page::Page<crate::pages::Message> for Page {
145145
*password_hidden,
146146
)
147147
.on_input(|input| Message::PasswordUpdate(SecureString::from(input)))
148-
.on_submit(Message::ConnectWithPassword);
148+
.on_submit(|_| Message::ConnectWithPassword);
149149

150150
let primary_action = widget::button::suggested(fl!("connect"))
151151
.on_press(Message::ConnectWithPassword);

cosmic-settings/src/pages/system/about.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ fn device() -> Section<crate::pages::Message> {
137137
)
138138
.width(250)
139139
.on_input(Message::HostnameInput)
140-
.on_submit(Message::HostnameSubmit);
140+
.on_submit(|_| Message::HostnameSubmit);
141141

142142
let device_name = settings::item::builder(&*desc[device])
143143
.description(&*desc[device_desc])

0 commit comments

Comments
 (0)