1 - fixed listbox.cpp to work with events with m_commandString member as wxString (fixing to match recent change)
2 - made wxSystemSettings::GetSystemColour(wxSYS_COLOUR_GRAYTEXT) return better value git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -96,17 +96,16 @@ gtk_listbox_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_event,
|
||||
event.m_commandInt = aSelections[0] ;
|
||||
event.m_clientData = listbox->GetClientData( event.m_commandInt );
|
||||
wxString str(listbox->GetString(event.m_commandInt));
|
||||
if (str != "") event.m_commandString = copystring((char *)(const char *)str);
|
||||
if (!str.IsEmpty()) event.m_commandString = str;
|
||||
}
|
||||
else
|
||||
{
|
||||
event.m_commandInt = -1 ;
|
||||
event.m_commandString = copystring("") ;
|
||||
event.m_commandString.Empty();
|
||||
}
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
if (event.m_commandString) delete[] event.m_commandString ;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -157,18 +156,17 @@ static void gtk_listitem_select_callback( GtkWidget *WXUNUSED(widget), wxListBox
|
||||
event.m_commandInt = aSelections[0] ;
|
||||
event.m_clientData = listbox->GetClientData( event.m_commandInt );
|
||||
wxString str(listbox->GetString(event.m_commandInt));
|
||||
if (str != "") event.m_commandString = copystring((char *)(const char *)str);
|
||||
if (!str.IsEmpty()) event.m_commandString = str;
|
||||
}
|
||||
else
|
||||
{
|
||||
event.m_commandInt = -1 ;
|
||||
event.m_commandString = copystring("") ;
|
||||
event.m_commandString.Empty();
|
||||
}
|
||||
|
||||
event.SetEventObject( listbox );
|
||||
|
||||
listbox->GetEventHandler()->ProcessEvent( event );
|
||||
if (event.m_commandString) delete[] event.m_commandString ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user