]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
fixed pasting of Unicode strings
[wxWidgets.git] / src / generic / progdlgg.cpp
index a812cb473620d528c62e40788107d290d19bef93..95e23580b6d15c6c7a0b475d908785b9addc3d40 100644 (file)
@@ -115,11 +115,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
     m_maximum /= m_factor;
 #endif // __WXMSW__
 
-    m_parentTop = parent;
-    while ( m_parentTop && m_parentTop->GetParent() )
-    {
-        m_parentTop = m_parentTop->GetParent();
-    }
+    m_parentTop = wxGetTopLevelParent(parent);
 
     wxLayoutConstraints *c;
 
@@ -144,8 +140,8 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
 
     if ( maximum > 0 )
     {
-        // note that we can't use wxGA_SMOOTH because it happens to also mean
-        // wxDIALOG_MODAL and will cause the dialog to be modal. Have an extra
+        // note that we can't use wxGA_SMOOTH because it happens to
+        // cause the dialog to be modal. Have an extra
         // style argument to wxProgressDialog, perhaps.
         m_gauge = new wxGauge(this, -1, m_maximum,
                               wxDefaultPosition, wxDefaultSize,