From 37d403aa1cf182cfc01e2ce1753c2dda39ba82ea Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 1 Sep 2000 08:35:30 +0000 Subject: [PATCH] Added to wxSystemSettings for better GTK+ themes compatibility git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 606 +++++++++++++++++----------------- include/wx/gtk/menuitem.h | 8 + include/wx/gtk1/menuitem.h | 8 + include/wx/ownerdrw.h | 4 + samples/dialogs/dialogs.cpp | 2 +- samples/notebook/notebook.cpp | 2 +- src/generic/listctrl.cpp | 3 +- src/generic/sashwin.cpp | 5 +- src/generic/splitter.cpp | 6 +- src/generic/statusbr.cpp | 3 +- src/generic/treectlg.cpp | 2 +- src/gtk/menu.cpp | 478 ++++++++++++++++++++++++++- src/gtk/settings.cpp | 77 ++++- src/gtk1/menu.cpp | 478 ++++++++++++++++++++++++++- src/gtk1/settings.cpp | 77 ++++- utils/dialoged/src/Makefile | 55 +-- 16 files changed, 1453 insertions(+), 361 deletions(-) diff --git a/configure b/configure index 0211941fc7..3e03035a1d 100755 --- a/configure +++ b/configure @@ -916,7 +916,7 @@ test "$host_alias" != "$target_alias" && WX_MAJOR_VERSION_NUMBER=2 -WX_MINOR_VERSION_NUMBER=2 +WX_MINOR_VERSION_NUMBER=3 WX_RELEASE_NUMBER=0 WX_INTERFACE_AGE=0 @@ -7831,8 +7831,8 @@ for ac_dir in $SEARCH_LIB; GUIDIST=MSW_DIST fi -if test "$wxUSE_MOTIF" = 1; then - # If we find X, set shell vars x_includes and x_libraries to the + +# If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. @@ -8666,9 +8666,12 @@ fi fi +CPPFLAGS="$CPPFLAGS $X_CFLAGS" +LDFLAGS="$LDFLAGS $X_LIBS" +if test "$wxUSE_MOTIF" = 1; then if test "$no_x" = "yes"; then - { echo "configure: error: X11 not found" 1>&2; exit 1; } + { echo "configure: error: X11 not found" 1>&2; exit 1; } fi GUI_TK_LIBRARY="$X_LIBS" @@ -8680,7 +8683,7 @@ fi COMPILED_X_PROGRAM=0 echo $ac_n "checking for Motif/Lesstif headers""... $ac_c" 1>&6 -echo "configure:8684: checking for Motif/Lesstif headers" >&5 +echo "configure:8687: checking for Motif/Lesstif headers" >&5 ac_find_includes= for ac_dir in $SEARCH_INCLUDE; @@ -8695,7 +8698,7 @@ for ac_dir in $SEARCH_INCLUDE; echo "$ac_t""found $ac_find_includes" 1>&6 else cat > conftest.$ac_ext < @@ -8708,7 +8711,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""found in default search path" 1>&6 @@ -8729,7 +8732,7 @@ rm -f conftest* if test "$COMPILED_X_PROGRAM" = 0; then echo $ac_n "checking for Motif/Lesstif library""... $ac_c" 1>&6 -echo "configure:8733: checking for Motif/Lesstif library" >&5 +echo "configure:8736: checking for Motif/Lesstif library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -8768,7 +8771,7 @@ for ac_dir in $SEARCH_LIB; echo "$ac_t""found at $ac_find_libraries" 1>&6 else cat > conftest.$ac_ext < @@ -8781,7 +8784,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""found in default search path" 1>&6 @@ -8804,7 +8807,7 @@ rm -f conftest* XPM_LINK="" echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 -echo "configure:8808: checking for Xpm library" >&5 +echo "configure:8811: checking for Xpm library" >&5 ac_find_libraries= for ac_dir in $SEARCH_LIB; @@ -8836,7 +8839,7 @@ EOF echo "$ac_t""found at $ac_find_libraries" 1>&6 else cat > conftest.$ac_ext < @@ -8849,7 +8852,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* XPM_LINK="-lXpm " @@ -9082,8 +9085,13 @@ if test "$wxUSE_SHARED" = "yes"; then *-*-freebsd* | *-*-netbsd*) SHARED_LD="${CC} -shared -o" PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" + WX_ALL="CREATE_LINKS CREATE_LINKS_GL" + else + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + fi ;; *-*-osf* ) SHARED_LD="${CXX} -shared -o" @@ -9169,17 +9177,17 @@ for ac_hdr in strings.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9173: checking for $ac_hdr" >&5 +echo "configure:9181: checking for $ac_hdr" >&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:9183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9209,17 +9217,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9213: checking for $ac_hdr" >&5 +echo "configure:9221: checking for $ac_hdr" >&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:9223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9249,17 +9257,17 @@ for ac_hdr in wchar.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9253: checking for $ac_hdr" >&5 +echo "configure:9261: checking for $ac_hdr" >&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:9263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9289,17 +9297,17 @@ for ac_hdr in wcstr.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9293: checking for $ac_hdr" >&5 +echo "configure:9301: checking for $ac_hdr" >&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:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9329,17 +9337,17 @@ for ac_hdr in fnmatch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9333: checking for $ac_hdr" >&5 +echo "configure:9341: checking for $ac_hdr" >&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:9343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9369,17 +9377,17 @@ for ac_hdr in iconv.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9373: checking for $ac_hdr" >&5 +echo "configure:9381: checking for $ac_hdr" >&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:9383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9409,17 +9417,17 @@ for ac_hdr in langinfo.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9413: checking for $ac_hdr" >&5 +echo "configure:9421: checking for $ac_hdr" >&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:9423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9452,17 +9460,17 @@ if test "$wxUSE_GUI" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9456: checking for $ac_hdr" >&5 +echo "configure:9464: checking for $ac_hdr" >&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:9466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9493,12 +9501,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:9497: checking for ANSI C header files" >&5 +echo "configure:9505: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9506,7 +9514,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9523,7 +9531,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -9541,7 +9549,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -9562,7 +9570,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -9573,7 +9581,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:9577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -9597,12 +9605,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:9601: checking for mode_t" >&5 +echo "configure:9609: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9630,12 +9638,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:9634: checking for off_t" >&5 +echo "configure:9642: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9663,12 +9671,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:9667: checking for pid_t" >&5 +echo "configure:9675: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9696,12 +9704,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:9700: checking for size_t" >&5 +echo "configure:9708: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -9729,12 +9737,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:9733: checking for uid_t in sys/types.h" >&5 +echo "configure:9741: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -9765,13 +9773,13 @@ fi echo $ac_n "checking for pw_gecos in struct passwd""... $ac_c" 1>&6 -echo "configure:9769: checking for pw_gecos in struct passwd" >&5 +echo "configure:9777: checking for pw_gecos in struct passwd" >&5 if eval "test \"`echo '$''{'wx_cv_struct_pw_gecos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -9782,7 +9790,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_pw_gecos=yes @@ -9812,18 +9820,18 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:9816: checking for working const" >&5 +echo "configure:9824: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -9887,21 +9895,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:9891: checking for inline" >&5 +echo "configure:9899: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -9928,7 +9936,7 @@ esac echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:9932: checking size of char" >&5 +echo "configure:9940: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9936,7 +9944,7 @@ else ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < main() @@ -9947,7 +9955,7 @@ main() exit(0); } EOF -if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -9967,7 +9975,7 @@ EOF echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 -echo "configure:9971: checking size of wchar_t" >&5 +echo "configure:9979: checking size of wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9975,7 +9983,7 @@ else ac_cv_sizeof_wchar_t=4 else cat > conftest.$ac_ext < main() @@ -9986,7 +9994,7 @@ main() exit(0); } EOF -if { (eval echo configure:9990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_wchar_t=`cat conftestval` else @@ -10006,7 +10014,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:10010: checking size of short" >&5 +echo "configure:10018: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10014,7 +10022,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -10025,7 +10033,7 @@ main() exit(0); } EOF -if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -10045,7 +10053,7 @@ EOF echo $ac_n "checking size of int *""... $ac_c" 1>&6 -echo "configure:10049: checking size of int *" >&5 +echo "configure:10057: checking size of int *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10053,7 +10061,7 @@ else ac_cv_sizeof_int_p=4 else cat > conftest.$ac_ext < main() @@ -10064,7 +10072,7 @@ main() exit(0); } EOF -if { (eval echo configure:10068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int_p=`cat conftestval` else @@ -10084,7 +10092,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:10088: checking size of int" >&5 +echo "configure:10096: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10092,7 +10100,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -10103,7 +10111,7 @@ main() exit(0); } EOF -if { (eval echo configure:10107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -10123,7 +10131,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:10127: checking size of long" >&5 +echo "configure:10135: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10131,7 +10139,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -10142,7 +10150,7 @@ main() exit(0); } EOF -if { (eval echo configure:10146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -10162,7 +10170,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:10166: checking size of long long" >&5 +echo "configure:10174: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10170,7 +10178,7 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < main() @@ -10181,7 +10189,7 @@ main() exit(0); } EOF -if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -10202,14 +10210,14 @@ EOF echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:10206: checking whether byte ordering is bigendian" >&5 +echo "configure:10214: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -10220,11 +10228,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -10235,7 +10243,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:10239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -10255,7 +10263,7 @@ if test "$cross_compiling" = yes; then ac_cv_c_bigendian=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -10315,17 +10323,17 @@ cross_compiling=$ac_cv_prog_cxx_cross do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10319: checking for $ac_hdr" >&5 +echo "configure:10327: checking for $ac_hdr" >&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:10329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10373,7 +10381,7 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking if C++ compiler supports bool""... $ac_c" 1>&6 -echo "configure:10377: checking if C++ compiler supports bool" >&5 +echo "configure:10385: checking if C++ compiler supports bool" >&5 if eval "test \"`echo '$''{'wx_cv_cpp_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10388,7 +10396,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -10442,13 +10450,13 @@ EOF echo $ac_n "checking if you need GNU extensions""... $ac_c" 1>&6 -echo "configure:10446: checking if you need GNU extensions" >&5 +echo "configure:10454: checking if you need GNU extensions" >&5 if eval "test \"`echo '$''{'wx_cv_gnu_extensions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -10461,7 +10469,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_gnu_extensions=yes else @@ -10486,7 +10494,7 @@ fi echo $ac_n "checking for wcslen in -lc""... $ac_c" 1>&6 -echo "configure:10490: checking for wcslen in -lc" >&5 +echo "configure:10498: checking for wcslen in -lc" >&5 ac_lib_var=`echo c'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10494,7 +10502,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10531,7 +10539,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wcslen in -lw""... $ac_c" 1>&6 -echo "configure:10535: checking for wcslen in -lw" >&5 +echo "configure:10543: checking for wcslen in -lw" >&5 ac_lib_var=`echo w'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10539,7 +10547,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10581,12 +10589,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:10585: checking for vprintf" >&5 +echo "configure:10593: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -10633,12 +10641,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:10637: checking for _doprnt" >&5 +echo "configure:10645: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -10698,13 +10706,13 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:10702: checking for vsnprintf" >&5 +echo "configure:10710: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'wx_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10729,7 +10737,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -10754,13 +10762,13 @@ fi echo "$ac_t""$wx_cv_func_vsnprintf" 1>&6 echo $ac_n "checking for vsscanf""... $ac_c" 1>&6 -echo "configure:10758: checking for vsscanf" >&5 +echo "configure:10766: checking for vsscanf" >&5 if eval "test \"`echo '$''{'wx_cv_func_vsscanf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10783,7 +10791,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF @@ -10820,12 +10828,12 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then for ac_func in sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10824: checking for $ac_func" >&5 +echo "configure:10832: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10889,13 +10897,13 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sa_handler type""... $ac_c" 1>&6 -echo "configure:10893: checking for sa_handler type" >&5 +echo "configure:10901: checking for sa_handler type" >&5 if eval "test \"`echo '$''{'wx_cv_type_sa_handler'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -10907,7 +10915,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_sa_handler=int @@ -10944,12 +10952,12 @@ fi for ac_func in vfork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10948: checking for $ac_func" >&5 +echo "configure:10956: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11000,12 +11008,12 @@ done for ac_func in timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11004: checking for $ac_func" >&5 +echo "configure:11012: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11067,12 +11075,12 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11071: checking for $ac_func" >&5 +echo "configure:11079: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11120,7 +11128,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6 -echo "configure:11124: checking for nanosleep in -lposix4" >&5 +echo "configure:11132: checking for nanosleep in -lposix4" >&5 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11128,7 +11136,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11167,12 +11175,12 @@ else for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11171: checking for $ac_func" >&5 +echo "configure:11179: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11234,12 +11242,12 @@ fi for ac_func in uname gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11238: checking for $ac_func" >&5 +echo "configure:11246: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11299,12 +11307,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in strtok_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11303: checking for $ac_func" >&5 +echo "configure:11311: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11367,12 +11375,12 @@ INET_LINK= for ac_func in inet_addr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11371: checking for $ac_func" >&5 +echo "configure:11379: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11420,7 +11428,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 -echo "configure:11424: checking for inet_addr in -lnsl" >&5 +echo "configure:11432: checking for inet_addr in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11428,7 +11436,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11458,7 +11466,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lresolv""... $ac_c" 1>&6 -echo "configure:11462: checking for inet_addr in -lresolv" >&5 +echo "configure:11470: checking for inet_addr in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11466,7 +11474,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11510,12 +11518,12 @@ done for ac_func in inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11514: checking for $ac_func" >&5 +echo "configure:11522: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11563,7 +11571,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_aton in -l$INET_LINK""... $ac_c" 1>&6 -echo "configure:11567: checking for inet_aton in -l$INET_LINK" >&5 +echo "configure:11575: checking for inet_aton in -l$INET_LINK" >&5 ac_lib_var=`echo $INET_LINK'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11571,7 +11579,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$INET_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11695,7 +11703,7 @@ if test "$wxUSE_THREADS" = "yes" ; then fi echo $ac_n "checking for pthread_create in -l$THREADS_LIB""... $ac_c" 1>&6 -echo "configure:11699: checking for pthread_create in -l$THREADS_LIB" >&5 +echo "configure:11707: checking for pthread_create in -l$THREADS_LIB" >&5 ac_lib_var=`echo $THREADS_LIB'_'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 @@ -11703,7 +11711,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LIB $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11737,7 +11745,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:11741: checking for pthread_create in -lc_r" >&5 +echo "configure:11749: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'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 @@ -11745,7 +11753,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11780,17 +11788,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:11784: checking for sys/prctl.h" >&5 +echo "configure:11792: 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:11794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11830,12 +11838,12 @@ if test "$wxUSE_THREADS" = "yes" ; then for ac_func in thr_setconcurrency do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11834: checking for $ac_func" >&5 +echo "configure:11842: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11888,17 +11896,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11892: checking for $ac_hdr" >&5 +echo "configure:11900: checking for $ac_hdr" >&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:11902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11926,7 +11934,7 @@ done echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:11930: checking for sched_yield in -l$THREADS_LINK" >&5 +echo "configure:11938: checking for sched_yield in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11934,7 +11942,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11967,7 +11975,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -l"posix4"""... $ac_c" 1>&6 -echo "configure:11971: checking for sched_yield in -l"posix4"" >&5 +echo "configure:11979: checking for sched_yield in -l"posix4"" >&5 ac_lib_var=`echo "posix4"'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11975,7 +11983,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l"posix4" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12017,7 +12025,7 @@ fi HAVE_PRIOR_FUNCS=0 echo $ac_n "checking for pthread_attr_getschedpolicy in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:12021: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 +echo "configure:12029: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_getschedpolicy | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12025,7 +12033,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12052,7 +12060,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for pthread_attr_setschedparam in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:12056: checking for pthread_attr_setschedparam in -l$THREADS_LINK" >&5 +echo "configure:12064: checking for pthread_attr_setschedparam in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_attr_setschedparam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12060,7 +12068,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12087,7 +12095,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for sched_get_priority_max in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:12091: checking for sched_get_priority_max in -l$THREADS_LINK" >&5 +echo "configure:12099: checking for sched_get_priority_max in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12095,7 +12103,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12125,7 +12133,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_get_priority_max in -l"posix4"""... $ac_c" 1>&6 -echo "configure:12129: checking for sched_get_priority_max in -l"posix4"" >&5 +echo "configure:12137: checking for sched_get_priority_max in -l"posix4"" >&5 ac_lib_var=`echo "posix4"'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12133,7 +12141,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l"posix4" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12191,7 +12199,7 @@ EOF fi echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:12195: checking for pthread_cancel in -l$THREADS_LINK" >&5 +echo "configure:12203: checking for pthread_cancel in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_cancel | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12199,7 +12207,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12236,13 +12244,13 @@ fi echo $ac_n "checking for pthread_cleanup_push/pop""... $ac_c" 1>&6 -echo "configure:12240: checking for pthread_cleanup_push/pop" >&5 +echo "configure:12248: checking for pthread_cleanup_push/pop" >&5 if eval "test \"`echo '$''{'wx_cv_func_pthread_cleanup_push'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -12252,7 +12260,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_pthread_cleanup_push=yes @@ -12293,7 +12301,7 @@ EOF else if test "$ac_cv_func_strtok_r" = "yes"; then echo $ac_n "checking if -D_REENTRANT is needed""... $ac_c" 1>&6 -echo "configure:12297: checking if -D_REENTRANT is needed" >&5 +echo "configure:12305: checking if -D_REENTRANT is needed" >&5 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then CFLAGS="${CFLAGS} -D_REENTRANT" CXXFLAGS="${CXXFLAGS} -D_REENTRANT" @@ -12431,17 +12439,17 @@ EOF ZLIB_LINK= ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for zlib.h""... $ac_c" 1>&6 -echo "configure:12435: checking for zlib.h" >&5 +echo "configure:12443: checking for zlib.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:12445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12458,7 +12466,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:12462: checking for deflate in -lz" >&5 +echo "configure:12470: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12466,7 +12474,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12524,17 +12532,17 @@ EOF PNG_LINK= ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:12528: checking for png.h" >&5 +echo "configure:12536: checking for png.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:12538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12551,7 +12559,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for png_check_sig in -lpng""... $ac_c" 1>&6 -echo "configure:12555: checking for png_check_sig in -lpng" >&5 +echo "configure:12563: checking for png_check_sig in -lpng" >&5 ac_lib_var=`echo png'_'png_check_sig | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12559,7 +12567,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12615,17 +12623,17 @@ EOF JPEG_LINK= ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:12619: checking for jpeglib.h" >&5 +echo "configure:12627: checking for jpeglib.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:12629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12642,7 +12650,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 -echo "configure:12646: checking for jpeg_read_header in -ljpeg" >&5 +echo "configure:12654: checking for jpeg_read_header in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12650,7 +12658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12703,17 +12711,17 @@ EOF TIFF_LINK= ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:12707: checking for tiffio.h" >&5 +echo "configure:12715: checking for tiffio.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:12717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12730,7 +12738,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for TIFFError in -ltiff""... $ac_c" 1>&6 -echo "configure:12734: checking for TIFFError in -ltiff" >&5 +echo "configure:12742: checking for TIFFError in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFError | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12738,7 +12746,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltiff -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12782,17 +12790,17 @@ fi if test "$wxUSE_OPENGL" = "yes"; then ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 -echo "configure:12786: checking for GL/gl.h" >&5 +echo "configure:12794: checking for GL/gl.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:12796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12818,7 +12826,7 @@ EOF EOF echo $ac_n "checking for glFlush in -lGL""... $ac_c" 1>&6 -echo "configure:12822: checking for glFlush in -lGL" >&5 +echo "configure:12830: checking for glFlush in -lGL" >&5 ac_lib_var=`echo GL'_'glFlush | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12826,7 +12834,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lGL $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12859,7 +12867,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for glFlush in -lMesaGL""... $ac_c" 1>&6 -echo "configure:12863: checking for glFlush in -lMesaGL" >&5 +echo "configure:12871: checking for glFlush in -lMesaGL" >&5 ac_lib_var=`echo MesaGL'_'glFlush | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12867,7 +12875,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lMesaGL $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13081,12 +13089,12 @@ if test "$wxUSE_TIMEDATE" = "yes"; then for ac_func in strptime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13085: checking for $ac_func" >&5 +echo "configure:13093: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13135,13 +13143,13 @@ done echo $ac_n "checking for timezone variable in ""... $ac_c" 1>&6 -echo "configure:13139: checking for timezone variable in " >&5 +echo "configure:13147: checking for timezone variable in " >&5 if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -13153,7 +13161,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=__timezone @@ -13164,7 +13172,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -13176,7 +13184,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=_timezone @@ -13187,7 +13195,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -13199,7 +13207,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=timezone @@ -13234,12 +13242,12 @@ EOF for ac_func in localtime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13238: checking for $ac_func" >&5 +echo "configure:13246: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13289,13 +13297,13 @@ done if test "$ac_cv_func_localtime" = "yes"; then echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:13293: checking for tm_gmtoff in struct tm" >&5 +echo "configure:13301: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -13307,7 +13315,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_tm_has_gmtoff=yes @@ -13333,12 +13341,12 @@ echo "$ac_t""$wx_cv_struct_tm_has_gmtoff" 1>&6 for ac_func in gettimeofday ftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13337: checking for $ac_func" >&5 +echo "configure:13345: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13388,7 +13396,7 @@ done if test "$ac_cv_func_gettimeofday" = "yes"; then echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6 -echo "configure:13392: checking whether gettimeofday takes two arguments" >&5 +echo "configure:13400: checking whether gettimeofday takes two arguments" >&5 if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13403,7 +13411,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -13417,7 +13425,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=yes else @@ -13425,7 +13433,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -13438,7 +13446,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=no else @@ -13484,12 +13492,12 @@ if test "$TOOLKIT" != "MSW"; then if test "$wxUSE_SOCKETS" = "yes"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:13488: checking for socket" >&5 +echo "configure:13496: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -13530,7 +13538,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:13534: checking for socket in -lsocket" >&5 +echo "configure:13542: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13538,7 +13546,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13583,7 +13591,7 @@ fi if test "$wxUSE_SOCKETS" = "yes" ; then echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6 -echo "configure:13587: checking what is the type of the third argument of getsockname" >&5 +echo "configure:13595: checking what is the type of the third argument of getsockname" >&5 if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13598,7 +13606,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -13611,7 +13619,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=socklen_t else @@ -13619,7 +13627,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -13632,7 +13640,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=size_t else @@ -13640,7 +13648,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -13653,7 +13661,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:13657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=int else @@ -13713,17 +13721,17 @@ if test "$wxUSE_JOYSTICK" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:13717: checking for $ac_hdr" >&5 +echo "configure:13725: checking for $ac_hdr" >&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:13727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13776,12 +13784,12 @@ if test "$wxUSE_DYNLIB_CLASS" = "yes"; then for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13780: checking for $ac_func" >&5 +echo "configure:13788: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13832,7 +13840,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:13836: checking for dlopen in -ldl" >&5 +echo "configure:13844: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13840,7 +13848,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13880,12 +13888,12 @@ else for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13884: checking for $ac_func" >&5 +echo "configure:13892: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -13936,7 +13944,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6 -echo "configure:13940: checking for dld in -lshl_load" >&5 +echo "configure:13948: checking for dld in -lshl_load" >&5 ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13944,7 +13952,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshl_load $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13994,12 +14002,12 @@ done for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13998: checking for $ac_func" >&5 +echo "configure:14006: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14047,7 +14055,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6 -echo "configure:14051: checking for dlerror in -ldl" >&5 +echo "configure:14059: checking for dlerror in -ldl" >&5 ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14055,7 +14063,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14291,17 +14299,17 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:14295: checking for $ac_hdr" >&5 +echo "configure:14303: checking for $ac_hdr" >&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:14305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14864,7 +14872,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:14868: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:14876: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/include/wx/gtk/menuitem.h b/include/wx/gtk/menuitem.h index 54d91d04f1..2a10795fb9 100644 --- a/include/wx/gtk/menuitem.h +++ b/include/wx/gtk/menuitem.h @@ -14,6 +14,8 @@ #pragma interface #endif +#include "wx/bitmap.h" + //----------------------------------------------------------------------------- // wxMenuItem //----------------------------------------------------------------------------- @@ -34,6 +36,8 @@ public: virtual void Enable( bool enable = TRUE ); virtual void Check( bool check = TRUE ); virtual bool IsChecked() const; + virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + virtual const wxBitmap& GetBitmap() const { return m_bitmap; } #if wxUSE_ACCEL virtual wxAcceleratorEntry *GetAccel() const; @@ -42,6 +46,8 @@ public: // implementation void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } GtkWidget *GetMenuItem() const { return m_menuItem; } + GtkWidget *GetLabelWidget() const { return m_labelWidget; } + void SetLabelWidget(GtkWidget *labelWidget) { m_labelWidget = labelWidget; } wxString GetFactoryPath() const; wxString GetHotKey() const { return m_hotKey; } @@ -52,8 +58,10 @@ private: void DoSetText(const wxString& text); wxString m_hotKey; + wxBitmap m_bitmap; // Bitmap for menuitem, if any GtkWidget *m_menuItem; // GtkMenuItem + GtkWidget* m_labelWidget; // Label widget DECLARE_DYNAMIC_CLASS(wxMenuItem) }; diff --git a/include/wx/gtk1/menuitem.h b/include/wx/gtk1/menuitem.h index 54d91d04f1..2a10795fb9 100644 --- a/include/wx/gtk1/menuitem.h +++ b/include/wx/gtk1/menuitem.h @@ -14,6 +14,8 @@ #pragma interface #endif +#include "wx/bitmap.h" + //----------------------------------------------------------------------------- // wxMenuItem //----------------------------------------------------------------------------- @@ -34,6 +36,8 @@ public: virtual void Enable( bool enable = TRUE ); virtual void Check( bool check = TRUE ); virtual bool IsChecked() const; + virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + virtual const wxBitmap& GetBitmap() const { return m_bitmap; } #if wxUSE_ACCEL virtual wxAcceleratorEntry *GetAccel() const; @@ -42,6 +46,8 @@ public: // implementation void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } GtkWidget *GetMenuItem() const { return m_menuItem; } + GtkWidget *GetLabelWidget() const { return m_labelWidget; } + void SetLabelWidget(GtkWidget *labelWidget) { m_labelWidget = labelWidget; } wxString GetFactoryPath() const; wxString GetHotKey() const { return m_hotKey; } @@ -52,8 +58,10 @@ private: void DoSetText(const wxString& text); wxString m_hotKey; + wxBitmap m_bitmap; // Bitmap for menuitem, if any GtkWidget *m_menuItem; // GtkMenuItem + GtkWidget* m_labelWidget; // Label widget DECLARE_DYNAMIC_CLASS(wxMenuItem) }; diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h index ae9cde808a..0ad31e7fec 100644 --- a/include/wx/ownerdrw.h +++ b/include/wx/ownerdrw.h @@ -63,6 +63,10 @@ public: m_bmpUnchecked = bmpUnchecked; m_bOwnerDrawn = TRUE; } + void SetBitmap(const wxBitmap& bmpChecked); + { m_bmpChecked = bmpChecked; + m_bOwnerDrawn = TRUE; } + const wxBitmap& GetBitmap(bool bChecked = TRUE) const { return (bChecked ? m_bmpChecked : m_bmpUnchecked); } diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index a33bc636d3..ff1975db03 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -389,7 +389,7 @@ void MyFrame::FileOpen2(wxCommandEvent& WXUNUSED(event) ) s_extDef = path.AfterLast(_T('.')); wxLogMessage(_T("You selected the file '%s', remembered extension '%s'"), - path, s_extDef); + (const wxChar*) path, (const wxChar*) s_extDef); } void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) ) diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index b69850bd96..5762ffffcf 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -47,7 +47,7 @@ bool MyApp::OnInit() // Problem with generic wxNotebook implementation whereby it doesn't size properly unless // you set the size again -#if defined(__WIN16__) +#if defined(__WIN16__) || defined(__WXMOTIF__) int width, height; frame->GetSize(& width, & height); frame->SetSize(-1, -1, width, height); diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 607477e3eb..2987335b9b 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1231,7 +1231,8 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) // do *not* use the listctrl colour for headers - one day we will have a // function to set it separately - dc.SetTextForeground( *wxBLACK ); + //dc.SetTextForeground( *wxBLACK ); + dc.SetTextForeground(wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOWTEXT )); int x = 1; // left of the header rect const int y = 1; // top diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index f5ec7897f2..f567e1113d 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -98,7 +98,8 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event) // reset the cursor #if defined(__WXMOTIF__) || defined(__WXGTK__) - SetCursor(* wxSTANDARD_CURSOR); + // Not necessary and in fact inhibits proper cursor setting (JACS 8/2000) + //SetCursor(* wxSTANDARD_CURSOR); #endif #ifdef __WXMSW__ SetCursor(wxNullCursor); @@ -655,7 +656,7 @@ void wxSashWindow::SizeWindows() void wxSashWindow::InitColours() { // Shadow colours -#if defined(__WIN95__) +#ifndef __WIN16__ m_faceColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE); m_mediumShadowColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW); m_darkShadowColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DDKSHADOW); diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 68a393a4a8..912c8dc8b6 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -833,7 +833,7 @@ void wxSplitterWindow::InitColours() wxDELETE( m_hilightPen ); // Shadow colours -#if defined(__WIN95__) +#ifndef __WIN16__ wxColour faceColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); m_facePen = new wxPen(faceColour, 1, wxSOLID); m_faceBrush = new wxBrush(faceColour, wxSOLID); @@ -849,14 +849,14 @@ void wxSplitterWindow::InitColours() wxColour hilightColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DHILIGHT)); m_hilightPen = new wxPen(hilightColour, 1, wxSOLID); -#else // !Win32 +#else m_facePen = new wxPen("LIGHT GREY", 1, wxSOLID); m_faceBrush = new wxBrush("LIGHT GREY", wxSOLID); m_mediumShadowPen = new wxPen("GREY", 1, wxSOLID); m_darkShadowPen = new wxPen("BLACK", 1, wxSOLID); m_lightShadowPen = new wxPen("LIGHT GREY", 1, wxSOLID); m_hilightPen = new wxPen("WHITE", 1, wxSOLID); -#endif // Win32/!Win32 +#endif // __WIN16__ } void wxSplitterWindow::SendUnsplitEvent(wxWindow *winRemoved) diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 753ff1677b..9121f45f62 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -179,6 +179,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) ) if ( GetFont().Ok() ) dc.SetFont(GetFont()); dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetTextForeground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT)); for ( i = 0; i < m_nFields; i ++ ) DrawField(dc, i); @@ -320,7 +321,7 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const void wxStatusBarGeneric::InitColours() { // Shadow colours -#if defined(__WIN95__) +#ifndef __WIN16__ wxColour mediumShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW)); m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID); diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 384ebdb372..d63cdc8705 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1818,7 +1818,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level if ( attr && attr->HasTextColour() ) colText = attr->GetTextColour(); else - colText = *wxBLACK; + colText = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOWTEXT ); } // prepare to draw diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index b3b73c34f5..89b3623f27 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -15,6 +15,7 @@ #include "wx/log.h" #include "wx/intl.h" #include "wx/app.h" +#include "wx/bitmap.h" #include "wx/menu.h" #if wxUSE_ACCEL @@ -35,6 +36,49 @@ extern bool g_isIdle; static wxString GetHotKey( const wxMenuItem& item ); #endif +////// BEGIN CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + +#define GTK_TYPE_PIXMAP_MENU_ITEM (gtk_pixmap_menu_item_get_type ()) +#define GTK_PIXMAP_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PIXMAP_MENU_ITEM, GtkPixmapMenuItem)) +#define GTK_PIXMAP_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PIXMAP_MENU_ITEM, GtkPixmapMenuItemClass)) +#define GTK_IS_PIXMAP_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PIXMAP_MENU_ITEM)) +#define GTK_IS_PIXMAP_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PIXMAP_MENU_ITEM)) +//#define GTK_PIXMAP_MENU_ITEM_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_PIXMAP_MENU_ITEM)) +#define GTK_PIXMAP_MENU_ITEM_GET_CLASS(obj) (GTK_PIXMAP_MENU_ITEM_CLASS( GTK_OBJECT_GET_CLASS(obj))) + +#ifndef GTK_MENU_ITEM_GET_CLASS +#define GTK_MENU_ITEM_GET_CLASS(obj) (GTK_MENU_ITEM_CLASS( GTK_OBJECT_GET_CLASS(obj))) +#endif + +typedef struct _GtkPixmapMenuItem GtkPixmapMenuItem; +typedef struct _GtkPixmapMenuItemClass GtkPixmapMenuItemClass; + +struct _GtkPixmapMenuItem +{ + GtkMenuItem menu_item; + + GtkWidget *pixmap; +}; + +struct _GtkPixmapMenuItemClass +{ + GtkMenuItemClass parent_class; + + guint orig_toggle_size; + guint have_pixmap_count; +}; + + +GtkType gtk_pixmap_menu_item_get_type (void); +GtkWidget* gtk_pixmap_menu_item_new (void); +void gtk_pixmap_menu_item_set_pixmap (GtkPixmapMenuItem *menu_item, + GtkWidget *pixmap); +/* Added by JACS */ + +GtkWidget* gtk_pixmap_menu_item_new_with_label (const gchar *label, GtkWidget** labelWidget); + +////// END CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + //----------------------------------------------------------------------------- // idle system //----------------------------------------------------------------------------- @@ -668,6 +712,7 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu, m_parentMenu = parentMenu; m_help = help; + m_labelWidget = (GtkWidget *) NULL; m_menuItem = (GtkWidget *) NULL; DoSetText(text); @@ -708,7 +753,11 @@ void wxMenuItem::SetText( const wxString& str ) if (m_menuItem) { - GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child ); + GtkLabel *label; + if (m_labelWidget) + label = (GtkLabel*) m_labelWidget; + else + label = GTK_LABEL( GTK_BIN(m_menuItem)->child ); /* set new text */ gtk_label_set( label, m_text.mb_str()); @@ -872,6 +921,8 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) { GtkWidget *menuItem; + bool appended = FALSE; + if ( mitem->IsSeparator() ) { #if (GTK_MINOR_VERSION > 0) @@ -924,6 +975,32 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) if ( m_invokingWindow ) wxMenubarSetInvokingWindow(mitem->GetSubMenu(), m_invokingWindow); } + else if (mitem->GetBitmap().Ok()) // An item with bitmap + { + //// UNFINISHED, because I don't know how to handle hotkeys and + //// accelerators :-( + + GtkWidget* labelWidget; + menuItem = gtk_pixmap_menu_item_new_with_label(mitem->GetText().mb_str(), &labelWidget); + //menuItem = gtk_pixmap_menu_item_new_with_label("", &labelWidget); + mitem->SetLabelWidget(labelWidget); + + //// TODO: should we store the widget somewhere to avoid a memory leak? + GtkWidget* w = gtk_pixmap_new(mitem->GetBitmap().GetPixmap(), mitem->GetBitmap().GetMask() ? mitem->GetBitmap().GetMask()->GetBitmap() : (GdkBitmap* )NULL); + gtk_widget_show(w); + gtk_pixmap_menu_item_set_pixmap(GTK_PIXMAP_MENU_ITEM( menuItem ), w); + + gtk_signal_connect( GTK_OBJECT(menuItem), "activate", + GTK_SIGNAL_FUNC(gtk_menu_clicked_callback), + (gpointer)this ); + gtk_menu_append( GTK_MENU(m_menu), menuItem ); + gtk_widget_show( menuItem ); + + //mitem->SetMenuItem(menuItem); + //mitem->SetText(mitem->GetText()); + + appended = TRUE; // We've done this, don't do it again + } else // a normal item { #if (GTK_MINOR_VERSION > 0) @@ -983,8 +1060,11 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) } #if GTK_MINOR_VERSION == 0 - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); + if (!appended) + { + gtk_menu_append( GTK_MENU(m_menu), menuItem ); + gtk_widget_show( menuItem ); + } #endif // GTK+ 1.0 mitem->SetMenuItem(menuItem); @@ -1128,3 +1208,395 @@ static wxString GetHotKey( const wxMenuItem& item ) } #endif // wxUSE_ACCEL + +////// BEGIN CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + +/* + * Copyright (C) 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/* + @NOTATION@ + */ + +/* Author: Dietmar Maurer */ + +//#include "gtkpixmapmenuitem.h" +#include +#include +#include +#include +#include + +static void gtk_pixmap_menu_item_class_init (GtkPixmapMenuItemClass *klass); +static void gtk_pixmap_menu_item_init (GtkPixmapMenuItem *menu_item); +static void gtk_pixmap_menu_item_draw (GtkWidget *widget, + GdkRectangle *area); +static gint gtk_pixmap_menu_item_expose (GtkWidget *widget, + GdkEventExpose *event); + +/* we must override the following functions */ + +static void gtk_pixmap_menu_item_map (GtkWidget *widget); +static void gtk_pixmap_menu_item_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); +static void gtk_pixmap_menu_item_forall (GtkContainer *container, + gboolean include_internals, + GtkCallback callback, + gpointer callback_data); +static void gtk_pixmap_menu_item_size_request (GtkWidget *widget, + GtkRequisition *requisition); +static void gtk_pixmap_menu_item_remove (GtkContainer *container, + GtkWidget *child); + +static void changed_have_pixmap_status (GtkPixmapMenuItem *menu_item); + +static GtkMenuItemClass *parent_class = NULL; + +#define BORDER_SPACING 3 +#define PMAP_WIDTH 20 + +GtkType +gtk_pixmap_menu_item_get_type (void) +{ + static GtkType pixmap_menu_item_type = 0; + + if (!pixmap_menu_item_type) + { + GtkTypeInfo pixmap_menu_item_info = + { + "GtkPixmapMenuItem", + sizeof (GtkPixmapMenuItem), + sizeof (GtkPixmapMenuItemClass), + (GtkClassInitFunc) gtk_pixmap_menu_item_class_init, + (GtkObjectInitFunc) gtk_pixmap_menu_item_init, + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, + }; + + pixmap_menu_item_type = gtk_type_unique (gtk_menu_item_get_type (), + &pixmap_menu_item_info); + } + + return pixmap_menu_item_type; +} + +/** + * gtk_pixmap_menu_item_new + * + * Creates a new pixmap menu item. Use gtk_pixmap_menu_item_set_pixmap() + * to set the pixmap wich is displayed at the left side. + * + * Returns: + * &GtkWidget pointer to new menu item + **/ + +GtkWidget* +gtk_pixmap_menu_item_new (void) +{ + return GTK_WIDGET (gtk_type_new (gtk_pixmap_menu_item_get_type ())); +} + +static void +gtk_pixmap_menu_item_class_init (GtkPixmapMenuItemClass *klass) +{ + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + GtkMenuItemClass *menu_item_class; + GtkContainerClass *container_class; + + object_class = (GtkObjectClass*) klass; + widget_class = (GtkWidgetClass*) klass; + menu_item_class = (GtkMenuItemClass*) klass; + container_class = (GtkContainerClass*) klass; + + parent_class = (GtkMenuItemClass*) gtk_type_class (gtk_menu_item_get_type ()); + + widget_class->draw = gtk_pixmap_menu_item_draw; + widget_class->expose_event = gtk_pixmap_menu_item_expose; + widget_class->map = gtk_pixmap_menu_item_map; + widget_class->size_allocate = gtk_pixmap_menu_item_size_allocate; + widget_class->size_request = gtk_pixmap_menu_item_size_request; + + container_class->forall = gtk_pixmap_menu_item_forall; + container_class->remove = gtk_pixmap_menu_item_remove; + + klass->orig_toggle_size = menu_item_class->toggle_size; + klass->have_pixmap_count = 0; +} + +static void +gtk_pixmap_menu_item_init (GtkPixmapMenuItem *menu_item) +{ + GtkMenuItem *mi; + + mi = GTK_MENU_ITEM (menu_item); + + menu_item->pixmap = NULL; +} + +static void +gtk_pixmap_menu_item_draw (GtkWidget *widget, + GdkRectangle *area) +{ + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget)); + g_return_if_fail (area != NULL); + + if (GTK_WIDGET_CLASS (parent_class)->draw) + (* GTK_WIDGET_CLASS (parent_class)->draw) (widget, area); + + if (GTK_WIDGET_DRAWABLE (widget) && + GTK_PIXMAP_MENU_ITEM(widget)->pixmap) { + gtk_widget_draw(GTK_WIDGET(GTK_PIXMAP_MENU_ITEM(widget)->pixmap),NULL); + } +} + +static gint +gtk_pixmap_menu_item_expose (GtkWidget *widget, + GdkEventExpose *event) +{ + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + if (GTK_WIDGET_CLASS (parent_class)->expose_event) + (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); + + if (GTK_WIDGET_DRAWABLE (widget) && + GTK_PIXMAP_MENU_ITEM(widget)->pixmap) { + gtk_widget_draw(GTK_WIDGET(GTK_PIXMAP_MENU_ITEM(widget)->pixmap),NULL); + } + + return FALSE; +} + +/** + * gtk_pixmap_menu_item_set_pixmap + * @menu_item: Pointer to the pixmap menu item + * @pixmap: Pointer to a pixmap widget + * + * Set the pixmap of the menu item. + * + **/ + +void +gtk_pixmap_menu_item_set_pixmap (GtkPixmapMenuItem *menu_item, + GtkWidget *pixmap) +{ + g_return_if_fail (menu_item != NULL); + g_return_if_fail (pixmap != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (menu_item)); + g_return_if_fail (GTK_IS_WIDGET (pixmap)); + g_return_if_fail (menu_item->pixmap == NULL); + + gtk_widget_set_parent (pixmap, GTK_WIDGET (menu_item)); + menu_item->pixmap = pixmap; + + if (GTK_WIDGET_REALIZED (pixmap->parent) && + !GTK_WIDGET_REALIZED (pixmap)) + gtk_widget_realize (pixmap); + + if (GTK_WIDGET_VISIBLE (pixmap->parent)) { + if (GTK_WIDGET_MAPPED (pixmap->parent) && + GTK_WIDGET_VISIBLE(pixmap) && + !GTK_WIDGET_MAPPED (pixmap)) + gtk_widget_map (pixmap); + } + + changed_have_pixmap_status(menu_item); + + if (GTK_WIDGET_VISIBLE (pixmap) && GTK_WIDGET_VISIBLE (menu_item)) + gtk_widget_queue_resize (pixmap); +} + +static void +gtk_pixmap_menu_item_map (GtkWidget *widget) +{ + GtkPixmapMenuItem *menu_item; + + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget)); + + menu_item = GTK_PIXMAP_MENU_ITEM(widget); + + GTK_WIDGET_CLASS(parent_class)->map(widget); + + if (menu_item->pixmap && + GTK_WIDGET_VISIBLE (menu_item->pixmap) && + !GTK_WIDGET_MAPPED (menu_item->pixmap)) + gtk_widget_map (menu_item->pixmap); +} + +static void +gtk_pixmap_menu_item_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) +{ + GtkPixmapMenuItem *pmenu_item; + + pmenu_item = GTK_PIXMAP_MENU_ITEM(widget); + + if (pmenu_item->pixmap && GTK_WIDGET_VISIBLE(pmenu_item)) + { + GtkAllocation child_allocation; + int border_width; + + border_width = GTK_CONTAINER (widget)->border_width; + + child_allocation.width = pmenu_item->pixmap->requisition.width; + child_allocation.height = pmenu_item->pixmap->requisition.height; + child_allocation.x = border_width + BORDER_SPACING; + child_allocation.y = (border_width + BORDER_SPACING + + (((allocation->height - child_allocation.height) - child_allocation.x) + / 2)); /* center pixmaps vertically */ + gtk_widget_size_allocate (pmenu_item->pixmap, &child_allocation); + } + + if (GTK_WIDGET_CLASS (parent_class)->size_allocate) + GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation); +} + +static void +gtk_pixmap_menu_item_forall (GtkContainer *container, + gboolean include_internals, + GtkCallback callback, + gpointer callback_data) +{ + GtkPixmapMenuItem *menu_item; + + g_return_if_fail (container != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (container)); + g_return_if_fail (callback != NULL); + + menu_item = GTK_PIXMAP_MENU_ITEM (container); + + if (menu_item->pixmap) + (* callback) (menu_item->pixmap, callback_data); + + GTK_CONTAINER_CLASS(parent_class)->forall(container,include_internals, + callback,callback_data); +} + +static void +gtk_pixmap_menu_item_size_request (GtkWidget *widget, + GtkRequisition *requisition) +{ + GtkPixmapMenuItem *menu_item; + GtkRequisition req = {0, 0}; + + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_MENU_ITEM (widget)); + g_return_if_fail (requisition != NULL); + + GTK_WIDGET_CLASS(parent_class)->size_request(widget,requisition); + + menu_item = GTK_PIXMAP_MENU_ITEM (widget); + + if (menu_item->pixmap) + gtk_widget_size_request(menu_item->pixmap, &req); + + requisition->height = MAX(req.height + GTK_CONTAINER(widget)->border_width + BORDER_SPACING, (unsigned int) requisition->height); + requisition->width += (req.width + GTK_CONTAINER(widget)->border_width + BORDER_SPACING); +} + +static void +gtk_pixmap_menu_item_remove (GtkContainer *container, + GtkWidget *child) +{ + GtkBin *bin; + gboolean widget_was_visible; + + g_return_if_fail (container != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (container)); + g_return_if_fail (child != NULL); + g_return_if_fail (GTK_IS_WIDGET (child)); + + bin = GTK_BIN (container); + g_return_if_fail ((bin->child == child || + (GTK_PIXMAP_MENU_ITEM(container)->pixmap == child))); + + widget_was_visible = GTK_WIDGET_VISIBLE (child); + + gtk_widget_unparent (child); + if (bin->child == child) + bin->child = NULL; + else { + GTK_PIXMAP_MENU_ITEM(container)->pixmap = NULL; + changed_have_pixmap_status(GTK_PIXMAP_MENU_ITEM(container)); + } + + if (widget_was_visible) + gtk_widget_queue_resize (GTK_WIDGET (container)); +} + + +/* important to only call this if there was actually a _change_ in pixmap == NULL */ +static void +changed_have_pixmap_status (GtkPixmapMenuItem *menu_item) +{ + if (menu_item->pixmap != NULL) { + GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count += 1; + + if (GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count == 1) { + /* Install pixmap toggle size */ + GTK_MENU_ITEM_GET_CLASS(menu_item)->toggle_size = MAX(GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->orig_toggle_size, PMAP_WIDTH); + } + } else { + GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count -= 1; + + if (GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count == 0) { + /* Install normal toggle size */ + GTK_MENU_ITEM_GET_CLASS(menu_item)->toggle_size = GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->orig_toggle_size; + } + } + + /* Note that we actually need to do this for _all_ GtkPixmapMenuItem + whenever the klass->toggle_size changes; but by doing it anytime + this function is called, we get the same effect, just because of + how the preferences option to show pixmaps works. Bogus, broken. + */ + if (GTK_WIDGET_VISIBLE(GTK_WIDGET(menu_item))) + gtk_widget_queue_resize(GTK_WIDGET(menu_item)); +} + +/* Added by JACS */ + +GtkWidget* +gtk_pixmap_menu_item_new_with_label (const gchar *label, GtkWidget** labelWidget) +{ + GtkWidget *menu_item; + GtkWidget *accel_label; + + menu_item = gtk_pixmap_menu_item_new (); + accel_label = gtk_accel_label_new (label); + if (labelWidget) + *labelWidget = accel_label; + gtk_misc_set_alignment (GTK_MISC (accel_label), 0.0, 0.5); + + gtk_container_add (GTK_CONTAINER (menu_item), accel_label); + gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (accel_label), menu_item); + gtk_widget_show (accel_label); + + return menu_item; +} + +////// END CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index 64dd67c08c..7e5bd7e7db 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -69,6 +69,7 @@ wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightTextColour = (wxColour *) NULL; wxColour *g_systemListBoxColour = (wxColour *) NULL; +wxColour *g_systemBtnTextColour = (wxColour *) NULL; wxFont *g_systemFont = (wxFont *) NULL; @@ -82,6 +83,7 @@ void wxSystemSettings::Done() delete g_systemHighlightTextColour; delete g_systemListBoxColour; delete g_systemFont; + delete g_systemBtnTextColour; } wxColour wxSystemSettings::GetSystemColour( int index ) @@ -99,6 +101,34 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_BTNFACE: case wxSYS_COLOUR_3DLIGHT: { + if (!g_systemBtnFaceColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->bg[GTK_STATE_NORMAL].red; + int green = def->bg[GTK_STATE_NORMAL].green; + int blue = def->bg[GTK_STATE_NORMAL].blue; + g_systemBtnFaceColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnFaceColour = + new wxColour( 0 >> SHIFT, + 0 >> SHIFT, + 0x9c40 >> SHIFT ); + } + gtk_widget_destroy( widget ); + + } + return *g_systemBtnFaceColour; + /* if (!g_systemBtnFaceColour) { g_systemBtnFaceColour = @@ -107,14 +137,29 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xd6d6 >> SHIFT ); } return *g_systemBtnFaceColour; + */ } case wxSYS_COLOUR_WINDOW: { return *wxWHITE; } + case wxSYS_COLOUR_3DDKSHADOW: + { + return *wxBLACK; + } case wxSYS_COLOUR_GRAYTEXT: case wxSYS_COLOUR_BTNSHADOW: + //case wxSYS_COLOUR_3DSHADOW: { + if (!g_systemBtnShadowColour) + { + wxColour faceColour(GetSystemColour(wxSYS_COLOUR_3DFACE)); + g_systemBtnShadowColour = + new wxColour(faceColour.Red() * 0.666, + faceColour.Green() * 0.666, + faceColour.Blue() * 0.666); + } + /* if (!g_systemBtnShadowColour) { g_systemBtnShadowColour = @@ -122,10 +167,14 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0x7530 >> SHIFT, 0x7530 >> SHIFT ); } + */ return *g_systemBtnShadowColour; } - case wxSYS_COLOUR_BTNHIGHLIGHT: + case wxSYS_COLOUR_3DHIGHLIGHT: + //case wxSYS_COLOUR_BTNHIGHLIGHT: { + return * wxWHITE; +/* I think this should normally be white (JACS 8/2000) if (!g_systemBtnHighlightColour) { g_systemBtnHighlightColour = @@ -134,6 +183,7 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xea60 >> SHIFT ); } return *g_systemBtnHighlightColour; +*/ } case wxSYS_COLOUR_HIGHLIGHT: { @@ -196,7 +246,30 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_BTNTEXT: case wxSYS_COLOUR_INFOTEXT: { - return *wxBLACK; + if (!g_systemBtnTextColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->fg[GTK_STATE_NORMAL].red; + int green = def->fg[GTK_STATE_NORMAL].green; + int blue = def->fg[GTK_STATE_NORMAL].blue; + g_systemBtnTextColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnTextColour = + new wxColour(0, 0, 0); + } + gtk_widget_destroy( widget ); + } + return *g_systemBtnTextColour; } case wxSYS_COLOUR_HIGHLIGHTTEXT: { diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index b3b73c34f5..89b3623f27 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -15,6 +15,7 @@ #include "wx/log.h" #include "wx/intl.h" #include "wx/app.h" +#include "wx/bitmap.h" #include "wx/menu.h" #if wxUSE_ACCEL @@ -35,6 +36,49 @@ extern bool g_isIdle; static wxString GetHotKey( const wxMenuItem& item ); #endif +////// BEGIN CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + +#define GTK_TYPE_PIXMAP_MENU_ITEM (gtk_pixmap_menu_item_get_type ()) +#define GTK_PIXMAP_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PIXMAP_MENU_ITEM, GtkPixmapMenuItem)) +#define GTK_PIXMAP_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PIXMAP_MENU_ITEM, GtkPixmapMenuItemClass)) +#define GTK_IS_PIXMAP_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PIXMAP_MENU_ITEM)) +#define GTK_IS_PIXMAP_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PIXMAP_MENU_ITEM)) +//#define GTK_PIXMAP_MENU_ITEM_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_PIXMAP_MENU_ITEM)) +#define GTK_PIXMAP_MENU_ITEM_GET_CLASS(obj) (GTK_PIXMAP_MENU_ITEM_CLASS( GTK_OBJECT_GET_CLASS(obj))) + +#ifndef GTK_MENU_ITEM_GET_CLASS +#define GTK_MENU_ITEM_GET_CLASS(obj) (GTK_MENU_ITEM_CLASS( GTK_OBJECT_GET_CLASS(obj))) +#endif + +typedef struct _GtkPixmapMenuItem GtkPixmapMenuItem; +typedef struct _GtkPixmapMenuItemClass GtkPixmapMenuItemClass; + +struct _GtkPixmapMenuItem +{ + GtkMenuItem menu_item; + + GtkWidget *pixmap; +}; + +struct _GtkPixmapMenuItemClass +{ + GtkMenuItemClass parent_class; + + guint orig_toggle_size; + guint have_pixmap_count; +}; + + +GtkType gtk_pixmap_menu_item_get_type (void); +GtkWidget* gtk_pixmap_menu_item_new (void); +void gtk_pixmap_menu_item_set_pixmap (GtkPixmapMenuItem *menu_item, + GtkWidget *pixmap); +/* Added by JACS */ + +GtkWidget* gtk_pixmap_menu_item_new_with_label (const gchar *label, GtkWidget** labelWidget); + +////// END CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + //----------------------------------------------------------------------------- // idle system //----------------------------------------------------------------------------- @@ -668,6 +712,7 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu, m_parentMenu = parentMenu; m_help = help; + m_labelWidget = (GtkWidget *) NULL; m_menuItem = (GtkWidget *) NULL; DoSetText(text); @@ -708,7 +753,11 @@ void wxMenuItem::SetText( const wxString& str ) if (m_menuItem) { - GtkLabel *label = GTK_LABEL( GTK_BIN(m_menuItem)->child ); + GtkLabel *label; + if (m_labelWidget) + label = (GtkLabel*) m_labelWidget; + else + label = GTK_LABEL( GTK_BIN(m_menuItem)->child ); /* set new text */ gtk_label_set( label, m_text.mb_str()); @@ -872,6 +921,8 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) { GtkWidget *menuItem; + bool appended = FALSE; + if ( mitem->IsSeparator() ) { #if (GTK_MINOR_VERSION > 0) @@ -924,6 +975,32 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) if ( m_invokingWindow ) wxMenubarSetInvokingWindow(mitem->GetSubMenu(), m_invokingWindow); } + else if (mitem->GetBitmap().Ok()) // An item with bitmap + { + //// UNFINISHED, because I don't know how to handle hotkeys and + //// accelerators :-( + + GtkWidget* labelWidget; + menuItem = gtk_pixmap_menu_item_new_with_label(mitem->GetText().mb_str(), &labelWidget); + //menuItem = gtk_pixmap_menu_item_new_with_label("", &labelWidget); + mitem->SetLabelWidget(labelWidget); + + //// TODO: should we store the widget somewhere to avoid a memory leak? + GtkWidget* w = gtk_pixmap_new(mitem->GetBitmap().GetPixmap(), mitem->GetBitmap().GetMask() ? mitem->GetBitmap().GetMask()->GetBitmap() : (GdkBitmap* )NULL); + gtk_widget_show(w); + gtk_pixmap_menu_item_set_pixmap(GTK_PIXMAP_MENU_ITEM( menuItem ), w); + + gtk_signal_connect( GTK_OBJECT(menuItem), "activate", + GTK_SIGNAL_FUNC(gtk_menu_clicked_callback), + (gpointer)this ); + gtk_menu_append( GTK_MENU(m_menu), menuItem ); + gtk_widget_show( menuItem ); + + //mitem->SetMenuItem(menuItem); + //mitem->SetText(mitem->GetText()); + + appended = TRUE; // We've done this, don't do it again + } else // a normal item { #if (GTK_MINOR_VERSION > 0) @@ -983,8 +1060,11 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) } #if GTK_MINOR_VERSION == 0 - gtk_menu_append( GTK_MENU(m_menu), menuItem ); - gtk_widget_show( menuItem ); + if (!appended) + { + gtk_menu_append( GTK_MENU(m_menu), menuItem ); + gtk_widget_show( menuItem ); + } #endif // GTK+ 1.0 mitem->SetMenuItem(menuItem); @@ -1128,3 +1208,395 @@ static wxString GetHotKey( const wxMenuItem& item ) } #endif // wxUSE_ACCEL + +////// BEGIN CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + +/* + * Copyright (C) 1998, 1999, 2000 Free Software Foundation + * All rights reserved. + * + * This file is part of the Gnome Library. + * + * The Gnome Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The Gnome Library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the Gnome Library; see the file COPYING.LIB. If not, + * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/* + @NOTATION@ + */ + +/* Author: Dietmar Maurer */ + +//#include "gtkpixmapmenuitem.h" +#include +#include +#include +#include +#include + +static void gtk_pixmap_menu_item_class_init (GtkPixmapMenuItemClass *klass); +static void gtk_pixmap_menu_item_init (GtkPixmapMenuItem *menu_item); +static void gtk_pixmap_menu_item_draw (GtkWidget *widget, + GdkRectangle *area); +static gint gtk_pixmap_menu_item_expose (GtkWidget *widget, + GdkEventExpose *event); + +/* we must override the following functions */ + +static void gtk_pixmap_menu_item_map (GtkWidget *widget); +static void gtk_pixmap_menu_item_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); +static void gtk_pixmap_menu_item_forall (GtkContainer *container, + gboolean include_internals, + GtkCallback callback, + gpointer callback_data); +static void gtk_pixmap_menu_item_size_request (GtkWidget *widget, + GtkRequisition *requisition); +static void gtk_pixmap_menu_item_remove (GtkContainer *container, + GtkWidget *child); + +static void changed_have_pixmap_status (GtkPixmapMenuItem *menu_item); + +static GtkMenuItemClass *parent_class = NULL; + +#define BORDER_SPACING 3 +#define PMAP_WIDTH 20 + +GtkType +gtk_pixmap_menu_item_get_type (void) +{ + static GtkType pixmap_menu_item_type = 0; + + if (!pixmap_menu_item_type) + { + GtkTypeInfo pixmap_menu_item_info = + { + "GtkPixmapMenuItem", + sizeof (GtkPixmapMenuItem), + sizeof (GtkPixmapMenuItemClass), + (GtkClassInitFunc) gtk_pixmap_menu_item_class_init, + (GtkObjectInitFunc) gtk_pixmap_menu_item_init, + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, + }; + + pixmap_menu_item_type = gtk_type_unique (gtk_menu_item_get_type (), + &pixmap_menu_item_info); + } + + return pixmap_menu_item_type; +} + +/** + * gtk_pixmap_menu_item_new + * + * Creates a new pixmap menu item. Use gtk_pixmap_menu_item_set_pixmap() + * to set the pixmap wich is displayed at the left side. + * + * Returns: + * &GtkWidget pointer to new menu item + **/ + +GtkWidget* +gtk_pixmap_menu_item_new (void) +{ + return GTK_WIDGET (gtk_type_new (gtk_pixmap_menu_item_get_type ())); +} + +static void +gtk_pixmap_menu_item_class_init (GtkPixmapMenuItemClass *klass) +{ + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + GtkMenuItemClass *menu_item_class; + GtkContainerClass *container_class; + + object_class = (GtkObjectClass*) klass; + widget_class = (GtkWidgetClass*) klass; + menu_item_class = (GtkMenuItemClass*) klass; + container_class = (GtkContainerClass*) klass; + + parent_class = (GtkMenuItemClass*) gtk_type_class (gtk_menu_item_get_type ()); + + widget_class->draw = gtk_pixmap_menu_item_draw; + widget_class->expose_event = gtk_pixmap_menu_item_expose; + widget_class->map = gtk_pixmap_menu_item_map; + widget_class->size_allocate = gtk_pixmap_menu_item_size_allocate; + widget_class->size_request = gtk_pixmap_menu_item_size_request; + + container_class->forall = gtk_pixmap_menu_item_forall; + container_class->remove = gtk_pixmap_menu_item_remove; + + klass->orig_toggle_size = menu_item_class->toggle_size; + klass->have_pixmap_count = 0; +} + +static void +gtk_pixmap_menu_item_init (GtkPixmapMenuItem *menu_item) +{ + GtkMenuItem *mi; + + mi = GTK_MENU_ITEM (menu_item); + + menu_item->pixmap = NULL; +} + +static void +gtk_pixmap_menu_item_draw (GtkWidget *widget, + GdkRectangle *area) +{ + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget)); + g_return_if_fail (area != NULL); + + if (GTK_WIDGET_CLASS (parent_class)->draw) + (* GTK_WIDGET_CLASS (parent_class)->draw) (widget, area); + + if (GTK_WIDGET_DRAWABLE (widget) && + GTK_PIXMAP_MENU_ITEM(widget)->pixmap) { + gtk_widget_draw(GTK_WIDGET(GTK_PIXMAP_MENU_ITEM(widget)->pixmap),NULL); + } +} + +static gint +gtk_pixmap_menu_item_expose (GtkWidget *widget, + GdkEventExpose *event) +{ + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + if (GTK_WIDGET_CLASS (parent_class)->expose_event) + (* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event); + + if (GTK_WIDGET_DRAWABLE (widget) && + GTK_PIXMAP_MENU_ITEM(widget)->pixmap) { + gtk_widget_draw(GTK_WIDGET(GTK_PIXMAP_MENU_ITEM(widget)->pixmap),NULL); + } + + return FALSE; +} + +/** + * gtk_pixmap_menu_item_set_pixmap + * @menu_item: Pointer to the pixmap menu item + * @pixmap: Pointer to a pixmap widget + * + * Set the pixmap of the menu item. + * + **/ + +void +gtk_pixmap_menu_item_set_pixmap (GtkPixmapMenuItem *menu_item, + GtkWidget *pixmap) +{ + g_return_if_fail (menu_item != NULL); + g_return_if_fail (pixmap != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (menu_item)); + g_return_if_fail (GTK_IS_WIDGET (pixmap)); + g_return_if_fail (menu_item->pixmap == NULL); + + gtk_widget_set_parent (pixmap, GTK_WIDGET (menu_item)); + menu_item->pixmap = pixmap; + + if (GTK_WIDGET_REALIZED (pixmap->parent) && + !GTK_WIDGET_REALIZED (pixmap)) + gtk_widget_realize (pixmap); + + if (GTK_WIDGET_VISIBLE (pixmap->parent)) { + if (GTK_WIDGET_MAPPED (pixmap->parent) && + GTK_WIDGET_VISIBLE(pixmap) && + !GTK_WIDGET_MAPPED (pixmap)) + gtk_widget_map (pixmap); + } + + changed_have_pixmap_status(menu_item); + + if (GTK_WIDGET_VISIBLE (pixmap) && GTK_WIDGET_VISIBLE (menu_item)) + gtk_widget_queue_resize (pixmap); +} + +static void +gtk_pixmap_menu_item_map (GtkWidget *widget) +{ + GtkPixmapMenuItem *menu_item; + + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (widget)); + + menu_item = GTK_PIXMAP_MENU_ITEM(widget); + + GTK_WIDGET_CLASS(parent_class)->map(widget); + + if (menu_item->pixmap && + GTK_WIDGET_VISIBLE (menu_item->pixmap) && + !GTK_WIDGET_MAPPED (menu_item->pixmap)) + gtk_widget_map (menu_item->pixmap); +} + +static void +gtk_pixmap_menu_item_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) +{ + GtkPixmapMenuItem *pmenu_item; + + pmenu_item = GTK_PIXMAP_MENU_ITEM(widget); + + if (pmenu_item->pixmap && GTK_WIDGET_VISIBLE(pmenu_item)) + { + GtkAllocation child_allocation; + int border_width; + + border_width = GTK_CONTAINER (widget)->border_width; + + child_allocation.width = pmenu_item->pixmap->requisition.width; + child_allocation.height = pmenu_item->pixmap->requisition.height; + child_allocation.x = border_width + BORDER_SPACING; + child_allocation.y = (border_width + BORDER_SPACING + + (((allocation->height - child_allocation.height) - child_allocation.x) + / 2)); /* center pixmaps vertically */ + gtk_widget_size_allocate (pmenu_item->pixmap, &child_allocation); + } + + if (GTK_WIDGET_CLASS (parent_class)->size_allocate) + GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation); +} + +static void +gtk_pixmap_menu_item_forall (GtkContainer *container, + gboolean include_internals, + GtkCallback callback, + gpointer callback_data) +{ + GtkPixmapMenuItem *menu_item; + + g_return_if_fail (container != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (container)); + g_return_if_fail (callback != NULL); + + menu_item = GTK_PIXMAP_MENU_ITEM (container); + + if (menu_item->pixmap) + (* callback) (menu_item->pixmap, callback_data); + + GTK_CONTAINER_CLASS(parent_class)->forall(container,include_internals, + callback,callback_data); +} + +static void +gtk_pixmap_menu_item_size_request (GtkWidget *widget, + GtkRequisition *requisition) +{ + GtkPixmapMenuItem *menu_item; + GtkRequisition req = {0, 0}; + + g_return_if_fail (widget != NULL); + g_return_if_fail (GTK_IS_MENU_ITEM (widget)); + g_return_if_fail (requisition != NULL); + + GTK_WIDGET_CLASS(parent_class)->size_request(widget,requisition); + + menu_item = GTK_PIXMAP_MENU_ITEM (widget); + + if (menu_item->pixmap) + gtk_widget_size_request(menu_item->pixmap, &req); + + requisition->height = MAX(req.height + GTK_CONTAINER(widget)->border_width + BORDER_SPACING, (unsigned int) requisition->height); + requisition->width += (req.width + GTK_CONTAINER(widget)->border_width + BORDER_SPACING); +} + +static void +gtk_pixmap_menu_item_remove (GtkContainer *container, + GtkWidget *child) +{ + GtkBin *bin; + gboolean widget_was_visible; + + g_return_if_fail (container != NULL); + g_return_if_fail (GTK_IS_PIXMAP_MENU_ITEM (container)); + g_return_if_fail (child != NULL); + g_return_if_fail (GTK_IS_WIDGET (child)); + + bin = GTK_BIN (container); + g_return_if_fail ((bin->child == child || + (GTK_PIXMAP_MENU_ITEM(container)->pixmap == child))); + + widget_was_visible = GTK_WIDGET_VISIBLE (child); + + gtk_widget_unparent (child); + if (bin->child == child) + bin->child = NULL; + else { + GTK_PIXMAP_MENU_ITEM(container)->pixmap = NULL; + changed_have_pixmap_status(GTK_PIXMAP_MENU_ITEM(container)); + } + + if (widget_was_visible) + gtk_widget_queue_resize (GTK_WIDGET (container)); +} + + +/* important to only call this if there was actually a _change_ in pixmap == NULL */ +static void +changed_have_pixmap_status (GtkPixmapMenuItem *menu_item) +{ + if (menu_item->pixmap != NULL) { + GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count += 1; + + if (GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count == 1) { + /* Install pixmap toggle size */ + GTK_MENU_ITEM_GET_CLASS(menu_item)->toggle_size = MAX(GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->orig_toggle_size, PMAP_WIDTH); + } + } else { + GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count -= 1; + + if (GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->have_pixmap_count == 0) { + /* Install normal toggle size */ + GTK_MENU_ITEM_GET_CLASS(menu_item)->toggle_size = GTK_PIXMAP_MENU_ITEM_GET_CLASS(menu_item)->orig_toggle_size; + } + } + + /* Note that we actually need to do this for _all_ GtkPixmapMenuItem + whenever the klass->toggle_size changes; but by doing it anytime + this function is called, we get the same effect, just because of + how the preferences option to show pixmaps works. Bogus, broken. + */ + if (GTK_WIDGET_VISIBLE(GTK_WIDGET(menu_item))) + gtk_widget_queue_resize(GTK_WIDGET(menu_item)); +} + +/* Added by JACS */ + +GtkWidget* +gtk_pixmap_menu_item_new_with_label (const gchar *label, GtkWidget** labelWidget) +{ + GtkWidget *menu_item; + GtkWidget *accel_label; + + menu_item = gtk_pixmap_menu_item_new (); + accel_label = gtk_accel_label_new (label); + if (labelWidget) + *labelWidget = accel_label; + gtk_misc_set_alignment (GTK_MISC (accel_label), 0.0, 0.5); + + gtk_container_add (GTK_CONTAINER (menu_item), accel_label); + gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (accel_label), menu_item); + gtk_widget_show (accel_label); + + return menu_item; +} + +////// END CODE ADAPTED FROM GTKPIXMAPMENUITEM.C IN LIBGNOMEUI ////// + diff --git a/src/gtk1/settings.cpp b/src/gtk1/settings.cpp index 64dd67c08c..7e5bd7e7db 100644 --- a/src/gtk1/settings.cpp +++ b/src/gtk1/settings.cpp @@ -69,6 +69,7 @@ wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightColour = (wxColour *) NULL; wxColour *g_systemHighlightTextColour = (wxColour *) NULL; wxColour *g_systemListBoxColour = (wxColour *) NULL; +wxColour *g_systemBtnTextColour = (wxColour *) NULL; wxFont *g_systemFont = (wxFont *) NULL; @@ -82,6 +83,7 @@ void wxSystemSettings::Done() delete g_systemHighlightTextColour; delete g_systemListBoxColour; delete g_systemFont; + delete g_systemBtnTextColour; } wxColour wxSystemSettings::GetSystemColour( int index ) @@ -99,6 +101,34 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_BTNFACE: case wxSYS_COLOUR_3DLIGHT: { + if (!g_systemBtnFaceColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->bg[GTK_STATE_NORMAL].red; + int green = def->bg[GTK_STATE_NORMAL].green; + int blue = def->bg[GTK_STATE_NORMAL].blue; + g_systemBtnFaceColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnFaceColour = + new wxColour( 0 >> SHIFT, + 0 >> SHIFT, + 0x9c40 >> SHIFT ); + } + gtk_widget_destroy( widget ); + + } + return *g_systemBtnFaceColour; + /* if (!g_systemBtnFaceColour) { g_systemBtnFaceColour = @@ -107,14 +137,29 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xd6d6 >> SHIFT ); } return *g_systemBtnFaceColour; + */ } case wxSYS_COLOUR_WINDOW: { return *wxWHITE; } + case wxSYS_COLOUR_3DDKSHADOW: + { + return *wxBLACK; + } case wxSYS_COLOUR_GRAYTEXT: case wxSYS_COLOUR_BTNSHADOW: + //case wxSYS_COLOUR_3DSHADOW: { + if (!g_systemBtnShadowColour) + { + wxColour faceColour(GetSystemColour(wxSYS_COLOUR_3DFACE)); + g_systemBtnShadowColour = + new wxColour(faceColour.Red() * 0.666, + faceColour.Green() * 0.666, + faceColour.Blue() * 0.666); + } + /* if (!g_systemBtnShadowColour) { g_systemBtnShadowColour = @@ -122,10 +167,14 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0x7530 >> SHIFT, 0x7530 >> SHIFT ); } + */ return *g_systemBtnShadowColour; } - case wxSYS_COLOUR_BTNHIGHLIGHT: + case wxSYS_COLOUR_3DHIGHLIGHT: + //case wxSYS_COLOUR_BTNHIGHLIGHT: { + return * wxWHITE; +/* I think this should normally be white (JACS 8/2000) if (!g_systemBtnHighlightColour) { g_systemBtnHighlightColour = @@ -134,6 +183,7 @@ wxColour wxSystemSettings::GetSystemColour( int index ) 0xea60 >> SHIFT ); } return *g_systemBtnHighlightColour; +*/ } case wxSYS_COLOUR_HIGHLIGHT: { @@ -196,7 +246,30 @@ wxColour wxSystemSettings::GetSystemColour( int index ) case wxSYS_COLOUR_BTNTEXT: case wxSYS_COLOUR_INFOTEXT: { - return *wxBLACK; + if (!g_systemBtnTextColour) + { + GtkWidget *widget = gtk_button_new(); + GtkStyle *def = gtk_rc_get_style( widget ); + if (!def) + def = gtk_widget_get_default_style(); + if (def) + { + int red = def->fg[GTK_STATE_NORMAL].red; + int green = def->fg[GTK_STATE_NORMAL].green; + int blue = def->fg[GTK_STATE_NORMAL].blue; + g_systemBtnTextColour = + new wxColour( red >> SHIFT, + green >> SHIFT, + blue >> SHIFT ); + } + else + { + g_systemBtnTextColour = + new wxColour(0, 0, 0); + } + gtk_widget_destroy( widget ); + } + return *g_systemBtnTextColour; } case wxSYS_COLOUR_HIGHLIGHTTEXT: { diff --git a/utils/dialoged/src/Makefile b/utils/dialoged/src/Makefile index d754615f73..ca4f4842a7 100644 --- a/utils/dialoged/src/Makefile +++ b/utils/dialoged/src/Makefile @@ -1,51 +1,22 @@ +# Generated automatically from Makefile.in by configure. # -# File: Makefile -# Author: Robert Roebling -# Created: 1999 +# File: makefile.unx +# Author: Julian Smart +# Created: 1998 # Updated: -# Copyright: (c) 1998 Robert Roebling +# Copyright: (c) 1998 Julian Smart # -# Makefile for Dialog Editor (GTK version) +# "%W% %G%" # -# This makefile requires wxWindows/GTK to be -# installed (possibly using "make install") -# on your system. -# - -CC = g++ - -DialogEd: dialoged.o dlghndlr.o edlist.o edtree.o reseditr.o reswrite.o \ - symbtabl.o winprop.o winstyle.o - $(CC) -o DialogEd \ - dialoged.o dlghndlr.o edlist.o edtree.o reseditr.o reswrite.o \ - symbtabl.o winprop.o winstyle.o `wx-config --libs` - -dialoged.o: dialoged.cpp - $(CC) `wx-config --cflags` -c dialoged.cpp - -dlghndlr.o: dlghndlr.cpp - $(CC) `wx-config --cflags` -c dlghndlr.cpp - -edlist.o: edlist.cpp - $(CC) `wx-config --cflags` -c edlist.cpp - -edtree.o: edtree.cpp - $(CC) `wx-config --cflags` -c edtree.cpp - -reseditr.o: reseditr.cpp - $(CC) `wx-config --cflags` -c reseditr.cpp +# Makefile for Tex2RTF (Unix) -reswrite.o: reswrite.cpp - $(CC) `wx-config --cflags` -c reswrite.cpp +top_srcdir = ../../.. +top_builddir = ../../.. +program_dir = utils/dialoged/src -symbtabl.o: symbtabl.cpp - $(CC) `wx-config --cflags` -c symbtabl.cpp +PROGRAM=DialogEd -winprop.o: winprop.cpp - $(CC) `wx-config --cflags` -c winprop.cpp +OBJECTS = dialoged.o dlghndlr.o edlist.o edtree.o reseditr.o reswrite.o symbtabl.o winprop.o winstyle.o -winstyle.o: winstyle.cpp - $(CC) `wx-config --cflags` -c winstyle.cpp +include ../../../src/makeprog.env -clean: - rm -f *.o DialogEd -- 2.45.2