X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7520f3da332d64a676b6f7d27a56004fabf2db36..bba35861478a26f5d8c756a9a7fa2bbd19a69cb1:/src/motif/filedlg.cpp diff --git a/src/motif/filedlg.cpp b/src/motif/filedlg.cpp index 3ac03441b9..490f92fb23 100644 --- a/src/motif/filedlg.cpp +++ b/src/motif/filedlg.cpp @@ -12,17 +12,15 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtDisplay XTDISPLAY -#define XtParent XTPARENT -#define XtWindow XTWINDOW +#include "wx/filedlg.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/settings.h" #endif -#include "wx/utils.h" -#include "wx/filedlg.h" -#include "wx/intl.h" -#include "wx/app.h" -#include "wx/settings.h" #include "wx/tokenzr.h" #include "wx/stockitem.h" @@ -113,8 +111,8 @@ static wxString ParseWildCard( const wxString& wild ) wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, - long style, const wxPoint& pos) - :wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos) + long style, const wxPoint& pos, const wxSize& sz, const wxString& name) + :wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name) { m_filterIndex = 1; } @@ -168,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); @@ -230,7 +231,7 @@ int wxFileDialog::ShowModal() if (!m_message.IsNull()) XtVaSetValues(shell, - XmNtitle, wxConstCast(m_message.c_str(), char), + XmNtitle, (const char*)m_message.mb_str(), NULL); if (!m_wildCard.empty()) @@ -243,7 +244,7 @@ int wxFileDialog::ShowModal() else filter = wildCard; - XmTextSetString(filterWidget, wxConstCast(filter.c_str(), char)); + XmTextSetString(filterWidget, filter.char_str()); XmFileSelectionDoSearch(fileSel, NULL); } @@ -271,8 +272,7 @@ int wxFileDialog::ShowModal() if (!entirePath.empty()) { - XmTextSetString(selectionWidget, - wxConstCast(entirePath.c_str(), char)); + XmTextSetString(selectionWidget, entirePath.char_str()); } XtAddCallback(fileSel, XmNcancelCallback,