#pragma implementation "combobox.h"
#endif
-
#include "wx/combobox.h"
#include <wx/intl.h>
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() );
event.SetInt( combo->GetSelection() );
- event.SetString( copystring(combo->GetStringSelection()) );
+ event.SetString( combo->GetStringSelection() );
event.SetEventObject( combo );
combo->GetEventHandler()->ProcessEvent( event );
-
- delete [] event.GetString();
}
//-----------------------------------------------------------------------------
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
{
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
- event.SetString( copystring(combo->GetValue()) );
+ event.SetString( combo->GetValue() );
event.SetEventObject( combo );
combo->GetEventHandler()->ProcessEvent( event );
-
- delete [] event.GetString();
}
//-----------------------------------------------------------------------------
wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
-#if (GTK_MINOR_VERSION == 1)
+#if (GTK_MINOR_VERSION > 0)
gtk_editable_copy_clipboard( GTK_EDITABLE(entry) );
#else
gtk_editable_copy_clipboard( GTK_EDITABLE(entry), 0 );
wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
-#if (GTK_MINOR_VERSION == 1)
+#if (GTK_MINOR_VERSION > 0)
gtk_editable_cut_clipboard( GTK_EDITABLE(entry) );
#else
gtk_editable_cut_clipboard( GTK_EDITABLE(entry), 0 );
wxCHECK_RET( m_widget != NULL, "invalid combobox" );
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
-#if (GTK_MINOR_VERSION == 1)
+#if (GTK_MINOR_VERSION > 0)
gtk_editable_paste_clipboard( GTK_EDITABLE(entry) );
#else
gtk_editable_paste_clipboard( GTK_EDITABLE(entry), 0 );
// all!
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() );
event.SetInt( 0 );
- event.SetString( (char *)value.c_str() );
+ event.SetString( value );
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
}
// and generate the selected event for it
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() );
event.SetInt( Number() - 1 );
- event.SetString( (char *)value.c_str() );
+ event.SetString( value );
event.SetEventObject( this );
GetEventHandler()->ProcessEvent( event );
}