tUse GTK-3 style separator classes - vaccinewars - be a doctor and try to vacci… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 385897979732663134d50d8fdad3c7bbd0a1f408 | |
parent 4d0df8bf54941486eee931282daeb1f6219e22ec | |
Author: Ben Webb <[email protected]> | |
Date: Sun, 22 Nov 2020 22:50:11 -0800 | |
Use GTK-3 style separator classes | |
Diffstat: | |
M src/gtkport/gtkport.c | 9 +++++++++ | |
M src/gtkport/gtkport.h | 1 + | |
M src/gui_client/gtk_client.c | 26 +++++++++++++------------- | |
M src/gui_client/newgamedia.c | 2 +- | |
M src/gui_client/optdialog.c | 4 ++-- | |
5 files changed, 26 insertions(+), 16 deletions(-) | |
--- | |
diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c | |
t@@ -5206,6 +5206,15 @@ GtkWidget *gtk_box_new(GtkOrientation orientation, gint… | |
} | |
} | |
+GtkWidget *gtk_separator_new(GtkOrientation orientation) | |
+{ | |
+ if (orientation == GTK_ORIENTATION_HORIZONTAL) { | |
+ return gtk_hseparator_new(); | |
+ } else { | |
+ return gtk_vseparator_new(); | |
+ } | |
+} | |
+ | |
#endif | |
guint SetAccelerator(GtkWidget *labelparent, gchar *Text, | |
diff --git a/src/gtkport/gtkport.h b/src/gtkport/gtkport.h | |
t@@ -699,6 +699,7 @@ void MapWidgetOrigin(GtkWidget *widget, POINT *pt); | |
#if GTK_MAJOR_VERSION == 2 | |
GtkWidget *gtk_button_box_new(GtkOrientation orientation); | |
GtkWidget *gtk_box_new(GtkOrientation orientation, gint spacing); | |
+GtkWidget *gtk_separator_new(GtkOrientation orientation); | |
#endif | |
/* Defines for GtkMessageBox options */ | |
diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c | |
t@@ -346,7 +346,7 @@ void ListInventory(GtkWidget *widget, gpointer data) | |
gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -640,7 +640,7 @@ void PrepareHighScoreDialog(void) | |
gtk_table_set_col_spacings(GTK_TABLE(table), 30); | |
gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
gtk_container_add(GTK_CONTAINER(dialog), vbox); | |
gtk_widget_show_all(dialog); | |
t@@ -927,7 +927,7 @@ static void CreateFightDialog(void) | |
gtk_table_set_row_spacings(GTK_TABLE(table), 7); | |
gtk_table_set_col_spacings(GTK_TABLE(table), 10); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_table_attach_defaults(GTK_TABLE(table), hsep, 0, 4, 1, 2); | |
gtk_widget_show_all(table); | |
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); | |
t@@ -946,7 +946,7 @@ static void CreateFightDialog(void) | |
gtk_widget_show_all(hbox); | |
gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
gtk_widget_show(hsep); | |
t@@ -1760,7 +1760,7 @@ void DealDrugs(GtkWidget *widget, gpointer data) | |
gtk_box_pack_start(GTK_BOX(hbox), spinner, FALSE, FALSE, 0); | |
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -1918,7 +1918,7 @@ void QuestionDialog(char *Data, Player *From) | |
label = gtk_label_new(LabelText); | |
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -2451,7 +2451,7 @@ void display_intro(GtkWidget *widget, gpointer data) | |
PackCentredURL(vbox, "https://dopewars.sourceforge.io/", | |
"https://dopewars.sourceforge.io/", WebBrowser); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -2620,7 +2620,7 @@ void TransferDialog(gboolean Debt) | |
gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -2679,7 +2679,7 @@ void ListPlayers(GtkWidget *widget, gpointer data) | |
UpdatePlayerList(clist, FALSE); | |
gtk_box_pack_start(GTK_BOX(vbox), clist, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -2811,7 +2811,7 @@ void TalkDialog(gboolean TalkToAll) | |
G_CALLBACK(TalkSend), (gpointer)&TalkData); | |
gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -2979,7 +2979,7 @@ void ErrandDialog(gint ErrandType) | |
UpdatePlayerList(clist, FALSE); | |
gtk_box_pack_start(GTK_BOX(vbox), clist, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
t@@ -3209,7 +3209,7 @@ void NewNameDialog(void) | |
gtk_entry_set_text(GTK_ENTRY(entry), GetPlayerName(ClientData.Play)); | |
gtk_box_pack_start(GTK_BOX(vbox), entry, FALSE, FALSE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
button = NewStockButton(GTK_STOCK_OK, accel_group); | |
t@@ -3262,7 +3262,7 @@ void GunShopDialog(void) | |
gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
diff --git a/src/gui_client/newgamedia.c b/src/gui_client/newgamedia.c | |
t@@ -747,7 +747,7 @@ static void SocksAuthDialog(NetworkBuffer *netbuf, gpointe… | |
gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); | |
diff --git a/src/gui_client/optdialog.c b/src/gui_client/optdialog.c | |
t@@ -930,7 +930,7 @@ void OptDialog(GtkWidget *widget, gpointer data) | |
hbox = CreateList("Drug", drugmembers); | |
gtk_box_pack_start(GTK_BOX(vbox2), hbox, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox2), hsep, FALSE, FALSE, 0); | |
table = gtk_table_new(2, 2, FALSE); | |
t@@ -1055,7 +1055,7 @@ void OptDialog(GtkWidget *widget, gpointer data) | |
gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); | |
- hsep = gtk_hseparator_new(); | |
+ hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); | |
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0); | |
hbbox = my_hbbox_new(); |