Package: pdmenu
Version: 1.2.89
Severity: normal

I use the following command to create an input window filling an environment 
variable
with its previous value as a default:

echo "exec::edit,setenv:echo BASENAME=~Name:$BASENAME~";

Unfortunately if I only want to change one or two characters in the middle of 
the
variable's value, I need to erase everything up to that point using the 
backspace key from
the end of the line backwards. It would be wonderful to be able to use the 
arrow keys to
move around and change individual characters.

-- System Information:
Debian Release: 4.0 by Linux-Systeme
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24.4
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages pdmenu depends on:
ii  libc6                  2.3.6.ds1-13etch8 GNU C Library: Shared libraries
ii  libgpmg1               1.19.6-25         General Purpose Mouse - shared lib
ii  libncurses5            5.5-5             Shared libraries for terminal hand
ii  libslang2              2.0.6-4           The S-Lang programming library - r

pdmenu recommends no packages.

-- no debconf information
#!/usr/bin/pdmenu

#Note that the above bang-path isn't required, but it lets you run this
#file directly as a sort of pdmenu script.

#Define the main menu:
menu:main:Main Scanning Menu
    group:_Options...
        exec::makemenu: \
            if \
                test "$BASENAME" = ""; \
            then \
                BASENAME=$(date +%Y%m%d.); \
            fi; \
            if \
                test "$XB" = ""; \
            then \
                XB=210; \
            fi; \
            if \
                test "$YB" = ""; \
            then \
                YB=302; \
            fi; \
            echo "menu:options:Options"; \
            echo "group:Set file _name base ($BASENAME)"; \
                echo "exec::edit,setenv:echo BASENAME=~Name:$BASENAME~"; \
                echo exit; \
                echo endgroup; \
            echo "group:_Resolution ($RES)..."; \
                echo "show:::resolution"; \
                echo exit; \
                echo endgroup; \
                echo "group:_Colour mode ($MODE)..."; \
                echo "show:::colours"; \
                echo exit; \
                echo endgroup; \
            echo "group:Set horizontal (_x) boundary ($XB)"; \
                echo "exec::edit,setenv:echo XB=~xmax:$XB~"; \
                echo exit; \
                echo endgroup; \
            echo "group:Set verticalal (_y) boundary ($YB)"; \
                echo "exec::edit,setenv:echo YB=~ymax:$YB~"; \
                echo exit; \
                echo endgroup; \
            echo "group:Set _source ($SOURCE)"; \
                echo "show:::source"; \
                echo exit; \
                echo endgroup; \
            echo "group:_Output format ($OUTFORM)..."; \
                echo "show:::outform"; \
                echo exit; \
                echo endgroup; \
            echo "exit:_Exit"
        show:::options
        remove:::options
        helptext::command:echo "Name: $BASENAME; Boundaries: $XB / $YB; 
Resolution: $RES; Mode: $MODE; Printing: $PRI; $OUTFORM; Source: $SOURCE"
    endgroup
    group:_Printing...
        exec::makemenu: \
            if \
                test "$PRI" = ""; \
            then \
                echo "menu:printing:Printing is off"; \
                echo "group:Switch printing _on"; \
                    echo "exec::setenv:echo PRI=-p"; \
                    echo "exit"; \
                    echo "endgroup"; \
                echo "exit:E_xit"; \
            else \
                echo "menu:printing:Printing is on"; \
                echo "group:Switch printing _off"; \
                    echo "exec::setenv:echo PRI="; \
                    echo "exit"; \
                    echo "endgroup"; \
                echo "exit:_Exit"; \
            fi
        show:::printing
        remove:::printing
        helptext::command:echo "Name: $BASENAME; Boundaries: $XB / $YB; 
Resolution: $RES; Mode: $MODE; Printing: $PRI"
    endgroup
    nop
    group:_Start scanning:display
        exec::setenv:if test "$XB" = ""; then echo XBO=; else echo XBO=-x $XB; 
fi
        exec::setenv:if test "$YB" = ""; then echo YBO=; else echo YBO=-y $YB; 
fi
        exec::setenv:if test "$SOURCE" = ""; then echo SOURCEPARA=; else echo 
SOURCEPARA=--source "$SOURCE"; fi
        helptext::command:echo scana4 $RES $MODE $XBO $YBO $PRI $BASENAME 
$OUTFORM $SOURCEPARA
            exec::command,pause:scana4 $RES $MODE $XBO $YBO $PRI $BASENAME 
$OUTFORM $SOURCEPARA
        endgroup
        nop
    exec:Display _file:command,pause:/usr/local/bin/displayFile .LastScanned -L
    group:Prin_t (Postscript) file:display
        exec::setenv:echo FPR=.LastScanned
        exec:::pdmenu /usr/local/bin/pdmenu/printing
        endgroup
    exec:_Bash:command:/bin/bash
    exec:_Initialise scanner:command,pause:initscan
        nop
        exit:E_xit

menu:resolution:Set special resolution options
    group:_Fine
        exec::setenv:echo RES=--fine
        exit
        endgroup
    group:_Very fine
        exec::setenv:echo RES=--veryfine
        exit
        endgroup
    group:_Photo
        exec::setenv:echo RES=--photo
        exit
        endgroup
    group:_Standard
        exec::setenv:echo RES=
        exit
        endgroup
    nop
    exit:_Back to main menu

menu:outform:Set output format
    group:_PDF
        exec::setenv:echo OUTFORM="--output pdf"
        exit
        endgroup
    group:_Postscript
        exec::setenv:echo OUTFORM="--output ps"
        exit
        endgroup
    group:_JPEG
        exec::setenv:echo OUTFORM="--output jpeg"
        exit
        endgroup
    group:_PNM (raw scan format)
        exec::setenv:echo OUTFORM="--output pnm"
        exit
        endgroup
    nop
    exit:_Back to main menu

menu:source:Set source
    group:_Flatbed (paper)
        exec::setenv:echo SOURCE="Flatbed"
        exit
        endgroup
    group:_Transparency adapter (foil, slide)
#        exec::setenv:echo SOURCE="Transparency adapter"
        exec::setenv:echo SOURCE="Transparency"
        exit
        endgroup
    nop
    exit:_Back to main menu

menu:colours:Set special colour mode options
    group:_Extra dark (b/w)
        exec::setenv:echo MODE=--extradark
        exit
        endgroup
    group:_Quite dark (b/w)
        exec::setenv:echo MODE=--verydark
        exit
        endgroup
    group:_Dark (b/w)
        exec::setenv:echo MODE=--dark
        exit
        endgroup
    group:_Bright (b/w)
        exec::setenv:echo MODE=--bright
        exit
        endgroup
    group:_Very bright (b/w)
        exec::setenv:echo MODE=--verybright
        exit
        endgroup
    group:_Grayscale
        exec::setenv:echo MODE=--gray
        exit
        endgroup
    group:_Colour
        exec::setenv:echo MODE=--colour
        exit
        endgroup
    group:_Standard
        exec::setenv:echo MODE=
        exit
        endgroup
    nop
    exit:_Back to main menu

Reply via email to