X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99e8cb505ad94704ec6596d20842ca8fa34e7d9e..96d5885406245ea36b7cfb2722c0e9f12b7dd1aa:/src/gtk1/tbargtk.cpp?ds=sidebyside diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 2832d62537..0802257ccc 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -16,10 +16,13 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "tbargtk.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/toolbar.h" #if wxUSE_TOOLBAR_NATIVE @@ -136,7 +139,7 @@ protected: // wxWin macros // ---------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase) +IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl) // ============================================================================ // implementation @@ -255,6 +258,8 @@ void wxToolBar::Init() m_bg = (GdkColor *)NULL; m_toolbar = (GtkToolbar *)NULL; m_blockEvent = FALSE; + m_defaultWidth = 32; + m_defaultHeight = 32; } wxToolBar::~wxToolBar() @@ -433,8 +438,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 +667,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();