From: Robert Roebling Date: Sat, 12 Sep 1998 17:18:12 +0000 (+0000) Subject: Changed instal path for setup.h X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cb43b372fb1567caf7ccfa523aca10c676ceaec4?hp=e55ad60e195f1007db921b2a73a3cac98ed9df65 Changed instal path for setup.h changed socket stream inheritance to virtual removed a few more warnings from the samples corrected thread habdling in configure.in removed dancing sliders from scrollbars corrected notebook send event bug and added it the controls sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index c47f54617a..6086571440 100755 --- a/configure +++ b/configure @@ -112,7 +112,7 @@ ac_help="$ac_help 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 @@ -4205,6 +4205,8 @@ DEFAULT_USE_GTK=1 DEFAULT_USE_QT=0 DEFAULT_USE_MOTIF=0 +DEFAULT_USE_THREADS=1 + DEFAULT_USE_SHARED=1 DEFAULT_USE_OPTIMISE=1 DEFAULT_USE_PROFILE=0 @@ -4266,7 +4268,7 @@ DEFAULT_USE_HELP=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" @@ -4296,7 +4298,7 @@ fi 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" @@ -4326,7 +4328,7 @@ fi 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" @@ -4357,7 +4359,7 @@ fi 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" @@ -4387,7 +4389,7 @@ fi 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" @@ -4417,7 +4419,7 @@ fi 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" @@ -4447,7 +4449,7 @@ fi 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" @@ -4477,7 +4479,7 @@ fi 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" @@ -4507,7 +4509,7 @@ fi 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" @@ -4537,7 +4539,7 @@ fi 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" @@ -4567,7 +4569,7 @@ fi 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" @@ -4598,7 +4600,7 @@ fi 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" @@ -4628,7 +4630,7 @@ fi 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" @@ -4658,7 +4660,7 @@ fi 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" @@ -4688,7 +4690,7 @@ fi 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" @@ -4718,7 +4720,7 @@ fi 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" @@ -4749,7 +4751,7 @@ fi 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" @@ -4779,7 +4781,7 @@ fi 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" @@ -4809,7 +4811,7 @@ fi 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" @@ -4839,7 +4841,7 @@ fi 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" @@ -4869,7 +4871,7 @@ fi 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" @@ -4899,7 +4901,7 @@ fi 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" @@ -4929,7 +4931,7 @@ fi 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" @@ -4959,7 +4961,7 @@ fi 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" @@ -4990,7 +4992,7 @@ fi 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" @@ -5020,7 +5022,7 @@ fi 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" @@ -5050,7 +5052,7 @@ fi 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" @@ -5080,7 +5082,7 @@ fi 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" @@ -5110,7 +5112,7 @@ fi 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" @@ -5140,7 +5142,7 @@ fi 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" @@ -5170,7 +5172,7 @@ fi 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" @@ -5200,7 +5202,7 @@ fi 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" @@ -5230,7 +5232,7 @@ fi 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" @@ -5261,7 +5263,7 @@ fi 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" @@ -5291,7 +5293,7 @@ fi 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" @@ -5321,7 +5323,7 @@ fi 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" @@ -5352,7 +5354,7 @@ fi 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" @@ -5382,7 +5384,7 @@ fi 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" @@ -5412,7 +5414,7 @@ fi 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" @@ -5443,7 +5445,7 @@ fi 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" @@ -5473,7 +5475,7 @@ fi 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" @@ -5503,7 +5505,7 @@ fi 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" @@ -5533,7 +5535,7 @@ fi 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" @@ -5563,7 +5565,7 @@ fi 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" @@ -5594,7 +5596,7 @@ fi 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" @@ -5624,7 +5626,7 @@ fi 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" @@ -5654,7 +5656,7 @@ fi 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" @@ -5734,7 +5736,7 @@ fi # 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 @@ -5765,7 +5767,7 @@ fi 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` @@ -5778,7 +5780,7 @@ echo "configure:5769: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -5800,7 +5802,7 @@ main () } 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 @@ -5839,7 +5841,7 @@ fi 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; @@ -5853,7 +5855,7 @@ 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; @@ -5903,7 +5905,7 @@ fi 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; @@ -5917,7 +5919,7 @@ 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; @@ -6346,7 +6348,7 @@ fi 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 @@ -6354,14 +6356,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&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 @@ -6387,21 +6389,45 @@ fi 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 @@ -6409,7 +6435,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread-0.7 $LIBS" cat > conftest.$ac_ext <&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 @@ -6444,17 +6470,17 @@ 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 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* @@ -6480,7 +6506,7 @@ fi 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 @@ -6488,7 +6514,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&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 @@ -6526,7 +6552,7 @@ fi 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 @@ -6534,7 +6560,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&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 @@ -6589,7 +6615,7 @@ OPENGL_LINK= 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; @@ -6604,7 +6630,7 @@ 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; diff --git a/configure.in b/configure.in index 01f5d75a1c..8168213443 100644 --- a/configure.in +++ b/configure.in @@ -646,6 +646,8 @@ DEFAULT_USE_GTK=1 DEFAULT_USE_QT=0 DEFAULT_USE_MOTIF=0 +DEFAULT_USE_THREADS=1 + DEFAULT_USE_SHARED=1 DEFAULT_USE_OPTIMISE=1 DEFAULT_USE_PROFILE=0 @@ -1318,11 +1320,15 @@ dnl ---------------------------------------------------------------- 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" diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index b4fc2002ed..bd18a96e90 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -276,6 +276,7 @@ public: float m_oldVerticalPos; bool m_needParent; bool m_hasScrolling; + bool m_isScrolling; bool m_hasOwnStyle; bool m_hasVMT; bool m_sizeSet; diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h index b4fc2002ed..bd18a96e90 100644 --- a/include/wx/gtk1/window.h +++ b/include/wx/gtk1/window.h @@ -276,6 +276,7 @@ public: float m_oldVerticalPos; bool m_needParent; bool m_hasScrolling; + bool m_isScrolling; bool m_hasOwnStyle; bool m_hasVMT; bool m_sizeSet; diff --git a/include/wx/sckstrm.h b/include/wx/sckstrm.h index 86782eddf2..83e8010280 100644 --- a/include/wx/sckstrm.h +++ b/include/wx/sckstrm.h @@ -18,7 +18,7 @@ #include "wx/stream.h" #include "wx/socket.h" -class WXDLLEXPORT wxSocketOutputStream : public wxOutputStream +class WXDLLEXPORT wxSocketOutputStream : public virtual wxOutputStream { public: wxSocketOutputStream(wxSocketBase& s); @@ -36,7 +36,7 @@ class WXDLLEXPORT wxSocketOutputStream : public wxOutputStream wxSocketBase *m_o_socket; }; -class WXDLLEXPORT wxSocketInputStream : public wxInputStream +class WXDLLEXPORT wxSocketInputStream : public virtual wxInputStream { public: wxSocketInputStream(wxSocketBase& s); diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 64ef002f29..1d5cefa1e2 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -58,6 +58,7 @@ class MyPanel: public wxPanel void OnRadio( wxCommandEvent &event ); void OnRadioButtons( wxCommandEvent &event ); void OnSetFont( wxCommandEvent &event ); + void OnPageChanged( wxNotebookEvent &event ); wxListBox *m_listbox; wxChoice *m_choice; @@ -171,37 +172,38 @@ const ID_RADIOBOX_ENABLE = 164; 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 ) : @@ -303,6 +305,11 @@ void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) ) 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: " ); diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 4cbe5a31ed..546028fb2c 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -149,7 +149,7 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h) SetIcon(wxIcon(mondrian_xpm)); #endif - const int widths[] = { -1 }; +// const int widths[] = { -1 }; CreateStatusBar(); // construct menu diff --git a/samples/forty/playerdg.cpp b/samples/forty/playerdg.cpp index c85ca72865..e55cd0f93d 100644 --- a/samples/forty/playerdg.cpp +++ b/samples/forty/playerdg.cpp @@ -62,7 +62,7 @@ PlayerSelectionDialog::PlayerSelectionDialog( 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]); } @@ -128,7 +128,7 @@ PlayerSelectionDialog::~PlayerSelectionDialog() { } -void PlayerSelectionDialog::OnSize(wxSizeEvent& event) +void PlayerSelectionDialog::OnSize(wxSizeEvent& WXUNUSED(event)) { Layout(); } diff --git a/samples/forty/scoredg.cpp b/samples/forty/scoredg.cpp index 765fa47b5d..58f8da8a1b 100644 --- a/samples/forty/scoredg.cpp +++ b/samples/forty/scoredg.cpp @@ -64,7 +64,7 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) : 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); diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 6e4b55f5ee..c14a3ad5d5 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -161,7 +161,7 @@ bool MyApp::OnInit(void) { 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); @@ -230,7 +230,7 @@ void MyFrame::OnListView(wxCommandEvent& WXUNUSED(event)) { char buf[20]; sprintf(buf, "Item %d", i); - long tmp = m_listCtrl->InsertItem(i, buf); + m_listCtrl->InsertItem(i, buf); } } @@ -266,7 +266,7 @@ void MyFrame::OnIconView(wxCommandEvent& WXUNUSED(event)) for ( int i=0; i < 9; i++) { - long tmp = m_listCtrl->InsertItem(i, i); + m_listCtrl->InsertItem(i, i); } } @@ -282,7 +282,7 @@ void MyFrame::OnIconTextView(wxCommandEvent& WXUNUSED(event)) { char buf[20]; sprintf(buf, "Label %d", i); - long tmp = m_listCtrl->InsertItem(i, buf, i); + m_listCtrl->InsertItem(i, buf, i); } } @@ -296,7 +296,7 @@ void MyFrame::OnSmallIconView(wxCommandEvent& WXUNUSED(event)) for ( int i=0; i < 9; i++) { - long tmp = m_listCtrl->InsertItem(i, 0); + m_listCtrl->InsertItem(i, 0); } } @@ -310,13 +310,13 @@ void MyFrame::OnSmallIconTextView(wxCommandEvent& WXUNUSED(event)) 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; @@ -333,7 +333,7 @@ void MyListCtrl::OnBeginDrag(wxListEvent& event) #endif } -void MyListCtrl::OnBeginRDrag(wxListEvent& event) +void MyListCtrl::OnBeginRDrag(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; @@ -349,7 +349,7 @@ void MyListCtrl::OnBeginRDrag(wxListEvent& event) #endif } -void MyListCtrl::OnBeginLabelEdit(wxListEvent& event) +void MyListCtrl::OnBeginLabelEdit(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; @@ -366,7 +366,7 @@ void MyListCtrl::OnBeginLabelEdit(wxListEvent& event) #endif } -void MyListCtrl::OnEndLabelEdit(wxListEvent& event) +void MyListCtrl::OnEndLabelEdit(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; @@ -383,7 +383,7 @@ void MyListCtrl::OnEndLabelEdit(wxListEvent& event) #endif } -void MyListCtrl::OnDeleteItem(wxListEvent& event) +void MyListCtrl::OnDeleteItem(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; @@ -437,7 +437,7 @@ void MyListCtrl::OnGetInfo(wxListEvent& event) #endif } -void MyListCtrl::OnSetInfo(wxListEvent& event) +void MyListCtrl::OnSetInfo(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; @@ -454,7 +454,7 @@ void MyListCtrl::OnSetInfo(wxListEvent& event) #endif } -void MyListCtrl::OnSelected(wxListEvent& event) +void MyListCtrl::OnSelected(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; @@ -471,7 +471,7 @@ void MyListCtrl::OnSelected(wxListEvent& event) #endif } -void MyListCtrl::OnDeselected(wxListEvent& event) +void MyListCtrl::OnDeselected(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; @@ -488,7 +488,7 @@ void MyListCtrl::OnDeselected(wxListEvent& event) #endif } -void MyListCtrl::OnKeyDown(wxListEvent& event) +void MyListCtrl::OnKeyDown(wxListEvent& WXUNUSED(event)) { if ( !wxGetApp().GetTopWindow() ) return; diff --git a/samples/memcheck/memcheck.cpp b/samples/memcheck/memcheck.cpp index 2c0f398439..44f024be6b 100644 --- a/samples/memcheck/memcheck.cpp +++ b/samples/memcheck/memcheck.cpp @@ -59,8 +59,9 @@ bool MyApp::OnInit(void) 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 @@ -113,7 +114,7 @@ MyFrame::MyFrame(wxFrame *parent): {} // Intercept menu commands -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close(TRUE); } diff --git a/samples/toolbar/test.cpp b/samples/toolbar/test.cpp index 3c0ce9b42c..07ebd62085 100644 --- a/samples/toolbar/test.cpp +++ b/samples/toolbar/test.cpp @@ -79,7 +79,8 @@ bool MyApp::OnInit(void) // 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"); diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp index 688a457b6c..334150af31 100644 --- a/samples/validate/validate.cpp +++ b/samples/validate/validate.cpp @@ -75,29 +75,29 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): 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(); diff --git a/src/Makefile.in b/src/Makefile.in index ac4c031a08..370902040a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -53,6 +53,7 @@ install:: $(includedir)/wx/common \ $(includedir)/wx/generic \ $(includedir)/wx/protocol \ + $(libdir)/wx/include/wx/gtk \ $(libdir) \ $(bindir) @echo " Copying headers from /include/wx" @@ -82,6 +83,9 @@ install:: 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) ;\ @@ -91,16 +95,19 @@ install:: @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:: diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index e27ead03d8..7712f54269 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -194,7 +194,7 @@ wxTCPConnection::~wxTCPConnection (void) wxDELETE(m_sockstrm); } -void wxTCPConnection::Compress(bool on) +void wxTCPConnection::Compress(bool WXUNUSED(on)) { // Use wxLZWStream } diff --git a/src/common/socket.cpp b/src/common/socket.cpp index e217cc6914..da261af97d 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -458,11 +458,7 @@ bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const 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); @@ -477,11 +473,7 @@ bool wxSocketBase::GetLocal(wxSockAddress& addr_man) const 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); diff --git a/src/gtk.inc b/src/gtk.inc index 7cffd5077b..d432ed5a4f 100644 --- a/src/gtk.inc +++ b/src/gtk.inc @@ -4,7 +4,7 @@ NONE = # define library name LIB_TARGET=wx_gtk LIB_MAJOR=1 -LIB_MINOR=93 +LIB_MINOR=94 # define library sources diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 2794bebe86..d9b2bbc090 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -62,12 +62,11 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), 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 ); } //----------------------------------------------------------------------------- diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 210b60fce7..c8bc130f5c 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -61,6 +61,34 @@ static void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *wi */ } +//----------------------------------------------------------------------------- +// "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 //----------------------------------------------------------------------------- @@ -93,6 +121,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, 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 ); @@ -126,25 +160,29 @@ void wxScrollBar::SetPosition( int viewStart ) 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; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index bec738c786..3633598be7 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -799,6 +799,39 @@ static void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxW 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" //----------------------------------------------------------------------------- @@ -865,6 +898,7 @@ wxWindow::wxWindow() m_hasVMT = FALSE; m_needParent = TRUE; m_hasScrolling = FALSE; + m_isScrolling = FALSE; m_hAdjust = (GtkAdjustment *) NULL; m_vAdjust = (GtkAdjustment *) NULL; m_oldHorizontalPos = 0.0; @@ -891,9 +925,14 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, 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; @@ -905,18 +944,17 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, 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) { @@ -1055,6 +1093,8 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, 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; @@ -2197,7 +2237,7 @@ wxWindow *wxWindow::FindWindow( const wxString& name ) } 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" ); @@ -2208,15 +2248,18 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, 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; @@ -2227,14 +2270,17 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, 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; @@ -2279,12 +2325,15 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) 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" ); + } } } diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index 2794bebe86..d9b2bbc090 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -62,12 +62,11 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), 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 ); } //----------------------------------------------------------------------------- diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index 210b60fce7..c8bc130f5c 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -61,6 +61,34 @@ static void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *wi */ } +//----------------------------------------------------------------------------- +// "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 //----------------------------------------------------------------------------- @@ -93,6 +121,12 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, 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 ); @@ -126,25 +160,29 @@ void wxScrollBar::SetPosition( int viewStart ) 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; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index bec738c786..3633598be7 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -799,6 +799,39 @@ static void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxW 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" //----------------------------------------------------------------------------- @@ -865,6 +898,7 @@ wxWindow::wxWindow() m_hasVMT = FALSE; m_needParent = TRUE; m_hasScrolling = FALSE; + m_isScrolling = FALSE; m_hAdjust = (GtkAdjustment *) NULL; m_vAdjust = (GtkAdjustment *) NULL; m_oldHorizontalPos = 0.0; @@ -891,9 +925,14 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, 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; @@ -905,18 +944,17 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, 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) { @@ -1055,6 +1093,8 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, 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; @@ -2197,7 +2237,7 @@ wxWindow *wxWindow::FindWindow( const wxString& name ) } 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" ); @@ -2208,15 +2248,18 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, 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; @@ -2227,14 +2270,17 @@ void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, 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; @@ -2279,12 +2325,15 @@ void wxWindow::SetScrollPos( int orient, int pos, bool WXUNUSED(refresh) ) 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" ); + } } } diff --git a/wx-config.in b/wx-config.in index 83cff55b82..44b607839e 100755 --- a/wx-config.in +++ b/wx-config.in @@ -36,12 +36,13 @@ while test $# -gt 0; do 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)