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

Use new API instead: gtk_widget_set_can_default ()
This commit is contained in:
Javier Jardón 2010-03-02 07:58:05 +01:00
parent 483a5a9e1a
commit e8e95d4c5e
28 changed files with 80 additions and 78 deletions

View File

@ -191,7 +191,7 @@ do_menus (GtkWidget *do_widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK(gtk_widget_destroy), window); G_CALLBACK(gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }

View File

@ -221,7 +221,7 @@ do_ui_manager (GtkWidget *do_widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), window); G_CALLBACK (gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show_all (window); gtk_widget_show_all (window);

View File

@ -2520,7 +2520,7 @@ int main( int argc,
G_CALLBACK (close_application), G_CALLBACK (close_application),
G_OBJECT (window)); G_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
gtk_widget_show (window); gtk_widget_show (window);
@ -3338,7 +3338,7 @@ static void create_range_controls( void )
G_CALLBACK (gtk_main_quit), G_CALLBACK (gtk_main_quit),
NULL); NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
@ -4078,7 +4078,7 @@ int main( int argc,
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
/* This makes it so the button is the default. */ /* 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 /* This grabs this button to be the default button. Simply hitting
* the "Enter" key will cause this button to activate. */ * the "Enter" key will cause this button to activate. */
@ -4694,7 +4694,7 @@ int main( int argc,
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
G_OBJECT (window)); G_OBJECT (window));
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
@ -5913,7 +5913,7 @@ static void create_calendar( void )
G_CALLBACK (gtk_main_quit), G_CALLBACK (gtk_main_quit),
NULL); NULL);
gtk_container_add (GTK_CONTAINER (bbox), button); 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_grab_default (button);
gtk_widget_show_all (window); gtk_widget_show_all (window);
@ -7243,7 +7243,7 @@ int main( int argc,
/* this makes it so the button is the default. */ /* 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); 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 /* This grabs this button to be the default button. Simply hitting

View File

@ -393,7 +393,7 @@ static void create_calendar( void )
G_CALLBACK (gtk_main_quit), G_CALLBACK (gtk_main_quit),
NULL); NULL);
gtk_container_add (GTK_CONTAINER (bbox), button); 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_grab_default (button);
gtk_widget_show_all (window); gtk_widget_show_all (window);

View File

@ -88,7 +88,7 @@ int main( int argc,
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);

View File

@ -183,7 +183,7 @@ int main( int argc,
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
/* This makes it so the button is the default. */ /* 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 /* This grabs this button to be the default button. Simply hitting
* the "Enter" key will cause this button to activate. */ * the "Enter" key will cause this button to activate. */

View File

@ -69,7 +69,7 @@ int main( int argc,
G_CALLBACK (close_application), G_CALLBACK (close_application),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
gtk_widget_show (window); gtk_widget_show (window);

View File

@ -272,7 +272,7 @@ static void create_range_controls( void )
G_CALLBACK (gtk_main_quit), G_CALLBACK (gtk_main_quit),
NULL); NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);

View File

@ -77,7 +77,7 @@ int main( int argc,
/* this makes it so the button is the default. */ /* 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); 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 /* This grabs this button to be the default button. Simply hitting

View File

@ -170,7 +170,7 @@ int main( int argc,
G_CALLBACK (close_application), G_CALLBACK (close_application),
NULL); NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);

View File

@ -623,7 +623,7 @@ gtk_about_dialog_init (GtkAboutDialog *about)
/* Add the credits button */ /* Add the credits button */
button = gtk_button_new_with_mnemonic (_("C_redits")); 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); image = gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), image); gtk_button_set_image (GTK_BUTTON (button), image);
gtk_widget_set_no_show_all (button, TRUE); gtk_widget_set_no_show_all (button, TRUE);
@ -637,7 +637,7 @@ gtk_about_dialog_init (GtkAboutDialog *about)
/* Add the license button */ /* Add the license button */
button = gtk_button_new_from_stock (_("_License")); 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_widget_set_no_show_all (button, TRUE);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (about)->action_area), gtk_box_pack_end (GTK_BOX (GTK_DIALOG (about)->action_area),
button, FALSE, TRUE, 0); button, FALSE, TRUE, 0);

