X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..76ab455a6b91d578577443e10c10651853b63874:/src/gtk/radiobox.cpp?ds=sidebyside diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 13e3c1fc27..3467b72318 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -14,12 +14,6 @@ #include "wx/radiobox.h" -#ifndef WX_PRECOMP - #include "wx/log.h" - #include "wx/frame.h" - #include "wx/dialog.h" -#endif - #if wxUSE_TOOLTIPS #include "wx/tooltip.h" #endif @@ -428,8 +422,6 @@ void wxRadioBox::SetString(unsigned int item, const wxString& label) bool wxRadioBox::Enable( bool enable ) { - bool isEnabled = IsEnabled(); - if ( !wxControl::Enable( enable ) ) return false; @@ -444,10 +436,8 @@ bool wxRadioBox::Enable( bool enable ) node = node->GetNext(); } - if (!isEnabled && enable) - { + if (enable) GTKFixSensitivity(); - } return true; } @@ -571,7 +561,7 @@ void wxRadioBox::GTKWidgetDoSetMnemonic(GtkWidget* w) } #if wxUSE_TOOLTIPS -void wxRadioBox::ApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip) +void wxRadioBox::GTKApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip) { // set this tooltip for all radiobuttons which don't have their own tips unsigned n = 0; @@ -581,7 +571,7 @@ void wxRadioBox::ApplyToolTip(GtkTooltips * WXUNUSED(tips), const gchar *tip) { if ( !GetItemToolTip(n) ) { - wxToolTip::Apply(GTK_WIDGET(node->GetData()->button), tip); + wxToolTip::GTKApply(GTK_WIDGET(node->GetData()->button), tip); } } } @@ -594,7 +584,7 @@ void wxRadioBox::DoSetItemToolTip(unsigned int n, wxToolTip *tooltip) if ( tooltip ) buf = wxGTK_CONV(tooltip->GetTip()); - wxToolTip::Apply(GTK_WIDGET(m_buttonsInfo[n]->button), buf); + wxToolTip::GTKApply(GTK_WIDGET(m_buttonsInfo[n]->button), buf); } #endif // wxUSE_TOOLTIPS @@ -608,7 +598,9 @@ GdkWindow *wxRadioBox::GTKGetWindow(wxArrayGdkWindows& windows) const { GtkWidget *button = GTK_WIDGET( node->GetData()->button ); - windows.push_back(button->window); + // don't put NULL pointers in the 'windows' array! + if (button->window) + windows.push_back(button->window); node = node->GetNext(); }