Skip to content

Commit e22717e

Browse files
authored
Allow users to cancel opening config directory (#1098)
1 parent 64bdd71 commit e22717e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

data/fcitx5-configtool.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export TEXTDOMAIN=fcitx5
77

88
if command -v kdialog > /dev/null 2>&1; then
99
message() {
10-
kdialog --msgbox "$1"
10+
kdialog --yesno "$1"
1111
}
1212
error() {
1313
kdialog --error "$1"
1414
}
1515
elif command -v zenity > /dev/null 2>&1; then
1616
message() {
17-
zenity --info --text="$1"
17+
zenity --question --text="$1"
1818
}
1919
error() {
2020
zenity --error --text="$1"
@@ -138,6 +138,11 @@ run_xdg() {
138138
;;
139139
esac
140140

141+
# user choose no
142+
if [ $? -ne 0 ]; then
143+
exit
144+
fi
145+
141146
if command="$(command -v xdg-open 2>/dev/null)"; then
142147
exec "$command" "$HOME/.config/fcitx5"
143148
fi

0 commit comments

Comments
 (0)