Further UNicode fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-08-15 20:45:58 +00:00
parent acbeb7b368
commit 2e1d710482
8 changed files with 118 additions and 24 deletions

View File

@@ -257,7 +257,11 @@ int wxChoice::FindString( const wxString &string ) const
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
wxString tmp( wxGTK_CONV_BACK( label->label ) );
#ifdef __WXGTK20__
wxString tmp( wxGTK_CONV_BACK( gtk_label_get_text( label) ) );
#else
wxString tmp( label->label );
#endif
if (string == tmp)
return count;
@@ -271,9 +275,15 @@ int wxChoice::FindString( const wxString &string ) const
int wxChoice::GetSelection() const
{
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid choice") );
#ifdef __WXGTK20__
return gtk_option_menu_get_history( GTK_OPTION_MENU(m_widget) );
#else
GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
int count = 0;
GList *child = menu_shell->children;
while (child)
{
@@ -284,6 +294,7 @@ int wxChoice::GetSelection() const
}
return -1;
#endif
}
void wxChoice::SetString( int WXUNUSED(n), const wxString& WXUNUSED(string) )
@@ -313,7 +324,11 @@ wxString wxChoice::GetString( int n ) const
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
return wxString( wxGTK_CONV_BACK(label->label) );
#ifdef __WXGTK20__
return wxString( wxGTK_CONV_BACK( gtk_label_get_text( label) ) );
#else
return wxString( label->label );
#endif
}
child = child->next;
count++;