projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/common/wxchar.cpps/wxConvLocal/wxConvLibs/g as otherwise we may fail to convert...
[wxWidgets.git]
/
src
/
gtk
/
radiobut.cpp
diff --git
a/src/gtk/radiobut.cpp
b/src/gtk/radiobut.cpp
index c03a82e438a66b5684935008c37d4f93e33ee2ef..9900eb7c898932804bd6ac5686bfdcf7a42d34c8 100644
(file)
--- a/
src/gtk/radiobut.cpp
+++ b/
src/gtk/radiobut.cpp
@@
-40,6
+40,7
@@
extern wxWindowGTK *g_delayedFocus;
// "clicked"
//-----------------------------------------------------------------------------
// "clicked"
//-----------------------------------------------------------------------------
+extern "C" {
static
void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *rb )
{
static
void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *rb )
{
@@
-58,6
+59,7
@@
void gtk_radiobutton_clicked_callback( GtkToggleButton *button, wxRadioButton *r
event.SetEventObject( rb );
rb->GetEventHandler()->ProcessEvent( event );
}
event.SetEventObject( rb );
rb->GetEventHandler()->ProcessEvent( event );
}
+}
//-----------------------------------------------------------------------------
// wxRadioButton
//-----------------------------------------------------------------------------
// wxRadioButton
@@
-187,11
+189,10
@@
bool wxRadioButton::Enable( bool enable )
return TRUE;
}
return TRUE;
}
-void wxRadioButton::
ApplyWidgetStyle(
)
+void wxRadioButton::
DoApplyWidgetStyle(GtkRcStyle *style
)
{
{
- SetWidgetStyle();
- gtk_widget_set_style( m_widget, m_widgetStyle );
- gtk_widget_set_style( BUTTON_CHILD(m_widget), m_widgetStyle );
+ gtk_widget_modify_style(m_widget, style);
+ gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
}
bool wxRadioButton::IsOwnGtkWindow( GdkWindow *window )
}
bool wxRadioButton::IsOwnGtkWindow( GdkWindow *window )
@@
-238,9
+239,12
@@
wxVisualAttributes
wxRadioButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
{
wxVisualAttributes attr;
wxRadioButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
{
wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget* widget = gtk_radio_button_new_with_label(NULL, "");
GtkWidget* widget = gtk_radio_button_new_with_label(NULL, "");
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
attr = GetDefaultAttributesFromGTKWidget(widget);
attr = GetDefaultAttributesFromGTKWidget(widget);
- gtk_widget_destroy(w
idget
);
+ gtk_widget_destroy(w
nd
);
return attr;
}
return attr;
}