X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..a7d5151df02bf70a9f6ff1c5c7fd33ab07bf409c:/src/gtk/treegtk.cpp diff --git a/src/gtk/treegtk.cpp b/src/gtk/treegtk.cpp index e00310eacf..ffd0f0caf1 100644 --- a/src/gtk/treegtk.cpp +++ b/src/gtk/treegtk.cpp @@ -6,13 +6,9 @@ // Created: 07/05/98 // RCS-ID: $Id$ // Copyright: (c) Denis Pershin -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "treectrl.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -496,7 +492,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()) @@ -538,16 +534,14 @@ printf("m_tree = %p\n", m_tree); gtk_widget_show(GTK_WIDGET(item)); - gtk_signal_connect(GTK_OBJECT(item), "select", - GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this ); - - gtk_signal_connect(GTK_OBJECT(item), "deselect", - GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this ); - - gtk_signal_connect(GTK_OBJECT(item), "expand", - GTK_SIGNAL_FUNC(gtk_treeitem_expand_callback), (gpointer)this ); - gtk_signal_connect(GTK_OBJECT(item), "collapse", - GTK_SIGNAL_FUNC(gtk_treeitem_collapse_callback), (gpointer)this ); + g_signal_connect (item, "select", + G_CALLBACK (gtk_treeitem_select_callback), this); + g_signal_connect (item, "deselect", + G_CALLBACK (gtk_treeitem_select_callback), this); + g_signal_connect (item, "expand", + G_CALLBACK (gtk_treeitem_expand_callback), this); + g_signal_connect (item, "collapse", + G_CALLBACK (gtk_treeitem_collapse_callback), this); return item; } @@ -721,7 +715,7 @@ long wxTreeCtrl::GetChild(long item) const { p = findGtkTreeItem(item); GList *list = gtk_container_children(GTK_CONTAINER(p)); - next = GTK_TREE_ITEM(list->data);; + next = GTK_TREE_ITEM(list->data); if (next != NULL) return (long)gtk_object_get_data(GTK_OBJECT(next), "id"); @@ -733,7 +727,7 @@ long wxTreeCtrl::GetFirstVisibleItem(void) const { GtkTreeItem *next = NULL; GList *list = gtk_container_children(GTK_CONTAINER(m_anchor)); - next = GTK_TREE_ITEM(list->data);; + next = GTK_TREE_ITEM(list->data); // gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_visible_callback, &next); if (next != NULL) @@ -748,7 +742,7 @@ long wxTreeCtrl::GetNextVisibleItem(long item) const { p = findGtkTreeItem(item); GList *list = gtk_container_children(GTK_CONTAINER(p)); - next = GTK_TREE_ITEM(list->data);; + next = GTK_TREE_ITEM(list->data); // gtk_container_foreach(GTK_CONTAINER(p), gtk_treectrl_next_visible_callback, &next); if (next != NULL) @@ -860,16 +854,14 @@ long wxTreeCtrl::InsertItem(long parent, wxTreeItem& info, long insertAfter) { gtk_widget_show(GTK_WIDGET(item)); - gtk_signal_connect(GTK_OBJECT(item), "select", - GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this ); - - gtk_signal_connect(GTK_OBJECT(item), "deselect", - GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this ); - - gtk_signal_connect(GTK_OBJECT(item), "expand", - GTK_SIGNAL_FUNC(gtk_treeitem_expand_callback), (gpointer)this ); - gtk_signal_connect(GTK_OBJECT(item), "collapse", - GTK_SIGNAL_FUNC(gtk_treeitem_collapse_callback), (gpointer)this ); + g_signal_connect (item, "select", + G_CALLBACK (gtk_treeitem_select_callback), this); + g_signal_connect (item, "deselect", + G_CALLBACK (gtk_treeitem_select_callback), this); + g_signal_connect (item, "expand", + G_CALLBACK (gtk_treeitem_expand_callback), this); + g_signal_connect (item, "collapse", + G_CALLBACK (gtk_treeitem_collapse_callback), this); return info.m_itemId; }