- //In the keyevent we don't know the index of the item
- //and the activated event gets called anyway...
- //
- //Also, activating with the space causes the treeview to
- //unselect all the items and then select the item in question
- //wx's behaviour is to just toggle the item's selection state
- //and leave the others alone
- listbox->m_spacePressed = true;
- }
-
- if (ret)
- {
- g_signal_stop_emission_by_name (widget, "key_press_event");
- return TRUE;
- }
-
- return FALSE;
-}
-}
-
-//-----------------------------------------------------------------------------
-// "select" and "deselect"
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static gboolean gtk_listitem_select_cb( GtkTreeSelection* selection,
- GtkTreeModel* model,
- GtkTreePath* path,
- gboolean is_selected,
- wxListBox *listbox )
-{
- if (g_isIdle) wxapp_install_idle_handler();
-
- if (!listbox->m_hasVMT) return TRUE;
- if (g_blockEventsOnDrag) return TRUE;
-
- if (listbox->m_spacePressed) return FALSE; //see keyevent callback
- if (listbox->m_blockEvent) return TRUE;