]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobox.cpp
rebaked after adding new string-related headers
[wxWidgets.git] / src / gtk / radiobox.cpp
index a16eaf5679f47ede7434e7da16a6d541d23dd323..911aa6ccaba0fd0c5fb06b055db6164d13d8b14a 100644 (file)
@@ -193,12 +193,11 @@ static void gtk_radiobutton_size_allocate( GtkWidget *widget,
                                            GtkAllocation * alloc,
                                            wxRadioBox *win )
 {
-    unsigned int n = 0;
     for ( wxRadioBoxButtonsInfoList::compatibility_iterator node = win->m_buttonsInfo.GetFirst();
           node;
-          node = node->GetNext(), n++ )
+          node = node->GetNext())
     {
-        if( widget == GTK_WIDGET(node->GetData()->button) )
+        if (widget == GTK_WIDGET(node->GetData()->button))
         {
             const wxPoint origin = win->GetPosition();
             wxRect rect = wxRect( alloc->x - origin.x, alloc->y - origin.y,
@@ -220,7 +219,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioBox,wxControl)
 void wxRadioBox::Init()
 {
     m_needParent = true;
-    m_acceptsFocus = true;
 
     m_hasFocus =
     m_lostFocus = false;
@@ -254,6 +252,12 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
 
     m_widget = GTKCreateFrame(title);
     wxControl::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