ac_help="$ac_help
**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed"
ac_help="$ac_help
-**--without-threads Force disabling threads "
+**--without-threads Force disabling threads"
# Initialize some variables set by options.
# The variables have the same names as the options, with
DEFAULT_USE_QT=0
DEFAULT_USE_MOTIF=0
+DEFAULT_USE_THREADS=1
+
DEFAULT_USE_SHARED=1
DEFAULT_USE_OPTIMISE=1
DEFAULT_USE_PROFILE=0
echo $ac_n "checking "for gtk"""... $ac_c" 1>&6
-echo "configure:4270: checking "for gtk"" >&5
+echo "configure:4272: checking "for gtk"" >&5
# Check whether --with-gtk or --without-gtk was given.
if test "${with_gtk+set}" = set; then
withval="$with_gtk"
echo $ac_n "checking "for qt"""... $ac_c" 1>&6
-echo "configure:4300: checking "for qt"" >&5
+echo "configure:4302: checking "for qt"" >&5
# Check whether --with-qt or --without-qt was given.
if test "${with_qt+set}" = set; then
withval="$with_qt"
echo $ac_n "checking "for motif"""... $ac_c" 1>&6
-echo "configure:4330: checking "for motif"" >&5
+echo "configure:4332: checking "for motif"" >&5
# Check whether --with-motif or --without-motif was given.
if test "${with_motif+set}" = set; then
withval="$with_motif"
echo $ac_n "checking "for shared"""... $ac_c" 1>&6
-echo "configure:4361: checking "for shared"" >&5
+echo "configure:4363: checking "for shared"" >&5
# Check whether --with-shared or --without-shared was given.
if test "${with_shared+set}" = set; then
withval="$with_shared"
echo $ac_n "checking "for optimise"""... $ac_c" 1>&6
-echo "configure:4391: checking "for optimise"" >&5
+echo "configure:4393: checking "for optimise"" >&5
# Check whether --with-optimise or --without-optimise was given.
if test "${with_optimise+set}" = set; then
withval="$with_optimise"
echo $ac_n "checking "for debug_flag"""... $ac_c" 1>&6
-echo "configure:4421: checking "for debug_flag"" >&5
+echo "configure:4423: checking "for debug_flag"" >&5
# Check whether --with-debug_flag or --without-debug_flag was given.
if test "${with_debug_flag+set}" = set; then
withval="$with_debug_flag"
echo $ac_n "checking "for debug_info"""... $ac_c" 1>&6
-echo "configure:4451: checking "for debug_info"" >&5
+echo "configure:4453: checking "for debug_info"" >&5
# Check whether --with-debug_info or --without-debug_info was given.
if test "${with_debug_info+set}" = set; then
withval="$with_debug_info"
echo $ac_n "checking "for mem_tracing"""... $ac_c" 1>&6
-echo "configure:4481: checking "for mem_tracing"" >&5
+echo "configure:4483: checking "for mem_tracing"" >&5
# Check whether --with-mem_tracing or --without-mem_tracing was given.
if test "${with_mem_tracing+set}" = set; then
withval="$with_mem_tracing"
echo $ac_n "checking "for dmalloc"""... $ac_c" 1>&6
-echo "configure:4511: checking "for dmalloc"" >&5
+echo "configure:4513: checking "for dmalloc"" >&5
# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
withval="$with_dmalloc"
echo $ac_n "checking "for profile"""... $ac_c" 1>&6
-echo "configure:4541: checking "for profile"" >&5
+echo "configure:4543: checking "for profile"" >&5
# Check whether --with-profile or --without-profile was given.
if test "${with_profile+set}" = set; then
withval="$with_profile"
echo $ac_n "checking "for apple_ieee"""... $ac_c" 1>&6
-echo "configure:4571: checking "for apple_ieee"" >&5
+echo "configure:4573: checking "for apple_ieee"" >&5
# Check whether --with-apple_ieee or --without-apple_ieee was given.
if test "${with_apple_ieee+set}" = set; then
withval="$with_apple_ieee"
echo $ac_n "checking "for zlib"""... $ac_c" 1>&6
-echo "configure:4602: checking "for zlib"" >&5
+echo "configure:4604: checking "for zlib"" >&5
# Check whether --with-zlib or --without-zlib was given.
if test "${with_zlib+set}" = set; then
withval="$with_zlib"
echo $ac_n "checking "for gdk_imlib"""... $ac_c" 1>&6
-echo "configure:4632: checking "for gdk_imlib"" >&5
+echo "configure:4634: checking "for gdk_imlib"" >&5
# Check whether --with-gdk_imlib or --without-gdk_imlib was given.
if test "${with_gdk_imlib+set}" = set; then
withval="$with_gdk_imlib"
echo $ac_n "checking "for libpng"""... $ac_c" 1>&6
-echo "configure:4662: checking "for libpng"" >&5
+echo "configure:4664: checking "for libpng"" >&5
# Check whether --with-libpng or --without-libpng was given.
if test "${with_libpng+set}" = set; then
withval="$with_libpng"
echo $ac_n "checking "for odbc"""... $ac_c" 1>&6
-echo "configure:4692: checking "for odbc"" >&5
+echo "configure:4694: checking "for odbc"" >&5
# Check whether --with-odbc or --without-odbc was given.
if test "${with_odbc+set}" = set; then
withval="$with_odbc"
echo $ac_n "checking "for opengl"""... $ac_c" 1>&6
-echo "configure:4722: checking "for opengl"" >&5
+echo "configure:4724: checking "for opengl"" >&5
# Check whether --with-opengl or --without-opengl was given.
if test "${with_opengl+set}" = set; then
withval="$with_opengl"
echo $ac_n "checking "for gauge"""... $ac_c" 1>&6
-echo "configure:4753: checking "for gauge"" >&5
+echo "configure:4755: checking "for gauge"" >&5
# Check whether --with-gauge or --without-gauge was given.
if test "${with_gauge+set}" = set; then
withval="$with_gauge"
echo $ac_n "checking "for combobox"""... $ac_c" 1>&6
-echo "configure:4783: checking "for combobox"" >&5
+echo "configure:4785: checking "for combobox"" >&5
# Check whether --with-combobox or --without-combobox was given.
if test "${with_combobox+set}" = set; then
withval="$with_combobox"
echo $ac_n "checking "for scrollbar"""... $ac_c" 1>&6
-echo "configure:4813: checking "for scrollbar"" >&5
+echo "configure:4815: checking "for scrollbar"" >&5
# Check whether --with-scrollbar or --without-scrollbar was given.
if test "${with_scrollbar+set}" = set; then
withval="$with_scrollbar"
echo $ac_n "checking "for listctrl"""... $ac_c" 1>&6
-echo "configure:4843: checking "for listctrl"" >&5
+echo "configure:4845: checking "for listctrl"" >&5
# Check whether --with-listctrl or --without-listctrl was given.
if test "${with_listctrl+set}" = set; then
withval="$with_listctrl"
echo $ac_n "checking "for treectrl"""... $ac_c" 1>&6
-echo "configure:4873: checking "for treectrl"" >&5
+echo "configure:4875: checking "for treectrl"" >&5
# Check whether --with-treectrl or --without-treectrl was given.
if test "${with_treectrl+set}" = set; then
withval="$with_treectrl"
echo $ac_n "checking "for grid"""... $ac_c" 1>&6
-echo "configure:4903: checking "for grid"" >&5
+echo "configure:4905: checking "for grid"" >&5
# Check whether --with-grid or --without-grid was given.
if test "${with_grid+set}" = set; then
withval="$with_grid"
echo $ac_n "checking "for tab_dialog"""... $ac_c" 1>&6
-echo "configure:4933: checking "for tab_dialog"" >&5
+echo "configure:4935: checking "for tab_dialog"" >&5
# Check whether --with-tab_dialog or --without-tab_dialog was given.
if test "${with_tab_dialog+set}" = set; then
withval="$with_tab_dialog"
echo $ac_n "checking "for notebook"""... $ac_c" 1>&6
-echo "configure:4963: checking "for notebook"" >&5
+echo "configure:4965: checking "for notebook"" >&5
# Check whether --with-notebook or --without-notebook was given.
if test "${with_notebook+set}" = set; then
withval="$with_notebook"
echo $ac_n "checking "for timedate"""... $ac_c" 1>&6
-echo "configure:4994: checking "for timedate"" >&5
+echo "configure:4996: checking "for timedate"" >&5
# Check whether --with-timedate or --without-timedate was given.
if test "${with_timedate+set}" = set; then
withval="$with_timedate"
echo $ac_n "checking "for fraction"""... $ac_c" 1>&6
-echo "configure:5024: checking "for fraction"" >&5
+echo "configure:5026: checking "for fraction"" >&5
# Check whether --with-fraction or --without-fraction was given.
if test "${with_fraction+set}" = set; then
withval="$with_fraction"
echo $ac_n "checking "for log"""... $ac_c" 1>&6
-echo "configure:5054: checking "for log"" >&5
+echo "configure:5056: checking "for log"" >&5
# Check whether --with-log or --without-log was given.
if test "${with_log+set}" = set; then
withval="$with_log"
echo $ac_n "checking "for intl"""... $ac_c" 1>&6
-echo "configure:5084: checking "for intl"" >&5
+echo "configure:5086: checking "for intl"" >&5
# Check whether --with-intl or --without-intl was given.
if test "${with_intl+set}" = set; then
withval="$with_intl"
echo $ac_n "checking "for config"""... $ac_c" 1>&6
-echo "configure:5114: checking "for config"" >&5
+echo "configure:5116: checking "for config"" >&5
# Check whether --with-config or --without-config was given.
if test "${with_config+set}" = set; then
withval="$with_config"
echo $ac_n "checking "for streams"""... $ac_c" 1>&6
-echo "configure:5144: checking "for streams"" >&5
+echo "configure:5146: checking "for streams"" >&5
# Check whether --with-streams or --without-streams was given.
if test "${with_streams+set}" = set; then
withval="$with_streams"
echo $ac_n "checking "for serial"""... $ac_c" 1>&6
-echo "configure:5174: checking "for serial"" >&5
+echo "configure:5176: checking "for serial"" >&5
# Check whether --with-serial or --without-serial was given.
if test "${with_serial+set}" = set; then
withval="$with_serial"
echo $ac_n "checking "for file"""... $ac_c" 1>&6
-echo "configure:5204: checking "for file"" >&5
+echo "configure:5206: checking "for file"" >&5
# Check whether --with-file or --without-file was given.
if test "${with_file+set}" = set; then
withval="$with_file"
echo $ac_n "checking "for textfile"""... $ac_c" 1>&6
-echo "configure:5234: checking "for textfile"" >&5
+echo "configure:5236: checking "for textfile"" >&5
# Check whether --with-textfile or --without-textfile was given.
if test "${with_textfile+set}" = set; then
withval="$with_textfile"
echo $ac_n "checking "for afmfonts"""... $ac_c" 1>&6
-echo "configure:5265: checking "for afmfonts"" >&5
+echo "configure:5267: checking "for afmfonts"" >&5
# Check whether --with-afmfonts or --without-afmfonts was given.
if test "${with_afmfonts+set}" = set; then
withval="$with_afmfonts"
echo $ac_n "checking "for normalized"""... $ac_c" 1>&6
-echo "configure:5295: checking "for normalized"" >&5
+echo "configure:5297: checking "for normalized"" >&5
# Check whether --with-normalized or --without-normalized was given.
if test "${with_normalized+set}" = set; then
withval="$with_normalized"
echo $ac_n "checking "for postscript"""... $ac_c" 1>&6
-echo "configure:5325: checking "for postscript"" >&5
+echo "configure:5327: checking "for postscript"" >&5
# Check whether --with-postscript or --without-postscript was given.
if test "${with_postscript+set}" = set; then
withval="$with_postscript"
echo $ac_n "checking "for wxresources"""... $ac_c" 1>&6
-echo "configure:5356: checking "for wxresources"" >&5
+echo "configure:5358: checking "for wxresources"" >&5
# Check whether --with-wxresources or --without-wxresources was given.
if test "${with_wxresources+set}" = set; then
withval="$with_wxresources"
echo $ac_n "checking "for prologio"""... $ac_c" 1>&6
-echo "configure:5386: checking "for prologio"" >&5
+echo "configure:5388: checking "for prologio"" >&5
# Check whether --with-prologio or --without-prologio was given.
if test "${with_prologio+set}" = set; then
withval="$with_prologio"
echo $ac_n "checking "for RPC"""... $ac_c" 1>&6
-echo "configure:5416: checking "for RPC"" >&5
+echo "configure:5418: checking "for RPC"" >&5
# Check whether --with-rpc or --without-rpc was given.
if test "${with_rpc+set}" = set; then
withval="$with_rpc"
echo $ac_n "checking "for IPC"""... $ac_c" 1>&6
-echo "configure:5447: checking "for IPC"" >&5
+echo "configure:5449: checking "for IPC"" >&5
# Check whether --with-ipc or --without-ipc was given.
if test "${with_ipc+set}" = set; then
withval="$with_ipc"
echo $ac_n "checking "for resources"""... $ac_c" 1>&6
-echo "configure:5477: checking "for resources"" >&5
+echo "configure:5479: checking "for resources"" >&5
# Check whether --with-resources or --without-resources was given.
if test "${with_resources+set}" = set; then
withval="$with_resources"
echo $ac_n "checking "for clipboard"""... $ac_c" 1>&6
-echo "configure:5507: checking "for clipboard"" >&5
+echo "configure:5509: checking "for clipboard"" >&5
# Check whether --with-clipboard or --without-clipboard was given.
if test "${with_clipboard+set}" = set; then
withval="$with_clipboard"
echo $ac_n "checking "for dnd"""... $ac_c" 1>&6
-echo "configure:5537: checking "for dnd"" >&5
+echo "configure:5539: checking "for dnd"" >&5
# Check whether --with-dnd or --without-dnd was given.
if test "${with_dnd+set}" = set; then
withval="$with_dnd"
echo $ac_n "checking "for constrains"""... $ac_c" 1>&6
-echo "configure:5567: checking "for constrains"" >&5
+echo "configure:5569: checking "for constrains"" >&5
# Check whether --with-constraints or --without-constraints was given.
if test "${with_constraints+set}" = set; then
withval="$with_constraints"
echo $ac_n "checking "for mdi"""... $ac_c" 1>&6
-echo "configure:5598: checking "for mdi"" >&5
+echo "configure:5600: checking "for mdi"" >&5
# Check whether --with-mdi or --without-mdi was given.
if test "${with_mdi+set}" = set; then
withval="$with_mdi"
echo $ac_n "checking "for docview"""... $ac_c" 1>&6
-echo "configure:5628: checking "for docview"" >&5
+echo "configure:5630: checking "for docview"" >&5
# Check whether --with-docview or --without-docview was given.
if test "${with_docview+set}" = set; then
withval="$with_docview"
echo $ac_n "checking "for printarch"""... $ac_c" 1>&6
-echo "configure:5658: checking "for printarch"" >&5
+echo "configure:5660: checking "for printarch"" >&5
# Check whether --with-printarch or --without-printarch was given.
if test "${with_printarch+set}" = set; then
withval="$with_printarch"
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5738: checking for $ac_word" >&5
+echo "configure:5740: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
min_gtk_version=0.99.7
echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
-echo "configure:5769: checking for GTK - version >= $min_gtk_version" >&5
+echo "configure:5771: checking for GTK - version >= $min_gtk_version" >&5
no_gtk=""
if test "$GTK_CONFIG" != "no" ; then
GTK_CFLAGS=`$GTK_CONFIG --cflags`
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat > conftest.$ac_ext <<EOF
-#line 5782 "configure"
+#line 5784 "configure"
#include "confdefs.h"
#include <gtk/gtk.h>
}
EOF
-if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
if test "$USE_QT" = 1; then
echo $ac_n "checking for Qt includes""... $ac_c" 1>&6
-echo "configure:5843: checking for Qt includes" >&5
+echo "configure:5845: checking for Qt includes" >&5
ac_find_includes=
for ac_dir in $SEARCH_INCLUDE;
if test "$ac_find_includes" != "" ; then
echo "$ac_t""found $ac_find_includes" 1>&6
echo $ac_n "checking for Qt library""... $ac_c" 1>&6
-echo "configure:5857: checking for Qt library" >&5
+echo "configure:5859: checking for Qt library" >&5
ac_find_libraries=
for ac_dir in $SEARCH_LIB;
if test "$USE_MOTIF" = 1; then
echo $ac_n "checking for Motif/Lesstif includes""... $ac_c" 1>&6
-echo "configure:5907: checking for Motif/Lesstif includes" >&5
+echo "configure:5909: checking for Motif/Lesstif includes" >&5
ac_find_includes=
for ac_dir in $SEARCH_INCLUDE;
if test "$ac_find_includes" != "" ; then
echo "$ac_t""found $ac_find_includes" 1>&6
echo $ac_n "checking for Motif or Lesstif library""... $ac_c" 1>&6
-echo "configure:5921: checking for Motif or Lesstif library" >&5
+echo "configure:5923: checking for Motif or Lesstif library" >&5
ac_find_libraries=
for ac_dir in $SEARCH_LIB;
echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
-echo "configure:6350: checking for main in -ldl" >&5
+echo "configure:6352: checking for main in -ldl" >&5
ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6358 "configure"
+#line 6360 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:6365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
USE_THREADS=1
THREADS_LINK=""
-UNIX_THREAD=""
+UNIX_THREAD="gtk/threadno.cpp"
+
+echo $ac_n "checking "for threads"""... $ac_c" 1>&6
+echo "configure:6397: checking "for threads"" >&5
# Check whether --with-threads or --without-threads was given.
if test "${with_threads+set}" = set; then
withval="$with_threads"
- USE_THREADS="$withval"
+ if test "x$with_threads" = xyes; then
+ ac_cv_use_threads='USE_THREADS="1"'
+else
+ ac_cv_use_threads='USE_THREADS="0"'
+fi
+else
+
+ LINE=`grep "USE_THREADS" ${OSTYPE}.system.cache`
+ if test "x$LINE" != x ; then
+ eval "DEFAULT_$LINE"
+ fi
+ ac_cv_use_threads='USE_THREADS='$DEFAULT_USE_THREADS
+
+fi
+
+eval "$ac_cv_use_threads"
+echo $ac_cv_use_threads >> ${OSTYPE}.system.cache.tmp
+if test "$USE_THREADS" = 1; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
fi
+
if test "$USE_THREADS" = "1"; then
UNIX_THREAD="gtk/threadno.cpp"
echo $ac_n "checking for pthread_create in -lpthread-0.7""... $ac_c" 1>&6
-echo "configure:6405: checking for pthread_create in -lpthread-0.7" >&5
+echo "configure:6431: checking for pthread_create in -lpthread-0.7" >&5
ac_lib_var=`echo pthread-0.7'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthread-0.7 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6413 "configure"
+#line 6439 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6
-echo "configure:6448: checking for sys/prctl.h" >&5
+echo "configure:6474: checking for sys/prctl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6453 "configure"
+#line 6479 "configure"
#include "confdefs.h"
#include <sys/prctl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for pthread_setcanceltype in -lpthread""... $ac_c" 1>&6
-echo "configure:6484: checking for pthread_setcanceltype in -lpthread" >&5
+echo "configure:6510: checking for pthread_setcanceltype in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_setcanceltype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6492 "configure"
+#line 6518 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_setcanceltype()
; return 0; }
EOF
-if { (eval echo configure:6503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for pthread_setcanceltype in -lpthreads""... $ac_c" 1>&6
-echo "configure:6530: checking for pthread_setcanceltype in -lpthreads" >&5
+echo "configure:6556: checking for pthread_setcanceltype in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'pthread_setcanceltype | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6538 "configure"
+#line 6564 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_setcanceltype()
; return 0; }
EOF
-if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$USE_OPENGL" = 1; then
echo $ac_n "checking for OpenGL includes""... $ac_c" 1>&6
-echo "configure:6593: checking for OpenGL includes" >&5
+echo "configure:6619: checking for OpenGL includes" >&5
ac_find_includes=
for ac_dir in $SEARCH_INCLUDE;
OPENGL_INCLUDE="-I$ac_find_includes"
echo "$ac_t""found $ac_find_includes" 1>&6
echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
-echo "configure:6608: checking for OpenGL library" >&5
+echo "configure:6634: checking for OpenGL library" >&5
ac_find_libraries=
for ac_dir in $SEARCH_LIB;
DEFAULT_USE_QT=0
DEFAULT_USE_MOTIF=0
+DEFAULT_USE_THREADS=1
+
DEFAULT_USE_SHARED=1
DEFAULT_USE_OPTIMISE=1
DEFAULT_USE_PROFILE=0
USE_THREADS=1
THREADS_LINK=""
-UNIX_THREAD=""
+UNIX_THREAD="gtk/threadno.cpp"
+
+AC_OVERRIDES(threads,threads,
+**--without-threads Force disabling threads,
+USE_THREADS)
-AC_ARG_WITH(threads,
-[**--without-threads Force disabling threads ],
-[USE_THREADS="$withval"])
+dnl AC_ARG_WITH(threads,
+dnl [**--without-threads Force disabling threads ],
+dnl [USE_THREADS="$withval"])
if test "$USE_THREADS" = "1"; then
UNIX_THREAD="gtk/threadno.cpp"
float m_oldVerticalPos;
bool m_needParent;
bool m_hasScrolling;
+ bool m_isScrolling;
bool m_hasOwnStyle;
bool m_hasVMT;
bool m_sizeSet;
float m_oldVerticalPos;
bool m_needParent;
bool m_hasScrolling;
+ bool m_isScrolling;
bool m_hasOwnStyle;
bool m_hasVMT;
bool m_sizeSet;
#include "wx/stream.h"
#include "wx/socket.h"
-class WXDLLEXPORT wxSocketOutputStream : public wxOutputStream
+class WXDLLEXPORT wxSocketOutputStream : public virtual wxOutputStream
{
public:
wxSocketOutputStream(wxSocketBase& s);
wxSocketBase *m_o_socket;
};
-class WXDLLEXPORT wxSocketInputStream : public wxInputStream
+class WXDLLEXPORT wxSocketInputStream : public virtual wxInputStream
{
public:
wxSocketInputStream(wxSocketBase& s);
void OnRadio( wxCommandEvent &event );
void OnRadioButtons( wxCommandEvent &event );
void OnSetFont( wxCommandEvent &event );
+ void OnPageChanged( wxNotebookEvent &event );
wxListBox *m_listbox;
wxChoice *m_choice;
const ID_SET_FONT = 170;
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
- EVT_SIZE ( MyPanel::OnSize)
- EVT_LISTBOX (ID_LISTBOX, MyPanel::OnListBox)
- EVT_BUTTON (ID_LISTBOX_SEL_NUM, MyPanel::OnListBoxButtons)
- EVT_BUTTON (ID_LISTBOX_SEL_STR, MyPanel::OnListBoxButtons)
- EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons)
- EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons)
- EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons)
- EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons)
- EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons)
- EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice)
- EVT_BUTTON (ID_CHOICE_SEL_NUM, MyPanel::OnChoiceButtons)
- EVT_BUTTON (ID_CHOICE_SEL_STR, MyPanel::OnChoiceButtons)
- EVT_BUTTON (ID_CHOICE_CLEAR, MyPanel::OnChoiceButtons)
- EVT_BUTTON (ID_CHOICE_APPEND, MyPanel::OnChoiceButtons)
- EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons)
- EVT_BUTTON (ID_CHOICE_FONT, MyPanel::OnChoiceButtons)
- EVT_CHECKBOX (ID_CHOICE_ENABLE, MyPanel::OnChoiceButtons)
- EVT_CHOICE (ID_COMBO, MyPanel::OnCombo)
- EVT_BUTTON (ID_COMBO_SEL_NUM, MyPanel::OnComboButtons)
- EVT_BUTTON (ID_COMBO_SEL_STR, MyPanel::OnComboButtons)
- EVT_BUTTON (ID_COMBO_CLEAR, MyPanel::OnComboButtons)
- EVT_BUTTON (ID_COMBO_APPEND, MyPanel::OnComboButtons)
- EVT_BUTTON (ID_COMBO_DELETE, MyPanel::OnComboButtons)
- EVT_BUTTON (ID_COMBO_FONT, MyPanel::OnComboButtons)
- EVT_CHECKBOX (ID_COMBO_ENABLE, MyPanel::OnComboButtons)
- EVT_RADIOBOX (ID_RADIOBOX, MyPanel::OnRadio)
- EVT_BUTTON (ID_RADIOBOX_SEL_NUM, MyPanel::OnRadioButtons)
- EVT_BUTTON (ID_RADIOBOX_SEL_STR, MyPanel::OnRadioButtons)
- EVT_BUTTON (ID_RADIOBOX_FONT, MyPanel::OnRadioButtons)
- EVT_CHECKBOX (ID_RADIOBOX_ENABLE, MyPanel::OnRadioButtons)
- EVT_BUTTON (ID_SET_FONT, MyPanel::OnSetFont)
+ EVT_SIZE ( MyPanel::OnSize)
+ EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK, MyPanel::OnPageChanged)
+ EVT_LISTBOX (ID_LISTBOX, MyPanel::OnListBox)
+ EVT_BUTTON (ID_LISTBOX_SEL_NUM, MyPanel::OnListBoxButtons)
+ EVT_BUTTON (ID_LISTBOX_SEL_STR, MyPanel::OnListBoxButtons)
+ EVT_BUTTON (ID_LISTBOX_CLEAR, MyPanel::OnListBoxButtons)
+ EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons)
+ EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons)
+ EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons)
+ EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons)
+ EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice)
+ EVT_BUTTON (ID_CHOICE_SEL_NUM, MyPanel::OnChoiceButtons)
+ EVT_BUTTON (ID_CHOICE_SEL_STR, MyPanel::OnChoiceButtons)
+ EVT_BUTTON (ID_CHOICE_CLEAR, MyPanel::OnChoiceButtons)
+ EVT_BUTTON (ID_CHOICE_APPEND, MyPanel::OnChoiceButtons)
+ EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons)
+ EVT_BUTTON (ID_CHOICE_FONT, MyPanel::OnChoiceButtons)
+ EVT_CHECKBOX (ID_CHOICE_ENABLE, MyPanel::OnChoiceButtons)
+ EVT_CHOICE (ID_COMBO, MyPanel::OnCombo)
+ EVT_BUTTON (ID_COMBO_SEL_NUM, MyPanel::OnComboButtons)
+ EVT_BUTTON (ID_COMBO_SEL_STR, MyPanel::OnComboButtons)
+ EVT_BUTTON (ID_COMBO_CLEAR, MyPanel::OnComboButtons)
+ EVT_BUTTON (ID_COMBO_APPEND, MyPanel::OnComboButtons)
+ EVT_BUTTON (ID_COMBO_DELETE, MyPanel::OnComboButtons)
+ EVT_BUTTON (ID_COMBO_FONT, MyPanel::OnComboButtons)
+ EVT_CHECKBOX (ID_COMBO_ENABLE, MyPanel::OnComboButtons)
+ EVT_RADIOBOX (ID_RADIOBOX, MyPanel::OnRadio)
+ EVT_BUTTON (ID_RADIOBOX_SEL_NUM, MyPanel::OnRadioButtons)
+ EVT_BUTTON (ID_RADIOBOX_SEL_STR, MyPanel::OnRadioButtons)
+ EVT_BUTTON (ID_RADIOBOX_FONT, MyPanel::OnRadioButtons)
+ EVT_CHECKBOX (ID_RADIOBOX_ENABLE, MyPanel::OnRadioButtons)
+ EVT_BUTTON (ID_SET_FONT, MyPanel::OnSetFont)
END_EVENT_TABLE()
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) :
if (m_text) m_text->SetSize( 2, y*2/3+2, x-4, y/3-4 );
}
+void MyPanel::OnPageChanged( wxNotebookEvent &event )
+{
+ *m_text << "Notebook selection is " << event.GetSelection() << "\n";
+}
+
void MyPanel::OnListBox( wxCommandEvent &event )
{
m_text->WriteText( "ListBox selection string is: " );
SetIcon(wxIcon(mondrian_xpm));
#endif
- const int widths[] = { -1 };
+// const int widths[] = { -1 };
CreateStatusBar();
// construct menu
wxArrayString players;
m_scoreFile->GetPlayerList(players);
- for (int i = 0; i < players.Count(); i++)
+ for (unsigned int i = 0; i < players.Count(); i++)
{
list->Append(players[i]);
}
{
}
-void PlayerSelectionDialog::OnSize(wxSizeEvent& event)
+void PlayerSelectionDialog::OnSize(wxSizeEvent& WXUNUSED(event))
{
Layout();
}
ostrstream os;
os << "Player\tWins\tGames\tScore\n";
- for (int i = 0; i < players.Count(); i++)
+ for (unsigned int i = 0; i < players.Count(); i++)
{
int wins, games, score;
scoreFile->ReadPlayersScore(players[i], wins, games, score);
{
char buf[20];
sprintf(buf, "Item %d", i);
- long tmp = frame->m_listCtrl->InsertItem(i, buf);
+ frame->m_listCtrl->InsertItem(i, buf);
}
frame->CreateStatusBar(3);
{
char buf[20];
sprintf(buf, "Item %d", i);
- long tmp = m_listCtrl->InsertItem(i, buf);
+ m_listCtrl->InsertItem(i, buf);
}
}
for ( int i=0; i < 9; i++)
{
- long tmp = m_listCtrl->InsertItem(i, i);
+ m_listCtrl->InsertItem(i, i);
}
}
{
char buf[20];
sprintf(buf, "Label %d", i);
- long tmp = m_listCtrl->InsertItem(i, buf, i);
+ m_listCtrl->InsertItem(i, buf, i);
}
}
for ( int i=0; i < 9; i++)
{
- long tmp = m_listCtrl->InsertItem(i, 0);
+ m_listCtrl->InsertItem(i, 0);
}
}
for ( int i=0; i < 9; i++)
{
- long tmp = m_listCtrl->InsertItem(i, "Label", 0);
+ m_listCtrl->InsertItem(i, "Label", 0);
}
}
// MyListCtrl
-void MyListCtrl::OnBeginDrag(wxListEvent& event)
+void MyListCtrl::OnBeginDrag(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnBeginRDrag(wxListEvent& event)
+void MyListCtrl::OnBeginRDrag(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
+void MyListCtrl::OnBeginLabelEdit(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
+void MyListCtrl::OnEndLabelEdit(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnDeleteItem(wxListEvent& event)
+void MyListCtrl::OnDeleteItem(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnSetInfo(wxListEvent& event)
+void MyListCtrl::OnSetInfo(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnSelected(wxListEvent& event)
+void MyListCtrl::OnSelected(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnDeselected(wxListEvent& event)
+void MyListCtrl::OnDeselected(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
#endif
}
-void MyListCtrl::OnKeyDown(wxListEvent& event)
+void MyListCtrl::OnKeyDown(wxListEvent& WXUNUSED(event))
{
if ( !wxGetApp().GetTopWindow() )
return;
MyFrame *frame = new MyFrame((wxFrame *) NULL);
// Give it an icon
-#ifdef wx_msw
+#ifdef __WXMSW__
frame->SetIcon(wxIcon("mondrian"));
+#else
frame->SetIcon(wxIcon(mondrian_xpm));
#endif
{}
// Intercept menu commands
-void MyFrame::OnQuit(wxCommandEvent& event)
+void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
// Force a resize. This should probably be replaced by a call to a wxFrame
// function that lays out default decorations and the remaining content window.
- frame->OnSize(wxSizeEvent(wxSize(-1, -1), frame->GetId()));
+ wxSizeEvent event(wxSize(-1, -1), frame->GetId());
+ frame->OnSize(event);
frame->Show(TRUE);
frame->SetStatusText("Hello, wxWindows");
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
{}
-void MyFrame::OnQuit(wxCommandEvent& event)
+void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
-void MyFrame::OnTestDialog(wxCommandEvent& event)
+void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event))
{
MyDialog dialog(this, "Validation test dialog", wxPoint(100, 100), wxSize(340, 170));
dialog.ShowModal();
}
-MyDialog::MyDialog(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size,
- const long style):
+MyDialog::MyDialog( wxWindow *parent, const wxString& title,
+ const wxPoint& pos, const wxSize& size, const long WXUNUSED(style) ) :
wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
{
wxButton *but1 = new wxButton(this, wxID_OK, "OK", wxPoint(250, 10), wxSize(80, 30));
- wxButton *but2 = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30));
+ (void)new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30));
- wxTextCtrl *txt1 = new wxTextCtrl(this, VALIDATE_TEXT, "",
+ (void)new wxTextCtrl(this, VALIDATE_TEXT, "",
wxPoint(10, 10), wxSize(120, -1), 0, wxTextValidator(wxFILTER_ALPHA, &g_data.m_string));
-// SetBackgroundColour(wxColour(0,0,255));
+ SetBackgroundColour(wxColour(0,0,255));
but1->SetFocus();
but1->SetDefault();
$(includedir)/wx/common \
$(includedir)/wx/generic \
$(includedir)/wx/protocol \
+ $(libdir)/wx/include/wx/gtk \
$(libdir) \
$(bindir)
@echo " Copying headers from /include/wx"
rm -f $(includedir)/wx/protocol/$$f ; \
$(INSTALL_DATA) $$f $(includedir)/wx/protocol/$$f ; \
done
+ @echo " Moving setup.h to library path"
+ @$(INSTALL) -d $(libdir)/wx/include/wx/gtk ;\
+ mv $(includedir)/wx/gtk/setup.h $(libdir)/wx/include/wx/gtk/setup.h ;
@echo " Copying wx-config"
@cd $(WXBASEDIR) ; \
$(INSTALL) -d $(bindir) ;\
@cd $(WXBASEDIR)/lib/$(OS) ; \
rm -f $(libdir)/$(STATIC_LIBRARY) ; \
$(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
- @if test -d $(SHARED_LIBRARY); then \
- echo " Copying shared library" \
+ @if test $(WXBASEDIR)/lib/$(OS)/$(SHARED_LIBRARY) ; then \
+ echo " Copying shared library" ; \
cd $(WXBASEDIR)/lib/$(OS) ; \
- rm -f $(libdir)/$(SHARED_LIBRARY) ; \
+ rm -f $(libdir)/lib$(LIB_TARGET).so* ; \
$(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY) ; \
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so.$(LIB_MAJOR) ; \
$(LN_S) $(SHARED_LIBRARY) $(libdir)/lib$(LIB_TARGET).so ; \
+ echo " " ; \
+ echo " You may have to run ldconfig!" ; \
+ echo " " ; \
fi
@echo " "
- @echo "Installation complete. You may have to run ldconfig!"
+ @echo "Installation complete."
@echo " "
clean::
wxDELETE(m_sockstrm);
}
-void wxTCPConnection::Compress(bool on)
+void wxTCPConnection::Compress(bool WXUNUSED(on))
{
// Use wxLZWStream
}
if (m_fd < 0)
return FALSE;
-#ifdef __WINDOWS__
if (getpeername(m_fd, (struct sockaddr *)&my_addr, (int *)&len_addr) < 0)
-#else
- if (getpeername(m_fd, (struct sockaddr *)&my_addr, (unsigned int *)&len_addr) < 0)
-#endif
return FALSE;
addr_man.Disassemble(&my_addr, len_addr);
if (m_fd < 0)
return FALSE;
-#ifdef __WINDOWS__
if (getsockname(m_fd, (struct sockaddr *)&my_addr, (int *)&len_addr) < 0)
-#else
- if (getsockname(m_fd, (struct sockaddr *)&my_addr, (unsigned int *)&len_addr) < 0)
-#endif
return FALSE;
addr_man.Disassemble(&my_addr, len_addr);
# define library name
LIB_TARGET=wx_gtk
LIB_MAJOR=1
-LIB_MINOR=93
+LIB_MINOR=94
# define library sources
int old = notebook->GetSelection();
// TODO: emulate PAGE_CHANGING event
- wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
- notebook->GetId(),
- nPage,
- old);
+
+ wxNotebookEvent event( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
+ notebook->GetId(), nPage, old );
event.SetEventObject( notebook );
- notebook->ProcessEvent( event );
+ notebook->GetEventHandler()->ProcessEvent( event );
}
//-----------------------------------------------------------------------------
*/
}
+//-----------------------------------------------------------------------------
+// "button_press_event" from slider
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_press_callback( GtkRange *widget, GdkEventButton *gdk_event, wxScrollBar *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ win->m_isScrolling = TRUE;
+
+ return FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// "button_release_event" from slider
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_release_callback( GtkRange *widget, GdkEventButton *gdk_event, wxScrollBar *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ gtk_signal_emit_by_name( GTK_OBJECT(win->m_adjust), "value_changed" );
+
+ win->m_isScrolling = FALSE;
+
+ return FALSE;
+}
+
//-----------------------------------------------------------------------------
// wxScrollBar
//-----------------------------------------------------------------------------
gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed",
(GtkSignalFunc) gtk_scrollbar_callback, (gpointer) this );
+ gtk_signal_connect( GTK_OBJECT(m_widget), "button_press_event",
+ (GtkSignalFunc)gtk_scrollbar_button_press_callback, (gpointer) this );
+
+ gtk_signal_connect( GTK_OBJECT(m_widget), "button_release_event",
+ (GtkSignalFunc)gtk_scrollbar_button_release_callback, (gpointer) this );
+
PostCreation();
Show( TRUE );
m_oldPos = fpos;
if (fabs(fpos-m_adjust->value) < 0.2) return;
m_adjust->value = fpos;
-
- gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" );
+
+ if (!m_isScrolling)
+ gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" );
}
void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize,
bool WXUNUSED(refresh) )
{
float fpos = (float)position;
- m_oldPos = fpos;
float frange = (float)range;
float fthumb = (float)thumbSize;
float fpage = (float)pageSize;
- if ((fabs(fpos-m_adjust->value) < 0.2) &&
- (fabs(frange-m_adjust->upper) < 0.2) &&
+ if ((fabs(frange-m_adjust->upper) < 0.2) &&
(fabs(fthumb-m_adjust->page_size) < 0.2) &&
(fabs(fpage-m_adjust->page_increment) < 0.2))
- return;
+ {
+ SetPosition( position );
+ return;
+ }
+ m_oldPos = fpos;
+
m_adjust->lower = 0.0;
m_adjust->upper = frange;
m_adjust->value = fpos;
win->GetEventHandler()->ProcessEvent( event );
}
+//-----------------------------------------------------------------------------
+// "button_press_event" from scrollbar
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_press_callback( GtkRange *widget, GdkEventButton *gdk_event, wxWindow *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ win->m_isScrolling = TRUE;
+
+ return FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// "button_release_event" from scrollbar
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_release_callback( GtkRange *widget, GdkEventButton *gdk_event, wxWindow *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ GtkScrolledWindow *s_window = GTK_SCROLLED_WINDOW(win->m_widget);
+
+ if (widget == GTK_RANGE(s_window->vscrollbar))
+ gtk_signal_emit_by_name( GTK_OBJECT(win->m_hAdjust), "value_changed" );
+ else
+ gtk_signal_emit_by_name( GTK_OBJECT(win->m_vAdjust), "value_changed" );
+
+ win->m_isScrolling = FALSE;
+
+ return FALSE;
+}
+
//-----------------------------------------------------------------------------
// "drop_data_available_event"
//-----------------------------------------------------------------------------
m_hasVMT = FALSE;
m_needParent = TRUE;
m_hasScrolling = FALSE;
+ m_isScrolling = FALSE;
m_hAdjust = (GtkAdjustment *) NULL;
m_vAdjust = (GtkAdjustment *) NULL;
m_oldHorizontalPos = 0.0;
m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
m_hasScrolling = TRUE;
- GtkScrolledWindow *s_window;
- s_window = GTK_SCROLLED_WINDOW(m_widget);
-
+ GtkScrolledWindow *s_window = GTK_SCROLLED_WINDOW(m_widget);
+
+ gtk_signal_connect( GTK_OBJECT(s_window->vscrollbar), "button_press_event",
+ (GtkSignalFunc)gtk_scrollbar_button_press_callback, (gpointer) this );
+
+ gtk_signal_connect( GTK_OBJECT(s_window->hscrollbar), "button_release_event",
+ (GtkSignalFunc)gtk_scrollbar_button_release_callback, (gpointer) this );
+
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
scroll_class->scrollbar_spacing = 0;
m_hAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->hscrollbar) );
m_vAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->vscrollbar) );
- gtk_signal_connect (GTK_OBJECT (m_hAdjust), "value_changed",
+ gtk_signal_connect( GTK_OBJECT(m_hAdjust), "value_changed",
(GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
- gtk_signal_connect (GTK_OBJECT (m_vAdjust), "value_changed",
+ gtk_signal_connect( GTK_OBJECT(m_vAdjust), "value_changed",
(GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
- gtk_signal_connect (GTK_OBJECT (m_hAdjust), "changed",
+ gtk_signal_connect( GTK_OBJECT(m_hAdjust), "changed",
(GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
- gtk_signal_connect (GTK_OBJECT (m_vAdjust), "changed",
+ gtk_signal_connect(GTK_OBJECT(m_vAdjust), "changed",
(GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
- GtkViewport *viewport;
- viewport = GTK_VIEWPORT(s_window->viewport);
+ GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
if (m_windowStyle & wxRAISED_BORDER)
{
m_windowSizer = (wxSizer *) NULL;
m_sizerParent = (wxWindow *) NULL;
m_autoLayout = FALSE;
+ m_hasScrolling = FALSE;
+ m_isScrolling = FALSE;
m_pDropTarget = (wxDropTarget *) NULL;
m_resizing = FALSE;
m_windowValidator = (wxValidator *) NULL;
}
void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
- int range, bool WXUNUSED(refresh) )
+ int range, bool refresh )
{
wxASSERT_MSG( (m_widget != NULL), "invalid window" );
if (orient == wxHORIZONTAL)
{
float fpos = (float)pos;
- m_oldHorizontalPos = fpos;
float frange = (float)range;
float fthumb = (float)thumbVisible;
- if ((fabs(fpos-m_hAdjust->value) < 0.2) &&
- (fabs(frange-m_hAdjust->upper) < 0.2) &&
- (fabs(fthumb-m_hAdjust->page_size) < 0.2))
+ if ((fabs(frange-m_hAdjust->upper) < 0.2) &&
+ (fabs(fthumb-m_hAdjust->page_size) < 0.2))
+ {
+ SetScrollPos( orient, pos, refresh );
return;
+ }
+ m_oldHorizontalPos = fpos;
+
m_hAdjust->lower = 0.0;
m_hAdjust->upper = frange;
m_hAdjust->value = fpos;
else
{
float fpos = (float)pos;
- m_oldVerticalPos = fpos;
float frange = (float)range;
float fthumb = (float)thumbVisible;
- if ((fabs(fpos-m_vAdjust->value) < 0.2) &&
- (fabs(frange-m_vAdjust->upper) < 0.2) &&
- (fabs(fthumb-m_vAdjust->page_size) < 0.2))
+ if ((fabs(frange-m_vAdjust->upper) < 0.2) &&
+ (fabs(fthumb-m_vAdjust->page_size) < 0.2))
+ {
+ SetScrollPos( orient, pos, refresh );
return;
+ }
+
+ m_oldVerticalPos = fpos;
m_vAdjust->lower = 0.0;
m_vAdjust->upper = frange;
m_vAdjust->value = fpos;
}
- if (m_wxwindow->window)
- {
- if (orient == wxHORIZONTAL)
- gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
- else
- gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
+ if (!m_isScrolling)
+ {
+ if (m_wxwindow->window)
+ {
+ if (orient == wxHORIZONTAL)
+ gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
+ else
+ gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
+ }
}
}
int old = notebook->GetSelection();
// TODO: emulate PAGE_CHANGING event
- wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
- notebook->GetId(),
- nPage,
- old);
+
+ wxNotebookEvent event( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
+ notebook->GetId(), nPage, old );
event.SetEventObject( notebook );
- notebook->ProcessEvent( event );
+ notebook->GetEventHandler()->ProcessEvent( event );
}
//-----------------------------------------------------------------------------
*/
}
+//-----------------------------------------------------------------------------
+// "button_press_event" from slider
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_press_callback( GtkRange *widget, GdkEventButton *gdk_event, wxScrollBar *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ win->m_isScrolling = TRUE;
+
+ return FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// "button_release_event" from slider
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_release_callback( GtkRange *widget, GdkEventButton *gdk_event, wxScrollBar *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ gtk_signal_emit_by_name( GTK_OBJECT(win->m_adjust), "value_changed" );
+
+ win->m_isScrolling = FALSE;
+
+ return FALSE;
+}
+
//-----------------------------------------------------------------------------
// wxScrollBar
//-----------------------------------------------------------------------------
gtk_signal_connect (GTK_OBJECT (m_adjust), "value_changed",
(GtkSignalFunc) gtk_scrollbar_callback, (gpointer) this );
+ gtk_signal_connect( GTK_OBJECT(m_widget), "button_press_event",
+ (GtkSignalFunc)gtk_scrollbar_button_press_callback, (gpointer) this );
+
+ gtk_signal_connect( GTK_OBJECT(m_widget), "button_release_event",
+ (GtkSignalFunc)gtk_scrollbar_button_release_callback, (gpointer) this );
+
PostCreation();
Show( TRUE );
m_oldPos = fpos;
if (fabs(fpos-m_adjust->value) < 0.2) return;
m_adjust->value = fpos;
-
- gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" );
+
+ if (!m_isScrolling)
+ gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "value_changed" );
}
void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize,
bool WXUNUSED(refresh) )
{
float fpos = (float)position;
- m_oldPos = fpos;
float frange = (float)range;
float fthumb = (float)thumbSize;
float fpage = (float)pageSize;
- if ((fabs(fpos-m_adjust->value) < 0.2) &&
- (fabs(frange-m_adjust->upper) < 0.2) &&
+ if ((fabs(frange-m_adjust->upper) < 0.2) &&
(fabs(fthumb-m_adjust->page_size) < 0.2) &&
(fabs(fpage-m_adjust->page_increment) < 0.2))
- return;
+ {
+ SetPosition( position );
+ return;
+ }
+ m_oldPos = fpos;
+
m_adjust->lower = 0.0;
m_adjust->upper = frange;
m_adjust->value = fpos;
win->GetEventHandler()->ProcessEvent( event );
}
+//-----------------------------------------------------------------------------
+// "button_press_event" from scrollbar
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_press_callback( GtkRange *widget, GdkEventButton *gdk_event, wxWindow *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ win->m_isScrolling = TRUE;
+
+ return FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// "button_release_event" from scrollbar
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_release_callback( GtkRange *widget, GdkEventButton *gdk_event, wxWindow *win )
+{
+ if (gdk_event->window != widget->slider) return FALSE;
+
+ GtkScrolledWindow *s_window = GTK_SCROLLED_WINDOW(win->m_widget);
+
+ if (widget == GTK_RANGE(s_window->vscrollbar))
+ gtk_signal_emit_by_name( GTK_OBJECT(win->m_hAdjust), "value_changed" );
+ else
+ gtk_signal_emit_by_name( GTK_OBJECT(win->m_vAdjust), "value_changed" );
+
+ win->m_isScrolling = FALSE;
+
+ return FALSE;
+}
+
//-----------------------------------------------------------------------------
// "drop_data_available_event"
//-----------------------------------------------------------------------------
m_hasVMT = FALSE;
m_needParent = TRUE;
m_hasScrolling = FALSE;
+ m_isScrolling = FALSE;
m_hAdjust = (GtkAdjustment *) NULL;
m_vAdjust = (GtkAdjustment *) NULL;
m_oldHorizontalPos = 0.0;
m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
m_hasScrolling = TRUE;
- GtkScrolledWindow *s_window;
- s_window = GTK_SCROLLED_WINDOW(m_widget);
-
+ GtkScrolledWindow *s_window = GTK_SCROLLED_WINDOW(m_widget);
+
+ gtk_signal_connect( GTK_OBJECT(s_window->vscrollbar), "button_press_event",
+ (GtkSignalFunc)gtk_scrollbar_button_press_callback, (gpointer) this );
+
+ gtk_signal_connect( GTK_OBJECT(s_window->hscrollbar), "button_release_event",
+ (GtkSignalFunc)gtk_scrollbar_button_release_callback, (gpointer) this );
+
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
scroll_class->scrollbar_spacing = 0;
m_hAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->hscrollbar) );
m_vAdjust = gtk_range_get_adjustment( GTK_RANGE(s_window->vscrollbar) );
- gtk_signal_connect (GTK_OBJECT (m_hAdjust), "value_changed",
+ gtk_signal_connect( GTK_OBJECT(m_hAdjust), "value_changed",
(GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
- gtk_signal_connect (GTK_OBJECT (m_vAdjust), "value_changed",
+ gtk_signal_connect( GTK_OBJECT(m_vAdjust), "value_changed",
(GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
- gtk_signal_connect (GTK_OBJECT (m_hAdjust), "changed",
+ gtk_signal_connect( GTK_OBJECT(m_hAdjust), "changed",
(GtkSignalFunc) gtk_window_hscroll_change_callback, (gpointer) this );
- gtk_signal_connect (GTK_OBJECT (m_vAdjust), "changed",
+ gtk_signal_connect(GTK_OBJECT(m_vAdjust), "changed",
(GtkSignalFunc) gtk_window_vscroll_change_callback, (gpointer) this );
- GtkViewport *viewport;
- viewport = GTK_VIEWPORT(s_window->viewport);
+ GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
if (m_windowStyle & wxRAISED_BORDER)
{
m_windowSizer = (wxSizer *) NULL;
m_sizerParent = (wxWindow *) NULL;
m_autoLayout = FALSE;
+ m_hasScrolling = FALSE;
+ m_isScrolling = FALSE;
m_pDropTarget = (wxDropTarget *) NULL;
m_resizing = FALSE;
m_windowValidator = (wxValidator *) NULL;
}
void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
- int range, bool WXUNUSED(refresh) )
+ int range, bool refresh )
{
wxASSERT_MSG( (m_widget != NULL), "invalid window" );
if (orient == wxHORIZONTAL)
{
float fpos = (float)pos;
- m_oldHorizontalPos = fpos;
float frange = (float)range;
float fthumb = (float)thumbVisible;
- if ((fabs(fpos-m_hAdjust->value) < 0.2) &&
- (fabs(frange-m_hAdjust->upper) < 0.2) &&
- (fabs(fthumb-m_hAdjust->page_size) < 0.2))
+ if ((fabs(frange-m_hAdjust->upper) < 0.2) &&
+ (fabs(fthumb-m_hAdjust->page_size) < 0.2))
+ {
+ SetScrollPos( orient, pos, refresh );
return;
+ }
+ m_oldHorizontalPos = fpos;
+
m_hAdjust->lower = 0.0;
m_hAdjust->upper = frange;
m_hAdjust->value = fpos;
else
{
float fpos = (float)pos;
- m_oldVerticalPos = fpos;
float frange = (float)range;
float fthumb = (float)thumbVisible;
- if ((fabs(fpos-m_vAdjust->value) < 0.2) &&
- (fabs(frange-m_vAdjust->upper) < 0.2) &&
- (fabs(fthumb-m_vAdjust->page_size) < 0.2))
+ if ((fabs(frange-m_vAdjust->upper) < 0.2) &&
+ (fabs(fthumb-m_vAdjust->page_size) < 0.2))
+ {
+ SetScrollPos( orient, pos, refresh );
return;
+ }
+
+ m_oldVerticalPos = fpos;
m_vAdjust->lower = 0.0;
m_vAdjust->upper = frange;
m_vAdjust->value = fpos;
}
- if (m_wxwindow->window)
- {
- if (orient == wxHORIZONTAL)
- gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
- else
- gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
+ if (!m_isScrolling)
+ {
+ if (m_wxwindow->window)
+ {
+ if (orient == wxHORIZONTAL)
+ gtk_signal_emit_by_name( GTK_OBJECT(m_hAdjust), "value_changed" );
+ else
+ gtk_signal_emit_by_name( GTK_OBJECT(m_vAdjust), "value_changed" );
+ }
}
}
echo $exec_prefix
;;
--version)
- echo 1.93
+ echo 1.94
;;
--cflags)
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
fi
+ includes="$includes -I@libdir@/wx/include"
echo $includes -D@TOOLKIT_DEF@ @GUI_TK_INCLUDE@
;;
--libs)