From 3b17cde8005e417a3bc0720b477a035954a8c433 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 17 May 2022 22:09:15 +0800 Subject: pantheon.switchboard-plug-keyboard: 2.7.0 -> 3.1.1 --- ...1-Remove-Install-Unlisted-Engines-function.patch | 6 ++++-- .../apps/switchboard-plugs/keyboard/default.nix | 21 +++++++++++++++++---- .../apps/switchboard-plugs/keyboard/fix-paths.patch | 13 +++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) (limited to 'pkgs/desktops') diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/0001-Remove-Install-Unlisted-Engines-function.patch b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/0001-Remove-Install-Unlisted-Engines-function.patch index 550aefbb1f1..ead8bafaa12 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/0001-Remove-Install-Unlisted-Engines-function.patch +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/0001-Remove-Install-Unlisted-Engines-function.patch @@ -263,7 +263,7 @@ deleted file mode 100644 index 275c302..0000000 --- a/src/InputMethod/Installer/InstallList.vala +++ /dev/null -@@ -1,73 +0,0 @@ +@@ -1,75 +0,0 @@ -/* -* 2019-2020 elementary, Inc. (https://elementary.io) -* @@ -306,7 +306,7 @@ index 275c302..0000000 - case KO: - return { "ibus-hangul" }; - case ZH: -- return { "ibus-cangjie", "ibus-chewing", "ibus-pinyin" }; +- return { "ibus-cangjie", "ibus-chewing", "ibus-pinyin", "ibus-rime" }; - default: - assert_not_reached (); - } @@ -328,6 +328,8 @@ index 275c302..0000000 - return ZH; - case "ibus-pinyin": - return ZH; +- case "ibus-rime": +- return ZH; - default: - assert_not_reached (); - } diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix index 8b7ec684dbe..5ff6a7de4b0 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , nix-update-script , substituteAll , meson @@ -23,20 +24,33 @@ stdenv.mkDerivation rec { pname = "switchboard-plug-keyboard"; - version = "2.7.0"; + version = "3.1.1"; src = fetchFromGitHub { owner = "elementary"; repo = pname; rev = version; - sha256 = "sha256-ge87rctbd7iR9x9Xq4sMIC09DiPHbpbWBgMZUuJNWbw="; + sha256 = "sha256-DofAOv7sCe7RAJpgz9PEYm+C8RAl0a1KgFm9jToMsEY="; }; patches = [ ./0001-Remove-Install-Unlisted-Engines-function.patch (substituteAll { src = ./fix-paths.patch; - inherit ibus onboard; + inherit ibus onboard libgnomekbd; + }) + + # Revert schema key change that requires new GSD and Gala. + # TODO(@bobby285271): drop these in #196511. + (fetchpatch { + url = "https://github.com/elementary/switchboard-plug-keyboard/commit/555e9650bb8f74a7664e2393c589fe6664954a88.patch"; + sha256 = "sha256-koSTYLPRh9rOyxmJPtrj/fPuu2jb1SKZu6BwKsMvAmc="; + revert = true; + }) + (fetchpatch { + url = "https://github.com/elementary/switchboard-plug-keyboard/commit/6ebd57673b45cc64e1caf895134efc0d5f6cf2be.patch"; + sha256 = "sha256-Ezsh0t1/909MHCB2EJEnl4kcnXngshNYgrmqUQsfsaY="; + revert = true; }) ]; @@ -55,7 +69,6 @@ stdenv.mkDerivation rec { gtk3 ibus libgee - libgnomekbd libhandy libxklavier switchboard diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/fix-paths.patch b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/fix-paths.patch index 0b5c8b8fd27..bed4ca5573c 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/fix-paths.patch +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/fix-paths.patch @@ -24,3 +24,16 @@ index 75d2d805..b86252a4 100644 appinfo.launch (null, null); } catch (Error e) { warning ("Unable to launch onboard-settings: %s", e.message); +diff --git a/src/Dialogs/AddLayoutDialog.vala b/src/Dialogs/AddLayoutDialog.vala +index 7c2efda3..de77094f 100644 +--- a/src/Dialogs/AddLayoutDialog.vala ++++ b/src/Dialogs/AddLayoutDialog.vala +@@ -197,7 +197,7 @@ public class Pantheon.Keyboard.LayoutPage.AddLayoutDialog : Granite.Dialog { + }); + + keyboard_map_button.clicked.connect (() => { +- string command = "gkbd-keyboard-display \"--layout=" + layout_id + "\""; ++ string command = "@libgnomekbd@/bin/gkbd-keyboard-display \"--layout=" + layout_id + "\""; + try { + AppInfo.create_from_commandline (command, null, AppInfoCreateFlags.NONE).launch (null, null); + } catch (Error e) { -- cgit 1.4.1