tDon't use deprecated layout_default functions - vaccinewars - be a doctor and try to vaccinate the world
HTML git clone git://src.adamsgaard.dk/vaccinewars
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 0cb94ede5eb33dc1592d11d2a0c1a383d5ea25e2
DIR parent 4daec5e6c40d3a53f5d6eb97f39946412ffecbaf
HTML Author: Ben Webb <ben@salilab.org>
Date: Sun, 22 Nov 2020 01:36:33 -0800
Don't use deprecated layout_default functions
Diffstat:
M src/gui_client/gtk_client.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
---
DIR diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
t@@ -201,17 +201,13 @@ static void LogMessage(const gchar *log_domain, GLogLevelFlags log_level,
}
/*
- * Creates an hbutton_box widget, and sets a sensible spacing.
- * N.B. Should use gtk_hbutton_box_set_spacing_default() instead, but
- * this doesn't seem to actually work with GTK+2...
+ * Creates an hbutton_box widget, and sets a sensible spacing and layout.
*/
GtkWidget *my_hbbox_new(void)
{
GtkWidget *hbbox = gtk_hbutton_box_new();
-
-#if !CYGWIN
- gtk_box_set_spacing(GTK_BOX(hbbox), 8);
-#endif
+ gtk_button_box_set_layout(GTK_BUTTON_BOX(hbbox), GTK_BUTTONBOX_END);
+ gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbbox), 8);
return hbbox;
}
t@@ -2233,13 +2229,6 @@ gboolean GtkLoop(int *argc, char **argv[],
SetPlayerName(ClientData.Play, PlayerName);
}
- gtk_hbutton_box_set_layout_default(GTK_BUTTONBOX_END);
- gtk_vbutton_box_set_layout_default(GTK_BUTTONBOX_SPREAD);
-
-#if CYGWIN
- gtk_hbutton_box_set_spacing_default(8);
-#endif
-
window = MainWindow = ClientData.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
/* Title of main window in GTK+ client */
t@@ -3126,6 +3115,8 @@ void CreateInventory(GtkWidget *hbox, gchar *Objects,
if (CreateButtons) {
widgets->vbbox = vbbox = gtk_vbutton_box_new();
+ gtk_button_box_set_layout(GTK_BUTTON_BOX(vbbox), GTK_BUTTONBOX_SPREAD);
+
for (i = 0; i < 3; i++) {
button[i] = gtk_button_new_with_label("");