View File

@ -760,9 +760,9 @@ gtk_assistant_init (GtkAssistant *assistant)
assistant->back = gtk_button_new_from_stock (GTK_STOCK_GO_BACK); assistant->back = gtk_button_new_from_stock (GTK_STOCK_GO_BACK);
assistant->cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL); assistant->cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
assistant->last = gtk_button_new_from_stock (GTK_STOCK_GOTO_LAST); assistant->last = gtk_button_new_from_stock (GTK_STOCK_GOTO_LAST);
GTK_WIDGET_SET_FLAGS (assistant->close, GTK_CAN_DEFAULT); gtk_widget_set_can_default (assistant->close, TRUE);
GTK_WIDGET_SET_FLAGS (assistant->apply, GTK_CAN_DEFAULT); gtk_widget_set_can_default (assistant->apply, TRUE);
GTK_WIDGET_SET_FLAGS (assistant->forward, GTK_CAN_DEFAULT); gtk_widget_set_can_default (assistant->forward, TRUE);
priv->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); priv->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
gtk_size_group_add_widget (priv->size_group, assistant->close); gtk_size_group_add_widget (priv->size_group, assistant->close);

View File

@ -709,7 +709,7 @@ gtk_dialog_add_button (GtkDialog *dialog,
button = gtk_button_new_from_stock (button_text); 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); gtk_widget_show (button);

View File

@ -8145,7 +8145,7 @@ add_custom_button_to_dialog (GtkDialog *dialog,
GtkWidget *button; GtkWidget *button;
button = gtk_button_new_with_mnemonic (mnemonic_label); 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_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON)); gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON));
gtk_widget_show (button); gtk_widget_show (button);

View File

@ -1416,7 +1416,7 @@ gtk_file_selection_create_dir (GtkWidget *widget,
gtk_label_set_mnemonic_widget (GTK_LABEL (label), fs->fileop_entry); gtk_label_set_mnemonic_widget (GTK_LABEL (label), fs->fileop_entry);
gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry, gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry,
TRUE, TRUE, 5); 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_entry_set_activates_default (GTK_ENTRY (fs->fileop_entry), TRUE);
gtk_widget_show (fs->fileop_entry); gtk_widget_show (fs->fileop_entry);
@ -1681,7 +1681,7 @@ gtk_file_selection_rename_file (GtkWidget *widget,
fs->fileop_entry = gtk_entry_new (); fs->fileop_entry = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry, gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry,
TRUE, TRUE, 5); 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_entry_set_activates_default (GTK_ENTRY (fs->fileop_entry), TRUE);
gtk_widget_show (fs->fileop_entry); gtk_widget_show (fs->fileop_entry);

View File

@ -438,7 +438,7 @@ button_clicked_callback (GtkWidget *w, gpointer data)
gtk_widget_show (button); gtk_widget_show (button);
button = gtk_button_new_from_stock (GTK_STOCK_OK); 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_signal_connect (button, "clicked",
G_CALLBACK (gamma_ok_callback), c); G_CALLBACK (gamma_ok_callback), c);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);

View File

@ -802,7 +802,7 @@ gtk_info_bar_add_button (GtkInfoBar *info_bar,
button = gtk_button_new_from_stock (button_text); 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); gtk_widget_show (button);

View File

@ -310,13 +310,13 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
inputd->keys_list = NULL; inputd->keys_list = NULL;
inputd->save_button = gtk_button_new_from_stock (GTK_STOCK_SAVE); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG(inputd)->action_area),
inputd->save_button, TRUE, TRUE, 0); inputd->save_button, TRUE, TRUE, 0);
gtk_widget_show (inputd->save_button); gtk_widget_show (inputd->save_button);
inputd->close_button = gtk_button_new_from_stock (GTK_STOCK_CLOSE); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG(inputd)->action_area),
inputd->close_button, TRUE, TRUE, 0); inputd->close_button, TRUE, TRUE, 0);

View File

