From c851dfb4603650dd74b9facd0cc1e0ead8bebe00 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 5 Feb 2007 11:16:07 +0000 Subject: [PATCH] gtk intf: TListBox, TComboBox now use GTK_SELECTION_SINGLE to prevent auto selection by the gtk git-svn-id: trunk@10584 - --- lcl/interfaces/gtk/gtkobject.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/gtk/gtkobject.inc b/lcl/interfaces/gtk/gtkobject.inc index 3be45c3fbe..d62d2baab9 100644 --- a/lcl/interfaces/gtk/gtkobject.inc +++ b/lcl/interfaces/gtk/gtkobject.inc @@ -3490,7 +3490,7 @@ begin else SelectionMode:= GTK_SELECTION_MULTIPLE; end else - SelectionMode:= GTK_SELECTION_BROWSE; + SelectionMode:= GTK_SELECTION_SINGLE; case AControl.fCompStyle of csListBox, csCheckListBox: @@ -4869,6 +4869,10 @@ begin gtk_combo_disable_activate(Widget); gtk_combo_set_case_sensitive(Widget, GdkTrue); + + // Prevents the OnSelect event be fired after inserting the first item + // or deleting the selected item + gtk_list_set_selection_mode(PGtkList(Widget^.List),GTK_SELECTION_SINGLE); // Items ItemList:= TGtkListStringList.Create(PGtkList(Widget^.List),ComboBox,False);