mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-19 01:40:10 +00:00
Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_RECEIVES_DEFAULT)
Use new API instead: gtk_widget_set_receives_default ()
This commit is contained in:
parent
b4b95d07f8
commit
b909abaa62
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user