wxLB_MULTIPLE is same as wxLB_EXTENDED in wxGTK2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b0267bdc2c
commit
b4de6e0d25
@ -28,10 +28,11 @@
|
||||
Single-selection list.
|
||||
@style{wxLB_MULTIPLE}
|
||||
Multiple-selection list: the user can toggle multiple items on and
|
||||
off.
|
||||
off. This is the same as wxLB_EXTENDED in wxGTK2 port.
|
||||
@style{wxLB_EXTENDED}
|
||||
Extended-selection list: the user can select multiple items using
|
||||
the SHIFT key and the mouse or special key combinations.
|
||||
Extended-selection list: the user can extend the selection by using
|
||||
@c SHIFT or @c CTRL keys together with the cursor movement keys or
|
||||
the mouse.
|
||||
@style{wxLB_HSCROLL}
|
||||
Create horizontal scrollbar if contents are too wide (Windows only).
|
||||
@style{wxLB_ALWAYS_SB}
|
||||
|
@ -119,11 +119,11 @@ gtk_listitem_changed_callback(GtkTreeSelection * WXUNUSED(selection),
|
||||
{
|
||||
if (g_blockEventsOnDrag) return;
|
||||
|
||||
if (listbox->HasFlag(wxLB_MULTIPLE) || listbox->HasFlag(wxLB_EXTENDED))
|
||||
if (listbox->HasFlag(wxLB_MULTIPLE | wxLB_EXTENDED))
|
||||
{
|
||||
listbox->CalcAndSendEvent();
|
||||
}
|
||||
else
|
||||
else // single selection
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() );
|
||||
event.SetEventObject( listbox );
|
||||
@ -421,17 +421,13 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
||||
gtk_tree_view_set_enable_search(m_treeview, FALSE);
|
||||
|
||||
GtkSelectionMode mode;
|
||||
if (style & wxLB_MULTIPLE)
|
||||
// GTK_SELECTION_EXTENDED is a deprecated synonym for GTK_SELECTION_MULTIPLE
|
||||
if ( style & (wxLB_MULTIPLE | wxLB_EXTENDED) )
|
||||
{
|
||||
mode = GTK_SELECTION_MULTIPLE;
|
||||
}
|
||||
else if (style & wxLB_EXTENDED)
|
||||
else // no multi-selection flags specified
|
||||
{
|
||||
mode = GTK_SELECTION_EXTENDED;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if style was 0 set single mode
|
||||
m_windowStyle |= wxLB_SINGLE;
|
||||
mode = GTK_SELECTION_SINGLE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user