]> git.saurik.com Git - wxWidgets.git/commitdiff
more 'unreachable code' warnings which had been disabled instead of being fixed
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 8 Oct 2005 18:33:28 +0000 (18:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 8 Oct 2005 18:33:28 +0000 (18:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/dialog.cpp
src/motif/toplevel.cpp

index c230211bfc009d9090abe9a1daa5d292c0b11981..cc38234f56bea14c3cd8776791559d5446a68396 100644 (file)
@@ -105,7 +105,6 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
     m_foregroundColour = *wxBLACK;
 
     Widget dialogShell = (Widget) m_mainWidget;
-    Widget shell = XtParent(dialogShell) ;
 
     SetTitle( title );
 
@@ -131,6 +130,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
     // is managed, so we manage without mapping to the screen.
     // To show, we map the shell (actually it's parent).
 #if !wxUSE_INVISIBLE_RESIZE
+    Widget shell = XtParent(dialogShell) ;
     XtVaSetValues(shell, XmNmappedWhenManaged, False, NULL);
 #endif
 
@@ -194,21 +194,10 @@ bool wxDialog::XmDoCreateTLW(wxWindow* parent,
 
 void wxDialog::SetModal(bool flag)
 {
-#ifdef __VMS
-#pragma message disable codcauunr
-#endif
    if ( flag )
-        m_windowStyle |= wxDIALOG_MODAL ;
-    else
-        if ( m_windowStyle & wxDIALOG_MODAL )
-            m_windowStyle -= wxDIALOG_MODAL ;
-
-        wxModelessWindows.DeleteObject(this);
-        if (!flag)
-            wxModelessWindows.Append(this);
-#ifdef __VMS
-#pragma message enable codcauunr
-#endif
+       wxModelessWindows.DeleteObject(this);
+   else
+       wxModelessWindows.Append(this);
 }
 
 wxDialog::~wxDialog()
index 01342c5b9b9c0bddab92f4f118e4017d59a0bdef..bfa9a8a98213aef0c73df90af30cb1cc92e9c487 100644 (file)
@@ -65,14 +65,7 @@ static void wxTLWEventHandler( Widget wid,
 
 void wxTopLevelWindowMotif::PreDestroy()
 {
-#ifdef __VMS
-#pragma message disable codcauunr
-#endif
-   if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL )
-        wxModelessWindows.DeleteObject(this);
-#ifdef __VMS
-#pragma message enable codcauunr
-#endif
+    wxModelessWindows.DeleteObject(this);
 
     m_icons.m_icons.Empty();