Skip to content

Commit

Permalink
chore: update patch
Browse files Browse the repository at this point in the history
Log:
  • Loading branch information
xzl01 committed Dec 11, 2024
1 parent 7fc68b0 commit 3fc6b62
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 0 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
fcitx5 (5.1.11-2deepin1) unstable; urgency=medium

* New upstream release.
* Remove useless patch.

-- xiangzelong <[email protected]> Fri, 06 Dec 2024 17:18:39 +0800

fcitx5 (5.1.11-2) unstable; urgency=medium

[ Pino Toscano ]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
From: zsien <[email protected]>
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

Original file line number Diff line number Diff line change
@@ -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<bool> enumerateSkipFirst{
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
From: zsien <[email protected]>
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<std::vector<std::string>> defaultInputMethods{
this, "DefaultInputMethod", "DefaultInputMethod"};
+ Option<std::vector<std::string>> appendInputMethods{
+ this, "AppendInputMethods", "AppendInputMethods"};
Option<std::vector<std::string>> extraLayouts{
this, "ExtraLayout", "ExtraLayout"};);

@@ -346,6 +348,17 @@ void InstancePrivate::buildDefaultGroup() {
}
}

+ std::vector<std::string> 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<std::string> 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);
25 changes: 25 additions & 0 deletions debian/patches/0008-fix-remove-the-restart-icon.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From: xionglinlin <[email protected]>
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",
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3fc6b62

Please sign in to comment.