]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/msgdlg.cpp
added virtual wxFrame::FindItemInMenuBar(): overriding it in wxMDIParentFrame allows...
[wxWidgets.git] / src / motif / msgdlg.cpp
index 3ade9492f5ea11d0746ec0eee441e72326d6822d..f103cfc0d15bc3e7c95a285485082575bd3087b8 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
+    #include "wx/app.h"
+    #include "wx/settings.h"
 #endif
 
-#include "wx/app.h"
 #include "wx/motif/private.h"
-#include "wx/settings.h"
 
 // ----------------------------------------------------------------------------
 // macros
@@ -167,12 +167,15 @@ int wxMessageDialog::ShowModal()
 
     Display* dpy = XtDisplay(wParent);
 
-    wxComputeColours (dpy, & m_backgroundColour, (wxColour*) NULL);
+    if (m_backgroundColour.Ok())
+    {
+        wxComputeColours (dpy, & m_backgroundColour, (wxColour*) NULL);
 
-    XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++;
-    XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++;
-    XtSetArg(args[ac], XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel); ac++;
-    XtSetArg(args[ac], XmNforeground, g_itemColors[wxFORE_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel); ac++;
+        XtSetArg(args[ac], XmNforeground, g_itemColors[wxFORE_INDEX].pixel); ac++;
+    }
 
     wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);