]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/treegtk.cpp
[ 1473731 ] 'wxColourBase and wxString <-> wxColour implementation' with minor modifi...
[wxWidgets.git] / src / gtk / treegtk.cpp
index ffd0f0caf1c0639c516fbfd0a38890d863c61fc2..d5c5ddff1d2df9872b4554f4fd8d865f14f03627 100644 (file)
@@ -152,12 +152,14 @@ static void gtk_treectrl_count_callback (GtkWidget *widget, gpointer data) {
     gtk_container_foreach(GTK_CONTAINER(widget), gtk_treectrl_count_callback, data);
 }
 
-size_t wxTreeCtrl::GetCount() const {
-  int count = 0;
+unsigned int wxTreeCtrl::GetCount() const
+{
+    int count = 0;
+
+    if (m_anchor != NULL)
+        gtk_treectrl_count_callback(GTK_WIDGET(m_anchor), &count);
 
-  if (m_anchor != NULL)
-    gtk_treectrl_count_callback(GTK_WIDGET(m_anchor), &count);
-  return count;
+    return (unsigned int)count;
 }
 
 unsigned int wxTreeCtrl::GetIndent() const {
@@ -222,7 +224,7 @@ void wxTreeCtrl::SetItemText(const wxTreeItemId& item, const wxString& text) {
     return;
 
   GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
-  gtk_label_set(l, text);
+  gtk_label_set_text(l, text);
 }
 
 void wxTreeCtrl::SetItemImage(const wxTreeItemId& item, int image) {
@@ -665,7 +667,7 @@ void wxTreeCtrl::EndEditLabel(const wxTreeItemId& item, bool discardChanges) {
 #warning "Need to implement EndEditLabel"
 /*
   GtkLabel *m_label = (GtkLabel *)gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)m_editItem), "w_label");
-  gtk_label_set(m_label, m_textCtrl->GetValue());
+  gtk_label_set_text(m_label, m_textCtrl->GetValue());
 
   gtk_object_remove_data(GTK_OBJECT((GtkTreeItem *)m_editItem), "w_edit");
 
@@ -714,7 +716,7 @@ long wxTreeCtrl::GetChild(long item) const {
   GtkTreeItem *next = NULL;
 
   p = findGtkTreeItem(item);
-  GList *list = gtk_container_children(GTK_CONTAINER(p));
+  GList *list = gtk_container_get_children(GTK_CONTAINER(p));
   next = GTK_TREE_ITEM(list->data);
 
   if (next != NULL)
@@ -726,7 +728,7 @@ long wxTreeCtrl::GetChild(long item) const {
 long wxTreeCtrl::GetFirstVisibleItem(void) const {
   GtkTreeItem *next = NULL;
 
-  GList *list = gtk_container_children(GTK_CONTAINER(m_anchor));
+  GList *list = gtk_container_get_children(GTK_CONTAINER(m_anchor));
   next = GTK_TREE_ITEM(list->data);
 //  gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_visible_callback, &next);
 
@@ -741,7 +743,7 @@ long wxTreeCtrl::GetNextVisibleItem(long item) const {
   GtkTreeItem *next = NULL;
 
   p = findGtkTreeItem(item);
-  GList *list = gtk_container_children(GTK_CONTAINER(p));
+  GList *list = gtk_container_get_children(GTK_CONTAINER(p));
   next = GTK_TREE_ITEM(list->data);
 //  gtk_container_foreach(GTK_CONTAINER(p), gtk_treectrl_next_visible_callback, &next);