]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/treegtk.cpp
Fix memory leak when a spacer is added, and crash when a window is added before wxSiz...
[wxWidgets.git] / src / gtk1 / treegtk.cpp
index 6d8fa194e161bc0d7feb275b0b1e99208529feeb..0e2ad4c3c8de932a7c43e7e1c69ca38370c67624 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "treectrl.h"
 #endif
 
@@ -25,7 +25,7 @@
 #endif
 
 #include "wx/gtk/treectrl.h"
-#include <wx/textctrl.h>
+#include "wx/textctrl.h"
 #include "wx/log.h"
 
 #include <gtk/gtk.h>
@@ -75,10 +75,8 @@ static void gtk_treeitem_select_callback(GtkWidget *widget, wxTreeItemId *treeit
   owner->SendSelChanged(GTK_TREE_ITEM(widget));
 }
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)
 
-#endif
 
 void wxTreeCtrl::Init() {
   m_imageListNormal = NULL;
@@ -317,7 +315,7 @@ wxTreeItemId wxTreeCtrl::GetSelection() const {
   return p;
 }
 
-wxTreeItemId wxTreeCtrl::GetParent(const wxTreeItemId& item) const {
+wxTreeItemId wxTreeCtrl::GetItemParent(const wxTreeItemId& item) const {
   if (item.IsOk())
     return (GtkTreeItem *)gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "parent");
 
@@ -498,7 +496,7 @@ printf("begin insert\n");
   const wxBitmap *bmp;
   const wxImageList *list;
   if ((list = GetImageList(wxIMAGE_LIST_NORMAL)) != NULL)
-    if ((bmp = list->GetBitmap(image)) != NULL)
+    if ((bmp = list->GetBitmapPtr(image)) != NULL)
       if (bmp->Ok()) {
         GdkBitmap *mask = NULL;
         if (bmp->GetMask())