X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b135950383287e57c465f19879238fb7150a2fa..faaa88e7abcb48c0564d39f1a69bb3d19df0fe16:/src/motif/filedlg.cpp diff --git a/src/motif/filedlg.cpp b/src/motif/filedlg.cpp index 1684607914..490f92fb23 100644 --- a/src/motif/filedlg.cpp +++ b/src/motif/filedlg.cpp @@ -12,12 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtParent XTPARENT -#define XtWindow XTWINDOW -#endif - #include "wx/filedlg.h" #ifndef WX_PRECOMP @@ -172,12 +166,15 @@ int wxFileDialog::ShowModal() Arg args[10]; int ac = 0; - 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); @@ -234,7 +231,7 @@ int wxFileDialog::ShowModal() if (!m_message.IsNull()) XtVaSetValues(shell, - XmNtitle, wxConstCast(m_message.mb_str(), char), + XmNtitle, (const char*)m_message.mb_str(), NULL); if (!m_wildCard.empty()) @@ -247,7 +244,7 @@ int wxFileDialog::ShowModal() else filter = wildCard; - XmTextSetString(filterWidget, wxConstCast(filter.mb_str(), char)); + XmTextSetString(filterWidget, filter.char_str()); XmFileSelectionDoSearch(fileSel, NULL); } @@ -275,8 +272,7 @@ int wxFileDialog::ShowModal() if (!entirePath.empty()) { - XmTextSetString(selectionWidget, - wxConstCast(entirePath.mb_str(), char)); + XmTextSetString(selectionWidget, entirePath.char_str()); } XtAddCallback(fileSel, XmNcancelCallback,