merged 2.4 branch into the trunk

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-12-04 14:11:26 +00:00
parent 59a944cb63
commit 2b5f62a0b2
1057 changed files with 37805 additions and 24034 deletions

View File

@@ -209,6 +209,17 @@ wxComboBox::~wxComboBox()
m_clientDataList.Clear();
}
void wxComboBox::SetFocus()
{
if ( m_hasFocus )
{
// don't do anything if we already have focus
return;
}
gtk_widget_grab_focus( m_focusWidget );
}
void wxComboBox::AppendCommon( const wxString &item )
{
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
@@ -364,8 +375,14 @@ int wxComboBox::FindString( const wxString &item )
{
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
if (item == wxString(label->label,*wxConvCurrent))
#ifdef __WXGTK20__
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
#else
wxString str( label->label );
#endif
if (item == str)
return count;
count++;
child = child->next;
}
@@ -408,7 +425,7 @@ wxString wxComboBox::GetString( int n ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
#ifdef __WXGTK20__
str = wxGTK_CONV_BACK( gtk_label_get_text( label) );
str = wxGTK_CONV_BACK( gtk_label_get_text(label) );
#else
str = wxString( label->label );
#endif
@@ -431,7 +448,12 @@ wxString wxComboBox::GetStringSelection() const
if (selection)
{
GtkBin *bin = GTK_BIN( selection->data );
wxString tmp = wxString(GTK_LABEL( bin->child )->label,*wxConvCurrent);
GtkLabel *label = GTK_LABEL( bin->child );
#ifdef __WXGTK20__
wxString tmp( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
#else
wxString tmp( label->label );
#endif
return tmp;
}