Package: module-assistant
Version: 0.7.5
Severity: wishlist

Hi,

can you add support for different screen sizes? This can be done with the
environment variables COLUMNS and ROWS and passing adequate values to
dialog. The following is cut out from orphaner of the deborphan package:

# Adapt to terminal size
if [ -n "${LINES:-}" -a -n "${COLUMNS:-}" ]; then
    # Can't use LINES, because it colides with magic variable
    # COLUMNS ditto
    lines=$(($LINES - 7))
    columns=$((COLUMNS - 10))
    
    # unset these magic variables to avoid unwished effects
    unset LINES COLUMNS
else
    size=$(stty size)
    lines=$((${size% *} - 7))
    columns=$((${size#* } - 10))

    function sigwinch_handle
    {
        size=$(stty size)
        lines=$((${size% *} - 7))
        columns=$((${size#* } - 10))

        if [ $lines -ge 12 -a $columns -ge 50 ]; then
            LISTSIZE="$lines $columns $(($lines - 7))"
            BOXSIZE="$lines $columns"
        fi
    }

    trap sigwinch_handle SIGWINCH
fi

if [ $lines -lt 12 -o $columns -lt 50 ]; then
    echo 'Screen to small or set $LINES and $COLUMNS' >&2
    exit 1
fi

LISTSIZE="$lines $columns $(($lines - 7))"
BOXSIZE="$lines $columns"

...
      dialog \
        --backtitle "Orphaner $VERSION" \
        --separate-output \
        --title "Orphaner $VERSION" \
        --checklist "Select Packages that should never be recommended for 
removal in deborphan:" \
        $LISTSIZE \
        $ORPHANED \
        2> $PACKAGES || true

Bye, Joerg.


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.9
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages module-assistant depends on:
ii  perl                          5.8.4-6    Larry Wall's Practical Extraction 

-- no debconf information

Attachment: signature.asc
Description: Digital signature

Reply via email to