@ -2555,7 +2555,7 @@ gtk_print (gchar *str)
G_CALLBACK (gtk_widget_hide), G_CALLBACK (gtk_widget_hide),
GTK_OBJECT (window)); GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }

View File

@ -186,9 +186,11 @@ gtk_option_menu_child_type (GtkContainer *container)
static void static void
gtk_option_menu_init (GtkOptionMenu *option_menu) gtk_option_menu_init (GtkOptionMenu *option_menu)
{ {
gtk_widget_set_can_focus (GTK_WIDGET (option_menu), TRUE); GtkWidget *widget = GTK_WIDGET (option_menu);
GTK_WIDGET_UNSET_FLAGS (option_menu, GTK_CAN_DEFAULT);
gtk_widget_set_receives_default (GTK_WIDGET (option_menu), FALSE); 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 = NULL;
option_menu->menu_item = NULL; option_menu->menu_item = NULL;

View File

@ -414,7 +414,7 @@ add_custom_button_to_dialog (GtkDialog *dialog,
GtkWidget *button = NULL; GtkWidget *button = NULL;
button = gtk_button_new_with_mnemonic (mnemonic_label); 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_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (stock_id, gtk_image_new_from_stock (stock_id,
GTK_ICON_SIZE_BUTTON)); GTK_ICON_SIZE_BUTTON));

View File

@ -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_get_can_default (widget))
{ {
if (can_default) if (can_default)
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); GTK_OBJECT_FLAGS (widget) |= GTK_CAN_DEFAULT;
else else
GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_DEFAULT); GTK_OBJECT_FLAGS (widget) &= ~(GTK_CAN_DEFAULT);
gtk_widget_queue_resize (widget); gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (widget), "can-default"); g_object_notify (G_OBJECT (widget), "can-default");

View File

@ -679,7 +679,7 @@ create_calendar(void)
gtk_container_add (GTK_CONTAINER (window), vbox); 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_widget_grab_default (button);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 0); gtk_window_set_default_size (GTK_WINDOW (window), 600, 0);

View File

