]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tbargtk.cpp
Fix for wxTextCtrl::GetSelection for singel line controls in GTK2 mode
[wxWidgets.git] / src / gtk / tbargtk.cpp
index 2832d625373a2f03468fc634ae82f0ec03996f75..b3ab910bfdd1e497f7d06e7cfe3756d57bb1b01d 100644 (file)
@@ -136,7 +136,7 @@ protected:
 // wxWin macros
 // ----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase)
+IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl)
 
 // ============================================================================
 // implementation
@@ -433,8 +433,10 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
 
                 if ( tool->IsRadio() )
                 {
-                    wxToolBarToolsList::Node *node = pos ? m_tools.Item(pos - 1)
-                                                         : NULL;
+                    wxToolBarToolsList::compatibility_iterator node
+                        = wxToolBarToolsList::compatibility_iterator();
+                    if ( pos ) node = m_tools.Item(pos - 1);
+
                     while ( node )
                     {
                         wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
@@ -660,7 +662,7 @@ void wxToolBar::OnInternalIdle()
             gdk_window_set_cursor( m_widget->window, cursor.GetCursor() );
         }
 
-        wxToolBarToolsList::Node *node = m_tools.GetFirst();
+        wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
         while ( node )
         {
             wxToolBarTool *tool = (wxToolBarTool *)node->GetData();