projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Optionally return length from wxLoadUserResource().
[wxWidgets.git]
/
src
/
msw
/
wince
/
filedlgwce.cpp
diff --git
a/src/msw/wince/filedlgwce.cpp
b/src/msw/wince/filedlgwce.cpp
index bb0a24773b6004943f198c90c2c639d8750dd436..6ad061639eb1a1dcbd6e804c2cd53fa769ea8b6b 100644
(file)
--- a/
src/msw/wince/filedlgwce.cpp
+++ b/
src/msw/wince/filedlgwce.cpp
@@
-1,6
+1,6
@@
/////////////////////////////////////////////////////////////////////////////
// Name: src/msw/wince/filedlgwce.cpp
/////////////////////////////////////////////////////////////////////////////
// Name: src/msw/wince/filedlgwce.cpp
-// Purpose: wxFileDialog
for WinCE (SmartPhone)
+// Purpose: wxFileDialog
implementation for smart phones driven by WinCE
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
@@
-17,10
+17,6
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "filedlg.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-31,13
+27,14
@@
// Only use this for MS SmartPhone. Use standard file dialog
// for Pocket PC.
// Only use this for MS SmartPhone. Use standard file dialog
// for Pocket PC.
-#if wxUSE_FILEDLG && defined(__SMARTPHONE__)
+#if wxUSE_FILEDLG && defined(__SMARTPHONE__) && defined(__WXWINCE__)
+
+#include "wx/filedlg.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/msgdlg.h"
#include "wx/dialog.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/msgdlg.h"
#include "wx/dialog.h"
- #include "wx/filedlg.h"
#include "wx/filefn.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/filefn.h"
#include "wx/intl.h"
#include "wx/log.h"
@@
-71,12
+68,14
@@
wxFileDialog::wxFileDialog(wxWindow *parent,
const wxString& defaultFileName,
const wxString& wildCard,
long style,
const wxString& defaultFileName,
const wxString& wildCard,
long style,
- const wxPoint& WXUNUSED(pos))
+ const wxPoint& WXUNUSED(pos),
+ const wxSize& WXUNUSED(sz),
+ const wxString& WXUNUSED(name))
{
m_message = message;
{
m_message = message;
- m_
dialog
Style = style;
- if ( ( m_
dialogStyle & wxMULTIPLE ) && ( m_dialogStyle & wx
SAVE ) )
- m_
dialogStyle &= ~wx
MULTIPLE;
+ m_
window
Style = style;
+ if ( ( m_
windowStyle & wxFD_MULTIPLE ) && ( m_windowStyle & wxFD_
SAVE ) )
+ m_
windowStyle &= ~wxFD_
MULTIPLE;
m_parent = parent;
m_path = wxEmptyString;
m_fileName = defaultFileName;
m_parent = parent;
m_path = wxEmptyString;
m_fileName = defaultFileName;
@@
-90,8
+89,8
@@
void wxFileDialog::GetPaths(wxArrayString& paths) const
paths.Empty();
wxString dir(m_dir);
paths.Empty();
wxString dir(m_dir);
- if ( m_dir.Last() !=
_
T('\\') )
- dir +=
_
T('\\');
+ if ( m_dir.Last() !=
wx
T('\\') )
+ dir +=
wx
T('\\');
size_t count = m_fileNames.GetCount();
for ( size_t n = 0; n < count; n++ )
size_t count = m_fileNames.GetCount();
for ( size_t n = 0; n < count; n++ )
@@
-106,9
+105,9
@@
void wxFileDialog::GetPaths(wxArrayString& paths) const
void wxFileDialog::SetPath(const wxString& path)
{
wxString ext;
void wxFileDialog::SetPath(const wxString& path)
{
wxString ext;
- wxSplitPath(path, &m_dir, &m_fileName, &ext);
+ wx
FileName::
SplitPath(path, &m_dir, &m_fileName, &ext);
if ( !ext.empty() )
if ( !ext.empty() )
- m_fileName <<
_
T('.') << ext;
+ m_fileName <<
wx
T('.') << ext;
}
int wxFileDialog::ShowModal()
}
int wxFileDialog::ShowModal()
@@
-116,18
+115,14
@@
int wxFileDialog::ShowModal()
wxWindow* parentWindow = GetParent();
if (!parentWindow)
parentWindow = wxTheApp->GetTopWindow();
wxWindow* parentWindow = GetParent();
if (!parentWindow)
parentWindow = wxTheApp->GetTopWindow();
-
+
wxString str = wxGetTextFromUser(m_message, _("File"), m_fileName, parentWindow);
wxString str = wxGetTextFromUser(m_message, _("File"), m_fileName, parentWindow);
- if (str)
- {
- m_fileName = str;
- m_fileNames.Add(str);
- return wxID_OK;
- }
- else
- {
+ if (str.empty())
return wxID_CANCEL;
return wxID_CANCEL;
- }
+
+ m_fileName = str;
+ m_fileNames.Add(str);
+ return wxID_OK;
}
void wxFileDialog::GetFilenames(wxArrayString& files) const
}
void wxFileDialog::GetFilenames(wxArrayString& files) const
@@
-135,5
+130,4
@@
void wxFileDialog::GetFilenames(wxArrayString& files) const
files = m_fileNames;
}
files = m_fileNames;
}
-#endif // wxUSE_FILEDLG
-
+#endif // wxUSE_FILEDLG && __SMARTPHONE__ && __WXWINCE__