fix for wxUniversal on win32 platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,7 +14,9 @@ enum
|
|||||||
wxCHANGE_DIR = 0x0040
|
wxCHANGE_DIR = 0x0040
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined (__WXUNIVERSAL__)
|
||||||
|
#include "wx/generic/filedlgg.h"
|
||||||
|
#elif defined(__WXMSW__)
|
||||||
#include "wx/msw/filedlg.h"
|
#include "wx/msw/filedlg.h"
|
||||||
#elif defined(__WXMOTIF__)
|
#elif defined(__WXMOTIF__)
|
||||||
#include "wx/motif/filedlg.h"
|
#include "wx/motif/filedlg.h"
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
#if wxUSE_FILEDLG
|
#if wxUSE_FILEDLG
|
||||||
|
|
||||||
#if !defined(__UNIX__) && !defined(__DOS__)
|
#if !defined(__UNIX__) && !defined(__DOS__) && !defined(__WIN32__)
|
||||||
#error wxFileDialog currently only supports Unix and DOS
|
#error wxFileDialog currently only supports Unix, win32 and DOS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/checkbox.h"
|
#include "wx/checkbox.h"
|
||||||
@@ -76,7 +76,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#if defined(__UNIX__) || defined(__DOS__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
@@ -364,7 +366,16 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
|
|||||||
m_HashTable.Put(extension, new wxFileIconEntry(newid));
|
m_HashTable.Put(extension, new wxFileIconEntry(newid));
|
||||||
return newid;
|
return newid;
|
||||||
}
|
}
|
||||||
|
#ifdef __WIN32__
|
||||||
|
wxBitmap myBitmap (ic.GetWidth(), ic.GetHeight() ) ;
|
||||||
|
wxMemoryDC memDC;
|
||||||
|
memDC.SelectObject( myBitmap );
|
||||||
|
memDC.DrawIcon(ic,0,0);
|
||||||
|
memDC.SelectObject( wxNullBitmap );
|
||||||
|
wxImage img = myBitmap.ConvertToImage();
|
||||||
|
#else
|
||||||
wxImage img = ic.ConvertToImage();
|
wxImage img = ic.ConvertToImage();
|
||||||
|
#endif
|
||||||
delete ft;
|
delete ft;
|
||||||
|
|
||||||
int id = m_ImageList.GetImageCount();
|
int id = m_ImageList.GetImageCount();
|
||||||
@@ -788,7 +799,7 @@ void wxFileCtrl::UpdateFiles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SortItems(ListCompare, 0);
|
SortItems((wxListCtrlCompare)ListCompare, 0);
|
||||||
|
|
||||||
if ( my_style & wxLC_REPORT )
|
if ( my_style & wxLC_REPORT )
|
||||||
{
|
{
|
||||||
@@ -851,7 +862,7 @@ void wxFileCtrl::MakeDir()
|
|||||||
|
|
||||||
if (id != -1)
|
if (id != -1)
|
||||||
{
|
{
|
||||||
SortItems( ListCompare, 0 );
|
SortItems( (wxListCtrlCompare) ListCompare, 0 );
|
||||||
id = FindItem( 0, (long)fd );
|
id = FindItem( 0, (long)fd );
|
||||||
EnsureVisible( id );
|
EnsureVisible( id );
|
||||||
EditLabel( id );
|
EditLabel( id );
|
||||||
|
Reference in New Issue
Block a user