From 3fc6b62b62ac22d67ddef30b109f1410cf6ce5c5 Mon Sep 17 00:00:00 2001 From: xzl Date: Fri, 6 Dec 2024 17:21:11 +0800 Subject: [PATCH] chore: update patch Log: --- debian/changelog | 7 ++ ...ns-dde-control-center-when-using-DDE.patch | 69 +++++++++++++++++++ ...-ctrl-shift-enumerate-key-by-default.patch | 21 ++++++ ...-the-default-zh_CN-input-method-list.patch | 64 +++++++++++++++++ .../0008-fix-remove-the-restart-icon.patch | 25 +++++++ ...e-control-center-when-using-deepin25.patch | 13 ++++ debian/patches/series | 5 ++ 7 files changed, 204 insertions(+) create mode 100644 debian/patches/0005-configtool-opens-dde-control-center-when-using-DDE.patch create mode 100644 debian/patches/0006-Revert-disable-ctrl-shift-enumerate-key-by-default.patch create mode 100644 debian/patches/0007-Add-Sogou-to-the-default-zh_CN-input-method-list.patch create mode 100644 debian/patches/0008-fix-remove-the-restart-icon.patch create mode 100644 debian/patches/0009-configtool-opens-dde-control-center-when-using-deepin25.patch diff --git a/debian/changelog b/debian/changelog index a6f7cd74..4175677c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +fcitx5 (5.1.11-2deepin1) unstable; urgency=medium + + * New upstream release. + * Remove useless patch. + + -- xiangzelong Fri, 06 Dec 2024 17:18:39 +0800 + fcitx5 (5.1.11-2) unstable; urgency=medium [ Pino Toscano ] diff --git a/debian/patches/0005-configtool-opens-dde-control-center-when-using-DDE.patch b/debian/patches/0005-configtool-opens-dde-control-center-when-using-DDE.patch new file mode 100644 index 00000000..55af6eda --- /dev/null +++ b/debian/patches/0005-configtool-opens-dde-control-center-when-using-DDE.patch @@ -0,0 +1,69 @@ +From: zsien +Date: Fri, 10 Feb 2023 17:02:28 +0800 +Subject: configtool opens dde-control-center when using DDE + +--- + data/fcitx5-configtool.sh | 27 +++++++++++++++++++++++++-- + 1 file changed, 25 insertions(+), 2 deletions(-) + +diff --git a/data/fcitx5-configtool.sh b/data/fcitx5-configtool.sh +index 7218967..9b08f7a 100755 +--- a/data/fcitx5-configtool.sh ++++ b/data/fcitx5-configtool.sh +@@ -65,6 +65,11 @@ detectDE() { + XFCE) + DE=xfce + break ++ ;; ++ DDE|Deepin) ++ DE=dde ++ break ++ ;; + esac + done + fi +@@ -93,6 +98,9 @@ detectDE() { + xfce|xfce4|'Xfce Session') + DE=xfce; + ;; ++ DDE*|deepin) ++ DE=dde; ++ ;; + esac + fi + +@@ -118,6 +126,18 @@ run_kde() { + fi + } + ++run_dde() { ++ local dbus_service="org.deepin.dde.ControlCenter1" ++ local dbus_path="/org/deepin/dde/ControlCenter1" ++ local dbus_interface="org.deepin.dde.ControlCenter1" ++ local dcc_module="keyboard/Manage Input Methods" ++ ++ if dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.GetAllModule 2>> /dev/null | jq --arg url "$dcc_module" -Rse 'fromjson? // error("Bad input") | any(.url == $url)' >> /dev/null 2>&1; then ++ exec dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.ShowPage string:"$dcc_module" ++ fi ++ return 1 ++} ++ + run_qt() { + if command -v fcitx5-config-qt > /dev/null 2>&1; then + exec fcitx5-config-qt +@@ -154,10 +174,13 @@ detectDE + # xdg is never a preferred solution + case "$DE" in + kde) +- order="kde qt xdg" ++ order="kde qt dde xdg" ++ ;; ++ dde) ++ order="dde qt kde xdg" + ;; + *) +- order="qt kde xdg" ++ order="qt kde dde xdg" + ;; + esac + diff --git a/debian/patches/0006-Revert-disable-ctrl-shift-enumerate-key-by-default.patch b/debian/patches/0006-Revert-disable-ctrl-shift-enumerate-key-by-default.patch new file mode 100644 index 00000000..59c016ac --- /dev/null +++ b/debian/patches/0006-Revert-disable-ctrl-shift-enumerate-key-by-default.patch @@ -0,0 +1,21 @@ +diff --git a/src/lib/fcitx/globalconfig.cpp b/src/lib/fcitx/globalconfig.cpp +index 49946c51..8c4c0e64 100644 +--- a/src/lib/fcitx/globalconfig.cpp ++++ b/src/lib/fcitx/globalconfig.cpp +@@ -50,14 +50,14 @@ FCITX_CONFIGURATION( + this, + "EnumerateForwardKeys", + _("Enumerate Input Method Forward"), +- {}, ++ {Key("Control+Shift_L")}, + KeyListConstrain({KeyConstrainFlag::AllowModifierLess, + KeyConstrainFlag::AllowModifierOnly})}; + KeyListOption enumerateBackwardKeys{ + this, + "EnumerateBackwardKeys", + _("Enumerate Input Method Backward"), +- {}, ++ {Key("Control+Shift_R")}, + KeyListConstrain({KeyConstrainFlag::AllowModifierLess, + KeyConstrainFlag::AllowModifierOnly})}; + Option enumerateSkipFirst{ diff --git a/debian/patches/0007-Add-Sogou-to-the-default-zh_CN-input-method-list.patch b/debian/patches/0007-Add-Sogou-to-the-default-zh_CN-input-method-list.patch new file mode 100644 index 00000000..acc1d5fd --- /dev/null +++ b/debian/patches/0007-Add-Sogou-to-the-default-zh_CN-input-method-list.patch @@ -0,0 +1,64 @@ +From: zsien +Date: Tue, 23 Jul 2024 16:42:14 +0800 +Subject: Add Sogou to the default zh_CN input method list + +--- + data/default/zh_CN | 3 +++ + src/lib/fcitx/instance.cpp | 19 +++++++++++++++++++ + 2 files changed, 22 insertions(+) + +diff --git a/data/default/zh_CN b/data/default/zh_CN +index b58579e..d5dc91e 100644 +--- a/data/default/zh_CN ++++ b/data/default/zh_CN +@@ -1,3 +1,6 @@ + [DefaultInputMethod] + 0=pinyin + 1=rime ++ ++[AppendInputMethods] ++0=com.sogou.ime.ng.fcitx5.deepin +diff --git a/src/lib/fcitx/instance.cpp b/src/lib/fcitx/instance.cpp +index 4aaae06..47b2d8a 100644 +--- a/src/lib/fcitx/instance.cpp ++++ b/src/lib/fcitx/instance.cpp +@@ -59,6 +59,8 @@ constexpr uint64_t AutoSaveIdleTime = 60ull * 1000000ull; // 1 minutes + FCITX_CONFIGURATION(DefaultInputMethod, + Option> defaultInputMethods{ + this, "DefaultInputMethod", "DefaultInputMethod"}; ++ Option> appendInputMethods{ ++ this, "AppendInputMethods", "AppendInputMethods"}; + Option> extraLayouts{ + this, "ExtraLayout", "ExtraLayout"};); + +@@ -346,6 +348,17 @@ void InstancePrivate::buildDefaultGroup() { + } + } + ++ std::vector appendInputMethods; ++ for (const auto &im : defaultIMConfig.appendInputMethods.value()) { ++ if (im == defaultIM) { ++ continue; ++ } ++ ++ if (imManager_.entry(im)) { ++ appendInputMethods.push_back(im); ++ } ++ } ++ + // Create a group for each layout. + std::vector groupOrders; + for (const auto &imLayout : imLayouts) { +@@ -364,6 +377,12 @@ void InstancePrivate::buildDefaultGroup() { + group.inputMethodList().emplace_back( + InputMethodGroupItem(defaultIM)); + } ++ if (!appendInputMethods.empty()) { ++ group.inputMethodList().insert( ++ group.inputMethodList().end(), ++ std::make_move_iterator(appendInputMethods.begin()), ++ std::make_move_iterator(appendInputMethods.end())); ++ } + FCITX_INFO() << "Items in " << groupName << ": " + << group.inputMethodList(); + group.setDefaultLayout(imLayout); diff --git a/debian/patches/0008-fix-remove-the-restart-icon.patch b/debian/patches/0008-fix-remove-the-restart-icon.patch new file mode 100644 index 00000000..54b01394 --- /dev/null +++ b/debian/patches/0008-fix-remove-the-restart-icon.patch @@ -0,0 +1,25 @@ +From: xionglinlin +Date: Sun, 29 Sep 2024 11:44:52 +0800 +Subject: fix: remove the restart icon + +remove the restart icon from the right-click menu + +Log: remove the restart icon +Bug: https://pms.uniontech.com/bug-view-270971.html +--- + src/modules/notificationitem/dbusmenu.cpp | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/modules/notificationitem/dbusmenu.cpp b/src/modules/notificationitem/dbusmenu.cpp +index 10e33c5..e29409f 100644 +--- a/src/modules/notificationitem/dbusmenu.cpp ++++ b/src/modules/notificationitem/dbusmenu.cpp +@@ -259,8 +259,6 @@ void DBusMenu::fillLayoutProperties( + case BII_Restart: + appendProperty(properties, propertyNames, "label", + dbus::Variant(_("Restart"))); +- appendProperty(properties, propertyNames, "icon-name", +- dbus::Variant("view-refresh")); + break; + case BII_Exit: + appendProperty(properties, propertyNames, "label", diff --git a/debian/patches/0009-configtool-opens-dde-control-center-when-using-deepin25.patch b/debian/patches/0009-configtool-opens-dde-control-center-when-using-deepin25.patch new file mode 100644 index 00000000..7f28afd8 --- /dev/null +++ b/debian/patches/0009-configtool-opens-dde-control-center-when-using-deepin25.patch @@ -0,0 +1,13 @@ +Index: fc/data/fcitx5-configtool.sh +=================================================================== +--- fc.orig/data/fcitx5-configtool.sh ++++ fc/data/fcitx5-configtool.sh +@@ -135,7 +135,7 @@ run_dde() { + local dbus_interface="org.deepin.dde.ControlCenter1" + local dcc_module="keyboard/Manage Input Methods" + +- if dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.GetAllModule 2>> /dev/null | jq --arg url "$dcc_module" -Rse 'fromjson? // error("Bad input") | any(.url == $url)' >> /dev/null 2>&1; then ++ if dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.GetAllModule 2>> /dev/null | grep -q "$dcc_module" >> /dev/null 2>&1; then + exec dbus-send --print-reply=literal --dest=$dbus_service $dbus_path $dbus_interface.ShowPage string:"$dcc_module" + fi + return 1 diff --git a/debian/patches/series b/debian/patches/series index d78299c9..478e99af 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,6 @@ 0001-fix-kde-config-fcitx5-package-name-in-fcitx5-configt.patch +0005-configtool-opens-dde-control-center-when-using-DDE.patch +0006-Revert-disable-ctrl-shift-enumerate-key-by-default.patch +0007-Add-Sogou-to-the-default-zh_CN-input-method-list.patch +0008-fix-remove-the-restart-icon.patch +0009-configtool-opens-dde-control-center-when-using-deepin25.patch