X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06cc1fb991aa0b6ec8966627d3c6d6bd0ade04be..245f35816d761212279e8cf223475efb7a367553:/src/generic/filedlgg.cpp
diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp
index 9d744f9b12..efc8f3e290 100644
--- a/src/generic/filedlgg.cpp
+++ b/src/generic/filedlgg.cpp
@@ -145,7 +145,7 @@ int wxFileDataTimeCompare( long data1, long data2, long data)
#define IsTopMostDir(dir) (dir.IsEmpty())
#endif
-#if defined(__DOS__) || defined(__WINDOWS__)
+#if defined(__DOS__) || defined(__WINDOWS__) || defined(__OS2__)
// defined in src/generic/dirctrlg.cpp
extern bool wxIsDriveAvailable(const wxString& dirName);
#endif
@@ -253,24 +253,25 @@ wxString wxFileData::GetHint() const
{
wxString s = m_filePath;
s += wxT(" ");
+
if (IsDir())
- s += wxT("
");
+ s += _("");
else if (IsLink())
- s += wxT(" ");
+ s += _("");
else if (IsDrive())
+ s += _("");
+ else // plain file
+ s += wxString::Format( _("%ld bytes"), m_size );
+
+ s += wxT(' ');
+
+ if ( !IsDrive() )
{
- s += wxT(" ");
- return s;
- }
- else
- {
- s += LongToString( m_size );
- s += wxT(" bytes ");
+ s << GetModificationTime()
+ << wxT(" ")
+ << m_permissions;
}
- s += GetModificationTime();
- s += wxT(" ");
- s += m_permissions;
return s;
};
@@ -872,7 +873,7 @@ wxGenericFileDialog::wxGenericFileDialog(wxWindow *parent,
m_filterExtension = wxEmptyString;
// layout
-
+
bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );
@@ -987,8 +988,6 @@ wxGenericFileDialog::wxGenericFileDialog(wxWindow *parent,
mainsizer->Add( choicesizer, 0, wxEXPAND );
}
- // FIXME - memory leaks!!
-
m_choice->Append( firstWildText, (void*) new wxString( firstWild ) );
while (tokens.HasMoreTokens())
{