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:
J. Russell Smyth 1999-03-17 11:11:15 +00:00
parent af11388a62
commit da7b3583d8
4 changed files with 10 additions and 14 deletions

View File

@ -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 ;
}
//-----------------------------------------------------------------------------

View File

@ -97,6 +97,7 @@ wxColour wxSystemSettings::GetSystemColour( int index )
}
return *g_systemBtnFaceColour;
}
case wxSYS_COLOUR_GRAYTEXT:
case wxSYS_COLOUR_BTNSHADOW:
{
GtkStyle *style = gtk_widget_get_default_style();
@ -109,7 +110,6 @@ wxColour wxSystemSettings::GetSystemColour( int index )
}
return *g_systemBtnShadowColour;
}
case wxSYS_COLOUR_GRAYTEXT:
case wxSYS_COLOUR_BTNHIGHLIGHT:
{
GtkStyle *style = gtk_widget_get_default_style();

View File

@ -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 ;
}
//-----------------------------------------------------------------------------

View File

@ -97,6 +97,7 @@ wxColour wxSystemSettings::GetSystemColour( int index )
}
return *g_systemBtnFaceColour;
}
case wxSYS_COLOUR_GRAYTEXT:
case wxSYS_COLOUR_BTNSHADOW:
{
GtkStyle *style = gtk_widget_get_default_style();
@ -109,7 +110,6 @@ wxColour wxSystemSettings::GetSystemColour( int index )
}
return *g_systemBtnShadowColour;
}
case wxSYS_COLOUR_GRAYTEXT:
case wxSYS_COLOUR_BTNHIGHLIGHT:
{
GtkStyle *style = gtk_widget_get_default_style();