From 750ced0b36889dd2ed5a3a3ed99e0e6846994330 Mon Sep 17 00:00:00 2001 From: pascal Date: Tue, 11 Aug 2009 17:13:43 +0000 Subject: =?UTF-8?q?Kommentare=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@2034 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- Compose/compose_gui.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'Compose') diff --git a/Compose/compose_gui.sh b/Compose/compose_gui.sh index 79a5554..2975557 100755 --- a/Compose/compose_gui.sh +++ b/Compose/compose_gui.sh @@ -3,11 +3,11 @@ # This file is part of the german Neo keyboard layout # # GUI to combine several Compose modules written by Neo keyboard layout -# This file has been originally written by Pascal Hauck (neo@pascalhauck.de) +# This file has been originally written by Pascal Hauck SRC=./src # Source directory -CONFFILE=.config +CONFFILE=.config # config file for selected modules # colours in the Bash @@ -17,9 +17,10 @@ orange="\033[33m" green="\033[32m" +# different subroutines for kdialog, zenity and dialog if [ "X:$KDE_FULL_SESSION" = "X:true" ]; then - NL="
" - ADD_TO_LIST() { + NL="
" # new line (can be different in kdialog and zenity) + ADD_TO_LIST() { # make list of modules, descriptions and default values (not for zenity) list=("${list[@]}" "$1" "$2" "$3") } CHECKLIST() { @@ -62,7 +63,7 @@ elif [ -n "`which dialog 2>/dev/null`" ]; then dialog --title Compose-Module --yesno "$1" 0 0 || exit 1 clear } -else +else # none of them (kdialog, zenity, dialog) exists → tell user to use make config && make install echo -e ${red} "Es wurde weder kdialog noch zenity noch dialog gefunden." ${normal} echo -e ${red} "Die graphische Konfiguration kann nicht verwendet werden." ${normal} echo -e ${red} "Bitte benutzen Sie stattdessen ›make config && make install‹." ${normal} @@ -71,7 +72,7 @@ else fi -while [ ! "$nohelp" ]; do +while [ ! "$nohelp" ]; do # options for »compose_gui.sh« (at the moment just --help) case ${1-" "} in " ") nohelp=ok @@ -80,7 +81,7 @@ while [ ! "$nohelp" ]; do echo Aufruf: compose.sh echo Mit »compose.sh« können die Compose-Module von Neo zusammengesetzt werden. echo Folgende Module sind verfügbar: - for j in `ls $SRC/*.module`; do + for j in `ls $SRC/*.module`; do # show all available Compose modules and descriptions i=$(basename $j .module) if [ ! "$i" = "base" ] && [ ! "$i" = "enUS" ]; then sed -n " @@ -109,11 +110,11 @@ done -auswahl=XCompose_enUS_base +auswahl=XCompose_enUS_base # enUS and base cannot be deselected for i in src/*.module; do - name=$(basename $i .module) # name of modul - if [ ! "$name" = "base" -a ! "$name" = "enUS" ]; then + name=$(basename $i .module) # get name of modul + if [ ! "$name" = "base" -a ! "$name" = "enUS" ]; then # enUS and base annot be deselected description=$(sed -n " /^#configinfo[ \t]*/{ s/// @@ -126,9 +127,9 @@ s/.*/(ohne Beschreibung)/ : print p q -" $SRC/$name.module) # description of module +" $SRC/$name.module) # get description of module if grep -qs $name $CONFFILE; then - default=on # default value for this module + default=on # get default value for this module else default=off fi @@ -140,7 +141,7 @@ done -if [ -f $HOME/.XCompose ]; then +if [ -f $HOME/.XCompose ]; then # warn if ~/.XCompose already exists YESNO "Es gibt bereits eine Compose-Datei (z.B. durch eine ältere Neo-Installation).\nSollten Sie eigene Definitionen in der Datei ~/.XCompose vorgenommen haben, dann brechen Sie jetzt ab und schreiben Ihre eigenen Definitionen in eine Datei (z.B. user.module) im Ordner src.\n\nAnderenfalls können Sie das Skript bedenkenlos fortsetzen.\nWollen Sie fortfahren?" || exit 1 fi -- cgit v1.2.3