diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 8b44900a07..e55574619c 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -540,7 +540,8 @@ gtk_button_init (GtkButton *button) { GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (button); - GTK_WIDGET_SET_FLAGS (button, GTK_CAN_FOCUS | GTK_RECEIVES_DEFAULT); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_FOCUS); + gtk_widget_set_receives_default (GTK_WIDGET (button), TRUE); GTK_WIDGET_SET_FLAGS (button, GTK_NO_WINDOW); button->label_text = NULL; diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 4dd458bdfc..d816ad4948 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -86,7 +86,7 @@ static void gtk_check_button_init (GtkCheckButton *check_button) { GTK_WIDGET_SET_FLAGS (check_button, GTK_NO_WINDOW); - GTK_WIDGET_UNSET_FLAGS (check_button, GTK_RECEIVES_DEFAULT); + gtk_widget_set_receives_default (GTK_WIDGET (check_button), FALSE); GTK_TOGGLE_BUTTON (check_button)->draw_indicator = TRUE; GTK_BUTTON (check_button)->depress_on_activate = FALSE; } diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index 9da3fe0659..19c4f58d63 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -187,7 +187,8 @@ static void gtk_option_menu_init (GtkOptionMenu *option_menu) { GTK_WIDGET_SET_FLAGS (option_menu, GTK_CAN_FOCUS); - GTK_WIDGET_UNSET_FLAGS (option_menu, GTK_CAN_DEFAULT | GTK_RECEIVES_DEFAULT); + GTK_WIDGET_UNSET_FLAGS (option_menu, GTK_CAN_DEFAULT); + gtk_widget_set_receives_default (GTK_WIDGET (option_menu), FALSE); option_menu->menu = NULL; option_menu->menu_item = NULL; diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index 11e3c86d50..cb1d1aad12 100644 --- a/gtk/gtkradiobutton.c +++ b/gtk/gtkradiobutton.c @@ -119,7 +119,7 @@ static void gtk_radio_button_init (GtkRadioButton *radio_button) { GTK_WIDGET_SET_FLAGS (radio_button, GTK_NO_WINDOW); - GTK_WIDGET_UNSET_FLAGS (radio_button, GTK_RECEIVES_DEFAULT); + gtk_widget_set_receives_default (GTK_WIDGET (radio_button), FALSE); GTK_TOGGLE_BUTTON (radio_button)->active = TRUE; diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index f22efb3fc0..c9f742173b 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -5651,9 +5651,9 @@ gtk_widget_set_receives_default (GtkWidget *widget, if (receives_default != gtk_widget_get_receives_default (widget)) { if (receives_default) - GTK_WIDGET_SET_FLAGS (widget, GTK_RECEIVES_DEFAULT); + GTK_OBJECT_FLAGS (widget) |= GTK_RECEIVES_DEFAULT; else - GTK_WIDGET_UNSET_FLAGS (widget, GTK_RECEIVES_DEFAULT); + GTK_OBJECT_FLAGS (widget) &= ~(GTK_RECEIVES_DEFAULT); g_object_notify (G_OBJECT (widget), "receives-default"); }