aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xadmin/config.guess132
-rwxr-xr-xadmin/config.sub107
-rwxr-xr-xadmin/depcomp64
-rwxr-xr-xadmin/install-sh342
-rwxr-xr-xadmin/missing61
-rw-r--r--src/kvilib/build/Makefile.am11
-rw-r--r--src/kvilib/tal/kvi_tal_wizard.cpp554
-rw-r--r--src/kvilib/tal/kvi_tal_wizard.h137
-rw-r--r--src/kvilib/tal/kvi_tal_wizard_qt3.h39
-rw-r--r--src/kvilib/tal/kvi_tal_wizard_qt4.h39
-rw-r--r--src/kvirc/kernel/kvi_theme.h117
-rw-r--r--src/modules/mircimport/libkvimircimport.cpp6
-rw-r--r--src/modules/objects/class_wizard.cpp25
-rw-r--r--src/modules/reguser/wizard.cpp4
-rw-r--r--src/modules/setup/setupwizard.cpp66
-rw-r--r--src/modules/setup/setupwizard.h7
-rw-r--r--src/modules/theme/packthemedialog.cpp2
-rw-r--r--src/modules/theme/savethemedialog.cpp2
18 files changed, 1356 insertions, 359 deletions
diff --git a/admin/config.guess b/admin/config.guess
index 917bbc50f..af7f02dc7 100755
--- a/admin/config.guess
+++ b/admin/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2006-07-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -138,6 +139,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+ eval $set_cc_for_build
+ cat << EOF > $dummy.c
+ #include <features.h>
+ #ifdef __UCLIBC__
+ # ifdef __UCLIBC_CONFIG_VERSION__
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+ # else
+ LIBC=uclibc
+ # endif
+ #else
+ LIBC=gnu
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
+fi
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -206,8 +224,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -764,7 +785,14 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -779,8 +807,11 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ x86:Interix*:[3456]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[3456]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -794,7 +825,7 @@ EOF
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
- amd64:CYGWIN*:*:*)
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
@@ -815,25 +846,28 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo cris-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo crisv32-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo frv-unknown-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
@@ -851,8 +885,12 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -870,14 +908,21 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-${LIBC}
+ exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -890,34 +935,37 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo x86_64-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -932,20 +980,22 @@ EOF
p'`
case "$ld_supported_targets" in
elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
;;
a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
exit ;;
coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
exit ;;
esac
+ # This should get integrated into the C code below, but now we hack
+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -961,7 +1011,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -971,7 +1021,11 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1182,7 +1236,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1261,6 +1314,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/admin/config.sub b/admin/config.sub
index 1c366dfde..ae0b3ddff 100755
--- a/admin/config.sub
+++ b/admin/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2006-07-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,15 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
+ | d10v | d30v | dlx | dsp16xx | dvp \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,18 +268,19 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | ms1 \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
@@ -276,9 +288,6 @@ case $basic_machine in
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -286,6 +295,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -305,7 +317,7 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -316,7 +328,7 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,19 +348,20 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
- | ms1-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -359,8 +372,6 @@ case $basic_machine in
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -678,6 +689,24 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -696,6 +725,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -803,6 +835,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +897,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -1101,7 +1143,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1174,21 +1216,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -irx*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1340,6 +1384,9 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1349,9 +1396,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
diff --git a/admin/depcomp b/admin/depcomp
index 04701da53..ca5ea4e1e 100755
--- a/admin/depcomp
+++ b/admin/depcomp
@@ -1,9 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2005-07-09.11
+scriptversion=2006-10-15.18
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -91,7 +92,20 @@ gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
stat=$?
if test $stat -eq 0; then :
else
@@ -276,6 +290,46 @@ icc)
rm -f "$tmpdepfile"
;;
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -288,13 +342,13 @@ tru64)
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
- # static library. This mecanism is used in libtool 1.4 series to
+ # static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in in $dir.libs/$base.o.d and
+ # compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
diff --git a/admin/install-sh b/admin/install-sh
index 4d4a9519e..4fbbae7b7 100755
--- a/admin/install-sh
+++ b/admin/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2005-05-14.22
+scriptversion=2006-10-14.15
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,15 +39,24 @@ scriptversion=2005-05-14.22
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
@@ -58,7 +67,13 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-chmodcmd="$chmodprog 0755"
+posix_glob=
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
stripcmd=
@@ -95,7 +110,7 @@ Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-while test -n "$1"; do
+while test $# -ne 0; do
case $1 in
-c) shift
continue;;
@@ -111,9 +126,15 @@ while test -n "$1"; do
--help) echo "$usage"; exit $?;;
- -m) chmodcmd="$chmodprog $2"
+ -m) mode=$2
shift
shift
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
continue;;
-o) chowncmd="$chownprog $2"
@@ -136,25 +157,33 @@ while test -n "$1"; do
--version) echo "$0 $scriptversion"; exit $?;;
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
+ --) shift
break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
esac
done
-if test -z "$1"; then
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+fi
+
+if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
@@ -164,6 +193,33 @@ if test -z "$1"; then
exit 0
fi
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
for src
do
# Protect names starting with `-'.
@@ -173,15 +229,11 @@ do
if test -n "$dir_arg"; then
dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
else
+
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
@@ -208,53 +260,188 @@ do
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
- dst=$dst/`basename "$src"`
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
fi
fi
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
- # Make sure that the destination directory exists.
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- shift
- IFS=$oIFS
+ case $dstdir in
+ /*) prefix=/ ;;
+ -*) prefix=./ ;;
+ *) prefix= ;;
+ esac
- pathcomp=
+ case $posix_glob in
+ '')
+ if (set -f) 2>/dev/null; then
+ posix_glob=true
+ else
+ posix_glob=false
+ fi ;;
+ esac
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
+ oIFS=$IFS
+ IFS=/
+ $posix_glob && set -f
+ set fnord $dstdir
shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
+ $posix_glob && set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
- pathcomp=$pathcomp/
- done
+ fi
fi
if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
- dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
@@ -262,10 +449,9 @@ do
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
- trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -276,10 +462,10 @@ do
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
@@ -291,11 +477,12 @@ do
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ if test -f "$dst"; then
+ $doit $rmcmd -f "$dst" 2>/dev/null \
+ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
@@ -304,16 +491,13 @@ do
} &&
# Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ $doit $mvcmd "$dsttmp" "$dst"
}
- }
- fi || { (exit 1); exit 1; }
-done
+ } || exit 1
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
- (exit 0); exit 0
-}
+ trap '' 0
+ fi
+done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/admin/missing b/admin/missing
index 894e786e1..1c8ff7049 100755
--- a/admin/missing
+++ b/admin/missing
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2005-06-08.21
+scriptversion=2006-05-10.23
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@@ -33,6 +33,8 @@ if test $# -eq 0; then
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +46,7 @@ fi
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +79,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@ esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
-case "$1" in
+case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@@ -135,7 +138,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case "$1" in
+case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
diff --git a/src/kvilib/build/Makefile.am b/src/kvilib/build/Makefile.am
index 3bc8f5fe1..e344d9971 100644
--- a/src/kvilib/build/Makefile.am
+++ b/src/kvilib/build/Makefile.am
@@ -27,9 +27,8 @@ nodist_libkvilib_la_SOURCES = \
../net/moc_kvi_dns.cpp \
../net/moc_kvi_http.cpp \
../system/moc_kvi_locale.cpp \
- ../system/moc_kvi_thread.cpp
-
-
+ ../system/moc_kvi_thread.cpp \
+ ../tal/moc_kvi_tal_wizard.cpp
libkvilib_la_SOURCES = \
../core/kvi_error.cpp \
@@ -239,8 +238,6 @@ headers_HEADERS = \
../tal/kvi_tal_widgetstack_qt3.h \
../tal/kvi_tal_widgetstack_qt4.h \
../tal/kvi_tal_wizard.h \
- ../tal/kvi_tal_wizard_qt3.h \
- ../tal/kvi_tal_wizard_qt4.h \
../tal/kvi_tal_windowstate.h
@@ -307,11 +304,9 @@ headers_HEADERS = \
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_qt3.moc
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_qt4.moc
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_kde.moc
+../tal/kvi_tal_tooltip.cpp: ../tal/kvi_tal_tooltip.moc
../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt3.moc
../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt4.moc
-../tal/kvi_tal_wizard.cpp: ../tal/kvi_tal_wizard_qt3.moc
-../tal/kvi_tal_wizard.cpp: ../tal/kvi_tal_wizard_qt4.moc
-../tal/kvi_tal_tooltip.cpp: ../tal/kvi_tal_tooltip.moc
#
# All the cpp files depend on symlinks beging up-to-date
diff --git a/src/kvilib/tal/kvi_tal_wizard.cpp b/src/kvilib/tal/kvi_tal_wizard.cpp
index 6ab9e84f0..281fbdab7 100644
--- a/src/kvilib/tal/kvi_tal_wizard.cpp
+++ b/src/kvilib/tal/kvi_tal_wizard.cpp
@@ -24,11 +24,561 @@
#define __KVILIB__
#include "kvi_tal_wizard.h"
+#include "kvi_tal_hbox.h"
+#include "kvi_list.h"
+#include "kvi_locale.h"
+#ifdef COMPILE_USE_QT4
+ #include <QShowEvent>
+ #include <QLabel>
+ #include <QPushButton>
+ #include <QGridLayout>
+ #include <QFrame>
+ #include <QStackedWidget>
+ #include <QPalette>
+#else
+ #include <qlabel.h>
+ #include <qpushbutton.h>
+ #include <qlayout.h>
+ #include <qevent.h>
+ #include <qframe.h>
+ #include <qwidgetstack.h>
+ #include <qpalette.h>
+#endif
+
+
+class KviTalWizardPageData
+{
+public:
+ enum EnableFlags
+ {
+ EnableNext = 1,
+ EnableBack = 2,
+ EnableHelp = 4,
+ EnableCancel = 8,
+ EnableFinish = 16
+ };
+public:
+ QWidget * pWidget;
+ QString szTitle;
+ bool bEnabled;
+ int iEnableFlags;
+ int iVisibleIndex;
+};
+
+class KviTalWizardPrivate
+{
+public:
+ KviPtrList<KviTalWizardPageData> * pPageList;
+ int iEnabledPageCount;
+ KviTalWizardPageData * pCurrentPage;
+ QGridLayout * pLayout;
+ QLabel * pTitleLabel;
+ QLabel * pStepsLabel;
+ QPushButton * pBackButton;
+ QPushButton * pCancelButton;
+ QPushButton * pHelpButton;
+ QPushButton * pNextButton;
+ QWidget * pNextSpacer;
+ QPushButton * pFinishButton;
+ QWidget * pFinishSpacer;
+#ifdef COMPILE_USE_QT4
+ QStackedWidget * pWidgetStack;
+#else
+ QWidgetStack * pWidgetStack;
+#endif
+public:
+ KviTalWizardPageData * findPage(QWidget * pWidget)
+ {
+ for(KviTalWizardPageData * pData = pPageList->first();pData;pData = pPageList->next())
+ {
+ if(pData->pWidget == pWidget)
+ return pData;
+ }
+ return NULL;
+ }
+
+ KviTalWizardPageData * findFirstEnabledPage()
+ {
+ KviTalWizardPageData * pData;
+ for(pData = pPageList->first();pData;pData = pPageList->next())
+ {
+ if(pData->bEnabled)
+ return pData;
+ }
+ return NULL;
+ }
+
+ KviTalWizardPageData * findLastEnabledPage()
+ {
+ KviTalWizardPageData * pData;
+ for(pData = pPageList->last();pData;pData = pPageList->prev())
+ {
+ if(pData->bEnabled)
+ return pData;
+ }
+ return NULL;
+ }
+
+ KviTalWizardPageData * findNextEnabledPage(QWidget * pReference)
+ {
+ if(!pReference)
+ return findFirstEnabledPage();
+ KviTalWizardPageData * pData = findPage(pReference);
+ if(!pData)
+ return NULL;
+ for(pData = pPageList->next();pData;pData = pPageList->next())
+ {
+ if(pData->bEnabled)
+ return pData;
+ }
+ return NULL;
+ }
+
+ KviTalWizardPageData * findPrevEnabledPage(QWidget * pReference)
+ {
+ if(!pReference)
+ return findLastEnabledPage();
+ KviTalWizardPageData * pData = findPage(pReference);
+ if(!pData)
+ return NULL;
+ for(pData = pPageList->prev();pData;pData = pPageList->prev())
+ {
+ if(pData->bEnabled)
+ return pData;
+ }
+ return NULL;
+ }
+
+ int reindexPages()
+ {
+ int iEnabledCount = 0;
+ for(KviTalWizardPageData * pData = pPageList->next();pData;pData = pPageList->next())
+ {
+ if(pData->bEnabled)
+ {
+ iEnabledCount++;
+ pData->iVisibleIndex = iEnabledCount;
+ }
+ }
+ return iEnabledCount;
+ }
+};
+
+
+KviTalWizard::KviTalWizard(QWidget * pParent)
+: QDialog(pParent)
+{
+ m_p = new KviTalWizardPrivate;
+ m_p->pPageList = new KviPtrList<KviTalWizardPageData>;
+ m_p->pPageList->setAutoDelete(true);
+ m_p->pCurrentPage = NULL;
+ m_p->iEnabledPageCount = 0;
+ m_p->pLayout = new QGridLayout(this);
+
+ m_p->pTitleLabel = new QLabel(this);
+#ifdef COMPILE_USE_QT4
+ m_p->pLayout->addWidget(m_p->pTitleLabel,0,0,1,3);
+#else
+ m_p->pLayout->addMultiCellWidget(m_p->pTitleLabel,0,0,0,3);
+#endif
+ m_p->pStepsLabel = new QLabel(this);
+ m_p->pStepsLabel->setMinimumWidth(80);
+ m_p->pStepsLabel->setAlignment(Qt::AlignRight);
+#ifdef COMPILE_USE_QT4
+ m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3);
+#else
+ m_p->pLayout->addMultiCellWidget(m_p->pStepsLabel,0,0,4,6);
+#endif
+
+ QFrame * f1 = new QFrame(this);
+ f1->setFrameStyle(QFrame::Sunken | QFrame::HLine);
+#ifdef COMPILE_USE_QT4
+ m_p->pLayout->addWidget(f1,1,0,1,7);
+#else
+ m_p->pLayout->addMultiCellWidget(f1,1,1,0,6);
+#endif
+
+#ifdef COMPILE_USE_QT4
+ m_p->pWidgetStack = new QStackedWidget(this);
+ m_p->pLayout->addWidget(m_p->pWidgetStack,2,0,1,7);
+#else
+ m_p->pWidgetStack = new QWidgetStack(this);
+ m_p->pLayout->addMultiCellWidget(m_p->pWidgetStack,2,2,0,6);
+#endif
+
+ QFrame * f2 = new QFrame(this);
+ f2->setFrameStyle(QFrame::Sunken | QFrame::HLine);
+#ifdef COMPILE_USE_QT4
+ m_p->pLayout->addWidget(f2,3,0,1,7);
+#else
+ m_p->pLayout->addMultiCellWidget(f2,3,3,0,6);
+#endif
+
+ KviTalHBox * pButtonBox = new KviTalHBox(this);
+#ifdef COMPILE_USE_QT4
+ m_p->pLayout->addWidget(pButtonBox,4,0,1,7);
+#else
+ m_p->pLayout->addMultiCellWidget(pButtonBox,4,4,0,6);
+#endif
+
+ pButtonBox->setMargin(0);
+ pButtonBox->setSpacing(0);
+
+
+ m_p->pCancelButton = new QPushButton(__tr("Cancel"),pButtonBox);
+ m_p->pCancelButton->setMinimumWidth(80);
+ QObject::connect(
+ m_p->pCancelButton,
+ SIGNAL(clicked()),
+ this,
+ SLOT(cancelButtonClicked())
+ );
+ QWidget * pSpacer = new QWidget(pButtonBox);
+ pSpacer->setFixedWidth(4);
+
+ m_p->pHelpButton = new QPushButton(__tr("Help"),pButtonBox);
+ m_p->pHelpButton->setMinimumWidth(80);
+ QObject::connect(
+ m_p->pHelpButton,
+ SIGNAL(clicked()),
+ this,
+ SLOT(helpButtonClicked())
+ );
+
+ QWidget * pLargeSpacer = new QWidget(pButtonBox);
+ pLargeSpacer->setMinimumWidth(50);
+ pButtonBox->setStretchFactor(pLargeSpacer,100);
+
+ QString szText = "< ";
+ szText += __tr("Back");
+ m_p->pBackButton = new QPushButton(szText,pButtonBox);
+ m_p->pBackButton->setMinimumWidth(80);
+ QObject::connect(
+ m_p->pBackButton,
+ SIGNAL(clicked()),
+ this,
+ SLOT(backButtonClicked())
+ );
+
+ m_p->pNextSpacer = new QWidget(pButtonBox);
+ m_p->pNextSpacer->setFixedWidth(4);
+
+ szText = __tr("Next");
+ szText += " >";
+ m_p->pNextButton = new QPushButton(szText,pButtonBox);
+ m_p->pNextButton->setMinimumWidth(80);
+ QObject::connect(
+ m_p->pNextButton,
+ SIGNAL(clicked()),
+ this,
+ SLOT(nextButtonClicked())
+ );
+
+ m_p->pFinishSpacer = new QWidget(pButtonBox);
+ m_p->pFinishSpacer->setFixedWidth(4);
+
+ m_p->pFinishButton = new QPushButton(__tr("Finish"),pButtonBox);
+ m_p->pFinishButton->setMinimumWidth(80);
+ QObject::connect(
+ m_p->pFinishButton,
+ SIGNAL(clicked()),
+ this,
+ SLOT(finishButtonClicked())
+ );
+
+ m_p->pLayout->setMargin(8);
+ m_p->pLayout->setSpacing(4);
+ m_p->pLayout->setRowStretch(2,1);
+ m_p->pLayout->setColStretch(0,1);
+}
+
+KviTalWizard::~KviTalWizard()
+{
+ delete m_p->pPageList;
+ delete m_p;
+}
+
+void KviTalWizard::insertPage(QWidget * pWidget,const QString &szTitle,int iIndex)
+{
+ KviTalWizardPageData * pPageData = m_p->findPage(pWidget);
+ if(!pPageData)
+ {
+ pPageData = new KviTalWizardPageData;
+ pPageData->pWidget = pWidget;
+ pPageData->iEnableFlags = \
+ KviTalWizardPageData::EnableNext | \
+ KviTalWizardPageData::EnableCancel | \
+ KviTalWizardPageData::EnableBack;
+ if(iIndex < 0)
+ {
+ m_p->pPageList->append(pPageData);
+ m_p->iEnabledPageCount++;
+ pPageData->iVisibleIndex = m_p->iEnabledPageCount;
+ } else {
+ m_p->pPageList->insert(iIndex,pPageData);
+ m_p->iEnabledPageCount = m_p->reindexPages();
+ }
+ m_p->pWidgetStack->addWidget(pWidget);
+ }
+ pPageData->szTitle = szTitle;
+ pPageData->bEnabled = true;
+
+}
+
+void KviTalWizard::addPage(QWidget * pWidget,const QString &szTitle)
+{
+ insertPage(pWidget,szTitle,-1);
+}
+
+bool KviTalWizard::setPageEnabled(QWidget * pWidget,bool bEnabled)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return false;
+ pData->bEnabled = bEnabled;
+ m_p->iEnabledPageCount = m_p->reindexPages();
+ setCurrentPage(m_p->pCurrentPage);
+ return true;
+}
+
+bool KviTalWizard::setPageTitle(QWidget * pWidget,const QString &szTitle)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return false;
+ pData->szTitle = szTitle;
+ return true;
+}
+
+bool KviTalWizard::setCurrentPage(QWidget * pWidget)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return false;
+ setCurrentPage(pData);
+ return true;
+}
+
+QWidget * KviTalWizard::currentPage()
+{
+ if(!m_p->pCurrentPage)
+ return NULL;
+ return m_p->pCurrentPage->pWidget;
+}
+
+void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData)
+{
+ m_p->pCurrentPage = pData;
+
+ bool bCancelEnabled = true;
+ bool bNextEnabled = false;
+ bool bBackEnabled = false;
+ bool bHelpEnabled = false;
+ bool bFinishEnabled = false;
+
+ QString szTitle;
+ QString szSteps;
+
+ if(pData)
+ {
+ bNextEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableNext) && m_p->findNextEnabledPage(pData->pWidget);
+ bBackEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableBack) && m_p->findPrevEnabledPage(pData->pWidget);
+ bCancelEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableCancel);
+ bFinishEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableFinish);
+ bHelpEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableHelp);
#ifdef COMPILE_USE_QT4
- #include "kvi_tal_wizard_qt4.moc"
+ m_p->pWidgetStack->setCurrentWidget(pData->pWidget);
#else
- #include "kvi_tal_wizard_qt3.moc"
+ m_p->pWidgetStack->raiseWidget(pData->pWidget);
#endif
+ szTitle = "<b>";
+ szTitle += pData->szTitle;
+ szTitle += "</b>";
+ QPalette pal = m_p->pStepsLabel->palette();
+#ifdef COMPILE_USE_QT4
+ QColor clrWin = pal.color(QPalette::Normal,QPalette::Window);
+ QColor clrTxt = pal.color(QPalette::Normal,QPalette::WindowText);
+#else
+ QColor clrWin = pal.color(QPalette::Normal,QColorGroup::Foreground);
+ QColor clrTxt = pal.color(QPalette::Normal,QColorGroup::Background);
+#endif
+ QColor clrMid = qRgb(
+ (clrWin.red() + clrTxt.red()) / 2,
+ (clrWin.green() + clrTxt.green()) / 2,
+ (clrWin.blue() + clrTxt.blue()) / 2
+ );
+
+ szSteps = "<nobr><font color=\"";
+ szSteps += clrMid.name();
+ szSteps += "\"><b>[";
+ szSteps += QString("Step %1 of %2").arg(pData->iVisibleIndex).arg(m_p->iEnabledPageCount);
+ szSteps += "]</b></font></nobr>";
+ }
+
+ m_p->pTitleLabel->setText(szTitle);
+ m_p->pStepsLabel->setText(szSteps);
+
+ m_p->pNextButton->setEnabled(bNextEnabled);
+ if(bNextEnabled)
+ {
+ m_p->pNextButton->show();
+ m_p->pNextSpacer->show();
+ } else {
+ m_p->pNextButton->hide();
+ m_p->pNextSpacer->hide();
+ }
+ m_p->pBackButton->setEnabled(bBackEnabled);
+ m_p->pHelpButton->setEnabled(bHelpEnabled);
+ if(bHelpEnabled)
+ m_p->pHelpButton->show();
+ else
+ m_p->pHelpButton->hide();
+ m_p->pCancelButton->setEnabled(bCancelEnabled);
+ m_p->pFinishButton->setEnabled(bFinishEnabled);
+ if(bFinishEnabled)
+ {
+ m_p->pFinishButton->show();
+ m_p->pFinishSpacer->show();
+ } else {
+ m_p->pFinishButton->hide();
+ m_p->pFinishSpacer->hide();
+ }
+}
+
+void KviTalWizard::showEvent(QShowEvent * e)
+{
+ if(!(m_p->pCurrentPage))
+ {
+ // display the first page
+ KviTalWizardPageData * pData = m_p->findFirstEnabledPage();
+ if(pData)
+ setCurrentPage(pData->pWidget);
+ }
+ QDialog::showEvent(e);
+}
+
+void KviTalWizard::closeEvent(QCloseEvent * e)
+{
+ e->ignore();
+ cancelButtonClicked();
+}
+
+void KviTalWizard::backButtonClicked()
+{
+ if(!m_p->pCurrentPage)
+ return;
+ setCurrentPage(m_p->findPrevEnabledPage(m_p->pCurrentPage->pWidget));
+}
+
+void KviTalWizard::nextButtonClicked()
+{
+ setCurrentPage(m_p->findNextEnabledPage(m_p->pCurrentPage->pWidget));
+}
+
+void KviTalWizard::helpButtonClicked()
+{
+ emit helpClicked();
+}
+
+void KviTalWizard::cancelButtonClicked()
+{
+ reject();
+}
+
+void KviTalWizard::finishButtonClicked()
+{
+ accept();
+}
+
+void KviTalWizard::setHelpEnabled(QWidget * pWidget,bool bEnabled)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return;
+ if(bEnabled)
+ pData->iEnableFlags |= KviTalWizardPageData::EnableHelp;
+ else
+ pData->iEnableFlags &= ~KviTalWizardPageData::EnableHelp;
+ if(pData == m_p->pCurrentPage)
+ setCurrentPage(pData);
+}
+
+void KviTalWizard::setCancelEnabled(QWidget * pWidget,bool bEnabled)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return;
+ if(bEnabled)
+ pData->iEnableFlags |= KviTalWizardPageData::EnableCancel;
+ else
+ pData->iEnableFlags &= ~KviTalWizardPageData::EnableCancel;
+ if(pData == m_p->pCurrentPage)
+ setCurrentPage(pData);
+}
+
+void KviTalWizard::setFinishEnabled(QWidget * pWidget,bool bEnabled)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return;
+ if(bEnabled)
+ pData->iEnableFlags |= KviTalWizardPageData::EnableFinish;
+ else
+ pData->iEnableFlags &= ~KviTalWizardPageData::EnableFinish;
+ if(pData == m_p->pCurrentPage)
+ setCurrentPage(pData);
+}
+
+void KviTalWizard::setNextEnabled(QWidget * pWidget,bool bEnabled)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return;
+ if(bEnabled)
+ pData->iEnableFlags |= KviTalWizardPageData::EnableNext;
+ else
+ pData->iEnableFlags &= ~KviTalWizardPageData::EnableNext;
+ if(pData == m_p->pCurrentPage)
+ setCurrentPage(pData);
+}
+
+void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled)
+{
+ KviTalWizardPageData * pData = m_p->findPage(pWidget);
+ if(!pData)
+ return;
+ if(bEnabled)
+ pData->iEnableFlags |= KviTalWizardPageData::EnableBack;
+ else
+ pData->iEnableFlags &= ~KviTalWizardPageData::EnableBack;
+ if(pData == m_p->pCurrentPage)
+ setCurrentPage(pData);
+}
+
+QPushButton * KviTalWizard::cancelButton()
+{
+ return m_p->pCancelButton;
+}
+
+QPushButton * KviTalWizard::helpButton()
+{
+ return m_p->pHelpButton;
+}
+
+QPushButton * KviTalWizard::finishButton()
+{
+ return m_p->pFinishButton;
+}
+
+QPushButton * KviTalWizard::nextButton()
+{
+ return m_p->pNextButton;
+}
+
+QPushButton * KviTalWizard::backButton()
+{
+ return m_p->pBackButton;
+}
diff --git a/src/kvilib/tal/kvi_tal_wizard.h b/src/kvilib/tal/kvi_tal_wizard.h
index c0121d625..8cd38d389 100644
--- a/src/kvilib/tal/kvi_tal_wizard.h
+++ b/src/kvilib/tal/kvi_tal_wizard.h
@@ -28,9 +28,142 @@
#include "kvi_settings.h"
#ifdef COMPILE_USE_QT4
- #include "kvi_tal_wizard_qt4.h"
+ #include <QDialog>
#else
- #include "kvi_tal_wizard_qt3.h"
+ #include <qdialog.h>
#endif
+class QShowEvent;
+class QPushButton;
+class KviTalWizardPrivate;
+class KviTalWizardPageData;
+
+///
+/// \class KviTalWizard
+///
+/// \brief Provides a wizard-style dialog with steps
+///
+class KVILIB_API KviTalWizard : public QDialog
+{
+ Q_OBJECT
+public:
+ KviTalWizard(QWidget * pParent);
+ ~KviTalWizard();
+protected:
+ KviTalWizardPrivate * m_p;
+public:
+ ///
+ /// Adds a page to the wizard with the specified title.
+ /// The pages are displayed in order they're added.
+ /// Adding a page a second time is equivalent to calling
+ /// setPageTitle() and enabling the page.
+ ///
+ void addPage(QWidget * pWidget,const QString &szTitle);
+ ///
+ /// Adds a page to the wizard with the specified title
+ /// and in the specified position.
+ /// Adding a page a second time is equivalent to calling
+ /// setPageTitle() and enabling the page.
+ ///
+ void insertPage(QWidget * pWidget,const QString &szTitle,int iIndex);
+ ///
+ /// Enables or disables a page. A disabled page
+ /// is skipped when the user presses "Next" in the
+ /// previous page or "Back" in the page after.
+ /// Disabling the current page has no effect.
+ ///
+ /// Returns true on success or false if the pWidget
+ /// does not identify a page that has been added to this wizard.
+ ///
+ bool setPageEnabled(QWidget * pWidget,bool bEnabled);
+ ///
+ /// Changes a page title.
+ ///
+ /// Returns true on success or false if the pWidget
+ /// does not identify a page that has been added to this wizard.
+ ///
+ bool setPageTitle(QWidget * pWidget,const QString &szTitle);
+ ///
+ /// Switches the wizard to the specified page.
+ /// Please note that this class handles page switching
+ /// automatically so you usually don't need to call this function.
+ ///
+ /// Returns true on success or false if the pWidget
+ /// does not identify a page that has been added to this wizard.
+ ///
+ bool setCurrentPage(QWidget * pWidget);
+ ///
+ /// Returns a pointer to the current page
+ ///
+ QWidget * currentPage();
+ ///
+ /// Enables or disables the help button for the specified page.
+ /// By default the help button is always disabled.
+ ///
+ void setHelpEnabled(QWidget * pWidget,bool bEnabled);
+ ///
+ /// Enables or disables the cancel button for the specified page.
+ /// By default the cancel button is always enabled.
+ ///
+ void setCancelEnabled(QWidget * pWidget,bool bEnabled);
+ ///
+ /// Enables or disables the finish button for the specified page.
+ /// By default the finish button is always disabled.
+ ///
+ void setFinishEnabled(QWidget * pWidget,bool bEnabled);
+ ///
+ /// Enables or disables the next button for the specified page.
+ /// By default the next button is always enabled.
+ ///
+ void setNextEnabled(QWidget * pWidget,bool bEnabled);
+ ///
+ /// Enables or disables the prev button for the specified page.
+ /// By default the prev button is always enabled.
+ ///
+ void setBackEnabled(QWidget * pWidget,bool bEnabled);
+ ///
+ /// Returns a pointer to the cancel button displayed in the dialog.
+ ///
+ QPushButton * cancelButton();
+ ///
+ /// Returns a pointer to the help button displayed in the dialog.
+ ///
+ QPushButton * helpButton();
+ ///
+ /// Returns a pointer to the finish button displayed in the dialog.
+ ///
+ QPushButton * finishButton();
+ ///
+ /// Returns a pointer to the next button displayed in the dialog.
+ ///
+ QPushButton * nextButton();
+ ///
+ /// Returns a pointer to the back button displayed in the dialog.
+ ///
+ QPushButton * backButton();
+signals:
+ ///
+ /// Emitted when the help button is clicked.
+ ///
+ void helpClicked();
+protected:
+ ///
+ /// Displays the first page if no other page is shown yet.
+ ///
+ virtual void showEvent(QShowEvent * e);
+ ///
+ /// Handles redirects the close button to the "cancel" operation.
+ ///
+ virtual void closeEvent(QCloseEvent * e);
+protected:
+ void setCurrentPage(KviTalWizardPageData * pData);
+protected slots:
+ void backButtonClicked();
+ void nextButtonClicked();
+ void helpButtonClicked();
+ void cancelButtonClicked();
+ void finishButtonClicked();
+};
+
+
#endif // _KVI_TAL_WIZARD_H_
diff --git a/src/kvilib/tal/kvi_tal_wizard_qt3.h b/src/kvilib/tal/kvi_tal_wizard_qt3.h
deleted file mode 100644
index aa8736a5a..000000000
--- a/src/kvilib/tal/kvi_tal_wizard_qt3.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _KVI_TAL_WIZARD_QT3_H_
-#define _KVI_TAL_WIZARD_QT3_H_
-
-//=============================================================================
-//
-// File : kvi_tal_wizard_qt3.h
-// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-//=============================================================================
-
-#include <qwizard.h>
-
-class KVILIB_API KviTalWizard : public QWizard
-{
- Q_OBJECT
-public:
- KviTalWizard(QWidget * pParent = 0,const char * name = 0,bool bModal = false)
- : QWizard(pParent,name,bModal) {};
- ~KviTalWizard() {};
-};
-
-#endif // _KVI_TAL_WIZARD_QT3_H_
diff --git a/src/kvilib/tal/kvi_tal_wizard_qt4.h b/src/kvilib/tal/kvi_tal_wizard_qt4.h
deleted file mode 100644
index aa2ef093c..000000000
--- a/src/kvilib/tal/kvi_tal_wizard_qt4.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _KVI_TAL_WIZARD_QT4_H_
-#define _KVI_TAL_WIZARD_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_wizard_qt4.h
-// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-//=============================================================================
-
-#include <q3wizard.h>
-
-class KVILIB_API KviTalWizard : public Q3Wizard
-{
- Q_OBJECT
-public:
- KviTalWizard(QWidget * pParent = 0,const char * name = 0,bool bModal = false)
- : Q3Wizard(pParent,name,bModal) {};
- ~KviTalWizard() {};
-};
-
-#endif // _KVI_TAL_WIZARD_QT4_H_
diff --git a/src/kvirc/kernel/kvi_theme.h b/src/kvirc/kernel/kvi_theme.h
index c4acfbdbf..fdf75e259 100644
--- a/src/kvirc/kernel/kvi_theme.h
+++ b/src/kvirc/kernel/kvi_theme.h
@@ -38,35 +38,51 @@
#define KVI_THEMEINFO_CONFIG_GROUP "ThemeInfo"
#define KVI_THEMEDATA_CONFIG_GROUP "ThemeData"
-// The current theme engine version: bump up if you make INCOMPATIBLE
-// changes in the method of saving the theme.
+///
+/// The current theme engine version: bump up if you make INCOMPATIBLE
+/// changes in the method of saving the theme.
+///
#define KVI_CURRENT_THEME_ENGINE_VERSION "1.0.0"
+///
+/// \class KviThemeInfo
+///
+/// \brief A set of informations about a KVIrc theme
+///
+/// This object contains a set of informations about
+/// a theme that can be read and stored to a standard
+/// KVIrc configuration file (which is usually named
+/// themeinfo.kvc but this is not strictly necessary).
+///
class KVIRC_API KviThemeInfo : public KviHeapObject
{
public:
KviThemeInfo();
~KviThemeInfo();
protected:
- QString m_szName; // name of the theme
- QString m_szVersion; // version of the theme
- QString m_szSubdirectory; // subdirectory of $LOCALKVIRCDIR/themes where the theme is saved to (not always used)
- QString m_szAbsoluteDirectory; // absolute directory where the theme should be saved to (or is loaded from)
- QString m_szAuthor; // author of the theme
- QString m_szDescription; // description of the theme
- QString m_szDate; // theme creation date
- QString m_szApplication; // theme creation (KVIrc) version
- QString m_szThemeEngineVersion; // the theme engine version that saved this theme
+ QString m_szName; //< name of the theme
+ QString m_szVersion; //< version of the theme
+ QString m_szSubdirectory; //< subdirectory of $LOCALKVIRCDIR/themes where the theme is saved to (not always used)
+ QString m_szAbsoluteDirectory; //< absolute directory where the theme should be saved to (or is loaded from)
+ QString m_szAuthor; //< author of the theme
+ QString m_szDescription; //< description of the theme
+ QString m_szDate; //< theme creation date
+ QString m_szApplication; //< theme creation (KVIrc) version
+ QString m_szThemeEngineVersion; //< the theme engine version that saved this theme
- QString m_szLastError; // reported when some function fails
+ QString m_szLastError; //< reported when some function fails
- QPixmap m_pixScreenshotLarge;
- QPixmap m_pixScreenshotMedium;
- QPixmap m_pixScreenshotSmall;
+ QPixmap m_pixScreenshotLarge; //< the large screenshot pixmap
+ QPixmap m_pixScreenshotMedium; //< the medium screenshot pixmap
+ QPixmap m_pixScreenshotSmall; //< the small screenshot pixmap
public:
- // load a specified themeinfo file
+ ///
+ /// load data from a specified theme config file
+ ///
bool load(const QString &szThemeFileName);
- // save the currently defined themeinfo in the specified file
+ ///
+ /// save the currently defined theme configuration in the specified file
+ ///
bool save(const QString &szThemeFileName);
const QString & lastError(){ return m_szLastError; };
@@ -90,39 +106,64 @@ public:
const QString & themeEngineVersion(){ return m_szThemeEngineVersion; };
void setThemeEngineVersion(const QString &szThemeEngineVersion){ m_szThemeEngineVersion = szThemeEngineVersion; };
- // Attempt to load a themeinfo file present in the specified directory
- // This function will fail if the directory contains a valid themeinfo
- // file but no themedata file unless bIgnoreThemeData is set to true
+ ///
+ /// Attempt to load a themeinfo.kvc file present in the specified directory.
+ /// This function will fail if the directory contains a valid themeinfo.kvc
+ /// file but no themedata.kvc file unless bIgnoreThemeData is set to true
+ ///
bool loadFromDirectory(const QString &szThemeDirectory,bool bIgnoreThemeData = false);
- // Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png
- // These functions will work only if the absoluteDirectory() of the theme
- // has been set, otherwise the returned pixmaps will be null.
+ ///
+ /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png
+ /// This function will work only if the absoluteDirectory() of the theme
+ /// has been set, otherwise the returned pixmap will be null.
+ ///
const QPixmap & smallScreenshot();
+ ///
+ /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png
+ /// This function will work only if the absoluteDirectory() of the theme
+ /// has been set, otherwise the returned pixmap will be null.
+ ///
const QPixmap & mediumScreenshot();
+ ///
+ /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png
+ /// This function will work only if the absoluteDirectory() of the theme
+ /// has been set, otherwise the returned pixmap will be null.
+ ///
const QPixmap & largeScreenshot();
+ ///
+ /// Attempt to load the theme screenshot from THEMEDIR/screenshot_*.png
+ /// This function will work only if the absoluteDirectory() of the theme
+ /// has been set, otherwise the returned pixmap will be null.
+ ///
QString smallScreenshotPath();
};
namespace KviTheme
{
- // Attempt to load (apply) a theme in the specified directory
- // Will return true on success and false on failure.
- // On success this function will return the theme informations in the buffer.
- // On failure this function will also set buffer.lastError() to a meaningful value
- // Note that for convenience this function is implemented in kvi_options.cpp
+ ///
+ /// Attempt to load (apply) a theme in the specified directory
+ /// Will return true on success and false on failure.
+ /// On success this function will return the theme informations in the buffer.
+ /// On failure this function will also set buffer.lastError() to a meaningful value
+ /// Note that for convenience this function is implemented in kvi_options.cpp
+ ///
bool KVIRC_API load(const QString &szThemeDir,KviThemeInfo &buffer);
- // Save a theme given the specified options.
- // Will return true on success and false on failure.
- // On failure this function will also set options.lastError() to a meaningful value
- // This function requires both absoluteDirectory() and subdirectory() to be
- // set to the right values. In theory this function could save a theme
- // in a directory different than $KVIRC_LOCAL_DIR/themes/subdirectory
- // but this feature is actually unused.
- // Note that for convenience this function is implemented in kvi_options.cpp
+ ///
+ /// Save a theme given the specified options.
+ /// Will return true on success and false on failure.
+ /// On failure this function will also set options.lastError() to a meaningful value
+ /// This function requires both absoluteDirectory() and subdirectory() to be
+ /// set to the right values. In theory this function could save a theme
+ /// in a directory different than $KVIRC_LOCAL_DIR/themes/subdirectory
+ /// but this feature is actually unused.
+ /// Note that for convenience this function is implemented in kvi_options.cpp
+ ///
bool KVIRC_API save(KviThemeInfo &options);
- // Save the theme screenshots in the given EXISTING directory and given
- // an existing screenshot on disk.
+ ///
+ /// Save the theme screenshots in the given EXISTING directory and given
+ /// an existing screenshot on disk (usually in the tmp directory).
+ ///
bool KVIRC_API saveScreenshots(KviThemeInfo &options,const QString &szOriginalScreenshotPath);
};
diff --git a/src/modules/mircimport/libkvimircimport.cpp b/src/modules/mircimport/libkvimircimport.cpp
index 7bfa1d340..42245778e 100644
--- a/src/modules/mircimport/libkvimircimport.cpp
+++ b/src/modules/mircimport/libkvimircimport.cpp
@@ -28,6 +28,7 @@
#include "kvi_locale.h"
#include "kvi_config.h"
#include "kvi_app.h"
+#include "kvi_qstring.h"
#include <qmessagebox.h>
@@ -107,8 +108,9 @@ int KviMircServersIniImport::doImport(const QString& filename)
}
} while(!entry.isEmpty());
} else {
- KviStr tmp(KviStr::Format,__tr("%s doesn't look like a servers.ini file.\nImport failed."),filename);
- QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),__tr2qs(tmp.ptr()));
+ QString tmp;
+ KviQString::sprintf(tmp,__tr2qs("%Q doesn't look like a servers.ini file.\nImport failed."),&filename);
+ QMessageBox::warning(0,__tr2qs("Warning - KVIrc"),tmp);
}
return iCount;
}
diff --git a/src/modules/objects/class_wizard.cpp b/src/modules/objects/class_wizard.cpp
index 83117af97..ca3302f3f 100644
--- a/src/modules/objects/class_wizard.cpp
+++ b/src/modules/objects/class_wizard.cpp
@@ -51,8 +51,6 @@
Add a page with title.<page_widget> must be a widget's object.
!fn: $insertPage(<page_widget>,<title:string>,<index:integer>)
Inserts a page at the position <index>. If index is -1, page will appended to the end of the wizard's page sequenze.
- !fn: $removePage(<page_widget:object>)
- Remove a page from the wizard sequence.
!fn: $setTitle(<page>,<title:string>)
Sets the title for page page to title text.
!fn: $setBackEnabled(<page_widget>,<bEnabled:boolean>)
@@ -95,7 +93,6 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_wizard,"wizard","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_wizard,"addPage", functionaddPage)
KVSO_REGISTER_HANDLER(KviKvsObject_wizard,"insertPage", functioninsertPage)
- KVSO_REGISTER_HANDLER(KviKvsObject_wizard,"removePage", functionremovePage)
KVSO_REGISTER_HANDLER(KviKvsObject_wizard,"setTitle", functionsetTitle)
KVSO_REGISTER_HANDLER(KviKvsObject_wizard,"setBackEnabled", functionsetBackEnabled);
@@ -172,23 +169,7 @@ bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c)
return true;
}
-bool KviKvsObject_wizard::functionremovePage(KviKvsObjectFunctionCall *c)
-{
- KviKvsObject *ob;
- kvs_hobject_t hObject;
- KVSO_PARAMETERS_BEGIN(c)
- KVSO_PARAMETER("page_widget",KVS_PT_HOBJECT,0,hObject)
- KVSO_PARAMETERS_END(c)
- ob=KviKvsKernel::instance()->objectController()->lookupObject(hObject);
- if(!widget())return true;
- if(!ob->object()->isWidgetType())
- {
- c->warning(__tr2qs("Not a widget object"));
- return true;
- }
- ((KviTalWizard *)widget())->removePage(((QWidget *)(ob->object())));
- return true;
-}
+
bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c)
{
KviKvsObject *ob;
@@ -205,7 +186,7 @@ bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((KviTalWizard *)widget())->setTitle(((QWidget *)(ob->object())),szTitle);
+ ((KviTalWizard *)widget())->setPageTitle(((QWidget *)(ob->object())),szTitle);
return true;
}
bool KviKvsObject_wizard::functionsetBackEnabled(KviKvsObjectFunctionCall *c)
@@ -360,7 +341,7 @@ void KviKvsObject_wizard::backClicked()
callFunction(this,"backClickedEvent",params);
}
KviKvsMdmWizard::KviKvsMdmWizard(QWidget * par,const char * name,KviKvsObject_wizard * parent)
-:KviTalWizard( par,name)
+:KviTalWizard(par)
{
m_pParentScript=parent;
connect (this->backButton(),SIGNAL(clicked()),this,SLOT(slotBackClicked()));
diff --git a/src/modules/reguser/wizard.cpp b/src/modules/reguser/wizard.cpp
index 6fefff089..327612824 100644
--- a/src/modules/reguser/wizard.cpp
+++ b/src/modules/reguser/wizard.cpp
@@ -49,10 +49,12 @@ extern KVIRC_API KviRegisteredUserDataBase * g_pRegisteredUserDataBase;
extern KviPtrList<KviRegistrationWizard> * g_pRegistrationWizardList;
KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db,QWidget * par,bool bModal)
-: KviTalWizard(par,"regusers_wizard",bModal)
+: KviTalWizard(par)
{
m_pDb = db;
+ setModal(bModal);
+
m_bModal = bModal;
KviIrcMask mask(startMask ? startMask : "*!*@*");
diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp
index 8201e3a55..8618b164d 100644
--- a/src/modules/setup/setupwizard.cpp
+++ b/src/modules/setup/setupwizard.cpp
@@ -113,8 +113,10 @@ KviSetupPage::~KviSetupPage()
KviSetupWizard::KviSetupWizard()
-: KviTalWizard(0,0,true)
+: KviTalWizard(0)
{
+ setModal(true);
+
g_bFoundMirc = false;
QString szLabelText;
@@ -148,19 +150,10 @@ KviSetupWizard::KviSetupWizard()
addPage(m_pWelcome,__tr2qs("Welcome to KVIrc"));
-#ifdef COMPILE_ON_WINDOWS
- m_pCreateUrlHandlers = new QCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pWelcome->m_pVBox);
- m_pCreateUrlHandlers->setChecked(true);
-#endif
-#ifdef COMPILE_KDE_SUPPORT
- m_pCreateDesktopShortcut = new QCheckBox(__tr2qs("Create desktop shortcut"),m_pWelcome->m_pVBox);
- m_pCreateDesktopShortcut->setChecked(true);
-#endif
setBackEnabled(m_pWelcome,false);
setHelpEnabled(m_pWelcome,false);
-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// License
#ifndef COMPILE_ON_WINDOWS //it have been already shown by installer
@@ -465,6 +458,34 @@ KviSetupWizard::KviSetupWizard()
setHelpEnabled(m_pTheme,false);*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Desktop integration
+
+ m_pDesktopIntegration = new KviSetupPage(this);
+
+ szText = __tr2qs( \
+ "<p>" \
+ "Here you can choose how much KVIrc will integrate with " \
+ "your system." \
+ "<br><br>" \
+ "The default settings are fine for most users so if " \
+ "you're in doubt just click \"<b>Next</b>\" and go to the next screen." \
+ "</p>");
+
+ m_pDesktopIntegration->m_pTextLabel->setText(szText);
+
+ addPage(m_pDesktopIntegration,__tr2qs("Desktop Integration"));
+
+#ifdef COMPILE_ON_WINDOWS
+ m_pCreateUrlHandlers = new QCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pDesktopIntegration->m_pVBox);
+ m_pCreateUrlHandlers->setChecked(true);
+#endif
+#ifdef COMPILE_KDE_SUPPORT
+ m_pCreateDesktopShortcut = new QCheckBox(__tr2qs("Create desktop shortcut"),m_pDesktopIntegration->m_pVBox);
+ m_pCreateDesktopShortcut->setChecked(true);
+#endif
+ setHelpEnabled(m_pDesktopIntegration,false);
+
+ /////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Server config
m_pServers = new KviSetupPage(this);
@@ -512,7 +533,7 @@ KviSetupWizard::KviSetupWizard()
KviConfig cfg(szTmp,KviConfig::Read);
cfg.setGroup("Setup");
if(cfg.readBoolEntry("hideServerList",FALSE)) {
- setAppropriate(m_pServers,false);
+ setPageEnabled(m_pServers,false);
setFinishEnabled(m_pIdentity,true);
KVI_OPTION_BOOL(KviOption_boolShowChannelsJoinOnIrc) = false;
KVI_OPTION_BOOL(KviOption_boolShowServersConnectDialogOnStart) = false;
@@ -524,11 +545,11 @@ KviSetupWizard::KviSetupWizard()
{
case 1:
m_pDirUseNew->toggle();
- setAppropriate(m_pDirectory,false);
+ setPageEnabled(m_pDirectory,false);
break;
case 2:
m_pDirMakePortable->toggle();
- setAppropriate(m_pDirectory,false);
+ setPageEnabled(m_pDirectory,false);
break;
}
}
@@ -607,9 +628,9 @@ void KviSetupWizard::oldDirClicked()
m_pNewPathBox->setEnabled(false);
m_pNewIncomingBox->setEnabled(false);
- if(m_pIdentity) setAppropriate(m_pIdentity,false);
-// if(m_pTheme) setAppropriate(m_pTheme,false);
- if(m_pServers) setAppropriate(m_pServers,false);
+ if(m_pIdentity) setPageEnabled(m_pIdentity,false);
+// if(m_pTheme) setPageEnabled(m_pTheme,false);
+ if(m_pServers) setPageEnabled(m_pServers,false);
if(m_pOldDataPathEdit->text().isEmpty()) setNextEnabled(m_pDirectory,false);
else setNextEnabled(m_pDirectory,true);
@@ -636,9 +657,9 @@ void KviSetupWizard::newDirClicked()
m_pNewPathBox->setEnabled(true);
m_pNewIncomingBox->setEnabled(true);
- if(m_pIdentity) setAppropriate(m_pIdentity,true);
-// if(m_pTheme) setAppropriate(m_pTheme,true);
- if(m_pServers) setAppropriate(m_pServers,true);
+ if(m_pIdentity) setPageEnabled(m_pIdentity,true);
+// if(m_pTheme) setPageEnabled(m_pTheme,true);
+ if(m_pServers) setPageEnabled(m_pServers,true);
if(m_pDataPathEdit->text().isEmpty() || m_pIncomingPathEdit->text().isEmpty()) setNextEnabled(m_pDirectory,false);
else setNextEnabled(m_pDirectory,true);
@@ -886,7 +907,7 @@ void KviSetupWizard::accept()
KviMessageBox::warning(__tr("Cannot create directory %s.\n" \
"You may not have write permission " \
"for that path. Please go back and choose another directory."));
- showPage(m_pDirectory);
+ setCurrentPage(m_pDirectory);
return;
}
} /*else {
@@ -917,7 +938,7 @@ void KviSetupWizard::accept()
KviMessageBox::warning(__tr("Cannot create directory %s.\n" \
"You may not have write permission " \
"for that path. Please go back and choose another directory."));
- showPage(m_pDirectory);
+ setCurrentPage(m_pDirectory);
return;
}
}
@@ -1038,7 +1059,8 @@ void KviSetupWizard::accept()
}
}
#ifdef COMPILE_ON_WINDOWS
- if(m_pDirMakePortable->isOn()) {
+ if(m_pDirMakePortable->isOn())
+ {
KviFileUtils::writeFile(g_pApp->applicationDirPath()+KVI_PATH_SEPARATOR_CHAR+"portable","true");
} else {
#endif
diff --git a/src/modules/setup/setupwizard.h b/src/modules/setup/setupwizard.h
index 0ffe90807..260de0838 100644
--- a/src/modules/setup/setupwizard.h
+++ b/src/modules/setup/setupwizard.h
@@ -1,11 +1,12 @@
#ifndef _SETUPWIZARD_H_
#define _SETUPWIZARD_H_
+//=============================================================================
//
// File : setupwizard.h
// Creation date : Sat Oct 6 02:06:51 2001 GMT by Szymon Stefanek
//
// This file is part of the KVirc irc client distribution
-// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
+// Copyright (C) 2001-2007 Szymon Stefanek (pragma at kvirc dot net)
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -21,6 +22,7 @@
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
+//=============================================================================
#include <kvi_tal_wizard.h>
@@ -79,11 +81,10 @@ public:
KviSetupPage * m_pDirectory;
KviSetupPage * m_pIdentity;
// KviSetupPage * m_pTheme;
+ KviSetupPage * m_pDesktopIntegration;
KviSetupPage * m_pServers;
// Theme
-
-
KviTalVButtonGroup * m_pThemeButtonGroup;
QRadioButton * m_pThemeHiRes;
diff --git a/src/modules/theme/packthemedialog.cpp b/src/modules/theme/packthemedialog.cpp
index 5b9a23428..53fe5de98 100644
--- a/src/modules/theme/packthemedialog.cpp
+++ b/src/modules/theme/packthemedialog.cpp
@@ -386,7 +386,7 @@ bool KviPackThemeDialog::packTheme()
{
QMessageBox::critical(this,__tr2qs_ctx("Export Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected image: please fix it","theme"),
QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
- showPage(m_pImageSelectionPage);
+ setCurrentPage(m_pImageSelectionPage);
return false;
}
}
diff --git a/src/modules/theme/savethemedialog.cpp b/src/modules/theme/savethemedialog.cpp
index a85be1fda..a98780a7d 100644
--- a/src/modules/theme/savethemedialog.cpp
+++ b/src/modules/theme/savethemedialog.cpp
@@ -285,7 +285,7 @@ bool KviSaveThemeDialog::saveTheme()
{
QMessageBox::critical(this,__tr2qs_ctx("Save Current Theme - KVIrc","theme"),__tr2qs_ctx("Failed to load the selected screenshot image: please fix it","theme"),
QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
- showPage(m_pImageSelectionPage);
+ setCurrentPage(m_pImageSelectionPage);
return false;
}
}