- wxCHECK_MSG((pos>=0) && (pos<=m_clientList.GetCount()), -1, wxT("invalid index"));
-
- GtkWidget *menu_item = gtk_menu_item_new_with_label( wxGTK_CONV( item ) );
-
- size_t index;
- if ( m_strings )
- {
- // sorted control, need to insert at the correct index
- index = m_strings->Add(item);
-
- gtk_menu_shell_insert( GTK_MENU_SHELL(menu), menu_item, index );
-
- if ( index )
- {
- m_clientList.Insert( m_clientList.Item(index - 1),
- (wxObject*) NULL );
- }
- else
- {
- m_clientList.Insert( (wxObject*) NULL );
- }
- }
- else
- {
- // don't call wxChoice::GetCount() from here because it doesn't work
- // if we're called from ctor (and GtkMenuShell is still NULL)
-
- // normal control, just append
- if (pos == m_clientList.GetCount())
- {
- gtk_menu_shell_append( GTK_MENU_SHELL(menu), menu_item );
- m_clientList.Append( (wxObject*) NULL );
- index = m_clientList.GetCount() - 1;
- }
- else
- {
- gtk_menu_shell_insert( GTK_MENU_SHELL(menu), menu_item, pos );
- m_clientList.Insert( pos, (wxObject*) NULL );
- index = pos;
- }
- }
+ // gtk_combo_box_get_wrap_width() was added in gtk 2.6
+ gint intval;
+ g_object_get(G_OBJECT(m_widget), "wrap-width", &intval, NULL);
+ return intval;
+}