]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobox.cpp
update OpenVMS makefile
[wxWidgets.git] / src / gtk / radiobox.cpp
index 13e3c1fc27889e09810a1c0b8ece81f800c8b70c..3467b72318a8d242c59a48e90a92bcf2b19d9ff6 100644 (file)
 
 #include "wx/radiobox.h"
 
 
 #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
 #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 wxRadioBox::Enable( bool enable )
 {
-    bool isEnabled = IsEnabled();
-
     if ( !wxControl::Enable( enable ) )
         return false;
 
     if ( !wxControl::Enable( enable ) )
         return false;
 
@@ -444,10 +436,8 @@ bool wxRadioBox::Enable( bool enable )
         node = node->GetNext();
     }
 
         node = node->GetNext();
     }
 
-    if (!isEnabled && enable)
-    {
+    if (enable)
         GTKFixSensitivity();
         GTKFixSensitivity();
-    }
 
     return true;
 }
 
     return true;
 }
@@ -571,7 +561,7 @@ void wxRadioBox::GTKWidgetDoSetMnemonic(GtkWidget* w)
 }
 
 #if wxUSE_TOOLTIPS
 }
 
 #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;
 {
     // 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) )
         {
     {
         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());
 
     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
 }
 
 #endif // wxUSE_TOOLTIPS
@@ -608,7 +598,9 @@ GdkWindow *wxRadioBox::GTKGetWindow(wxArrayGdkWindows& windows) const
     {
         GtkWidget *button = GTK_WIDGET( node->GetData()->button );
 
     {
         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();
     }
 
         node = node->GetNext();
     }