- size_t index;
- if ( m_strings )
- {
- // sorted control, need to insert at the correct index
- index = m_strings->Add(item);
-
- gtk_menu_insert( GTK_MENU(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 == (int)m_clientList.GetCount())
- {
- gtk_menu_append( GTK_MENU(menu), menu_item );
- m_clientList.Append( (wxObject*) NULL );
- index = m_clientList.GetCount() - 1;
- }
- else
- {
- gtk_menu_insert( GTK_MENU(menu), menu_item, pos );
- m_clientList.Insert( pos, (wxObject*) NULL );
- index = pos;
- }
- }
+void wxChoice::GTKEnableEvents()
+{
+ g_signal_handlers_unblock_by_func(m_widget,
+ (gpointer) gtk_choice_changed_callback, this);
+}