From 1e2cb856c4849b0956c21f053be2bc8f30b881fb Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 21 Feb 2005 22:46:34 +0000 Subject: [PATCH] Show that the GTK+ listbox doesn't deselect any item in MULTIPLE mode when clicked upon. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/controls/controls.cpp | 2 +- src/gtk/listbox.cpp | 2 ++ src/gtk1/listbox.cpp | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 28a5d986cf..77fefdba72 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -677,7 +677,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) wxPanel *panel = new wxPanel(m_book); m_listbox = new wxListBox( panel, ID_LISTBOX, wxPoint(10,10), wxSize(120,70), - 5, choices, wxLB_ALWAYS_SB ); + 5, choices, wxLB_MULTIPLE /*|wxLB_ALWAYS_SB*/ ); m_listboxSorted = new wxListBox( panel, ID_LISTBOX_SORTED, wxPoint(10,90), wxSize(120,70), 5, choices, wxLB_SORT ); diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 3865a4f20c..b71512c250 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -233,6 +233,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, } #endif // wxUSE_CHECKLISTBOX +#if 0 if ((gdk_event->state == 0) && (((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) || ((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) ) @@ -243,6 +244,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, return true; } } +#endif /* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */ g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS); diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 3865a4f20c..b71512c250 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -233,6 +233,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, } #endif // wxUSE_CHECKLISTBOX +#if 0 if ((gdk_event->state == 0) && (((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) || ((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) ) @@ -243,6 +244,7 @@ gtk_listbox_button_press_callback( GtkWidget *widget, return true; } } +#endif /* emit wxEVT_COMMAND_LISTBOX_DOUBLECLICKED later */ g_hasDoubleClicked = (gdk_event->type == GDK_2BUTTON_PRESS); -- 2.45.2