]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Applied patch [ 678788 ] Dialog command event propagation problem
[wxWidgets.git] / src / common / utilscmn.cpp
index 32e2332a52ae40e716d27897b24e5ad35415c500..2d9e558416dc48567fb087f1059dc32868bdf8be 100644 (file)
@@ -431,10 +431,10 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
       if (frame->GetToolBar())
         extraChildren.Append(frame->GetToolBar());
 
-      wxNode* node = extraChildren.First();
+      wxNode* node = extraChildren.GetFirst();
       while (node)
       {
-          wxWindow* child = (wxWindow*) node->Data();
+          wxWindow* child = (wxWindow*) node->GetData();
           wxWindow* foundWin = wxFindWindowAtPoint(child, pt);
           if (foundWin)
             return foundWin;
@@ -443,14 +443,14 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt)
     }
     */
 
-    wxNode* node = win->GetChildren().Last();
+    wxWindowList::Node  *node = win->GetChildren().GetLast();
     while (node)
     {
-        wxWindow* child = (wxWindow*) node->Data();
+        wxWindow* child = node->GetData();
         wxWindow* foundWin = wxFindWindowAtPoint(child, pt);
         if (foundWin)
           return foundWin;
-        node = node->Previous();
+        node = node->GetPrevious();
     }
 
     wxPoint pos = win->GetPosition();
@@ -472,14 +472,14 @@ wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt)
     // Go backwards through the list since windows
     // on top are likely to have been appended most
     // recently.
-    wxNode* node = wxTopLevelWindows.Last();
+    wxWindowList::Node  *node = wxTopLevelWindows.GetLast();
     while (node)
     {
-        wxWindow* win = (wxWindow*) node->Data();
+        wxWindow* win = node->GetData();
         wxWindow* found = wxFindWindowAtPoint(win, pt);
         if (found)
             return found;
-        node = node->Previous();
+        node = node->GetPrevious();
     }
     return NULL;
 }
@@ -872,14 +872,15 @@ wxWindowDisabler::~wxWindowDisabler()
 
 // Yield to other apps/messages and disable user input to all windows except
 // the given one
-bool wxSafeYield(wxWindow *win, bool onlyIfNeeded = FALSE)
+bool wxSafeYield(wxWindow *win, bool onlyIfNeeded)
 {
     wxWindowDisabler wd(win);
 
+    bool rc;
     if (onlyIfNeeded)
-        bool rc = wxYieldIfNeeded();
+        rc = wxYieldIfNeeded();
     else
-        bool rc = wxYield();
+        rc = wxYield();
 
     return rc;
 }
@@ -1068,6 +1069,7 @@ wxString wxGetCurrentDir()
 // wxDoExecuteWithCapture() helper: reads an entire stream into one array
 //
 // returns TRUE if ok, FALSE if error
+#if wxUSE_STREAMS
 static bool ReadAll(wxInputStream *is, wxArrayString& output)
 {
     wxCHECK_MSG( is, FALSE, _T("NULL stream in wxExecute()?") );
@@ -1096,6 +1098,7 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
 
     return cont;
 }
+#endif // wxUSE_STREAMS
 
 // this is a private function because it hasn't a clean interface: the first
 // array is passed by reference, the second by pointer - instead we have 2