#undef GetFirstChild
#endif
+#ifndef __WXMSW__
/* XPM */
static char * icon1_xpm[] = {
/* width height ncolors chars_per_pixel */
" ",
" "};
+#endif // !wxMSW
+
static const int ID_DIRCTRL = 1000;
static const int ID_TEXTCTRL = 1001;
static const int ID_OK = 1002;
bool wxDirItemData::HasSubDirs()
{
- wxString search = m_path + "/*";
+ wxString search = m_path + wxT("/*");
wxLogNull log;
wxString path = wxFindFirstFile( search, wxDIR );
return (bool)(!path.IsNull());
for (unsigned int i=0; i<m_paths.Count(); i++)
{
- dir_item = new wxDirItemData(m_paths[i],m_names[i]);
+ dir_item = new wxDirItemData(m_paths[i],m_names[i]);
#ifdef __WXMSW__
- id = AppendItem( parent, m_names[i], -1, -1, dir_item);
+ id = AppendItem( parent, m_names[i], -1, -1, dir_item);
#else
- id = AppendItem( parent, m_names[i], 0, 1, dir_item);
+ id = AppendItem( parent, m_names[i], 0, -1, dir_item);
+ SetItemImage( id, 1, wxTreeItemIcon_Expanded );
#endif
if (dir_item->m_hasSubDirs) SetItemHasChildren(id);
}
m_paths.Clear();
m_names.Clear();
+#ifdef __WXMSW__
+ search = data->m_path + "\\*.*";
+#else
search = data->m_path + "/*";
+#endif
for (path = wxFindFirstFile( search, wxDIR ); !path.IsNull();
path=wxFindNextFile() )
{
//-----------------------------------------------------------------------------
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_CLASS(wxDirDialog, wxDialog)
-#else
IMPLEMENT_DYNAMIC_CLASS( wxDirDialog, wxDialog )
-#endif
BEGIN_EVENT_TABLE( wxDirDialog, wxDialog )
EVT_TREE_KEY_DOWN (ID_DIRCTRL, wxDirDialog::OnTreeKeyDown)
do {
new_name = wxT("NewName");
wxString num;
- num.Printf( "%d", i );
+ num.Printf( wxT("%d"), i );
new_name += num;
path = data->m_path;