static wxString ParseWildCard( const wxString& wild )
{
+#ifdef __WXDEBUG__
static const wxChar* msg =
_T("Motif file dialog does not understand this ")
_T("wildcard syntax");
+#endif
wxStringTokenizer tok( wild, _T("|") );
static void wxChangeListBoxColours(wxWindow* WXUNUSED(win), Widget widget)
{
- wxWindow::DoChangeBackgroundColour((WXWidget) widget, *wxWHITE);
+ wxDoChangeBackgroundColour((WXWidget) widget, *wxWHITE);
// Change colour of the scrolled areas of the listboxes
Widget listParent = XtParent (widget);
- wxWindow::DoChangeBackgroundColour((WXWidget) listParent, *wxWHITE, TRUE);
+#if 0
+ wxDoChangeBackgroundColour((WXWidget) listParent, *wxWHITE, TRUE);
+#endif
Widget hsb = (Widget) 0;
Widget vsb = (Widget) 0;
* function to change them (by default, taken from wxSystemSettings)
*/
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
- wxWindow::DoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
- wxWindow::DoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
+ wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
+ wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
if (hsb)
XtVaSetValues (hsb,
Widget shell = XtParent(fileSel);
if (!m_message.IsNull())
- XtVaSetValues(shell, XmNtitle, (char*) (const char*) m_message, NULL);
+ XtVaSetValues(shell,
+ XmNtitle, wxConstCast(m_message.c_str(), char),
+ NULL);
wxString entirePath("");
entirePath = m_fileName;
}
- if (entirePath != "")
- {
- XmTextSetString(selectionWidget, (char*) (const char*) entirePath);
- }
-
if (m_wildCard != "")
{
// return something understandable by Motif
else
filter = wildCard;
- XmTextSetString(filterWidget, (char*)filter.c_str());
+ XmTextSetString(filterWidget, wxConstCast(filter.c_str(), char));
XmFileSelectionDoSearch(fileSel, NULL);
}
// file selector on Solaris 1.5.1.
if ( m_dir != "" )
{
- XmString thePath = XmStringCreateLtoR ((char*) (const char*) m_dir,
- XmSTRING_DEFAULT_CHARSET);
+ wxXmString thePath( m_dir );
XtVaSetValues (fileSel,
- XmNdirectory, thePath,
+ XmNdirectory, thePath(),
NULL);
+ }
- XmStringFree(thePath);
+ if (entirePath != "")
+ {
+ XmTextSetString(selectionWidget,
+ wxConstCast(entirePath.c_str(), char));
}
XtAddCallback(fileSel, XmNcancelCallback, (XtCallbackProc)wxFileSelCancel, (XtPointer)NULL);
XmNresizePolicy, XmRESIZE_NONE,
NULL);
#endif
- // DoChangeBackgroundColour((WXWidget) fileSel, m_backgroundColour);
- DoChangeBackgroundColour((WXWidget) filterWidget, *wxWHITE);
- DoChangeBackgroundColour((WXWidget) selectionWidget, *wxWHITE);
+ // wxDoChangeBackgroundColour((WXWidget) fileSel, m_backgroundColour);
+ wxDoChangeBackgroundColour((WXWidget) filterWidget, *wxWHITE);
+ wxDoChangeBackgroundColour((WXWidget) selectionWidget, *wxWHITE);
wxChangeListBoxColours(this, dirListWidget);
wxChangeListBoxColours(this, fileListWidget);
static wxString
wxDefaultFileSelector(bool load, const char *what, const char *extension, const char *default_name, wxWindow *parent)
{
- char *ext = (char *)extension;
+ char *ext = wxConstCast(extension, char);
wxString prompt;
wxString str;