Commit e8e95d4c authored by Javier Jardón's avatar Javier Jardón

Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_DEFAULT)

Use new API instead: gtk_widget_set_can_default ()
parent 483a5a9e
......@@ -191,7 +191,7 @@ do_menus (GtkWidget *do_widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK(gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......
......@@ -221,7 +221,7 @@ do_ui_manager (GtkWidget *do_widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
......
......@@ -2520,7 +2520,7 @@ int main( int argc,
G_CALLBACK (close_application),
G_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
gtk_widget_show (window);
......@@ -3338,7 +3338,7 @@ static void create_range_controls( void )
G_CALLBACK (gtk_main_quit),
NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
......@@ -4078,7 +4078,7 @@ int main( int argc,
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
/* This makes it so the button is the default. */
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
/* This grabs this button to be the default button. Simply hitting
* the "Enter" key will cause this button to activate. */
......@@ -4694,7 +4694,7 @@ int main( int argc,
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (window));
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
......@@ -5913,7 +5913,7 @@ static void create_calendar( void )
G_CALLBACK (gtk_main_quit),
NULL);
gtk_container_add (GTK_CONTAINER (bbox), button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
......@@ -7243,7 +7243,7 @@ int main( int argc,
/* this makes it so the button is the default. */
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting
......
......@@ -393,7 +393,7 @@ static void create_calendar( void )
G_CALLBACK (gtk_main_quit),
NULL);
gtk_container_add (GTK_CONTAINER (bbox), button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
......
......@@ -88,7 +88,7 @@ int main( int argc,
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
......
......@@ -183,7 +183,7 @@ int main( int argc,
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
/* This makes it so the button is the default. */
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
/* This grabs this button to be the default button. Simply hitting
* the "Enter" key will cause this button to activate. */
......
......@@ -69,7 +69,7 @@ int main( int argc,
G_CALLBACK (close_application),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
gtk_widget_show (window);
......
......@@ -272,7 +272,7 @@ static void create_range_controls( void )
G_CALLBACK (gtk_main_quit),
NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
......
......@@ -77,7 +77,7 @@ int main( int argc,
/* this makes it so the button is the default. */
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), button, TRUE, TRUE, 0);
/* This grabs this button to be the default button. Simply hitting
......
......@@ -170,7 +170,7 @@ int main( int argc,
G_CALLBACK (close_application),
NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
......
......@@ -623,7 +623,7 @@ gtk_about_dialog_init (GtkAboutDialog *about)
/* Add the credits button */
button = gtk_button_new_with_mnemonic (_("C_redits"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
image = gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), image);
gtk_widget_set_no_show_all (button, TRUE);
......@@ -637,7 +637,7 @@ gtk_about_dialog_init (GtkAboutDialog *about)
/* Add the license button */
button = gtk_button_new_from_stock (_("_License"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_set_no_show_all (button, TRUE);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (about)->action_area),
button, FALSE, TRUE, 0);
......
......@@ -760,9 +760,9 @@ gtk_assistant_init (GtkAssistant *assistant)
assistant->back = gtk_button_new_from_stock (GTK_STOCK_GO_BACK);
assistant->cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
assistant->last = gtk_button_new_from_stock (GTK_STOCK_GOTO_LAST);
GTK_WIDGET_SET_FLAGS (assistant->close, GTK_CAN_DEFAULT);
GTK_WIDGET_SET_FLAGS (assistant->apply, GTK_CAN_DEFAULT);
GTK_WIDGET_SET_FLAGS (assistant->forward, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (assistant->close, TRUE);
gtk_widget_set_can_default (assistant->apply, TRUE);
gtk_widget_set_can_default (assistant->forward, TRUE);
priv->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
gtk_size_group_add_widget (priv->size_group, assistant->close);
......
......@@ -709,7 +709,7 @@ gtk_dialog_add_button (GtkDialog *dialog,
button = gtk_button_new_from_stock (button_text);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
......
......@@ -8145,7 +8145,7 @@ add_custom_button_to_dialog (GtkDialog *dialog,
GtkWidget *button;
button = gtk_button_new_with_mnemonic (mnemonic_label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON));
gtk_widget_show (button);
......
......@@ -1416,7 +1416,7 @@ gtk_file_selection_create_dir (GtkWidget *widget,
gtk_label_set_mnemonic_widget (GTK_LABEL (label), fs->fileop_entry);
gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry,
TRUE, TRUE, 5);
GTK_WIDGET_SET_FLAGS (fs->fileop_entry, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (fs->fileop_entry, TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (fs->fileop_entry), TRUE);
gtk_widget_show (fs->fileop_entry);
......@@ -1681,7 +1681,7 @@ gtk_file_selection_rename_file (GtkWidget *widget,
fs->fileop_entry = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry,
TRUE, TRUE, 5);
GTK_WIDGET_SET_FLAGS (fs->fileop_entry, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (fs->fileop_entry, TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (fs->fileop_entry), TRUE);
gtk_widget_show (fs->fileop_entry);
......
......@@ -438,7 +438,7 @@ button_clicked_callback (GtkWidget *w, gpointer data)
gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_OK);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
g_signal_connect (button, "clicked",
G_CALLBACK (gamma_ok_callback), c);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
......
......@@ -802,7 +802,7 @@ gtk_info_bar_add_button (GtkInfoBar *info_bar,
button = gtk_button_new_from_stock (button_text);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
......
......@@ -310,13 +310,13 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
inputd->keys_list = NULL;
inputd->save_button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
GTK_WIDGET_SET_FLAGS (inputd->save_button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (inputd->save_button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(inputd)->action_area),
inputd->save_button, TRUE, TRUE, 0);
gtk_widget_show (inputd->save_button);
inputd->close_button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
GTK_WIDGET_SET_FLAGS (inputd->close_button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (inputd->close_button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(inputd)->action_area),
inputd->close_button, TRUE, TRUE, 0);
......
......@@ -2555,7 +2555,7 @@ gtk_print (gchar *str)
G_CALLBACK (gtk_widget_hide),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......
......@@ -186,9 +186,11 @@ gtk_option_menu_child_type (GtkContainer *container)
static void
gtk_option_menu_init (GtkOptionMenu *option_menu)
{
gtk_widget_set_can_focus (GTK_WIDGET (option_menu), TRUE);
GTK_WIDGET_UNSET_FLAGS (option_menu, GTK_CAN_DEFAULT);
gtk_widget_set_receives_default (GTK_WIDGET (option_menu), FALSE);
GtkWidget *widget = GTK_WIDGET (option_menu);
gtk_widget_set_can_focus (widget, TRUE);
gtk_widget_set_can_default (widget, FALSE);
gtk_widget_set_receives_default (widget, FALSE);
option_menu->menu = NULL;
option_menu->menu_item = NULL;
......
......@@ -414,7 +414,7 @@ add_custom_button_to_dialog (GtkDialog *dialog,
GtkWidget *button = NULL;
button = gtk_button_new_with_mnemonic (mnemonic_label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (stock_id,
GTK_ICON_SIZE_BUTTON));
......
......@@ -5553,9 +5553,9 @@ gtk_widget_set_can_default (GtkWidget *widget,
if (can_default != gtk_widget_get_can_default (widget))
{
if (can_default)
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT);
GTK_OBJECT_FLAGS (widget) |= GTK_CAN_DEFAULT;
else
GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_DEFAULT);
GTK_OBJECT_FLAGS (widget) &= ~(GTK_CAN_DEFAULT);
gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (widget), "can-default");
......
......@@ -679,7 +679,7 @@ create_calendar(void)
gtk_container_add (GTK_CONTAINER (window), vbox);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 0);
......
......@@ -909,7 +909,7 @@ create_buttons (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button[9], TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button[9], GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button[9], TRUE);
gtk_widget_grab_default (button[9]);
}
......@@ -977,7 +977,7 @@ create_toggle_buttons (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -1792,7 +1792,7 @@ create_statusbar (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -3494,7 +3494,7 @@ create_reparent (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -3782,7 +3782,7 @@ create_saved_position (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
......@@ -3867,7 +3867,7 @@ create_pixmap (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -4032,7 +4032,7 @@ create_tooltips (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_tooltips_set_tip (tooltips, button, "Push this button to close window", "ContextHelp/buttons/Close");
......@@ -4517,7 +4517,7 @@ create_menus (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......@@ -4788,7 +4788,7 @@ create_item_factory (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_item_factory_delete_item (item_factory, "/Preferences/ShouldNotAppear");
......@@ -5197,7 +5197,7 @@ create_scrolled_windows (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -5207,7 +5207,7 @@ create_scrolled_windows (GtkWidget *widget)
g_signal_connect (button, "clicked",
G_CALLBACK (scrolled_windows_remove),
scrolled_window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -5412,7 +5412,7 @@ create_entry (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -5580,7 +5580,7 @@ create_event_box (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -6623,7 +6623,7 @@ create_list (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -7174,7 +7174,7 @@ create_clist (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -8705,7 +8705,7 @@ create_dialog (GtkWidget *widget)
gtk_container_set_border_width (GTK_CONTAINER (dialog_window), 0);
button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -8715,7 +8715,7 @@ create_dialog (GtkWidget *widget)
g_signal_connect (button, "clicked",
G_CALLBACK (label_toggle),
&label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
......@@ -8724,7 +8724,7 @@ create_dialog (GtkWidget *widget)
button = gtk_button_new_with_label ("Separator");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog_window),
button,
......@@ -8986,7 +8986,7 @@ create_event_watcher (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
dialog_window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -9121,7 +9121,7 @@ create_range_controls (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......@@ -9398,7 +9398,7 @@ create_text (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......@@ -9769,7 +9769,7 @@ create_notebook (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_start (GTK_BOX (box1), button, FALSE, FALSE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
}
......@@ -10638,7 +10638,7 @@ create_wmhints (GtkWidget *widget)
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......@@ -12071,7 +12071,7 @@ create_progress_bar (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
pdata->window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (pdata->window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -13130,7 +13130,7 @@ create_timeout_test (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -13140,7 +13140,7 @@ create_timeout_test (GtkWidget *widget)
g_signal_connect (button, "clicked",
G_CALLBACK(start_timeout_test),
label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
......@@ -13149,7 +13149,7 @@ create_timeout_test (GtkWidget *widget)
g_signal_connect (button, "clicked",
G_CALLBACK (stop_timeout_test),
NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
......@@ -13306,7 +13306,7 @@ create_idle_test (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -13316,7 +13316,7 @@ create_idle_test (GtkWidget *widget)
g_signal_connect (button, "clicked",
G_CALLBACK (start_idle_test),
label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
......@@ -13325,7 +13325,7 @@ create_idle_test (GtkWidget *widget)
g_signal_connect (button, "clicked",
G_CALLBACK (stop_idle_test),
NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
......@@ -13405,7 +13405,7 @@ create_rc_file (GtkWidget *widget)
button = gtk_button_new_with_label ("Reload");
g_signal_connect (button, "clicked",
G_CALLBACK (gtk_rc_reparse_all), NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_grab_default (button);
......@@ -13413,7 +13413,7 @@ create_rc_file (GtkWidget *widget)
button = gtk_button_new_with_label ("Reload All");
g_signal_connect (button, "clicked",
G_CALLBACK (reload_all_rc_files), NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
......@@ -13421,7 +13421,7 @@ create_rc_file (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
}
......@@ -13478,7 +13478,7 @@ create_mainloop (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
......@@ -13638,7 +13638,7 @@ create_styles (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0);
gtk_widget_show (button);
......@@ -13917,7 +13917,7 @@ create_main_window (void)
G_CALLBACK (do_exit),
window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
......
......@@ -160,7 +160,7 @@ main (int argc, char **argv)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK(gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......
......@@ -224,7 +224,7 @@ main (int argc, char **argv)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK(gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
}
......
......@@ -193,7 +193,7 @@ main (int argc, char *argv[])
G_CALLBACK (gtk_widget_destroy),
window);
gtk_box_pack_end (GTK_BOX (box), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button);
gtk_widget_show (button);
......
......@@ -285,7 +285,7 @@ msgbox_run (GtkWindow *parent,
if (yes_button)
{
button = gtk_button_new_with_label (yes_button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_container_add (GTK_CONTAINER (button_box), button);
if (default_index == 0)
......@@ -301,7 +301,7 @@ msgbox_run (GtkWindow *parent,
if (no_button)
{
button = gtk_button_new_with_label (no_button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_container_add (GTK_CONTAINER (button_box), button);
if (default_index == 0)
......@@ -316,7 +316,7 @@ msgbox_run (GtkWindow *parent,
if (cancel_button)
{
button = gtk_button_new_with_label (cancel_button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_set_can_default (button, TRUE);
gtk_container_add (GTK_CONTAINER (button_box), button);
if (default_index == 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment