[gnome-robots/arnaudb/wip/gtk4: 28/45] Adapt to Box API.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-robots/arnaudb/wip/gtk4: 28/45] Adapt to Box API.
- Date: Tue, 15 Sep 2020 14:46:49 +0000 (UTC)
commit dbc06d421c6c687ed15b88c449e8b788163e80b8
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon May 25 19:21:48 2020 +0200
Adapt to Box API.
src/gnome-robots.c | 10 +++++-----
src/properties.c | 15 +++++++--------
2 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/src/gnome-robots.c b/src/gnome-robots.c
index b9a4ff4..c2fe526 100644
--- a/src/gnome-robots.c
+++ b/src/gnome-robots.c
@@ -407,7 +407,7 @@ activate (GtkApplication *app, gpointer user_data)
gtk_container_add (GTK_CONTAINER (button), label);
gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "win.random-teleport");
gtk_size_group_add_widget (size_group, button);
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_box_append (GTK_BOX (hbox), button);
safe_teleports_label = gtk_label_new (NULL);
gtk_label_set_justify (GTK_LABEL (safe_teleports_label), GTK_JUSTIFY_CENTER);
@@ -417,7 +417,7 @@ activate (GtkApplication *app, gpointer user_data)
gtk_container_add (GTK_CONTAINER (button), safe_teleports_label);
gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "win.safe-teleport");
gtk_size_group_add_widget (size_group, button);
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_box_append (GTK_BOX (hbox), button);
label = gtk_label_new_with_mnemonic (_("_Wait for Robots"));
gtk_widget_set_margin_top (label, 15);
@@ -426,13 +426,13 @@ activate (GtkApplication *app, gpointer user_data)
gtk_container_add (GTK_CONTAINER (button), label);
gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "win.wait");
gtk_size_group_add_widget (size_group, button);
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_box_append (GTK_BOX (hbox), button);
g_object_unref (size_group);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_box_pack_start (GTK_BOX (vbox), gridframe, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (vbox), gridframe);
+ gtk_box_append (GTK_BOX (vbox), hbox);
gtk_container_add (GTK_CONTAINER (window), vbox);
diff --git a/src/properties.c b/src/properties.c
index f201f43..4a3f66a 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -401,8 +401,7 @@ show_properties_dialog (void)
notebook = gtk_notebook_new ();
gtk_container_set_border_width (GTK_CONTAINER (notebook), 5);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (propbox))),
- notebook, TRUE, TRUE, 0);
+ gtk_box_append (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (propbox))), notebook);
/* The configuration page */
cpage = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
@@ -411,7 +410,7 @@ show_properties_dialog (void)
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
- gtk_box_pack_start (GTK_BOX (cpage), grid, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (cpage), grid);
label = gtk_label_new (_("Game Type"));
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
@@ -463,7 +462,7 @@ show_properties_dialog (void)
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
- gtk_box_pack_start (GTK_BOX (gpage), grid, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (gpage), grid);
label = gtk_label_new_with_mnemonic (_("_Image theme:"));
gtk_widget_set_hexpand (label, TRUE);
@@ -497,7 +496,7 @@ show_properties_dialog (void)
gtk_container_set_border_width (GTK_CONTAINER (kpage), 12);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_box_pack_start (GTK_BOX (kpage), vbox, TRUE, TRUE, 0);
+ gtk_box_append (GTK_BOX (kpage), vbox);
controls_list = games_controls_list_new (settings);
games_controls_list_add_controls (GAMES_CONTROLS_LIST (controls_list),
@@ -512,16 +511,16 @@ show_properties_dialog (void)
"key08", _("Key to move SE"), g_settings_get_default_value (settings,
"key08"),
NULL);
- gtk_box_pack_start (GTK_BOX (vbox), controls_list, TRUE, TRUE, 0);
+ gtk_box_append (GTK_BOX (vbox), controls_list);
hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_START);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (vbox), hbox);
dbut = gtk_button_new_with_mnemonic (_("_Restore Defaults"));
g_signal_connect (G_OBJECT (dbut), "clicked",
G_CALLBACK (defkey_cb), NULL);
- gtk_box_pack_start (GTK_BOX (hbox), dbut, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (hbox), dbut);
label = gtk_label_new_with_mnemonic (_("Keyboard"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), kpage, label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]