X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b126fe3ae2ef2717e8ec2491cb50fa418492e8c8..993da3969b28e4f80b492cc26114fb0e151163cb:/src/generic/dirctrlg.cpp?ds=inline diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index bf16d8a0df..77ae7aa640 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -525,10 +525,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrl, wxControl) #endif BEGIN_EVENT_TABLE(wxGenericDirCtrl, wxControl) - EVT_TREE_ITEM_EXPANDING (-1, wxGenericDirCtrl::OnExpandItem) - EVT_TREE_ITEM_COLLAPSED (-1, wxGenericDirCtrl::OnCollapseItem) - EVT_TREE_BEGIN_LABEL_EDIT (-1, wxGenericDirCtrl::OnBeginEditItem) - EVT_TREE_END_LABEL_EDIT (-1, wxGenericDirCtrl::OnEndEditItem) + EVT_TREE_ITEM_EXPANDING (wxID_TREECTRL, wxGenericDirCtrl::OnExpandItem) + EVT_TREE_ITEM_COLLAPSED (wxID_TREECTRL, wxGenericDirCtrl::OnCollapseItem) + EVT_TREE_BEGIN_LABEL_EDIT (wxID_TREECTRL, wxGenericDirCtrl::OnBeginEditItem) + EVT_TREE_END_LABEL_EDIT (wxID_TREECTRL, wxGenericDirCtrl::OnEndEditItem) EVT_SIZE (wxGenericDirCtrl::OnSize) END_EVENT_TABLE() @@ -1528,7 +1528,7 @@ wxImageList *wxFileIconsTable::GetSmallImageList() return m_smallImageList; } -#if wxUSE_MIMETYPE +#if wxUSE_MIMETYPE && wxUSE_IMAGE // VS: we don't need this function w/o wxMimeTypesManager because we'll only have // one icon and we won't resize it @@ -1680,10 +1680,11 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime) const unsigned int size = 16; int id = m_smallImageList->GetImageCount(); - if ((bmp.GetWidth() == size) && (bmp.GetHeight() == size)) + if ((bmp.GetWidth() == (int) size) && (bmp.GetHeight() == (int) size)) { m_smallImageList->Add(bmp); } +#if wxUSE_IMAGE else { wxImage img = bmp.ConvertToImage(); @@ -1694,7 +1695,8 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime) else m_smallImageList->Add(CreateAntialiasedBitmap(img)); } - +#endif // wxUSE_IMAGE + m_HashTable->Put(extension, new wxFileIconEntry(id)); return id;