Removed warning for Darwin compilation from datetime.inl
Added wxFileName::SetPath() and set m_relative if no dir is given Corrected wxFrame::Enable() in wxMac. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -54,12 +54,12 @@ inline wxDateTime wxDateTime::Now()
|
|||||||
/* static */
|
/* static */
|
||||||
inline wxDateTime wxDateTime::Today()
|
inline wxDateTime wxDateTime::Today()
|
||||||
{
|
{
|
||||||
struct tm *tm = GetTmNow();
|
struct tm *time = GetTmNow();
|
||||||
tm->tm_hour =
|
time->tm_hour = 0;
|
||||||
tm->tm_min =
|
time->tm_min = 0;
|
||||||
tm->tm_sec = 0;
|
time->tm_sec = 0;
|
||||||
|
|
||||||
return wxDateTime(*tm);
|
return wxDateTime(*time);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
|
#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
|
||||||
|
@@ -259,8 +259,6 @@ public:
|
|||||||
bool operator==(const wxString& filename)
|
bool operator==(const wxString& filename)
|
||||||
{ return *this == wxFileName(filename); }
|
{ return *this == wxFileName(filename); }
|
||||||
|
|
||||||
// Tests
|
|
||||||
|
|
||||||
// are the file names of this type cases sensitive?
|
// are the file names of this type cases sensitive?
|
||||||
static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE );
|
static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE );
|
||||||
|
|
||||||
@@ -271,6 +269,12 @@ public:
|
|||||||
// is this filename relative?
|
// is this filename relative?
|
||||||
bool IsRelative() const
|
bool IsRelative() const
|
||||||
{ return m_relative; }
|
{ return m_relative; }
|
||||||
|
|
||||||
|
// forcibly set the flag
|
||||||
|
void SetAbsolute()
|
||||||
|
{ m_relative = FALSE; }
|
||||||
|
void SetRelative()
|
||||||
|
{ m_relative = TRUE; }
|
||||||
|
|
||||||
// Information about path format
|
// Information about path format
|
||||||
|
|
||||||
@@ -315,6 +319,8 @@ public:
|
|||||||
// Construct path only - possibly with the trailing separator
|
// Construct path only - possibly with the trailing separator
|
||||||
wxString GetPath( bool add_separator = FALSE,
|
wxString GetPath( bool add_separator = FALSE,
|
||||||
wxPathFormat format = wxPATH_NATIVE ) const;
|
wxPathFormat format = wxPATH_NATIVE ) const;
|
||||||
|
// Replace current path with this one
|
||||||
|
void SetPath( const wxString &path, wxPathFormat format = wxPATH_NATIVE );
|
||||||
|
|
||||||
// more readable synonym
|
// more readable synonym
|
||||||
wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const
|
wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) AUTHOR
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_FRAME_H_
|
#ifndef _WX_FRAME_H_
|
||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
// override some more virtuals
|
// override some more virtuals
|
||||||
virtual bool Enable(bool enable) ;
|
virtual bool Enable(bool enable = TRUE) ;
|
||||||
|
|
||||||
// get the origin of the client area (which may be different from (0, 0)
|
// get the origin of the client area (which may be different from (0, 0)
|
||||||
// if the frame has a toolbar) in client coordinates
|
// if the frame has a toolbar) in client coordinates
|
||||||
|
@@ -231,6 +231,15 @@ void wxFileName::Assign(const wxString& volume,
|
|||||||
const wxString& name,
|
const wxString& name,
|
||||||
const wxString& ext,
|
const wxString& ext,
|
||||||
wxPathFormat format )
|
wxPathFormat format )
|
||||||
|
{
|
||||||
|
SetPath( path, format );
|
||||||
|
|
||||||
|
m_volume = volume;
|
||||||
|
m_ext = ext;
|
||||||
|
m_name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxFileName::SetPath( const wxString &path, wxPathFormat format )
|
||||||
{
|
{
|
||||||
wxPathFormat my_format = GetFormat( format );
|
wxPathFormat my_format = GetFormat( format );
|
||||||
wxString my_path = path;
|
wxString my_path = path;
|
||||||
@@ -297,10 +306,10 @@ void wxFileName::Assign(const wxString& volume,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
m_volume = volume;
|
{
|
||||||
m_ext = ext;
|
m_relative = TRUE;
|
||||||
m_name = name;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFileName::Assign(const wxString& fullpath,
|
void wxFileName::Assign(const wxString& fullpath,
|
||||||
|
Reference in New Issue
Block a user