// conditional compilation
//-------------------------------------------------------------------------
-#if (GTK_MINOR_VERSION == 1)
- #if (GTK_MICRO_VERSION >= 5)
- #define NEW_GTK_SCROLL_CODE
- #endif
+#if (GTK_MINOR_VERSION > 0)
+#define NEW_GTK_SCROLL_CODE
#endif
//-----------------------------------------------------------------------------
event.m_commandInt = aSelections[0] ;
event.m_clientData = listbox->GetClientData( event.m_commandInt );
wxString str(listbox->GetString(event.m_commandInt));
- if (str != "") event.m_commandString = copystring((char *)(const char *)str);
+ if (!str.IsEmpty()) event.m_commandString = str;
}
else
{
event.m_commandInt = -1 ;
- event.m_commandString = copystring("") ;
+ event.m_commandString.Empty();
}
listbox->GetEventHandler()->ProcessEvent( event );
- if (event.m_commandString) delete[] event.m_commandString ;
}
return FALSE;
event.m_commandInt = aSelections[0] ;
event.m_clientData = listbox->GetClientData( event.m_commandInt );
wxString str(listbox->GetString(event.m_commandInt));
- if (str != "") event.m_commandString = copystring((char *)(const char *)str);
+ if (!str.IsEmpty()) event.m_commandString = str;
}
else
{
event.m_commandInt = -1 ;
- event.m_commandString = copystring("") ;
+ event.m_commandString.Empty();
}
event.SetEventObject( listbox );
listbox->GetEventHandler()->ProcessEvent( event );
- if (event.m_commandString) delete[] event.m_commandString ;
}
//-----------------------------------------------------------------------------
debug_focus_in( s_window->vscrollbar, "wxWindow::vsrcollbar", name );
#ifdef NEW_GTK_SCROLL_CODE
- GtkViewport *viewport = GTK_VIEWPORT(s_window->child);
+ GtkViewport *viewport = GTK_VIEWPORT( GTK_BIN(s_window)->child );
#else
GtkViewport *viewport = GTK_VIEWPORT(s_window->viewport);
#endif