- if (listbox->IsSelected(sel))
- {
- gtk_list_unselect_item( GTK_LIST(listbox->m_list), sel );
- return true;
- }
+ listbox->m_blockEvent = TRUE;
+
+ int i;
+ for (i = 0; i < (int)listbox->GetCount(); i++)
+ if (i != sel)
+ gtk_list_unselect_item( GTK_LIST(listbox->m_list), i );
+
+ listbox->m_blockEvent = FALSE;
+
+ return false;