Package: im-config
Version: 0.21
Severity: wishlist
Tags: patch
I git KDE patch to im-config :-) Bravo!
I will wait for wheezy release for now.
But I do not want to loose this. So I am putting it to BTS
I think my code for im-config was clean enough to get a small patch.
Thanks for KUBUNTU people!
Osamu
-- System Information:
Debian Release: 7.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.8-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages im-config depends on:
ii dialog 1.1-20120215-3
ii gettext-base 0.18.1.1-10
ii zenity 3.4.0-2
Versions of packages im-config recommends:
ii dialog 1.1-20120215-3
ii x11-common 1:7.7+2
im-config suggests no packages.
-- no debconf information
Index: im-config-0.21ubuntu3/im-config
===================================================================
--- im-config-0.21ubuntu3.orig/im-config 2013-04-10 12:23:40.175113191
+0200
+++ im-config-0.21ubuntu3/im-config 2013-04-10 12:24:16.999113186 +0200
@@ -99,7 +99,12 @@
# Sanity check
#############################################################
if [ $IM_CONFIG_DIALOG = "X" ]; then
- if [ ! -x /usr/bin/zenity ]; then
+ kdialog_found=1
+ if [ "$KDE_FULL_SESSION" = true ] && [ -x /usr/bin/kdialog ]; then
+ kdialog_found=0
+ fi
+
+ if [ $kdialog_found -ne 0 ] && [ ! -x /usr/bin/zenity ]; then
eval_gettext "E: zenity must be installed." >&2
echo >&2
exit 1
Index: im-config-0.21ubuntu3/share/im-config.common
===================================================================
--- im-config-0.21ubuntu3.orig/share/im-config.common 2013-04-10
12:23:48.527113190 +0200
+++ im-config-0.21ubuntu3/share/im-config.common 2013-04-10
12:24:18.759113186 +0200
@@ -129,8 +129,16 @@
# console
dialog --title "$IM_CONFIG_ID" --msgbox "$1" 15 76
else
- # GTK GUI
- echo -n "$1" | zenity --width=600 --height=400 --title "$IM_CONFIG_ID"
--text-info
+ if [ "$KDE_FULL_SESSION" = true ] && [ -x /usr/bin/kdialog ]; then
+ # KDE GUI
+ tmp_file=/tmp/imconfig-kdialog.tmp
+ echo -n "$1" > $tmp_file
+ kdialog --title "$IM_CONFIG_ID" --textbox $tmp_file 600 400
+ rm -f $tmp_file
+ else
+ # GTK GUI
+ echo -n "$1" | zenity --width=600 --height=400 --title
"$IM_CONFIG_ID" --text-info
+ fi
fi
}
@@ -140,8 +148,13 @@
# console
dialog --title "$IM_CONFIG_ID" --yesno "$1" 20 76
else
- # GTK GUI
- zenity --title "$IM_CONFIG_ID" --width=600 --height=400 --question
--text "$1"
+ if [ "$KDE_FULL_SESSION" = true ] && [ -x /usr/bin/kdialog ]; then
+ # KDE GUI
+ kdialog --title "$IM_CONFIG_ID" --yesno "$1"
+ else
+ # GTK GUI
+ zenity --title "$IM_CONFIG_ID" --width=600 --height=400 --question
--text "$1"
+ fi
fi
}