#pragma implementation "radiobox.h"
#endif
-#include "wx/radiobox.h"
+#include "wx/defs.h"
#if wxUSE_RADIOBOX
+#include "wx/radiobox.h"
+
#include "wx/dialog.h"
#include "wx/frame.h"
#include "wx/log.h"
// "clicked"
//-----------------------------------------------------------------------------
-static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRadioBox *rb )
+static void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioBox *rb )
{
if (g_isIdle) wxapp_install_idle_handler();
if (!rb->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
- if (rb->m_alreadySent)
- {
- rb->m_alreadySent = FALSE;
- return;
- }
-
- rb->m_alreadySent = TRUE;
+ if (!button->active) return;
wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() );
event.SetInt( rb->GetSelection() );
void wxRadioBox::Init()
{
- m_alreadySent = FALSE;
m_needParent = TRUE;
m_acceptsFocus = TRUE;
!CreateBase( parent, id, pos, size, style, validator, name ))
{
wxFAIL_MSG( wxT("wxRadioBox creation failed") );
- return FALSE;
+ return FALSE;
}
m_widget = gtk_frame_new( title.mbc_str() );
GtkDisableEvents();
- gtk_toggle_button_set_state( button, 1 );
+ gtk_toggle_button_set_active( button, 1 );
GtkEnableEvents();
}