Changeset 1946

Show
Ignore:
Timestamp:
07/18/09 21:57:12 (4 years ago)
Author:
pascal
Message:

compose_gui.sh liest nun Beschreibungen aus Quell-Dateien – Beschreibungen dafür mit no-break space getrennt
Vorauswahl wird aus .config gelesen und mit kdialog angezeigt (für zenity habe ich dafür keinen Weg gefunden)

Location:
Compose
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • Compose/compose_gui.sh

    r1945 r1946  
    11#!/bin/sh 
    22 
    3 SRC=./src                                                               # Source directory 
    4  
    5 # Anzahl der Compose-Module 
    6 anzahl=6 
    7  
    8 m[2]=math                                                               # name of modul 
    9 b[2]="mathematische und physikalische Zeichen (≥ ∉ ℏ ℃)"                # description of module 
    10 a[2]=off                                                                # default value for this module 
    11  
    12 m[3]=greek 
    13 b[3]="griechische Buchstaben (A ἀ)" 
    14 a[3]=off 
    15  
    16 m[4]=lang 
    17 b[4]="Lautschrift und weitere Sprachen ([neːo] Ɱ ʃ ɐ)" 
    18 a[4]=off 
    19  
    20 m[5]=roman 
    21 b[5]="römische Zahlen >12 (große Datei!) (1868→ⅿⅾⅽⅽⅽⅼⅹⅴⅰⅰⅰ)" 
    22 a[5]=off 
    23  
    24 m[6]=klingon 
    25 b[6]="klingonische Zahlen (große Datei!) (1984→wa'SaD Hutvatlh chorghmaH loS)" 
    26 a[6]=off 
     3# This file is part of the german Neo keyboard layout 
     4# 
     5# GUI to combine several Compose modules written by Neo keyboard layout 
     6# This file has been originally written by Pascal Hauck (neo@pascalhauck.de) 
    277 
    288 
    29 m[0]=base 
    30 auswahl=XCompose_${m[0]} 
     9SRC=./src                                                               # Source directory 
     10CONFFILE=.config 
     11typeset -i anzahl 
    3112 
    32 if [ -f $SRC/optional.module ] 
    33 then 
    34         m[1]=optional 
    35         b[1]=eigene Compose-Datei                                       # for zenity written with a no‑break space 
    36         a[1]=on 
    37 fi 
     13 
     14auswahl=XCompose_base 
     15 
     16for i in src/*.module 
     17do 
     18        name=$(basename $i .module)                                     # name of modul 
     19        if [ ! "$name" = "base" ] 
     20        then 
     21                anzahl=anzahl+1 
     22                m[$anzahl]=$name 
     23                b[$anzahl]=$(sed -n " 
     24/^#configinfo[ \t]*/{ 
     25    s/// 
     26    s/^\(.\{10\}\) */\1/ 
     27    p;q 
     28} 
     29 
     30\${ 
     31    s/.*/ohne Beschreibung/ 
     32    s/^\(.\{10\}\) */\1/ 
     33    p 
     34}" $SRC/$name.module)                                                   # description of module 
     35                if grep -q $name $CONFFILE 
     36                then 
     37                        a[$anzahl]=on                                   # default value for this module 
     38                else 
     39                        a[$anzahl]=off 
     40                fi 
     41        fi 
     42        klist=$klist\ ${m[$anzahl]}\ ${b[$anzahl]}\ ${a[$anzahl]} 
     43        glist=$glist\ ${m[$anzahl]}\ ${b[$anzahl]} 
     44done 
     45 
    3846 
    3947while [ ! "$module" ] 
     
    4452      ;; 
    4553  *) 
    46       echo Aufruf: compose.sh [-g] [COMPOSEMODULE] 
     54      echo Aufruf: compose.sh 
    4755      echo Mit »compose.sh« können die Compose-Module von Neo zusammengesetzt werden. 
    4856      echo Folgende Module sind verfügbar: 
    49       for i in $(seq 2 $anzahl) 
     57      for i in $(seq 1 $anzahl) 
    5058      do 
    5159       echo -e "  ${m[$i]}\t\t${b[$i]}" 
     
    5563done 
    5664 
     65 
    5766if [ $KDE_FULL_SESSION = true ] 
    5867then 
    59         menu=`kdialog --title Compose-Module --checklist " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten. " ${m[2]} "${b[2]}" ${a[2]} ${m[3]} "${b[3]}" ${a[3]} ${m[4]} "${b[4]}" ${a[4]} ${m[5]} "${b[5]}" ${a[5]} ${m[6]} "${b[6]}" ${a[6]} ${m[1]} "${b[1]}" ${a[1]}` 
     68        menu=`kdialog --title Compose-Module --checklist " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten. " $klist` 
    6069else 
    61         menu=`zenity --title Compose-Module --width=480 --height=250 --list --multiple --column Modulname  --column Modulebeschreibung --hide-column=1 --separator=_ --text " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten.\n Für Für mehrere Module STRG bzw. CTRL gedrückt halten. " ${m[2]} "${b[2]}" ${m[3]} "${b[3]}" ${m[4]} "${b[4]}" ${m[5]} "${b[5]}" ${m[6]} "${b[6]}" ${m[1]} ${b[1]}` 
     70        menu=`zenity --title Compose-Module --width=480 --height=250 --list --multiple --column Modulname  --column Modulebeschreibung --hide-column=1 --separator=_ --text " Wählen Sie die optionalen Compose-Module von Neo aus, die Sie verwenden möchten.\n Für Für mehrere Module STRG bzw. CTRL gedrückt halten. " $glist` 
    6271fi 
    6372menu=$(echo $menu | sed -e 's/\"//g' | sed -e 's/\ /_/g') 
  • Compose/src/base.module

    r1939 r1946  
    1 #configinfo Standard-Definitionen (weitgehend auch außerhalb Neo verwendet) 
     1#configinfo Standard-Erweiterung der Compose-Definitionen 
    22# standard Definitions by Neo keyboard layout 
    33 
  • Compose/src/greek.module

    r1939 r1946  
    1 #configinfo Griechische Buchstaben mit Akzenten 
     1#configinfo Griechische Buchstaben mit Akzenten (A ἀ) 
    22 
    33 
  • Compose/src/klingon.module

    r1939 r1946  
    77# Licence (full name): Creative Commons Namensnennung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland 
    88# Licence-URL: http://creativecommons.org/licenses/by-sa/3.0/de/ 
    9 #configinfo Klingonische Zahlen 0 bis 3999 
     9#configinfo klingonische Zahlen 0 bis 3999 (1984→wa'SaD Hutvatlh chorghmaH loS) 
    1010 
    1111 
  • Compose/src/lang.module

    r1939 r1946  
    1 #configinfo IPA (international phonetic alphabet) 
     1#configinfo IPA (international phonetic alphabet) und weitere Sprachen ([neːo] Ɱ ʃ ɐ) 
    22 
    33# IPA-Compose by aleχ, 2009, CC-BY-SA DE 3. 
  • Compose/src/math.module

    r1939 r1946  
    1 #configinfo mathematische Sonderzeichen 
     1#configinfo mathematische und physikalische Zeichen (≥ ∉ ℏ ℃) 
    22 
    33 
  • Compose/src/roman.module

    r1939 r1946  
    77# Licence (full name): Creative Commons Namensnennung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland 
    88# Licence-URL: http://creativecommons.org/licenses/by-sa/3.0/de/ 
    9 #configinfo römische Zahlen 1 bis 3999 
     9#configinfo römische Zahlen 13 bis 3999 (1868→ⅿⅾⅽⅽⅽⅼⅹⅴⅰⅰⅰ) 
    1010 
    1111