tDon't use deprecated gtk_widget_set_usize() - vaccinewars - be a doctor and try to vaccinate the world
git clone git://src.adamsgaard.dk/vaccinewars
Log
Files
Refs
README
LICENSE
---
commit 31887b475ae814acb421a2ae9fc89049835ccedf
parent 9e142f36f3e9cee695ceadcab8026ec1b586d2e5
Author: Ben Webb 
Date:   Fri, 20 Nov 2020 00:34:49 -0800

Don't use deprecated gtk_widget_set_usize()

Diffstat:
  M src/gtkport/gtkport.c               |       2 +-
  M src/gtkport/gtkport.h               |       2 +-
  M src/gui_client/gtk_client.c         |       4 ++--

3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c
t@@ -4836,7 +4836,7 @@ void gtk_text_set_point(GtkText *text, guint index)
   gtk_editable_set_position(GTK_EDITABLE(text), index);
 }
 
-void gtk_widget_set_usize(GtkWidget *widget, gint width, gint height)
+void gtk_widget_set_size_request(GtkWidget *widget, gint width, gint height)
 {
   widget->usize.width = width;
   widget->usize.height = height;
diff --git a/src/gtkport/gtkport.h b/src/gtkport/gtkport.h
t@@ -637,7 +637,7 @@ void gtk_label_set_text(GtkLabel *label, const gchar *str);
 guint gtk_label_parse_uline(GtkLabel *label, const gchar *str);
 void gtk_label_get(GtkLabel *label, gchar **str);
 void gtk_text_set_point(GtkText *text, guint index);
-void gtk_widget_set_usize(GtkWidget *widget, gint width, gint height);
+void gtk_widget_set_size_request(GtkWidget *widget, gint width, gint height);
 gint gtk_spin_button_get_value_as_int(GtkSpinButton *spin_button);
 void gtk_spin_button_set_value(GtkSpinButton *spin_button, gfloat value);
 void gtk_spin_button_set_adjustment(GtkSpinButton *spin_button,
diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
t@@ -943,7 +943,7 @@ static void CreateFightDialog(void)
   g_object_set_data(G_OBJECT(dialog), "combatants", combatants);
 
   text = gtk_scrolled_text_view_new(&hbox);
-  gtk_widget_set_usize(text, 150, 120);
+  gtk_widget_set_size_request(text, 150, 120);
 
   gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
   gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
t@@ -2303,7 +2303,7 @@ gboolean GtkLoop(int *argc, char **argv[],
 
   text = ClientData.messages = gtk_scrolled_text_view_new(&hbox);
   make_tags(GTK_TEXT_VIEW(text));
-  gtk_widget_set_usize(text, 100, 80);
+  gtk_widget_set_size_request(text, 100, 80);
   gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
   gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
   gtk_paned_pack1(GTK_PANED(vpaned), hbox, TRUE, TRUE);