#include "wx/choice.h"
#include "wx/arrstr.h"
+// FIXME: We use GtkOptionMenu which has been deprecated since GTK+ 2.3.0 in
+// favour of GtkComboBox.
+// Later use GtkComboBox if GTK+ runtime version is new enough.
+#include <gtk/gtkversion.h>
+#if defined(GTK_DISABLE_DEPRECATED) && GTK_CHECK_VERSION(2,3,0)
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
//-----------------------------------------------------------------------------
// sorted control, need to insert at the correct index
index = m_strings->Add(item);
- gtk_menu_insert( GTK_MENU(menu), menu_item, index );
+ gtk_menu_shell_insert( GTK_MENU_SHELL(menu), menu_item, index );
if ( index )
{
// normal control, just append
if (pos == (int)m_clientList.GetCount())
{
- gtk_menu_append( GTK_MENU(menu), menu_item );
+ gtk_menu_shell_append( GTK_MENU_SHELL(menu), menu_item );
m_clientList.Append( (wxObject*) NULL );
index = m_clientList.GetCount() - 1;
}
else
{
- gtk_menu_insert( GTK_MENU(menu), menu_item, pos );
+ gtk_menu_shell_insert( GTK_MENU_SHELL(menu), menu_item, pos );
m_clientList.Insert( pos, (wxObject*) NULL );
index = pos;
}