From e5ae79a57575a8806a18d1552f9093c88103ee36 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 9 Oct 2021 23:20:03 +0300 Subject: [PATCH 44/44] gtk4: Drop parameters from gtk_scrolled_window_new() calls See osdn #43012 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/action_dialog.c | 8 ++++---- client/gui-gtk-4.0/citizensinfo.c | 4 ++-- client/gui-gtk-4.0/citydlg.c | 8 ++++---- client/gui-gtk-4.0/cityrep.c | 2 +- client/gui-gtk-4.0/cma_fe.c | 2 +- client/gui-gtk-4.0/dialogs.c | 6 +++--- client/gui-gtk-4.0/diplodlg.c | 4 ++-- client/gui-gtk-4.0/editgui.c | 2 +- client/gui-gtk-4.0/editprop.c | 6 +++--- client/gui-gtk-4.0/finddlg.c | 2 +- client/gui-gtk-4.0/gotodlg.c | 2 +- client/gui-gtk-4.0/gtkcompat.c | 14 ++++++++++++++ client/gui-gtk-4.0/gtkcompat.h | 11 +++++++++++ client/gui-gtk-4.0/gui_main.c | 8 ++++---- client/gui-gtk-4.0/helpdlg.c | 6 +++--- client/gui-gtk-4.0/inteldlg.c | 4 ++-- client/gui-gtk-4.0/luaconsole.c | 2 +- client/gui-gtk-4.0/messagedlg.c | 2 +- client/gui-gtk-4.0/messagewin.c | 2 +- client/gui-gtk-4.0/optiondlg.c | 2 +- client/gui-gtk-4.0/pages.c | 20 ++++++++++---------- client/gui-gtk-4.0/plrdlg.c | 2 +- client/gui-gtk-4.0/repodlgs.c | 8 ++++---- client/gui-gtk-4.0/unitselect.c | 2 +- client/gui-gtk-4.0/wldlg.c | 6 +++--- 25 files changed, 80 insertions(+), 55 deletions(-) diff --git a/client/gui-gtk-4.0/action_dialog.c b/client/gui-gtk-4.0/action_dialog.c index 06ad30e47d..a7ffd85e07 100644 --- a/client/gui-gtk-4.0/action_dialog.c +++ b/client/gui-gtk-4.0/action_dialog.c @@ -621,8 +621,8 @@ static void create_advances_list(struct player *pplayer, "yalign", 0.5, NULL); gtk_container_add(GTK_CONTAINER(vbox), label); - - sw = gtk_scrolled_window_new(NULL, NULL); + + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(sw), view); @@ -808,8 +808,8 @@ static void create_improvements_list(struct player *pplayer, "yalign", 0.5, NULL); gtk_container_add(GTK_CONTAINER(vbox), label); - - sw = gtk_scrolled_window_new(NULL, NULL); + + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(sw), view); diff --git a/client/gui-gtk-4.0/citizensinfo.c b/client/gui-gtk-4.0/citizensinfo.c index 8f4da561fd..01d96795f8 100644 --- a/client/gui-gtk-4.0/citizensinfo.c +++ b/client/gui-gtk-4.0/citizensinfo.c @@ -15,7 +15,6 @@ #include #endif - #include #include #include @@ -29,6 +28,7 @@ #include "player.h" /* client/gui-gtk-4.0 */ +#include "gtkcompat.h" #include "gui_stuff.h" #include "plrdlg.h" @@ -241,7 +241,7 @@ static struct citizens_dialog *citizens_dialog_create(const struct city *pcity) gtk_widget_set_hexpand(GTK_WIDGET(pdialog->list), TRUE); gtk_widget_set_vexpand(GTK_WIDGET(pdialog->list), TRUE); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); diff --git a/client/gui-gtk-4.0/citydlg.c b/client/gui-gtk-4.0/citydlg.c index 8f6abeeea2..c4652ca97c 100644 --- a/client/gui-gtk-4.0/citydlg.c +++ b/client/gui-gtk-4.0/citydlg.c @@ -413,7 +413,7 @@ static void city_dialog_map_create(struct city_dialog *pdialog, { GtkWidget *sw, *darea; - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(sw), CITYMAP_WIDTH); gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw), @@ -1003,7 +1003,7 @@ static void create_and_append_overview_page(struct city_dialog *pdialog) "xalign", 0.0, "yalign", 0.5, NULL); gtk_container_add(GTK_CONTAINER(vbox), label); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -1047,7 +1047,7 @@ static void create_and_append_overview_page(struct city_dialog *pdialog) pdialog->overview.present_units_frame); /* supported units */ - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_widget_set_hexpand(sw, TRUE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); @@ -1071,7 +1071,7 @@ static void create_and_append_overview_page(struct city_dialog *pdialog) unit_node_vector_init(&pdialog->overview.supported_units); /* present units */ - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_widget_set_hexpand(sw, TRUE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); diff --git a/client/gui-gtk-4.0/cityrep.c b/client/gui-gtk-4.0/cityrep.c index d84174979e..7f3e87ac70 100644 --- a/client/gui-gtk-4.0/cityrep.c +++ b/client/gui-gtk-4.0/cityrep.c @@ -1219,7 +1219,7 @@ static void create_city_report_dialog(bool make_modal) NULL); } - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), diff --git a/client/gui-gtk-4.0/cma_fe.c b/client/gui-gtk-4.0/cma_fe.c index 59b63e2884..4a9035d7ef 100644 --- a/client/gui-gtk-4.0/cma_fe.c +++ b/client/gui-gtk-4.0/cma_fe.c @@ -258,7 +258,7 @@ struct cma_dialog *create_cma_dialog(struct city *pcity, bool tiny) gtk_grid_set_row_spacing(GTK_GRID(pdialog->shell), 2); gtk_container_add(GTK_CONTAINER(page), vbox); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), diff --git a/client/gui-gtk-4.0/dialogs.c b/client/gui-gtk-4.0/dialogs.c index 5992a1943a..e87e53feca 100644 --- a/client/gui-gtk-4.0/dialogs.c +++ b/client/gui-gtk-4.0/dialogs.c @@ -125,7 +125,7 @@ void popup_notify_dialog(const char *caption, const char *headline, gtk_widget_set_halign(headline_label, GTK_ALIGN_START); gtk_widget_set_valign(headline_label, GTK_ALIGN_START); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -652,7 +652,7 @@ static GtkWidget* create_list_of_nations_in_group(struct nation_group* group, gtk_tree_selection_set_select_function(select, races_selection_func, NULL, NULL); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -1109,7 +1109,7 @@ static void create_races_dialog(struct player *pplayer) g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW(list)), "changed", G_CALLBACK(races_style_callback), NULL); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_widget_set_margin_top(sw, 6); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); diff --git a/client/gui-gtk-4.0/diplodlg.c b/client/gui-gtk-4.0/diplodlg.c index 66b5ec63c0..e94193108f 100644 --- a/client/gui-gtk-4.0/diplodlg.c +++ b/client/gui-gtk-4.0/diplodlg.c @@ -488,7 +488,7 @@ static struct Diplomacy_notebook *diplomacy_main_create(void) GTK_POS_RIGHT); gtk_notebook_set_scrollable(GTK_NOTEBOOK(dipl_main->notebook), TRUE); - dipl_sw = gtk_scrolled_window_new(NULL, NULL); + dipl_sw = gtk_scrolled_window_new(); g_object_set(dipl_sw, "margin", 2, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(dipl_sw), GTK_POLICY_AUTOMATIC, @@ -871,7 +871,7 @@ static struct Diplomacy_dialog *create_diplomacy_dialog(struct player *plr0, gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1, NULL, rend, "text", 0, NULL); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); g_object_set(sw, "margin", 2, NULL); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); diff --git a/client/gui-gtk-4.0/editgui.c b/client/gui-gtk-4.0/editgui.c index a6990a290c..ba5b8c38c8 100644 --- a/client/gui-gtk-4.0/editgui.c +++ b/client/gui-gtk-4.0/editgui.c @@ -1040,7 +1040,7 @@ create_tool_value_selector(struct editbar *eb, G_TYPE_STRING); tvs->store = store; - scrollwin = gtk_scrolled_window_new(NULL, NULL); + scrollwin = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), diff --git a/client/gui-gtk-4.0/editprop.c b/client/gui-gtk-4.0/editprop.c index 2119982134..7f601fd8bf 100644 --- a/client/gui-gtk-4.0/editprop.c +++ b/client/gui-gtk-4.0/editprop.c @@ -3615,7 +3615,7 @@ static struct extviewer *extviewer_new(struct objprop *op) ev->view_label = label; if (store || textbuf) { - scrollwin = gtk_scrolled_window_new(NULL, NULL); + scrollwin = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), @@ -4775,7 +4775,7 @@ property_page_new(enum editor_object_type objtype, gtk_widget_set_margin_bottom(vbox, 4); gtk_paned_pack1(GTK_PANED(paned), vbox, TRUE, TRUE); - scrollwin = gtk_scrolled_window_new(NULL, NULL); + scrollwin = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), @@ -4933,7 +4933,7 @@ property_page_new(enum editor_object_type objtype, gtk_widget_set_size_request(frame, 256, -1); gtk_container_add(GTK_CONTAINER(vbox), frame); - scrollwin = gtk_scrolled_window_new(NULL, NULL); + scrollwin = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_NONE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin), diff --git a/client/gui-gtk-4.0/finddlg.c b/client/gui-gtk-4.0/finddlg.c index 1a322c4c8b..b919394cea 100644 --- a/client/gui-gtk-4.0/finddlg.c +++ b/client/gui-gtk-4.0/finddlg.c @@ -98,7 +98,7 @@ void popup_find_dialog(void) gtk_tree_view_column_set_sort_order(column, GTK_SORT_ASCENDING); gtk_tree_view_append_column(GTK_TREE_VIEW(find_view), column); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); g_object_set(sw, "margin", 2, NULL); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); diff --git a/client/gui-gtk-4.0/gotodlg.c b/client/gui-gtk-4.0/gotodlg.c index fab18e3205..bed6918d0c 100644 --- a/client/gui-gtk-4.0/gotodlg.c +++ b/client/gui-gtk-4.0/gotodlg.c @@ -225,7 +225,7 @@ static void create_goto_dialog(void) gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); gtk_tree_view_column_set_sort_column_id(col, GD_COL_AIRLIFT); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_container_add(GTK_CONTAINER(sw), view); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); diff --git a/client/gui-gtk-4.0/gtkcompat.c b/client/gui-gtk-4.0/gtkcompat.c index 7f85f29ad5..309af62e39 100644 --- a/client/gui-gtk-4.0/gtkcompat.c +++ b/client/gui-gtk-4.0/gtkcompat.c @@ -79,3 +79,17 @@ GdkScrollDirection gdk_scroll_event_get_direction(GdkEvent *ev) } #endif /* GTK version < 3.98 */ + + +#if !GTK_CHECK_VERSION(3,99,0) + +/************************************************************************//** + Compatibility wrapper for dropping parameter from + gtk_scrolled_window_new() calls +****************************************************************************/ +GtkWidget *compat_scrolled_window_new_wrapper(void) +{ + return gtk_scrolled_window_new(NULL, NULL); +} + +#endif /* GTK version < 3.99.0 */ diff --git a/client/gui-gtk-4.0/gtkcompat.h b/client/gui-gtk-4.0/gtkcompat.h index 830d82e07e..8b81d44c81 100644 --- a/client/gui-gtk-4.0/gtkcompat.h +++ b/client/gui-gtk-4.0/gtkcompat.h @@ -41,4 +41,15 @@ GdkScrollDirection gdk_scroll_event_get_direction(GdkEvent *ev); #endif /* GTK version < 3.98 */ +#if !GTK_CHECK_VERSION(3,99,0) +/* Compatibility mode */ + +GtkWidget *compat_scrolled_window_new_wrapper(void); + +#ifndef GTKCOMPAT_ITSELF +#define gtk_scrolled_window_new() compat_scrolled_window_new_wrapper() +#endif /* GTKCOMPAT_ITSELF */ + +#endif /* GTK version < 3.99 */ + #endif /* FC__GTKCOMPAT_H */ diff --git a/client/gui-gtk-4.0/gui_main.c b/client/gui-gtk-4.0/gui_main.c index 810221c7f2..8e96658e81 100644 --- a/client/gui-gtk-4.0/gui_main.c +++ b/client/gui-gtk-4.0/gui_main.c @@ -1095,7 +1095,7 @@ static void setup_widgets(void) /* *** everything in the top *** */ - page = gtk_scrolled_window_new(NULL, NULL); + page = gtk_scrolled_window_new(); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(page), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(page), @@ -1155,7 +1155,7 @@ static void setup_widgets(void) gtk_container_add(GTK_CONTAINER(vgrid), ahbox); avbox = detached_widget_fill(ahbox); - overview_scrolled_window = gtk_scrolled_window_new(NULL, NULL); + overview_scrolled_window = gtk_scrolled_window_new(); gtk_widget_set_margin_start(overview_scrolled_window, 1); gtk_widget_set_margin_end(overview_scrolled_window, 1); gtk_widget_set_margin_top(overview_scrolled_window, 1); @@ -1332,7 +1332,7 @@ static void setup_widgets(void) unit_info_frame = gtk_frame_new(""); gtk_container_add(GTK_CONTAINER(unit_info_box), unit_info_frame); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_OUT); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -1499,7 +1499,7 @@ static void setup_widgets(void) gtk_orientable_set_orientation(GTK_ORIENTABLE(vgrid), GTK_ORIENTATION_VERTICAL); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, diff --git a/client/gui-gtk-4.0/helpdlg.c b/client/gui-gtk-4.0/helpdlg.c index 80505bcdd9..fe594a3739 100644 --- a/client/gui-gtk-4.0/helpdlg.c +++ b/client/gui-gtk-4.0/helpdlg.c @@ -519,7 +519,7 @@ static void create_help_dialog(void) col = gtk_tree_view_column_new_with_attributes(NULL, rend, "text", 0, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(help_view), col); - help_view_sw = gtk_scrolled_window_new(NULL, NULL); + help_view_sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(help_view_sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_widget_set_size_request(help_view_sw, 190, -1); @@ -666,7 +666,7 @@ static void create_help_dialog(void) help_text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)); gtk_widget_show(text); - help_text_sw = gtk_scrolled_window_new(NULL, NULL); + help_text_sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(help_text_sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_container_add(GTK_CONTAINER(help_text_sw), text); @@ -708,7 +708,7 @@ static void create_help_dialog(void) gtk_tree_view_append_column(GTK_TREE_VIEW(help_tree), col); - help_tree_sw = gtk_scrolled_window_new(NULL, NULL); + help_tree_sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(help_tree_sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(help_tree_sw), help_tree); diff --git a/client/gui-gtk-4.0/inteldlg.c b/client/gui-gtk-4.0/inteldlg.c index 9808d25f13..2d6412d3c1 100644 --- a/client/gui-gtk-4.0/inteldlg.c +++ b/client/gui-gtk-4.0/inteldlg.c @@ -248,7 +248,7 @@ static struct intel_dialog *create_intel_dialog(struct player *p) gtk_tree_view_expand_all(GTK_TREE_VIEW(view)); - sw = gtk_scrolled_window_new(NULL,NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(sw), view); @@ -285,7 +285,7 @@ static struct intel_dialog *create_intel_dialog(struct player *p) "text", 1, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); - sw = gtk_scrolled_window_new(NULL,NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(sw), view); diff --git a/client/gui-gtk-4.0/luaconsole.c b/client/gui-gtk-4.0/luaconsole.c index 1249f0798b..edafbcfa13 100644 --- a/client/gui-gtk-4.0/luaconsole.c +++ b/client/gui-gtk-4.0/luaconsole.c @@ -202,7 +202,7 @@ static void luaconsole_dialog_create(struct luaconsole_data *pdialog) GTK_ORIENTATION_VERTICAL); gtk_container_add(GTK_CONTAINER(box), vbox); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), diff --git a/client/gui-gtk-4.0/messagedlg.c b/client/gui-gtk-4.0/messagedlg.c index 10f4fab314..e27b431177 100644 --- a/client/gui-gtk-4.0/messagedlg.c +++ b/client/gui-gtk-4.0/messagedlg.c @@ -152,7 +152,7 @@ static void create_messageopt_dialog(void) -1, _("Pop"), renderer, "active", 2, NULL); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(sw), view); diff --git a/client/gui-gtk-4.0/messagewin.c b/client/gui-gtk-4.0/messagewin.c index 6a056099e8..39cf2285d4 100644 --- a/client/gui-gtk-4.0/messagewin.c +++ b/client/gui-gtk-4.0/messagewin.c @@ -341,7 +341,7 @@ static void meswin_dialog_init(struct meswin_dialog *pdialog) gui_dialog_set_title(pdialog->shell, _("Messages")); vbox = GTK_CONTAINER(pdialog->shell->vbox); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), diff --git a/client/gui-gtk-4.0/optiondlg.c b/client/gui-gtk-4.0/optiondlg.c index 684fcb41ef..0a7068a420 100644 --- a/client/gui-gtk-4.0/optiondlg.c +++ b/client/gui-gtk-4.0/optiondlg.c @@ -495,7 +495,7 @@ static void option_dialog_option_add(struct option_dialog *pdialog, if (NULL == pdialog->vboxes[category]) { GtkWidget *sw; - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); diff --git a/client/gui-gtk-4.0/pages.c b/client/gui-gtk-4.0/pages.c index caf1ba7a0c..40187eea12 100644 --- a/client/gui-gtk-4.0/pages.c +++ b/client/gui-gtk-4.0/pages.c @@ -622,7 +622,7 @@ static GtkWidget *save_dialog_new(const char *title, const char *savelabel, NULL); gtk_container_add(GTK_CONTAINER(sbox), label); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(sw), 300); gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw), 300); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), @@ -1241,7 +1241,7 @@ GtkWidget *create_network_page(void) label = gtk_label_new_with_mnemonic(_("Local _Area Network")); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_widget_set_margin_start(sw, 4); gtk_widget_set_margin_end(sw, 4); gtk_widget_set_margin_top(sw, 4); @@ -1289,7 +1289,7 @@ GtkWidget *create_network_page(void) label = gtk_label_new_with_mnemonic(_("Internet _Metaserver")); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_widget_set_margin_start(sw, 4); gtk_widget_set_margin_end(sw, 4); gtk_widget_set_margin_top(sw, 4); @@ -1415,7 +1415,7 @@ GtkWidget *create_network_page(void) add_treeview_column(view, _("Nation"), G_TYPE_STRING, 3); server_playerlist_view = view; - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -2778,7 +2778,7 @@ GtkWidget *create_start_page(void) G_CALLBACK(connection_list_row_callback), GINT_TO_POINTER(FALSE)); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -2789,7 +2789,7 @@ GtkWidget *create_start_page(void) gtk_container_add(GTK_CONTAINER(sbox), sw); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -2957,7 +2957,7 @@ GtkWidget *create_load_page(void) NULL); gtk_container_add(GTK_CONTAINER(sbox), label); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW(sw), 300); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); @@ -3233,7 +3233,7 @@ GtkWidget *create_scenario_page(void) gtk_grid_set_column_homogeneous(GTK_GRID(hbox), TRUE); gtk_grid_set_column_spacing(GTK_GRID(hbox), 12); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, @@ -3249,7 +3249,7 @@ GtkWidget *create_scenario_page(void) gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE); scenario_description = text; - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, @@ -3264,7 +3264,7 @@ GtkWidget *create_scenario_page(void) gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE); scenario_authors = text; - swa = gtk_scrolled_window_new(NULL, NULL); + swa = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(swa), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swa), GTK_POLICY_AUTOMATIC, diff --git a/client/gui-gtk-4.0/plrdlg.c b/client/gui-gtk-4.0/plrdlg.c index 7a2b66200b..eee5bdf210 100644 --- a/client/gui-gtk-4.0/plrdlg.c +++ b/client/gui-gtk-4.0/plrdlg.c @@ -514,7 +514,7 @@ void create_players_dialog(void) gtk_tree_view_set_search_column(GTK_TREE_VIEW(players_list), player_dlg_default_sort_column()); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), diff --git a/client/gui-gtk-4.0/repodlgs.c b/client/gui-gtk-4.0/repodlgs.c index 14f6e7af22..3b57a818c6 100644 --- a/client/gui-gtk-4.0/repodlgs.c +++ b/client/gui-gtk-4.0/repodlgs.c @@ -645,7 +645,7 @@ static void science_report_init(struct science_report *preport) preport->button_show_all = show_all_button; /* Science diagram. */ - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(vbox, sw); @@ -1097,7 +1097,7 @@ static void economy_report_init(struct economy_report *preport) gui_dialog_set_title(preport->shell, _("Economy")); vbox = GTK_CONTAINER(preport->shell->vbox); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_widget_set_halign(sw, GTK_ALIGN_CENTER); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); @@ -1631,7 +1631,7 @@ static void units_report_init(struct units_report *preport) gui_dialog_set_title(preport->shell, _("Units")); vbox = GTK_CONTAINER(preport->shell->vbox); - sw = gtk_scrolled_window_new(NULL,NULL); + sw = gtk_scrolled_window_new(); gtk_widget_set_halign(sw, GTK_ALIGN_CENTER); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); @@ -1913,7 +1913,7 @@ static void endgame_report_init(struct endgame_report *preport) gui_dialog_set_default_size(preport->shell, 700, 420); /* Setup the layout. */ - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), diff --git a/client/gui-gtk-4.0/unitselect.c b/client/gui-gtk-4.0/unitselect.c index 2f4d3cc091..9336e68655 100644 --- a/client/gui-gtk-4.0/unitselect.c +++ b/client/gui-gtk-4.0/unitselect.c @@ -457,7 +457,7 @@ static void usdlg_tab_select(struct unit_select_dialog *pdialog, gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); } - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw), 300); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); diff --git a/client/gui-gtk-4.0/wldlg.c b/client/gui-gtk-4.0/wldlg.c index 587de7a5e7..e4073437f1 100644 --- a/client/gui-gtk-4.0/wldlg.c +++ b/client/gui-gtk-4.0/wldlg.c @@ -257,7 +257,7 @@ static GtkWidget *create_worklists_report(void) gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(list), -1, NULL, rend, "text", 0, NULL); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw), 200); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); @@ -1100,7 +1100,7 @@ GtkWidget *create_worklist(void) group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), @@ -1192,7 +1192,7 @@ GtkWidget *create_worklist(void) G_CALLBACK(queue_remove), ptr); gtk_widget_set_sensitive(ptr->remove_cmd, FALSE); - sw = gtk_scrolled_window_new(NULL, NULL); + sw = gtk_scrolled_window_new(); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), -- 2.33.0