]> git.saurik.com Git - wxWidgets.git/commitdiff
Added configure patch for DEC
authorRobert Roebling <robert@roebling.de>
Wed, 28 Apr 1999 17:05:45 +0000 (17:05 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 28 Apr 1999 17:05:45 +0000 (17:05 +0000)
  Tried to find a DnD bug.
  Corrected a tree ctrl bug.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
samples/image/image.cpp
samples/splitter/test.cpp
src/generic/treectrl.cpp
src/gtk/dataobj.cpp
src/gtk/dnd.cpp
src/gtk1/dataobj.cpp
src/gtk1/dnd.cpp

index dbccca5ddeffcbc8212b7e745e92a602ba327987..5a130486a2e883128eefa72c4feedb51d1c873ff 100755 (executable)
--- a/configure
+++ b/configure
@@ -5651,7 +5651,7 @@ DEFAULT_wxUSE_TIMEDATE=1
 DEFAULT_wxUSE_INTL=1
 DEFAULT_wxUSE_CONFIG=1
 DEFAULT_wxUSE_STREAMS=1
-DEFAULT_wxUSE_SOCKETS=1
+DEFAULT_wxUSE_SOCKETS=0
 DEFAULT_wxUSE_SERIAL=1
 DEFAULT_wxUSE_DYNLIB_CLASS=1
 
@@ -7659,17 +7659,25 @@ fi
 
 
 if test "$wxUSE_SOCKETS" = "1"; then
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
         echo $ac_n "checking the type of the third argument of getsockname""... $ac_c" 1>&6
-echo "configure:7664: checking the type of the third argument of getsockname" >&5
+echo "configure:7672: checking the type of the third argument of getsockname" >&5
     cat > conftest.$ac_ext <<EOF
-#line 7666 "configure"
+#line 7674 "configure"
 #include "confdefs.h"
 #include <sys/socket.h>
 int main() {
 socklen_t len; getsockname(0, NULL, &len);
 ; return 0; }
 EOF
-if { (eval echo configure:7673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define SOCKLEN_T socklen_t
@@ -7680,14 +7688,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 7684 "configure"
+#line 7692 "configure"
 #include "confdefs.h"
 #include <sys/socket.h>
 int main() {
 size_t len; getsockname(0, NULL, &len);
 ; return 0; }
 EOF
-if { (eval echo configure:7691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define SOCKLEN_T size_t
@@ -7698,14 +7706,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 7702 "configure"
+#line 7710 "configure"
 #include "confdefs.h"
 #include <sys/socket.h>
 int main() {
 int len; getsockname(0, NULL, &len);
 ; return 0; }
 EOF
-if { (eval echo configure:7709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define SOCKLEN_T int
@@ -7725,6 +7733,13 @@ rm -f conftest*
     
 fi
 rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
 fi
 
 
@@ -7733,12 +7748,12 @@ if test "$wxUSE_DYNLIB_CLASS" = "1"; then
             for ac_func in dlopen
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7737: checking for $ac_func" >&5
+echo "configure:7752: 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 <<EOF
-#line 7742 "configure"
+#line 7757 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7762,7 +7777,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7781: \"$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
@@ -7787,7 +7802,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:7791: checking for dlopen in -ldl" >&5
+echo "configure:7806: 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
@@ -7795,7 +7810,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7799 "configure"
+#line 7814 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7806,7 +7821,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7825: \"$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
@@ -7835,12 +7850,12 @@ done
     for ac_func in shl_load
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7839: checking for $ac_func" >&5
+echo "configure:7854: 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 <<EOF
-#line 7844 "configure"
+#line 7859 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7864,7 +7879,7 @@ f = $ac_func;
 
 ; return 0; }
 EOF
-if { (eval echo configure:7868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7883: \"$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
@@ -8048,7 +8063,7 @@ UNIX_THREAD=""
 if test "$wxUSE_THREADS" = "1"; then
     
                 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:8052: checking for pthread_create in -lpthread" >&5
+echo "configure:8067: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'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
@@ -8056,7 +8071,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8060 "configure"
+#line 8075 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8067,7 +8082,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8086: \"$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
@@ -8090,7 +8105,7 @@ else
   echo "$ac_t""no" 1>&6
 
                         echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:8094: checking for pthread_create in -lc_r" >&5
+echo "configure:8109: 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
@@ -8098,7 +8113,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8102 "configure"
+#line 8117 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8109,7 +8124,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:8113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8128: \"$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
@@ -8133,17 +8148,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:8137: checking for sys/prctl.h" >&5
+echo "configure:8152: checking for sys/prctl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8142 "configure"
+#line 8157 "configure"
 #include "confdefs.h"
 #include <sys/prctl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8162: \"$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*
@@ -8193,17 +8208,17 @@ if test "$wxUSE_THREADS" = "1"; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8197: checking for $ac_hdr" >&5
+echo "configure:8212: 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
-#line 8202 "configure"
+#line 8217 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8222: \"$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*
@@ -8231,7 +8246,7 @@ done
 
 
   echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6
-echo "configure:8235: checking for sched_yield in -l$THREADS_LINK" >&5
+echo "configure:8250: 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
@@ -8239,7 +8254,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$THREADS_LINK  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8243 "configure"
+#line 8258 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8250,7 +8265,7 @@ int main() {
 sched_yield()
 ; return 0; }
 EOF
-if { (eval echo configure:8254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8269: \"$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
@@ -8272,7 +8287,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:8276: checking for sched_yield in -l"posix4"" >&5
+echo "configure:8291: 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
@@ -8280,7 +8295,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l"posix4"  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8284 "configure"
+#line 8299 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8291,7 +8306,7 @@ int main() {
 sched_yield()
 ; return 0; }
 EOF
-if { (eval echo configure:8295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8310: \"$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
@@ -8321,7 +8336,7 @@ fi
 
 
                 echo $ac_n "checking for pthread_attr_getschedpolicy in -l$THREADS_LINK""... $ac_c" 1>&6
-echo "configure:8325: checking for pthread_attr_getschedpolicy in -l$THREADS_LINK" >&5
+echo "configure:8340: 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
@@ -8329,7 +8344,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$THREADS_LINK  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8333 "configure"
+#line 8348 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8340,7 +8355,7 @@ int main() {
 pthread_attr_getschedpolicy()
 ; return 0; }
 EOF
-if { (eval echo configure:8344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8359: \"$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
@@ -8362,7 +8377,7 @@ EOF
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for pthread_attr_getschedpolicy in -l"posix4"""... $ac_c" 1>&6
-echo "configure:8366: checking for pthread_attr_getschedpolicy in -l"posix4"" >&5
+echo "configure:8381: checking for pthread_attr_getschedpolicy in -l"posix4"" >&5
 ac_lib_var=`echo "posix4"'_'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
@@ -8370,7 +8385,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l"posix4"  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8374 "configure"
+#line 8389 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8381,7 +8396,7 @@ int main() {
 pthread_attr_getschedpolicy()
 ; return 0; }
 EOF
-if { (eval echo configure:8385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8400: \"$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
@@ -8411,7 +8426,7 @@ fi
 
 
   echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6
-echo "configure:8415: checking for pthread_cancel in -l$THREADS_LINK" >&5
+echo "configure:8430: 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
@@ -8419,7 +8434,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$THREADS_LINK  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8423 "configure"
+#line 8438 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8430,7 +8445,7 @@ int main() {
 pthread_cancel()
 ; return 0; }
 EOF
-if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8449: \"$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
index 97c118eaa2d42c0b049224785b944f16ba5b175c..cd51d6aeb475092f69312f8159b4aaa802547d87 100644 (file)
@@ -1370,6 +1370,8 @@ dnl wxSocket
 dnl ------------------------------------------------------------------------
 
 if test "$wxUSE_SOCKETS" = "1"; then
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
     dnl determine the type of third argument for getsockname
     AC_MSG_CHECKING(the type of the third argument of getsockname)
     AC_TRY_COMPILE(
@@ -1388,6 +1390,7 @@ if test "$wxUSE_SOCKETS" = "1"; then
                )
         )
     )
+    AC_LANG_RESTORE
 fi
 
 dnl ------------------------------------------------------------------------
index 2b923cb1fb7921441731da745df1681824d9461c..466618e3518f31c318ebc847981a54385b3d0016 100644 (file)
@@ -226,11 +226,11 @@ MyFrame::MyFrame()
                   wxPoint(20,20), wxSize(470,360) )
 {
   wxMenu *file_menu = new wxMenu();
-  file_menu->Append( ID_ABOUT, "About..");
-  file_menu->Append( ID_QUIT, "Exit");
+  file_menu->Append( ID_ABOUT, "&About..");
+  file_menu->Append( ID_QUIT, "E&xit");
 
   wxMenuBar *menu_bar = new wxMenuBar();
-  menu_bar->Append(file_menu, "File");
+  menu_bar->Append(file_menu, "&File");
 
   SetMenuBar( menu_bar );
 
index 3073e17f3c78d1bbe7a24f1d56119d23061543dd..c44103a332804754c7db10c472d94475da0e3978 100644 (file)
@@ -89,7 +89,7 @@ DECLARE_EVENT_TABLE()
 class MyCanvas: public wxScrolledWindow
 {
 public:
-       MyCanvas(wxWindow* parent, wxWindowID id, int x, int y, int w, int h);
+       MyCanvas(wxWindow* parent, wxWindowID id, int x, int y, int w, int h, const wxString &name);
        virtual ~MyCanvas();
 
   virtual void OnDraw(wxDC& dc);
@@ -166,12 +166,12 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, cons
 
   m_splitter = new MySplitterWindow(this, SPLITTER_WINDOW);
 
-  m_leftCanvas = new MyCanvas(m_splitter, CANVAS1, 0, 0, 400, 400);
+  m_leftCanvas = new MyCanvas(m_splitter, CANVAS1, 0, 0, 400, 400, "Test1" );
   m_leftCanvas->SetBackgroundColour(*wxRED);
   m_leftCanvas->SetScrollbars(20, 20, 50, 50);
   m_leftCanvas->SetCursor(wxCursor(wxCURSOR_MAGNIFIER));
 
-  m_rightCanvas = new MyCanvas(m_splitter, CANVAS2, 0, 0, 400, 400);
+  m_rightCanvas = new MyCanvas(m_splitter, CANVAS2, 0, 0, 400, 400, "Test2" );
   m_rightCanvas->SetBackgroundColour(*wxCYAN);
   m_rightCanvas->SetScrollbars(20, 20, 50, 50);
   m_rightCanvas->Show(FALSE);
@@ -252,8 +252,8 @@ void MyFrame::UpdatePosition()
   SetStatusText(str);
 }
 
-MyCanvas::MyCanvas(wxWindow* parent, wxWindowID id, int x, int y, int w, int h) :
-       wxScrolledWindow(parent, id, wxPoint(x, y), wxSize(w, h))
+MyCanvas::MyCanvas(wxWindow* parent, wxWindowID id, int x, int y, int w, int h, const wxString &name ) :
+       wxScrolledWindow(parent, id, wxPoint(x, y), wxSize(w, h), 0, name )
 {
 }
 
index c69ea64098cf5f01e8e7f6542e1ed336c39c47f4..2494432374c41d31535d8e251e73a9bd6caeaab6 100644 (file)
@@ -1327,14 +1327,17 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
                 if (!prev)
                 {
                     prev = GetParent( m_current );
-                    long cockie = 0;
-                    wxTreeItemId current = m_current;
-                    if (current == GetFirstChild( prev, cockie ))
-                    {
-                        // otherwise we return to where we came from
-                        SelectItem( prev );
-                        EnsureVisible( prev );
-                        break;
+                   if (prev)
+                   {
+                        long cockie = 0;
+                        wxTreeItemId current = m_current;
+                        if (current == GetFirstChild( prev, cockie ))
+                        {
+                            // otherwise we return to where we came from
+                            SelectItem( prev );
+                            EnsureVisible( prev );
+                            break;
+                       }
                     }
                 }
                 if (prev)
index c36564b559fed683bab25d43c926eb0c316afe1e..cbcce96e5f9c9799f6522887ddb364324671f6fb 100644 (file)
@@ -341,7 +341,7 @@ size_t wxTextDataObject::GetSize() const
 
 void wxTextDataObject::WriteString( const wxString &str, void *dest ) const
 {
-    memcpy( dest, m_data.mbc_str(), GetSize() );
+    memcpy( dest, str.mb_str(), str.Len()+1 );
 }
     
 // ----------------------------------------------------------------------------
index ae53201b1bdf172955d696297206f4d21b3da3c2..0bfbbc7bde00381df2262c101446d57182dbfe40 100644 (file)
@@ -273,6 +273,8 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
            qualifies for junk */
         gtk_drag_finish (context, FALSE, FALSE, time);
        
+//     printf( "no data.\n" );
+       
        return;
     }
     
@@ -340,6 +342,12 @@ bool wxDropTarget::RequestData( wxDataFormat format )
     if (!m_dragContext) return FALSE;
     if (!m_dragWidget) return FALSE;
     
+/*
+    wxPrintf( _T("format: %s.\n"), format.GetId().c_str() );
+    if (format.GetType() == wxDF_PRIVATE) wxPrintf( _T("private data.\n") );
+    if (format.GetType() == wxDF_TEXT) wxPrintf( _T("text data.\n") );
+*/
+
     /* this should trigger an "drag_data_received" event */
     gtk_drag_get_data( m_dragWidget, 
                       m_dragContext,
@@ -581,6 +589,8 @@ source_drag_data_get  (GtkWidget          *WXUNUSED(widget),
                       guint               WXUNUSED(time),
                       wxDropSource       *drop_source )
 {
+//    printf( "Provide data!\n" );
+
 //    char *name = gdk_atom_name( selection_data->target );
 //    if (name) printf( "Format requested: %s.\n", name );
     
@@ -590,10 +600,14 @@ source_drag_data_get  (GtkWidget          *WXUNUSED(widget),
         wxDataObject *data_object = (wxDataObject*) node->Data();
        if (data_object->GetFormat().GetAtom() == selection_data->target)
        {
+//         printf( "format found.\n" );
+       
            size_t data_size = data_object->GetSize();
            
            if (data_size > 0)
            {
+//             printf( "data size: %d.\n", (int)data_size );
+           
                guchar *buffer = new guchar[data_size];
                data_object->WriteData( buffer );
                
@@ -802,8 +816,6 @@ wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
                                  0,
                                  0 );
     
-        gdk_flush();
-    
         while (m_waiting) wxYield();
     }
 
index c36564b559fed683bab25d43c926eb0c316afe1e..cbcce96e5f9c9799f6522887ddb364324671f6fb 100644 (file)
@@ -341,7 +341,7 @@ size_t wxTextDataObject::GetSize() const
 
 void wxTextDataObject::WriteString( const wxString &str, void *dest ) const
 {
-    memcpy( dest, m_data.mbc_str(), GetSize() );
+    memcpy( dest, str.mb_str(), str.Len()+1 );
 }
     
 // ----------------------------------------------------------------------------
index ae53201b1bdf172955d696297206f4d21b3da3c2..0bfbbc7bde00381df2262c101446d57182dbfe40 100644 (file)
@@ -273,6 +273,8 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
            qualifies for junk */
         gtk_drag_finish (context, FALSE, FALSE, time);
        
+//     printf( "no data.\n" );
+       
        return;
     }
     
@@ -340,6 +342,12 @@ bool wxDropTarget::RequestData( wxDataFormat format )
     if (!m_dragContext) return FALSE;
     if (!m_dragWidget) return FALSE;
     
+/*
+    wxPrintf( _T("format: %s.\n"), format.GetId().c_str() );
+    if (format.GetType() == wxDF_PRIVATE) wxPrintf( _T("private data.\n") );
+    if (format.GetType() == wxDF_TEXT) wxPrintf( _T("text data.\n") );
+*/
+
     /* this should trigger an "drag_data_received" event */
     gtk_drag_get_data( m_dragWidget, 
                       m_dragContext,
@@ -581,6 +589,8 @@ source_drag_data_get  (GtkWidget          *WXUNUSED(widget),
                       guint               WXUNUSED(time),
                       wxDropSource       *drop_source )
 {
+//    printf( "Provide data!\n" );
+
 //    char *name = gdk_atom_name( selection_data->target );
 //    if (name) printf( "Format requested: %s.\n", name );
     
@@ -590,10 +600,14 @@ source_drag_data_get  (GtkWidget          *WXUNUSED(widget),
         wxDataObject *data_object = (wxDataObject*) node->Data();
        if (data_object->GetFormat().GetAtom() == selection_data->target)
        {
+//         printf( "format found.\n" );
+       
            size_t data_size = data_object->GetSize();
            
            if (data_size > 0)
            {
+//             printf( "data size: %d.\n", (int)data_size );
+           
                guchar *buffer = new guchar[data_size];
                data_object->WriteData( buffer );
                
@@ -802,8 +816,6 @@ wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
                                  0,
                                  0 );
     
-        gdk_flush();
-    
         while (m_waiting) wxYield();
     }