]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkradiobutton.c
replace g_scanner_add/remove_symbol by g_scanner_scope_add/remove_symbol.
[~andy/gtk] / gtk / gtkradiobutton.c
index 8d9ed1e487b61da14b54cd449ef25df04a328b45..245bec87e9f39e714e812f650022337014026f8b 100644 (file)
@@ -220,7 +220,7 @@ gtk_radio_button_new_with_label (GSList      *group,
   radio_button = g_object_new (GTK_TYPE_RADIO_BUTTON, "label", label, NULL) ;
 
   if (group)
-    gtk_radio_button_set_group (radio_button, group);
+    gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_button), group);
 
   return radio_button;
 }
@@ -246,7 +246,7 @@ gtk_radio_button_new_with_mnemonic (GSList      *group,
   radio_button = g_object_new (GTK_TYPE_RADIO_BUTTON, "label", label, "use_underline", TRUE, NULL);
 
   if (group)
-    gtk_radio_button_set_group (radio_button, group);
+    gtk_radio_button_set_group (GTK_RADIO_BUTTON (radio_button), group);
 
   return radio_button;
 }
@@ -323,6 +323,9 @@ gtk_radio_button_destroy (GtkObject *object)
       tmp_button->group = radio_button->group;
     }
 
+  /* this button is no longer in the group */
+  radio_button->group = NULL;
+  
   if (GTK_OBJECT_CLASS (parent_class)->destroy)
     (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
 }
@@ -463,7 +466,7 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
        x = widget->allocation.x + widget->allocation.width - (indicator_size + x - widget->allocation.x);
 
       gtk_paint_option (widget->style, widget->window,
-                       GTK_WIDGET_STATE (widget), shadow_type,
+                       state_type, shadow_type,
                        area, widget, "radiobutton",
                        x, y, indicator_size, indicator_size);
     }