chore: update libcosmic
This commit is contained in:
parent
66a9507dc2
commit
9c274a759b
7 changed files with 30 additions and 30 deletions
|
|
@ -46,7 +46,7 @@ impl Default for Page {
|
|||
let focus_follows_cursor = comp_config
|
||||
.get("focus_follows_cursor")
|
||||
.unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'focus_follows_cursor'");
|
||||
}
|
||||
false
|
||||
|
|
@ -54,7 +54,7 @@ impl Default for Page {
|
|||
let cursor_follows_focus = comp_config
|
||||
.get("cursor_follows_focus")
|
||||
.unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'cursor_follows_focus'");
|
||||
}
|
||||
false
|
||||
|
|
@ -63,7 +63,7 @@ impl Default for Page {
|
|||
let focus_follows_cursor_delay = comp_config
|
||||
.get("focus_follows_cursor_delay")
|
||||
.inspect_err(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'focus_follows_cursor_delay'")
|
||||
}
|
||||
})
|
||||
|
|
@ -72,7 +72,7 @@ impl Default for Page {
|
|||
let show_active_hint = comp_config
|
||||
.get("active_hint")
|
||||
.inspect_err(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'active_hint'")
|
||||
}
|
||||
})
|
||||
|
|
@ -81,7 +81,7 @@ impl Default for Page {
|
|||
let edge_snap_threshold = comp_config
|
||||
.get("edge_snap_threshold")
|
||||
.inspect_err(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'edge_snap_threshold'")
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ impl Default for Page {
|
|||
fn default() -> Self {
|
||||
let comp_config = cosmic_config::Config::new("com.system76.CosmicComp", 1).unwrap();
|
||||
let comp_workspace_config = comp_config.get("workspaces").unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'workspaces'");
|
||||
}
|
||||
|
||||
|
|
@ -44,14 +44,14 @@ impl Default for Page {
|
|||
});
|
||||
let config = cosmic_config::Config::new("com.system76.CosmicWorkspaces", 1).unwrap();
|
||||
let show_workspace_name = config.get("show_workspace_name").unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'show_workspace_name'");
|
||||
}
|
||||
|
||||
false
|
||||
});
|
||||
let show_workspace_number = config.get("show_workspace_number").unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'show_workspace_number'");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ impl Default for Page {
|
|||
let comp_config = cosmic_config::Config::new("com.system76.CosmicComp", 1).unwrap();
|
||||
let comp_config_descale_xwayland =
|
||||
comp_config.get("descale_xwayland").unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'descale_xwayland'");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ fn get_config<T: Default + serde::de::DeserializeOwned>(
|
|||
key: &str,
|
||||
) -> T {
|
||||
config.get(key).unwrap_or_else(|why| {
|
||||
if !matches!(why, cosmic_config::Error::NoConfigDirectory) {
|
||||
if why.is_err() {
|
||||
error!(?why, "Failed to read config '{}'", key);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ impl Default for Page {
|
|||
fn default() -> Self {
|
||||
let comp_config = cosmic_config::Config::new("com.system76.CosmicComp", 1).unwrap();
|
||||
let comp_workspace_config = comp_config.get("workspaces").unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'workspaces'");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ impl Default for Page {
|
|||
let military_time = cosmic_applet_config
|
||||
.get("military_time")
|
||||
.unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'military_time'");
|
||||
}
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ impl Default for Page {
|
|||
let show_seconds = cosmic_applet_config
|
||||
.get("show_seconds")
|
||||
.unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'show_seconds'");
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ impl Default for Page {
|
|||
let first_day_of_week = cosmic_applet_config
|
||||
.get("first_day_of_week")
|
||||
.unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'first_day_of_week'");
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ impl Default for Page {
|
|||
let show_date_in_top_panel = cosmic_applet_config
|
||||
.get("show_date_in_top_panel")
|
||||
.unwrap_or_else(|err| {
|
||||
if !matches!(err, cosmic_config::Error::NoConfigDirectory) {
|
||||
if err.is_err() {
|
||||
error!(?err, "Failed to read config 'show_date_in_top_panel'");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue