Blame 0001-use-latest-compatible-crates.patch

80357c2
From 85bf2b63e14b0324d58a9d6d399dc722d50817bb Mon Sep 17 00:00:00 2001
80357c2
From: Nikhil Jha <hi@nikhiljha.com>
80357c2
Date: Sat, 29 Feb 2020 10:13:05 -0800
80357c2
Subject: [PATCH] use latest compatible crates
80357c2
80357c2
---
80357c2
 Cargo.toml     | 10 +++++-----
80357c2
 src/popover.rs |  6 +++---
80357c2
 src/style.rs   |  4 ++--
80357c2
 3 files changed, 10 insertions(+), 10 deletions(-)
80357c2
80357c2
diff --git a/Cargo.toml b/Cargo.toml
80357c2
index e59996f..eb0b20b 100644
80357c2
--- a/Cargo.toml
80357c2
+++ b/Cargo.toml
80357c2
@@ -3,16 +3,16 @@ name = "rs"
80357c2
 version = "0.1.0"
80357c2
 
80357c2
 [dependencies]
80357c2
-bitflags = "1.0.*"
80357c2
-clap = { version = "2.32.*", default-features = false }
80357c2
+bitflags = "1.2.*"
80357c2
+clap = { version = "2.33.*", default-features = false }
80357c2
 maplit = "1.0.*"
80357c2
-regex = "1.1.*"
80357c2
+regex = "1.3.*"
80357c2
 serde = { version = "1.0.*", features = ["derive"] }
80357c2
 serde_yaml = "0.8.*"
80357c2
 xkbcommon = { version = "0.4.*", features = ["wayland"] }
80357c2
 
80357c2
 [dependencies.cairo-rs]
80357c2
-version = "0.5.*"
80357c2
+version = "0.8.*"
80357c2
 
80357c2
 [dependencies.cairo-sys-rs]
80357c2
 version = ""
80357c2
@@ -33,7 +33,7 @@ version = ""
80357c2
 features = ["v2_44"]
80357c2
 
80357c2
 [dependencies.gtk]
80357c2
-version = "0.5.*"
80357c2
+version = "0.8.*"
80357c2
 features = ["v3_22"]
80357c2
 
80357c2
 [dependencies.gtk-sys]
80357c2
diff --git a/src/popover.rs b/src/popover.rs
80357c2
index 8330a92..7e947f4 100644
80357c2
--- a/src/popover.rs
80357c2
+++ b/src/popover.rs
80357c2
@@ -13,7 +13,7 @@ use ::resources;
80357c2
 
80357c2
 use gio::ActionMapExt;
80357c2
 use gio::SettingsExt;
80357c2
-use gio::SimpleActionExt;
80357c2
+use gtk::prelude::BuilderExtManual;
80357c2
 use glib::translate::FromGlibPtrNone;
80357c2
 use glib::variant::ToVariant;
80357c2
 use gtk::PopoverExt;
80357c2
@@ -134,7 +134,7 @@ fn make_menu_builder(inputs: Vec<(&str, OwnedTranslation)>) -> gtk::Builder {
80357c2
 
80357c2
 fn set_layout(kind: String, name: String) {
80357c2
     let settings = gio::Settings::new("org.gnome.desktop.input-sources");
80357c2
-    let inputs = settings.get_value("sources").unwrap();
80357c2
+    let inputs = settings.get_value("sources");
80357c2
     let current = (kind.clone(), name.clone());
80357c2
     let inputs = variants::get_tuples(inputs).into_iter()
80357c2
         .filter(|t| t != ¤t;;
80357c2
@@ -285,7 +285,7 @@ pub fn show(
80357c2
         .map(|name| LayoutId::Local(name.to_string()));
80357c2
 
80357c2
     let settings = gio::Settings::new("org.gnome.desktop.input-sources");
80357c2
-    let inputs = settings.get_value("sources").unwrap();
80357c2
+    let inputs = settings.get_value("sources");
80357c2
     let inputs = variants::get_tuples(inputs);
80357c2
     
80357c2
     let system_layouts: Vec<LayoutId> = inputs.into_iter()
80357c2
diff --git a/src/style.rs b/src/style.rs
80357c2
index 153431a..2d7d539 100644
80357c2
--- a/src/style.rs
80357c2
+++ b/src/style.rs
80357c2
@@ -99,13 +99,13 @@ fn get_theme_name(settings: &gtk::Settings) -> GtkTheme {
80357c2
             name: {
80357c2
                 settings.get_property("gtk-theme-name")
80357c2
                     .or_print(logging::Problem::Surprise, "No theme name")
80357c2
-                    .and_then(|value| value.get::<String>())
80357c2
+                    .and_then(|value| value.get::<String>().unwrap())
80357c2
                     .unwrap_or(DEFAULT_THEME_NAME.into())
80357c2
             },
80357c2
             variant: {
80357c2
                 settings.get_property("gtk-application-prefer-dark-theme")
80357c2
                     .or_print(logging::Problem::Surprise, "No settings key")
80357c2
-                    .and_then(|value| value.get::<bool>())
80357c2
+                    .and_then(|value| value.get::<bool>().unwrap())
80357c2
                     .and_then(|dark_preferred| match dark_preferred {
80357c2
                         true => Some("dark".into()),
80357c2
                         false => None,
80357c2
-- 
80357c2
2.21.0 (Apple Git-122.2)
80357c2