*** empty log message ***
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
// Name: ownerdrw.h
|
// Name: ownerdrw.h
|
||||||
// Purpose: interface for owner-drawn GUI elements
|
// Purpose: interface for owner-drawn GUI elements
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 11.11.97
|
// Created: 11.11.97
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
wxColour& GetBackgroundColour() const
|
wxColour& GetBackgroundColour() const
|
||||||
{ return (wxColour&) m_colBack ; }
|
{ return (wxColour&) m_colBack ; }
|
||||||
|
|
||||||
void SetBitmaps(const wxBitmap& bmpChecked,
|
void SetBitmaps(const wxBitmap& bmpChecked,
|
||||||
const wxBitmap& bmpUnchecked = wxNullBitmap)
|
const wxBitmap& bmpUnchecked = wxNullBitmap)
|
||||||
{ m_bmpChecked = bmpChecked;
|
{ m_bmpChecked = bmpChecked;
|
||||||
m_bmpUnchecked = bmpUnchecked;
|
m_bmpUnchecked = bmpUnchecked;
|
||||||
@@ -94,10 +94,10 @@ public:
|
|||||||
// constants used in OnDrawItem
|
// constants used in OnDrawItem
|
||||||
// (they have the same values as corresponding Win32 constants)
|
// (they have the same values as corresponding Win32 constants)
|
||||||
enum wxODAction
|
enum wxODAction
|
||||||
{
|
{
|
||||||
wxODDrawAll = 0x0001, // redraw entire control
|
wxODDrawAll = 0x0001, // redraw entire control
|
||||||
wxODSelectChanged = 0x0002, // selection changed (see Status.Select)
|
wxODSelectChanged = 0x0002, // selection changed (see Status.Select)
|
||||||
wxODFocusChanged = 0x0004, // keyboard focus changed (see Status.Focus)
|
wxODFocusChanged = 0x0004 // keyboard focus changed (see Status.Focus)
|
||||||
};
|
};
|
||||||
|
|
||||||
enum wxODStatus
|
enum wxODStatus
|
||||||
@@ -107,7 +107,7 @@ public:
|
|||||||
wxODDisabled = 0x0004, // item is to be drawn as disabled
|
wxODDisabled = 0x0004, // item is to be drawn as disabled
|
||||||
wxODChecked = 0x0008, // item is to be checked
|
wxODChecked = 0x0008, // item is to be checked
|
||||||
wxODHasFocus = 0x0010, // item has the keyboard focus
|
wxODHasFocus = 0x0010, // item has the keyboard focus
|
||||||
wxODDefault = 0x0020, // item is the default item
|
wxODDefault = 0x0020 // item is the default item
|
||||||
};
|
};
|
||||||
|
|
||||||
// virtual functions to implement drawing (return TRUE if processed)
|
// virtual functions to implement drawing (return TRUE if processed)
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
#include "wx/generic/prntdlgg.h"
|
#include "wx/generic/prntdlgg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__WXMSW__) && !defined(__WXMAC__)
|
#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXPM__)
|
||||||
#define wxPrintDialog wxGenericPrintDialog
|
#define wxPrintDialog wxGenericPrintDialog
|
||||||
#define sm_classwxPrintDialog sm_classwxGenericPrintDialog
|
#define sm_classwxPrintDialog sm_classwxGenericPrintDialog
|
||||||
|
|
||||||
|
@@ -32,11 +32,6 @@
|
|||||||
#include "wx/msw/winundef.h"
|
#include "wx/msw/winundef.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WXPM__
|
|
||||||
#define INCL_OS2
|
|
||||||
#include <os2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
|
|
||||||
|
|
||||||
|
@@ -42,6 +42,7 @@
|
|||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
#include "wx/mdi.h"
|
#include "wx/mdi.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -834,7 +835,7 @@ void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
wxPrintDialogData data;
|
wxPrintDialogData data;
|
||||||
|
|
||||||
wxPrintDialog printerDialog(parentWin, & data);
|
wxPrintDialog printerDialog(parentWin, &data);
|
||||||
printerDialog.GetPrintDialogData().SetSetupDialog(TRUE);
|
printerDialog.GetPrintDialogData().SetSetupDialog(TRUE);
|
||||||
printerDialog.ShowModal();
|
printerDialog.ShowModal();
|
||||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_DYNLIB_CLASS
|
#if wxUSE_DYNLIB_CLASS
|
||||||
|
|
||||||
#include "wx/dynlib.h"
|
#include "wx/dynlib.h"
|
||||||
@@ -66,6 +65,14 @@
|
|||||||
# endif // Win32/16
|
# endif // Win32/16
|
||||||
# define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name)
|
# define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name)
|
||||||
# define wxDllClose ::FreeLibrary
|
# define wxDllClose ::FreeLibrary
|
||||||
|
|
||||||
|
#elif defined(__OS2__)
|
||||||
|
|
||||||
|
# define INCL_DOS
|
||||||
|
# include <os2.h>
|
||||||
|
# define wxDllOpen(error, lib, handle) DosLoadModule(error, sizeof(error), lib, &handle)
|
||||||
|
# define wxDllGetSymbol(handle, modaddr) DosQueryProcAddr(handle, 1L, NULL, (PFN*)modaddr)
|
||||||
|
# define wxDllClose(handle) DosFreeModule(handle)
|
||||||
#else
|
#else
|
||||||
# error "Don't know how to load shared libraries on this platform."
|
# error "Don't know how to load shared libraries on this platform."
|
||||||
#endif // OS
|
#endif // OS
|
||||||
@@ -92,7 +99,7 @@ static wxString ConstructLibraryName(const wxString& basename)
|
|||||||
# else //__HPUX__
|
# else //__HPUX__
|
||||||
fullname << ".so";
|
fullname << ".so";
|
||||||
# endif //__HPUX__
|
# endif //__HPUX__
|
||||||
#elif defined(__WINDOWS__)
|
#elif defined(__WINDOWS__) || defined(__OS2__)
|
||||||
fullname << ".dll";
|
fullname << ".dll";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -179,7 +186,7 @@ wxDllLoader::GetProgramHandle(void)
|
|||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/);
|
return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/);
|
||||||
#else
|
#else
|
||||||
wxFAIL_MSG(_("This method is not implemented under Windows"));
|
wxFAIL_MSG(_("This method is not implemented under Windows or OS/2"));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -204,6 +211,9 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
|
|||||||
wxASSERT_MSG( 1 , (char*)myErrName ) ;
|
wxASSERT_MSG( 1 , (char*)myErrName ) ;
|
||||||
return NULL ;
|
return NULL ;
|
||||||
}
|
}
|
||||||
|
#elif defined(__OS2__)
|
||||||
|
char zError[256] = "";
|
||||||
|
wxDllOpen(zError, libname, handle);
|
||||||
#else // !Mac
|
#else // !Mac
|
||||||
handle = wxDllOpen(libname);
|
handle = wxDllOpen(libname);
|
||||||
#endif // OS
|
#endif // OS
|
||||||
@@ -245,6 +255,8 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
|
|||||||
|
|
||||||
if ( FindSymbol( dllHandle , symName , &symAddress , &symClass ) == noErr )
|
if ( FindSymbol( dllHandle , symName , &symAddress , &symClass ) == noErr )
|
||||||
symbol = (void *)symAddress ;
|
symbol = (void *)symAddress ;
|
||||||
|
#elif defined( __OS2__ )
|
||||||
|
wxDllGetSymbol(dllHandle, symbol);
|
||||||
#else
|
#else
|
||||||
symbol = wxDllGetSymbol(dllHandle, name);
|
symbol = wxDllGetSymbol(dllHandle, name);
|
||||||
#endif
|
#endif
|
||||||
@@ -283,9 +295,14 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
|
|||||||
wxLibrary *lib;
|
wxLibrary *lib;
|
||||||
wxClassInfo *old_sm_first;
|
wxClassInfo *old_sm_first;
|
||||||
|
|
||||||
|
#if defined(__VISAGECPP__)
|
||||||
|
node = m_loaded.Find(name.GetData());
|
||||||
|
if (node != NULL)
|
||||||
|
return ((wxLibrary *)node->Data());
|
||||||
|
#else // !OS/2
|
||||||
if ( (node = m_loaded.Find(name.GetData())) )
|
if ( (node = m_loaded.Find(name.GetData())) )
|
||||||
return ((wxLibrary *)node->Data());
|
return ((wxLibrary *)node->Data());
|
||||||
|
#endif
|
||||||
// If DLL shares data, this is necessary.
|
// If DLL shares data, this is necessary.
|
||||||
old_sm_first = wxClassInfo::sm_first;
|
old_sm_first = wxClassInfo::sm_first;
|
||||||
wxClassInfo::sm_first = NULL;
|
wxClassInfo::sm_first = NULL;
|
||||||
|
@@ -60,6 +60,11 @@
|
|||||||
#ifdef __GNUWIN32__
|
#ifdef __GNUWIN32__
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
#elif (defined(__WXPM__))
|
||||||
|
#include <io.h>
|
||||||
|
#include <direct.h>
|
||||||
|
#define W_OK 2
|
||||||
|
#define R_OK 4
|
||||||
#elif (defined(__WXSTUBS__))
|
#elif (defined(__WXSTUBS__))
|
||||||
// Have to ifdef this for different environments
|
// Have to ifdef this for different environments
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
@@ -479,6 +484,13 @@ bool wxTempFile::Open(const wxString& strName)
|
|||||||
static const wxChar *szMktempSuffix = _T("XXXXXX");
|
static const wxChar *szMktempSuffix = _T("XXXXXX");
|
||||||
m_strTemp << strName << szMktempSuffix;
|
m_strTemp << strName << szMktempSuffix;
|
||||||
mktemp(MBSTRINGCAST m_strTemp.mb_str()); // will do because length doesn't change
|
mktemp(MBSTRINGCAST m_strTemp.mb_str()); // will do because length doesn't change
|
||||||
|
#elif defined(__WXPM__)
|
||||||
|
// for now just create a file
|
||||||
|
// future enhancements can be to set some extended attributes for file systems
|
||||||
|
// OS/2 supports that have them (HPFS, FAT32) and security (HPFS386)
|
||||||
|
static const wxChar *szMktempSuffix = _T("XXX");
|
||||||
|
m_strTemp << strName << szMktempSuffix;
|
||||||
|
mkdir(m_strTemp.GetWriteBuf(MAX_PATH));
|
||||||
#else // Windows
|
#else // Windows
|
||||||
wxString strPath;
|
wxString strPath;
|
||||||
wxSplitPath(strName, &strPath, NULL, NULL);
|
wxSplitPath(strName, &strPath, NULL, NULL);
|
||||||
|
@@ -46,6 +46,13 @@
|
|||||||
#if defined(__WXMSW__) && !defined(_WINDOWS_)
|
#if defined(__WXMSW__) && !defined(_WINDOWS_)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif //windows.h
|
#endif //windows.h
|
||||||
|
#if defined(__WXPM__)
|
||||||
|
#define INCL_DOS
|
||||||
|
#include <os2.h>
|
||||||
|
#define LINKAGEMODE _Optlink
|
||||||
|
#else
|
||||||
|
#define LINKAGEMODE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -67,8 +74,8 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// compare functions for sorting the arrays
|
// compare functions for sorting the arrays
|
||||||
static int CompareEntries(ConfigEntry *p1, ConfigEntry *p2);
|
static int LINKAGEMODE CompareEntries(ConfigEntry *p1, ConfigEntry *p2);
|
||||||
static int CompareGroups(ConfigGroup *p1, ConfigGroup *p2);
|
static int LINKAGEMODE CompareGroups(ConfigGroup *p1, ConfigGroup *p2);
|
||||||
|
|
||||||
// filter strings
|
// filter strings
|
||||||
static wxString FilterInValue(const wxString& str);
|
static wxString FilterInValue(const wxString& str);
|
||||||
@@ -93,6 +100,97 @@ wxString wxFileConfig::GetGlobalDir()
|
|||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
strDir = _T("/etc/");
|
strDir = _T("/etc/");
|
||||||
|
#elif defined(__WXPM__)
|
||||||
|
ULONG aulSysInfo[QSV_MAX] = {0};
|
||||||
|
UINT drive;
|
||||||
|
APIRET rc;
|
||||||
|
|
||||||
|
rc = DosQuerySysInfo( 1L, QSV_MAX, (PVOID)aulSysInfo, sizeof(ULONG)*QSV_MAX);
|
||||||
|
if (rc == 0)
|
||||||
|
{
|
||||||
|
drive = aulSysInfo[QSV_BOOT_DRIVE - 1];
|
||||||
|
switch(drive)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
strDir = "A:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
strDir = "B:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
strDir = "C:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
strDir = "D:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
strDir = "E:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
strDir = "F:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
strDir = "G:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
strDir = "H:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
strDir = "I:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
strDir = "J:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
strDir = "K:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
strDir = "L:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
strDir = "M:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
strDir = "N:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
strDir = "O:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
strDir = "P:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
strDir = "Q:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
strDir = "R:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
strDir = "S:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
strDir = "T:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
strDir = "U:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
strDir = "V:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
strDir = "W:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
strDir = "X:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
strDir = "Y:\\OS2\\";
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
strDir = "Z:\\OS2\\";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
#elif defined(__WXSTUBS__)
|
#elif defined(__WXSTUBS__)
|
||||||
wxASSERT_MSG( FALSE, _T("TODO") ) ;
|
wxASSERT_MSG( FALSE, _T("TODO") ) ;
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
|
@@ -58,6 +58,10 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __OS2__
|
||||||
|
#include <direct.h>
|
||||||
|
#include <process.h>
|
||||||
|
#endif
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
|
#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
@@ -471,8 +475,25 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Expand inline environment variables */
|
/* Expand inline environment variables */
|
||||||
|
#ifdef __VISAGECPP__
|
||||||
|
while (*d)
|
||||||
|
{
|
||||||
|
*d++ = *s;
|
||||||
|
if(*s == _T('\\'))
|
||||||
|
{
|
||||||
|
*(d - 1) = *++s;
|
||||||
|
if (*d)
|
||||||
|
{
|
||||||
|
s++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#else
|
||||||
while ((*d++ = *s)) {
|
while ((*d++ = *s)) {
|
||||||
#ifndef __WXMSW__
|
# ifndef __WXMSW__
|
||||||
if (*s == _T('\\')) {
|
if (*s == _T('\\')) {
|
||||||
if ((*(d - 1) = *++s)) {
|
if ((*(d - 1) = *++s)) {
|
||||||
s++;
|
s++;
|
||||||
@@ -480,6 +501,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
if (*s++ == _T('$') && (*s == _T('{') || *s == _T(')')))
|
if (*s++ == _T('$') && (*s == _T('{') || *s == _T(')')))
|
||||||
@@ -490,7 +512,13 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
register wxChar *start = d;
|
register wxChar *start = d;
|
||||||
register int braces = (*s == _T('{') || *s == _T('('));
|
register int braces = (*s == _T('{') || *s == _T('('));
|
||||||
register wxChar *value;
|
register wxChar *value;
|
||||||
|
#ifdef __VISAGECPP__
|
||||||
|
// VA gives assignment in logical expr warning
|
||||||
|
while (*d)
|
||||||
|
*d++ = *s;
|
||||||
|
#else
|
||||||
while ((*d++ = *s))
|
while ((*d++ = *s))
|
||||||
|
#endif
|
||||||
if (braces ? (*s == _T('}') || *s == _T(')')) : !(wxIsalnum(*s) || *s == _T('_')) )
|
if (braces ? (*s == _T('}') || *s == _T(')')) : !(wxIsalnum(*s) || *s == _T('_')) )
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
@@ -498,7 +526,12 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
*--d = 0;
|
*--d = 0;
|
||||||
value = wxGetenv(braces ? start + 1 : start);
|
value = wxGetenv(braces ? start + 1 : start);
|
||||||
if (value) {
|
if (value) {
|
||||||
|
#ifdef __VISAGECPP__
|
||||||
|
// VA gives assignment in logical expr warning
|
||||||
|
for ((d = start - 1); (*d); *d++ = *value++);
|
||||||
|
#else
|
||||||
for ((d = start - 1); (*d++ = *value++););
|
for ((d = start - 1); (*d++ = *value++););
|
||||||
|
#endif
|
||||||
d--;
|
d--;
|
||||||
if (braces && *s)
|
if (braces && *s)
|
||||||
s++;
|
s++;
|
||||||
@@ -550,8 +583,13 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
*(d - 1) = SEP;
|
*(d - 1) = SEP;
|
||||||
}
|
}
|
||||||
s = nm;
|
s = nm;
|
||||||
|
#ifdef __VISAGECPP__
|
||||||
|
// VA gives assignment in logical expr warning
|
||||||
|
while (*d)
|
||||||
|
*d++ = *s++;
|
||||||
|
#else
|
||||||
while ((*d++ = *s++));
|
while ((*d++ = *s++));
|
||||||
|
#endif
|
||||||
delete[] nm_tmp; // clean up alloc
|
delete[] nm_tmp; // clean up alloc
|
||||||
/* Now clean up the buffer */
|
/* Now clean up the buffer */
|
||||||
return wxRealPath(buf);
|
return wxRealPath(buf);
|
||||||
@@ -632,7 +670,7 @@ wxChar *wxFileNameFromPath (wxChar *path)
|
|||||||
#endif
|
#endif
|
||||||
return tcp + 1;
|
return tcp + 1;
|
||||||
} /* while */
|
} /* while */
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
if (wxIsalpha (*path) && *(path + 1) == _T(':'))
|
if (wxIsalpha (*path) && *(path + 1) == _T(':'))
|
||||||
return path + 2;
|
return path + 2;
|
||||||
#endif
|
#endif
|
||||||
@@ -659,7 +697,7 @@ wxString wxFileNameFromPath (const wxString& path1)
|
|||||||
#endif
|
#endif
|
||||||
return wxString(tcp + 1);
|
return wxString(tcp + 1);
|
||||||
} /* while */
|
} /* while */
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
if (wxIsalpha (*path) && *(path + 1) == _T(':'))
|
if (wxIsalpha (*path) && *(path + 1) == _T(':'))
|
||||||
return wxString(path + 2);
|
return wxString(path + 2);
|
||||||
#endif
|
#endif
|
||||||
@@ -703,7 +741,7 @@ wxPathOnly (wxChar *path)
|
|||||||
else i --;
|
else i --;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
// Try Drive specifier
|
// Try Drive specifier
|
||||||
if (wxIsalpha (buf[0]) && buf[1] == _T(':'))
|
if (wxIsalpha (buf[0]) && buf[1] == _T(':'))
|
||||||
{
|
{
|
||||||
@@ -751,7 +789,7 @@ wxString wxPathOnly (const wxString& path)
|
|||||||
else i --;
|
else i --;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
// Try Drive specifier
|
// Try Drive specifier
|
||||||
if (wxIsalpha (buf[0]) && buf[1] == _T(':'))
|
if (wxIsalpha (buf[0]) && buf[1] == _T(':'))
|
||||||
{
|
{
|
||||||
@@ -830,7 +868,7 @@ wxDos2UnixFilename (wxChar *s)
|
|||||||
{
|
{
|
||||||
if (*s == _T('\\'))
|
if (*s == _T('\\'))
|
||||||
*s = _T('/');
|
*s = _T('/');
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
else
|
else
|
||||||
*s = wxTolower(*s); // Case INDEPENDENT
|
*s = wxTolower(*s); // Case INDEPENDENT
|
||||||
#endif
|
#endif
|
||||||
@@ -839,14 +877,14 @@ wxDos2UnixFilename (wxChar *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
wxUnix2DosFilename (wxChar *s)
|
wxUnix2DosFilename (wxChar *s)
|
||||||
#else
|
#else
|
||||||
wxUnix2DosFilename (wxChar *WXUNUSED(s))
|
wxUnix2DosFilename (wxChar *WXUNUSED(s))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// Yes, I really mean this to happen under DOS only! JACS
|
// Yes, I really mean this to happen under DOS only! JACS
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
if (s)
|
if (s)
|
||||||
while (*s)
|
while (*s)
|
||||||
{
|
{
|
||||||
@@ -992,12 +1030,12 @@ bool wxMkdir(const wxString& dir, int perm)
|
|||||||
const wxChar *dirname = dir.c_str();
|
const wxChar *dirname = dir.c_str();
|
||||||
#endif // Mac/!Mac
|
#endif // Mac/!Mac
|
||||||
|
|
||||||
// assume mkdir() has 2 args on non Windows platforms and on Windows too
|
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
|
||||||
// for the GNU compiler
|
// for the GNU compiler
|
||||||
#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__)
|
#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__)
|
||||||
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
|
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
|
||||||
#else // MSW
|
#else // MSW and OS/2
|
||||||
if ( mkdir(wxFNCONV(dirname)) != 0 )
|
if ( mkdir((char*)wxFNCONV(dirname)) != 0 )
|
||||||
#endif // !MSW/MSW
|
#endif // !MSW/MSW
|
||||||
{
|
{
|
||||||
wxLogSysError(_("Directory '%s' couldn't be created"), dirname);
|
wxLogSysError(_("Directory '%s' couldn't be created"), dirname);
|
||||||
@@ -1464,8 +1502,8 @@ wxString wxGetCwd()
|
|||||||
|
|
||||||
bool wxSetWorkingDirectory(const wxString& d)
|
bool wxSetWorkingDirectory(const wxString& d)
|
||||||
{
|
{
|
||||||
#if defined( __UNIX__ ) || defined( __WXMAC__ )
|
#if defined( __UNIX__ ) || defined( __WXMAC__ ) || defined(__WXPM__)
|
||||||
return (chdir(d.fn_str()) == 0);
|
return (chdir((char*)d.fn_str()) == 0);
|
||||||
#elif defined(__WINDOWS__)
|
#elif defined(__WINDOWS__)
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
@@ -1581,7 +1619,7 @@ void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName,
|
|||||||
pDot = NULL;
|
pDot = NULL;
|
||||||
}
|
}
|
||||||
#endif // MSW/Unix
|
#endif // MSW/Unix
|
||||||
|
|
||||||
if ( pDot < pLastSeparator )
|
if ( pDot < pLastSeparator )
|
||||||
{
|
{
|
||||||
// the dot is part of the path, not the start of the extension
|
// the dot is part of the path, not the start of the extension
|
||||||
@@ -1590,7 +1628,7 @@ void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName,
|
|||||||
|
|
||||||
if ( pstrPath )
|
if ( pstrPath )
|
||||||
{
|
{
|
||||||
if ( pLastSeparator )
|
if ( pLastSeparator )
|
||||||
*pstrPath = wxString(pszFileName, pLastSeparator - pszFileName);
|
*pstrPath = wxString(pszFileName, pLastSeparator - pszFileName);
|
||||||
else
|
else
|
||||||
pstrPath->Empty();
|
pstrPath->Empty();
|
||||||
|
Reference in New Issue
Block a user