X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..6af984df34c71bc14648a7b5bf1ad3c3cd07fc05:/src/gtk1/radiobox.cpp diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 83252b6c37..7aab3d84f8 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -16,11 +16,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/frame.h" + #include "wx/dialog.h" #endif -#include "wx/dialog.h" -#include "wx/frame.h" - #include "wx/gtk1/private.h" #include @@ -58,7 +57,7 @@ static void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioBo event.SetInt( rb->GetSelection() ); event.SetString( rb->GetStringSelection() ); event.SetEventObject( rb ); - rb->GetEventHandler()->ProcessEvent(event); + rb->HandleWindowEvent(event); } } @@ -116,7 +115,7 @@ static gint gtk_radiobox_keypress_callback( GtkWidget *widget, GdkEventKey *gdk_ } extern "C" { -static gint gtk_radiobutton_focus_in( GtkWidget *widget, +static gint gtk_radiobutton_focus_in( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxRadioBox *win ) { @@ -134,7 +133,7 @@ static gint gtk_radiobutton_focus_in( GtkWidget *widget, // never stop the signal emission, it seems to break the kbd handling // inside the radiobox - (void)win->GetEventHandler()->ProcessEvent( event ); + (void)win->HandleWindowEvent( event ); } return FALSE; @@ -142,7 +141,7 @@ static gint gtk_radiobutton_focus_in( GtkWidget *widget, } extern "C" { -static gint gtk_radiobutton_focus_out( GtkWidget *widget, +static gint gtk_radiobutton_focus_out( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxRadioBox *win ) { @@ -203,6 +202,11 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, m_widget = gtk_frame_new(NULL); SetLabel(title); + if ( HasFlag(wxNO_BORDER) ) + { + // If we don't do this here, the wxNO_BORDER style is ignored in Show() + gtk_frame_set_shadow_type(GTK_FRAME(m_widget), GTK_SHADOW_NONE); + } // majorDim may be 0 if all trailing parameters were omitted, so don't // assert here but just use the correct value for it @@ -582,7 +586,7 @@ void wxRadioBox::OnInternalIdle() wxFocusEvent event( wxEVT_KILL_FOCUS, GetId() ); event.SetEventObject( this ); - (void)GetEventHandler()->ProcessEvent( event ); + (void)HandleWindowEvent( event ); } if (g_delayedFocus == this)