@ -909,7 +909,7 @@ create_buttons (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button[9], TRUE, TRUE, 0); 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]); gtk_widget_grab_default (button[9]);
} }
@ -977,7 +977,7 @@ create_toggle_buttons (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
} }
@ -1792,7 +1792,7 @@ create_statusbar (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
} }
@ -3494,7 +3494,7 @@ create_reparent (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), window); G_CALLBACK (gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
} }
@ -3782,7 +3782,7 @@ create_saved_position (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5); 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_grab_default (button);
gtk_widget_show_all (window); gtk_widget_show_all (window);
@ -3867,7 +3867,7 @@ create_pixmap (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
} }
@ -4032,7 +4032,7 @@ create_tooltips (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_tooltips_set_tip (tooltips, button, "Push this button to close window", "ContextHelp/buttons/Close"); 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), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }
@ -4788,7 +4788,7 @@ create_item_factory (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_item_factory_delete_item (item_factory, "/Preferences/ShouldNotAppear"); 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_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -5207,7 +5207,7 @@ create_scrolled_windows (GtkWidget *widget)
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (scrolled_windows_remove), G_CALLBACK (scrolled_windows_remove),
scrolled_window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -5412,7 +5412,7 @@ create_entry (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
} }
@ -5580,7 +5580,7 @@ create_event_box (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
} }
@ -6623,7 +6623,7 @@ create_list (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
} }
@ -7174,7 +7174,7 @@ create_clist (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
} }
@ -8705,7 +8705,7 @@ create_dialog (GtkWidget *widget)
gtk_container_set_border_width (GTK_CONTAINER (dialog_window), 0); gtk_container_set_border_width (GTK_CONTAINER (dialog_window), 0);
button = gtk_button_new_with_label ("OK"); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -8715,7 +8715,7 @@ create_dialog (GtkWidget *widget)
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (label_toggle), G_CALLBACK (label_toggle),
&label); &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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
@ -8724,7 +8724,7 @@ create_dialog (GtkWidget *widget)
button = gtk_button_new_with_label ("Separator"); 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), gtk_dialog_add_action_widget (GTK_DIALOG (dialog_window),
button, button,
@ -8986,7 +8986,7 @@ create_event_watcher (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
dialog_window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -9121,7 +9121,7 @@ create_range_controls (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }
@ -9398,7 +9398,7 @@ create_text (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }
@ -9769,7 +9769,7 @@ create_notebook (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_start (GTK_BOX (box1), button, FALSE, FALSE, 0); 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); gtk_widget_grab_default (button);
} }
@ -10638,7 +10638,7 @@ create_wmhints (GtkWidget *widget)
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }
@ -12071,7 +12071,7 @@ create_progress_bar (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
pdata->window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (pdata->window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -13130,7 +13130,7 @@ create_timeout_test (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -13140,7 +13140,7 @@ create_timeout_test (GtkWidget *widget)
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK(start_timeout_test), G_CALLBACK(start_timeout_test),
label); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
@ -13149,7 +13149,7 @@ create_timeout_test (GtkWidget *widget)
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (stop_timeout_test), G_CALLBACK (stop_timeout_test),
NULL); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
@ -13306,7 +13306,7 @@ create_idle_test (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -13316,7 +13316,7 @@ create_idle_test (GtkWidget *widget)
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (start_idle_test), G_CALLBACK (start_idle_test),
label); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
@ -13325,7 +13325,7 @@ create_idle_test (GtkWidget *widget)
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (stop_idle_test), G_CALLBACK (stop_idle_test),
NULL); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
@ -13405,7 +13405,7 @@ create_rc_file (GtkWidget *widget)
button = gtk_button_new_with_label ("Reload"); button = gtk_button_new_with_label ("Reload");
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (gtk_rc_reparse_all), NULL); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
@ -13413,7 +13413,7 @@ create_rc_file (GtkWidget *widget)
button = gtk_button_new_with_label ("Reload All"); button = gtk_button_new_with_label ("Reload All");
g_signal_connect (button, "clicked", g_signal_connect (button, "clicked",
G_CALLBACK (reload_all_rc_files), NULL); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
@ -13421,7 +13421,7 @@ create_rc_file (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
} }
@ -13478,7 +13478,7 @@ create_mainloop (GtkWidget *widget)
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_set_can_default (button, TRUE);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
@ -13638,7 +13638,7 @@ create_styles (GtkWidget *widget)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); 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), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
button, TRUE, TRUE, 0); button, TRUE, TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
@ -13917,7 +13917,7 @@ create_main_window (void)
G_CALLBACK (do_exit), G_CALLBACK (do_exit),
window); window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show_all (window); gtk_widget_show_all (window);

View File

@ -160,7 +160,7 @@ main (int argc, char **argv)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK(gtk_widget_destroy), window); G_CALLBACK(gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }

View File

@ -224,7 +224,7 @@ main (int argc, char **argv)
g_signal_connect_swapped (button, "clicked", g_signal_connect_swapped (button, "clicked",
G_CALLBACK(gtk_widget_destroy), window); G_CALLBACK(gtk_widget_destroy), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
} }

View File

@ -193,7 +193,7 @@ main (int argc, char *argv[])
G_CALLBACK (gtk_widget_destroy), G_CALLBACK (gtk_widget_destroy),
window); window);
gtk_box_pack_end (GTK_BOX (box), button, TRUE, TRUE, 0); 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_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);

View File

@ -285,7 +285,7 @@ msgbox_run (GtkWindow *parent,
if (yes_button) if (yes_button)
{ {
button = gtk_button_new_with_label (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); gtk_container_add (GTK_CONTAINER (button_box), button);
if (default_index == 0) if (default_index == 0)
@ -301,7 +301,7 @@ msgbox_run (GtkWindow *parent,
if (no_button) if (no_button)
{ {
button = gtk_button_new_with_label (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); gtk_container_add (GTK_CONTAINER (button_box), button);
if (default_index == 0) if (default_index == 0)
@ -316,7 +316,7 @@ msgbox_run (GtkWindow *parent,
if (cancel_button) if (cancel_button)
{ {
button = gtk_button_new_with_label (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); gtk_container_add (GTK_CONTAINER (button_box), button);
if (default_index == 1) if (default_index == 1)