[gnome-games] Replace some deprecated GTK symbols
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] Replace some deprecated GTK symbols
- Date: Sun, 11 Sep 2011 13:57:40 +0000 (UTC)
commit 1fe020f78fe55a292532337704a743cfc8aace38
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date: Sun Sep 11 16:03:21 2011 +0200
Replace some deprecated GTK symbols
gnect/src/prefs.c | 12 ++++++------
gnibbles/main.c | 2 +-
gnibbles/preferences.c | 8 ++++----
gnibbles/scoreboard.c | 8 ++++----
gnobots2/gnobots.c | 2 +-
gnobots2/properties.c | 19 +++++++++++--------
gnomine/gnomine.c | 13 +++++++------
gnotski/gnotski.c | 27 +++++++++++++++++----------
gtali/gyahtzee.c | 8 ++++----
gtali/setup.c | 14 +++++++-------
iagno/gnothello.c | 2 +-
iagno/properties.c | 14 +++++++-------
mahjongg/mahjongg.c | 10 +++++-----
quadrapassel/tetris.cpp | 20 ++++++++++----------
14 files changed, 85 insertions(+), 74 deletions(-)
---
diff --git a/gnect/src/prefs.c b/gnect/src/prefs.c
index ccb3de7..e35f248 100644
--- a/gnect/src/prefs.c
+++ b/gnect/src/prefs.c
@@ -296,18 +296,18 @@ prefsbox_open (void)
/* game tab */
- vbox1 = gtk_vbox_new (FALSE, 18);
+ vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 12);
label = gtk_label_new (_("Game"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox1, label);
- hbox = gtk_hbox_new (FALSE, 18);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 18);
gtk_box_pack_start (GTK_BOX (vbox1), hbox, FALSE, FALSE, 0);
frame_player1 = games_frame_new (NULL);
gtk_box_pack_start (GTK_BOX (hbox), frame_player1, FALSE, FALSE, 0);
- vbox2 = gtk_vbox_new (FALSE, 0);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (frame_player1), vbox2);
group = NULL;
@@ -320,7 +320,7 @@ prefsbox_open (void)
frame_player2 = games_frame_new (NULL);
gtk_box_pack_start (GTK_BOX (hbox), frame_player2, FALSE, FALSE, 0);
- vbox2 = gtk_vbox_new (FALSE, 0);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (frame_player2), vbox2);
group = NULL;
@@ -333,10 +333,10 @@ prefsbox_open (void)
frame = games_frame_new (_("Appearance"));
gtk_box_pack_start (GTK_BOX (vbox1), frame, FALSE, FALSE, 0);
- vbox2 = gtk_vbox_new (FALSE, 7);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 7);
gtk_container_add (GTK_CONTAINER (frame), vbox2);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
label = gtk_label_new_with_mnemonic (_("_Theme:"));
diff --git a/gnibbles/main.c b/gnibbles/main.c
index 664f5b9..7f1b94d 100644
--- a/gnibbles/main.c
+++ b/gnibbles/main.c
@@ -705,7 +705,7 @@ setup_window (void)
gtk_widget_realize (window);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
games_stock_init ();
ui_manager = gtk_ui_manager_new ();
diff --git a/gnibbles/preferences.c b/gnibbles/preferences.c
index 9108fff2..5655d5a 100644
--- a/gnibbles/preferences.c
+++ b/gnibbles/preferences.c
@@ -248,7 +248,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1, 0,
GTK_FILL | GTK_EXPAND, 0, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL 6);
gtk_container_add (GTK_CONTAINER (frame), vbox);
button = gtk_radio_button_new_with_label (NULL, _("Nibbles newbie"));
@@ -294,7 +294,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
frame = games_frame_new (_("Options"));
gtk_table_attach_defaults (GTK_TABLE (table), frame, 1, 2, 0, 1);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), vbox);
button =
@@ -409,7 +409,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
label = gtk_label_new (buffer);
g_free (buffer);
- vbox = gtk_vbox_new (FALSE, 18);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label);
@@ -436,7 +436,7 @@ gnibbles_preferences_cb (GtkWidget * widget, gpointer data)
frame = games_frame_new (_("Options"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
- vbox2 = gtk_vbox_new (FALSE, 6);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), vbox2);
button = gtk_check_button_new_with_mnemonic (_("_Use relative movement"));
diff --git a/gnibbles/scoreboard.c b/gnibbles/scoreboard.c
index 8eb75c8..ab2b899 100644
--- a/gnibbles/scoreboard.c
+++ b/gnibbles/scoreboard.c
@@ -42,7 +42,7 @@ gnibbles_scoreboard_new (GtkWidget * t_statusbar)
tmp->count = 0;
for (i = 0; i < NUMWORMS; i++) {
- hbox = gtk_hbox_new (FALSE, 8);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (hbox);
sprintf (buffer, _("Worm %d:"), i + 1);
@@ -63,13 +63,13 @@ void
gnibbles_scoreboard_register (GnibblesScoreboard * scoreboard,
GnibblesWorm * t_worm, gchar * colorname)
{
- GdkColor color;
+ GdkRGBA color;
- gdk_color_parse (colorname, &color);
+ gdk_rgba_parse (&color, colorname);
scoreboard->worms[scoreboard->count] = t_worm;
gtk_widget_set_sensitive (scoreboard->names[scoreboard->count], TRUE);
- gtk_widget_modify_fg (scoreboard->names[scoreboard->count], GTK_STATE_NORMAL, &color);
+ gtk_widget_override_color (scoreboard->names[scoreboard->count], GTK_STATE_NORMAL, &color);
gtk_widget_set_sensitive (scoreboard->data[scoreboard->count], TRUE);
gtk_widget_show (scoreboard->names[scoreboard->count]);
gtk_widget_show (scoreboard->data[scoreboard->count]);
diff --git a/gnobots2/gnobots.c b/gnobots2/gnobots.c
index a300b11..fc2451b 100644
--- a/gnobots2/gnobots.c
+++ b/gnobots2/gnobots.c
@@ -294,7 +294,7 @@ main (int argc, char *argv[])
gridframe = games_grid_frame_new (GAME_WIDTH, GAME_HEIGHT);
gtk_container_add (GTK_CONTAINER (gridframe), game_area);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), gridframe, TRUE, TRUE, 0);
diff --git a/gnobots2/properties.c b/gnobots2/properties.c
index f1271f8..569ccf1 100644
--- a/gnobots2/properties.c
+++ b/gnobots2/properties.c
@@ -439,16 +439,17 @@ show_properties_dialog (void)
notebook, TRUE, TRUE, 0);
/* The configuration page */
- cpage = gtk_vbox_new (FALSE, 18);
+ cpage = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_container_set_border_width (GTK_CONTAINER (cpage), 12);
frame = games_frame_new (_("Game Type"));
gtk_box_pack_start (GTK_BOX (cpage), frame, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), vbox);
- hbox = gtk_hbox_new (TRUE, 0);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
typemenu = gtk_combo_box_text_new ();
@@ -459,7 +460,8 @@ show_properties_dialog (void)
frame = games_frame_new (_("Options"));
gtk_box_pack_start (GTK_BOX (cpage), frame, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (TRUE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_box_set_homogeneous (GTK_BOX (vbox), TRUE);
gtk_container_add (GTK_CONTAINER (frame), vbox);
chkbox = gtk_check_button_new_with_mnemonic (_("_Use safe moves"));
@@ -482,7 +484,8 @@ show_properties_dialog (void)
frame = games_frame_new (_("Sound"));
gtk_box_pack_start (GTK_BOX (cpage), frame, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (TRUE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_box_set_homogeneous (GTK_BOX (vbox), TRUE);
gtk_container_add (GTK_CONTAINER (frame), vbox);
chkbox = gtk_check_button_new_with_mnemonic (_("_Enable sounds"));
@@ -498,7 +501,7 @@ show_properties_dialog (void)
/* The graphics page */
- gpage = gtk_vbox_new (FALSE, 18);
+ gpage = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_container_set_border_width (GTK_CONTAINER (gpage), 12);
frame = games_frame_new (_("Graphics Theme"));
@@ -536,12 +539,12 @@ show_properties_dialog (void)
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), gpage, label);
/* The keyboard page */
- kpage = gtk_vbox_new (FALSE, 18);
+ kpage = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_container_set_border_width (GTK_CONTAINER (kpage), 12);
frame = games_frame_new (_("Keyboard Controls"));
gtk_box_pack_start (GTK_BOX (kpage), frame, TRUE, TRUE, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), vbox);
controls_list = games_controls_list_new (KEY_PREFERENCES_GROUP);
diff --git a/gnomine/gnomine.c b/gnomine/gnomine.c
index 194356b..94edf99 100644
--- a/gnomine/gnomine.c
+++ b/gnomine/gnomine.c
@@ -620,7 +620,7 @@ create_preferences (void)
frame = games_frame_new (_("Field Size"));
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
group = NULL;
for (i = 0; i < G_N_ELEMENTS (scorecats); ++i) {
@@ -1003,7 +1003,7 @@ main (int argc, char *argv[])
g_signal_connect (G_OBJECT (window), "focus_out_event",
G_CALLBACK (focus_out_callback), NULL);
- all_boxes = gtk_vbox_new (FALSE, 0);
+ all_boxes = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (all_boxes);
gtk_container_add (GTK_CONTAINER (window), all_boxes);
@@ -1026,7 +1026,7 @@ main (int argc, char *argv[])
gtk_table_attach (GTK_TABLE (button_table), mbutton, 1, 2, 0, 1,
0, 0, 5, 5);
- face_box = gtk_vbox_new (FALSE, 5);
+ face_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
gtk_container_add (GTK_CONTAINER (mbutton), face_box);
pm_win = image_widget_setup ("face-win.svg");
@@ -1041,7 +1041,7 @@ main (int argc, char *argv[])
gtk_box_pack_start (GTK_BOX (face_box), pm_cool, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (face_box), pm_worried, FALSE, FALSE, 0);
- box = gtk_vbox_new (FALSE, 0);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_table_attach_defaults (GTK_TABLE (button_table), box, 1, 2, 1, 2);
gtk_box_pack_start (GTK_BOX (box), gtk_hseparator_new (), FALSE, FALSE, 0);
@@ -1084,13 +1084,14 @@ main (int argc, char *argv[])
gtk_box_pack_start (GTK_BOX (box), gtk_hseparator_new (), FALSE, FALSE, 0);
- status_box = gtk_hbox_new (TRUE, 0);
+ status_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_set_homogeneous (GTK_BOX (status_box), TRUE);
gtk_box_pack_start (GTK_BOX (box), status_box, FALSE, FALSE, 8);
flabel = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (status_box), flabel, FALSE, FALSE, 0);
- box = gtk_hbox_new (FALSE, 0);
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
label = gtk_label_new (_("Time: "));
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
diff --git a/gnotski/gnotski.c b/gnotski/gnotski.c
index bbd7841..47aae20 100644
--- a/gnotski/gnotski.c
+++ b/gnotski/gnotski.c
@@ -532,7 +532,7 @@ main (int argc, char **argv)
G_CALLBACK (quit_game_cb), NULL);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
load_image ();
@@ -662,9 +662,13 @@ void
gui_draw_space (void)
{
cairo_t *cr;
- GtkStyle *style;
+ GtkStyleContext *style;
+ GdkRGBA fg;
+ GdkRGBA bg;
- style = gtk_widget_get_style (space);
+ style = gtk_widget_get_style_context (space);
+ gtk_style_context_get_color (style, GTK_STATE_FLAG_NORMAL, &fg);
+ gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &bg);
if (buffer)
cairo_surface_destroy (buffer);
@@ -676,10 +680,10 @@ gui_draw_space (void)
cr = cairo_create (buffer);
- gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
+ gdk_cairo_set_source_rgba (cr, &bg);
cairo_paint (cr);
- gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
+ gdk_cairo_set_source_rgba (cr, &fg);
cairo_set_line_width (cr, 1.0);
cairo_rectangle (cr, 1.5, 1.5, width * tile_size + SPACE_PADDING - 2.0,
height * tile_size + SPACE_PADDING - 2.0);
@@ -699,7 +703,8 @@ gui_draw_pixmap (char *target, gint x, gint y)
gint overlay_size;
gint overlay_offset;
cairo_t *cr;
- GtkStyle *style;
+ GtkStyleContext *style;
+ GdkRGBA bg;
GdkRectangle rect;
rect.x = x * tile_size + SPACE_OFFSET;
@@ -707,11 +712,12 @@ gui_draw_pixmap (char *target, gint x, gint y)
rect.width = tile_size;
rect.height = tile_size;
- style = gtk_widget_get_style (space);
+ style = gtk_widget_get_style_context (space);
+ gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &bg);
cr = cairo_create (buffer);
gdk_cairo_rectangle (cr, &rect);
- gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
+ gdk_cairo_set_source_rgba (cr, &bg);
cairo_fill (cr);
@@ -990,7 +996,7 @@ add_puzzle_menu (GtkUIManager * ui_manager)
item = gtk_ui_manager_get_widget (ui_manager, g_strjoin("/", pack_uipath[level[i].group], level[i].name, NULL));
/* Create a label and image for the menu item */
- box = gtk_hbox_new (FALSE, 6);
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
labelw = gtk_label_new(label);
gtk_misc_set_alignment (GTK_MISC (labelw), 0.0, 0.5);
image = gtk_image_new ();
@@ -1043,7 +1049,8 @@ create_menubar (void)
void
create_statusbar (void)
{
- statusbar = gtk_hbox_new (TRUE, 0);
+ statusbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_set_homogeneous (GTK_BOX (statusbar), TRUE);
messagewidget = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (statusbar), messagewidget, FALSE, FALSE, 0);
diff --git a/gtali/gyahtzee.c b/gtali/gyahtzee.c
index 4893523..52e2b96 100644
--- a/gtali/gyahtzee.c
+++ b/gtali/gyahtzee.c
@@ -799,8 +799,8 @@ GyahtzeeCreateMainWindow (void)
/*---- Content ----*/
- hbox = gtk_hbox_new (FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 0);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -813,7 +813,7 @@ GyahtzeeCreateMainWindow (void)
LoadDicePixmaps ();
/* Put all the dice in a vertical column */
- dicebox = gtk_vbox_new (FALSE, 0);
+ dicebox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (hbox), dicebox, FALSE, TRUE, 0);
gtk_widget_show (dicebox);
@@ -836,7 +836,7 @@ GyahtzeeCreateMainWindow (void)
gtk_box_pack_end (GTK_BOX (dicebox), toolbar, TRUE, TRUE, 0);
for (i = 0; i < NUMBER_OF_DICE; i++) {
- tmp = gtk_vbox_new (FALSE, 0);
+ tmp = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
for (j = 0; j < NUMBER_OF_PIXMAPS; j++) {
gtk_box_pack_start (GTK_BOX (tmp), dicePixmaps[i][j][GAME_YAHTZEE], FALSE, FALSE, 0);
diff --git a/gtali/setup.c b/gtali/setup.c
index 6dc1cc8..687eea3 100644
--- a/gtali/setup.c
+++ b/gtali/setup.c
@@ -288,12 +288,12 @@ setup_game (GtkAction * action, gpointer data)
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1, GTK_FILL, GTK_FILL,
0, 0);
- box = gtk_vbox_new (FALSE, 6);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), box);
/*--- Spinner (number of humans) ---*/
OriginalNumberOfHumans = NumberOfHumans;
- box2 = gtk_hbox_new (FALSE, 12);
+ box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (box), box2, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Number of players:"));
@@ -313,7 +313,7 @@ setup_game (GtkAction * action, gpointer data)
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 1, 2, GTK_FILL,
GTK_FILL | GTK_EXPAND, 0, 0);
- box = gtk_vbox_new (FALSE, 6);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), box);
/*--- Button ---*/
@@ -325,7 +325,7 @@ setup_game (GtkAction * action, gpointer data)
/*--- Spinner (number of computers) ---*/
OriginalNumberOfComputers = NumberOfComputers;
- box2 = gtk_hbox_new (FALSE, 12);
+ box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (box), box2, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("N_umber of opponents:"));
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
@@ -339,7 +339,7 @@ setup_game (GtkAction * action, gpointer data)
G_CALLBACK (MaxPlayersCheck), ComputerAdj);
gtk_box_pack_start (GTK_BOX (box2), ComputerSpinner, TRUE, TRUE, 0);
- box2 = gtk_hbox_new(FALSE, 2);
+ box2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_box_pack_start(GTK_BOX(box), box2, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Difficulty:"));
gtk_box_pack_start(GTK_BOX(box2), label, FALSE, FALSE, 0);
@@ -373,11 +373,11 @@ setup_game (GtkAction * action, gpointer data)
frame = games_frame_new (_("Player Names"));
gtk_table_attach_defaults (GTK_TABLE (table), frame, 1, 2, 0, 3);
- box = gtk_vbox_new (FALSE, 6);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), box);
for (i = 0; i < MAX_NUMBER_OF_PLAYERS; i++) {
- box2 = gtk_hbox_new (FALSE, 12);
+ box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_box_pack_start (GTK_BOX (box), box2, FALSE, FALSE, 0);
ts = g_strdup_printf ("_%1d:", i + 1);
diff --git a/iagno/gnothello.c b/iagno/gnothello.c
index d105674..f72ef1e 100644
--- a/iagno/gnothello.c
+++ b/iagno/gnothello.c
@@ -831,7 +831,7 @@ create_window (void)
games_settings_bind_window_state ("/org/gnome/iagno/", GTK_WINDOW (window));
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
ui_manager = gtk_ui_manager_new ();
diff --git a/iagno/properties.c b/iagno/properties.c
index 4a23a97..d1f10b3 100644
--- a/iagno/properties.c
+++ b/iagno/properties.c
@@ -395,7 +395,7 @@ show_properties_dialog (void)
label = gtk_label_new (_("Game"));
- vbox = gtk_vbox_new (FALSE, 18);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label);
@@ -403,7 +403,7 @@ show_properties_dialog (void)
gtk_table_set_col_spacings (GTK_TABLE (table), 18);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
- vbox2 = gtk_vbox_new (FALSE, 6);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
button = gtk_check_button_new_with_mnemonic (_("_Use quick moves"));
@@ -424,7 +424,7 @@ show_properties_dialog (void)
frame = games_frame_new (_("Dark"));
gtk_table_attach_defaults (GTK_TABLE (table), frame, 0, 1, 0, 1);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
button = gtk_radio_button_new_with_label (NULL, _("Human"));
if (black_computer_level == 0)
@@ -465,7 +465,7 @@ show_properties_dialog (void)
frame = games_frame_new (_("Light"));
gtk_table_attach_defaults (GTK_TABLE (table), frame, 1, 2, 0, 1);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
button = gtk_radio_button_new_with_label (NULL, _("Human"));
if (white_computer_level == 0)
@@ -513,7 +513,7 @@ show_properties_dialog (void)
frame = games_frame_new (_("Animation"));
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
button = gtk_radio_button_new_with_label (NULL, _("None"));
if (animate == 0)
@@ -545,7 +545,7 @@ show_properties_dialog (void)
gtk_table_attach_defaults (GTK_TABLE (table), frame, 0, 1, 0, 1);
frame = games_frame_new (_("Options"));
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), vbox);
button = gtk_check_button_new_with_mnemonic (_("_Stagger flips"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
@@ -569,7 +569,7 @@ show_properties_dialog (void)
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
label2 = gtk_label_new_with_mnemonic (_("_Tile set:"));
diff --git a/mahjongg/mahjongg.c b/mahjongg/mahjongg.c
index 9d020d2..366b38b 100644
--- a/mahjongg/mahjongg.c
+++ b/mahjongg/mahjongg.c
@@ -1369,9 +1369,9 @@ main (int argc, char *argv[])
load_preferences ();
/* Statusbar for a chrono, Tiles left and Moves left */
- status_box = gtk_hbox_new (FALSE, 10);
+ status_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
- group_box = gtk_hbox_new (FALSE, 0);
+ group_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
tiles_label = gtk_label_new (_("Tiles Left:"));
gtk_box_pack_start (GTK_BOX (group_box), tiles_label, FALSE, FALSE, 0);
spacer = gtk_label_new (" ");
@@ -1380,7 +1380,7 @@ main (int argc, char *argv[])
gtk_box_pack_start (GTK_BOX (group_box), tiles_label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (status_box), group_box, FALSE, FALSE, 0);
- group_box = gtk_hbox_new (FALSE, 0);
+ group_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
moves_label = gtk_label_new (_("Moves Left:"));
gtk_box_pack_start (GTK_BOX (group_box), moves_label, FALSE, FALSE, 0);
spacer = gtk_label_new (" ");
@@ -1389,7 +1389,7 @@ main (int argc, char *argv[])
gtk_box_pack_start (GTK_BOX (group_box), moves_label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (status_box), group_box, FALSE, FALSE, 0);
- group_box = gtk_hbox_new (FALSE, 0);
+ group_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
chrono_label = gtk_label_new (_("Time:"));
gtk_box_pack_start (GTK_BOX (group_box), chrono_label, FALSE, FALSE, 0);
spacer = gtk_label_new (" ");
@@ -1418,7 +1418,7 @@ main (int argc, char *argv[])
gtk_style_context_add_class (gtk_widget_get_style_context (toolbar),
GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0);
diff --git a/quadrapassel/tetris.cpp b/quadrapassel/tetris.cpp
index 32e0087..e54c177 100644
--- a/quadrapassel/tetris.cpp
+++ b/quadrapassel/tetris.cpp
@@ -198,9 +198,9 @@ Tetris::Tetris(int cmdlLevel):
menubar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu");
- GtkWidget * hb = gtk_hbox_new(FALSE, 0);
+ GtkWidget * hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (w), vbox);
gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), hb, TRUE, TRUE, 0);
@@ -212,7 +212,7 @@ Tetris::Tetris(int cmdlLevel):
gtk_widget_set_events(w, gtk_widget_get_events(w) |
GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
- GtkWidget *vb1 = gtk_vbox_new(FALSE, 0);
+ GtkWidget *vb1 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width(GTK_CONTAINER(vb1), 10);
gtk_box_pack_start(GTK_BOX(vb1), aspect_frame, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hb), vb1, TRUE, TRUE, 0);
@@ -222,7 +222,7 @@ Tetris::Tetris(int cmdlLevel):
g_signal_connect (w, "key_press_event", G_CALLBACK (keyPressHandler), this);
g_signal_connect (w, "key_release_event", G_CALLBACK (keyReleaseHandler), this);
- GtkWidget *vb2 = gtk_vbox_new(FALSE, 0);
+ GtkWidget *vb2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width(GTK_CONTAINER(vb2), 10);
gtk_box_pack_end(GTK_BOX(hb), vb2, 0, 0, 0);
@@ -591,7 +591,7 @@ Tetris::gameProperties(GtkAction *action, void *d)
gtk_box_pack_start (GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
/* game page */
- vbox = gtk_vbox_new (FALSE, 18);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
label = gtk_label_new (_("Game"));
gtk_notebook_append_page (GTK_NOTEBOOK(notebook), vbox, label);
@@ -662,7 +662,7 @@ Tetris::gameProperties(GtkAction *action, void *d)
FALSE, FALSE, 0);
frame = games_frame_new (_("Operation"));
- fvbox = gtk_vbox_new (FALSE, 6);
+ fvbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
/* sound */
t->sound_toggle =
@@ -735,7 +735,7 @@ Tetris::gameProperties(GtkAction *action, void *d)
gtk_table_set_col_spacings (GTK_TABLE (table), 12);
/* controls page */
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
label = gtk_label_new (_("Controls"));
gtk_notebook_append_page (GTK_NOTEBOOK(notebook), vbox, label);
@@ -743,7 +743,7 @@ Tetris::gameProperties(GtkAction *action, void *d)
frame = games_frame_new (_("Keyboard Controls"));
gtk_container_add (GTK_CONTAINER (vbox), frame);
- fvbox = gtk_vbox_new (FALSE, 6);
+ fvbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), fvbox);
controls_list = games_controls_list_new (KEY_CONTROLS_GROUP);
@@ -759,7 +759,7 @@ Tetris::gameProperties(GtkAction *action, void *d)
gtk_box_pack_start (GTK_BOX (fvbox), controls_list, TRUE, TRUE, 0);
/* theme page */
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
label = gtk_label_new (_("Theme"));
gtk_notebook_append_page (GTK_NOTEBOOK(notebook), vbox, label);
@@ -767,7 +767,7 @@ Tetris::gameProperties(GtkAction *action, void *d)
frame = games_frame_new (_("Block Style"));
gtk_container_add (GTK_CONTAINER (vbox), frame);
- fvbox = gtk_vbox_new (FALSE, 6);
+ fvbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (frame), fvbox);
GtkWidget *omenu = gtk_combo_box_text_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]