]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/treegtk.cpp
fixes and missing files from the first wxComboControl patch (update of patch 1479938)
[wxWidgets.git] / src / gtk1 / treegtk.cpp
index 91e52b964c6ee49a2cf36a473e7d1b32e2550355..325c74f345f78d8c2891071f901bff382d985230 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        treectrl.cpp
+// Name:        src/gtk1/treectrl.cpp
 // Purpose:     wxTreeCtrl
 // Author:      Denis Pershin
 // Modified by:
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
+    #include "wx/wx.h"
+    #include "wx/log.h"
 #endif
 
 #include "wx/gtk1/treectrl.h"
 #include "wx/textctrl.h"
-#include "wx/log.h"
 
 #include <gtk/gtk.h>
 
@@ -186,16 +186,17 @@ void wxTreeCtrl::SetStateImageList(wxImageList *imageList) {
   m_imageListState = imageList;
 }
 
-wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const {
-  char *t;
+wxString wxTreeCtrl::GetItemText(const wxTreeItemId &item) const
+{
+    char *t;
 
-  if (!item.IsOk())
-    return wxString("");
+    if (!item.IsOk())
+        return wxEmptyString;
 
-  GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
-  gtk_label_get(l, &t);
+    GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
+    gtk_label_get(l, &t);
 
-  return t;
+    return t;
 }
 
 int wxTreeCtrl::GetItemImage(const wxTreeItemId& item) const {