Nuke GTK1 from src/gtk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -238,17 +238,11 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
// and case-sensitive
|
||||
gtk_combo_set_case_sensitive( GTK_COMBO(m_widget), TRUE );
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
if (style & wxNO_BORDER)
|
||||
g_object_set( GTK_ENTRY( combo->entry ), "has-frame", FALSE, NULL );
|
||||
#endif
|
||||
|
||||
GtkWidget *list = GTK_COMBO(m_widget)->list;
|
||||
|
||||
#ifndef __WXGTK20__
|
||||
// gtk_list_set_selection_mode( GTK_LIST(list), GTK_SELECTION_MULTIPLE );
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
GtkWidget *list_item = gtk_list_item_new_with_label( wxGTK_CONV( choices[i] ) );
|
||||
@@ -550,11 +544,8 @@ int wxComboBox::FindString( const wxString &item, bool bCase ) const
|
||||
{
|
||||
GtkBin *bin = GTK_BIN( child->data );
|
||||
GtkLabel *label = GTK_LABEL( bin->child );
|
||||
#ifdef __WXGTK20__
|
||||
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||
#else
|
||||
wxString str( label->label );
|
||||
#endif
|
||||
|
||||
if (item.IsSameAs( str , bCase ) )
|
||||
return count;
|
||||
|
||||
@@ -607,11 +598,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) );
|
||||
#else
|
||||
str = wxString( label->label );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -632,11 +619,7 @@ wxString wxComboBox::GetStringSelection() const
|
||||
{
|
||||
GtkBin *bin = GTK_BIN( selection->data );
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -832,15 +815,10 @@ void wxComboBox::GetSelection( long* from, long* to ) const
|
||||
if (IsEditable())
|
||||
{
|
||||
GtkEditable *editable = GTK_EDITABLE(GTK_COMBO(m_widget)->entry);
|
||||
#ifdef __WXGTK20__
|
||||
gint start, end;
|
||||
gtk_editable_get_selection_bounds(editable, & start, & end);
|
||||
*from = start;
|
||||
*to = end;
|
||||
#else
|
||||
*from = (long) editable->selection_start_pos;
|
||||
*to = (long) editable->selection_end_pos;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user