Package: im-config
Version: 0.34-1

im-config does not work with kdialog because menulist_*()
functions in im-config.common don't support it.

Please apply the attached patch.

Thanks.

-- 
-- Name: SATOH Fumiyasu @ OSS Technology Corp. (fumiyas @ osstech co jp)
-- Business Home: https://www.OSSTech.co.jp/
-- GitHub Home: https://GitHub.com/fumiyas/
-- PGP Fingerprint: BBE1 A1C9 525A 292E 6729  CDEC ADC2 9DCA 5E1C CBCA
>From c40e3dd6e6d4ea21104150513a7c228f9fde5939 Mon Sep 17 00:00:00 2001
From: SATOH Fumiyasu <fumi...@osstech.co.jp>
Date: Sun, 20 May 2018 22:17:42 +0900
Subject: [PATCH] Fix kdialog support

---
 share/im-config.common | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/share/im-config.common b/share/im-config.common
index 01ffa73..2a188a9 100644
--- a/share/im-config.common
+++ b/share/im-config.common
@@ -174,6 +174,8 @@ menulist_init () {
     if [ $IM_CONFIG_DIALOG = "console" ]; then
         # console
         printf "%s" "whiptail --title \"$IM_CONFIG_ID\" --radiolist \"$1\" 23 
76 18"
+    elif [ "$KDE_FULL_SESSION" = true ] && [ -x /usr/bin/kdialog ]; then
+        printf "%s" "kdialog --title=\"$IM_CONFIG_ID\" --radiolist \"$1\""
     else
         # GTK GUI
         printf "%s" "zenity --title=\"$IM_CONFIG_ID\" --width=600 --height=400 
--text=\"$1\" --list --radiolist --column \"$2\" --column \"$3\" --column 
\"$4\""
@@ -188,6 +190,8 @@ menulist_add () {
     if [ $IM_CONFIG_DIALOG = "console" ]; then
         # console
         printf "%s" "$1 \"$2\" $3"
+    elif [ "$KDE_FULL_SESSION" = true ] && [ -x /usr/bin/kdialog ]; then
+        printf "%s" "$1 \"$2\" $3"
     else
         # GTK GUI
         if [ "x$3" = "xon" ]; then
@@ -205,7 +209,7 @@ menulist_eval () {
         # console
         eval "$1"
     else
-        # GTK GUI
+        # KDE or GTK GUI
         eval "$1" 3>&2 2>/dev/null 1>&3
     fi
 }
-- 
2.17.0

Reply via email to