From 80b3fbddfdb61edc9b18d9bc705b01084a5042e5 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 22 Dec 2021 02:11:23 +0200 Subject: [PATCH 48/48] gtk4: Drop gtkcompat.[ch] module See osdn #43437 Signed-off-by: Marko Lindqvist --- client/gui-gtk-4.0/Makefile.am | 2 -- client/gui-gtk-4.0/citizensinfo.c | 1 - client/gui-gtk-4.0/citydlg.c | 6 ------ client/gui-gtk-4.0/gtkcompat.c | 35 ------------------------------- client/gui-gtk-4.0/gtkcompat.h | 32 ---------------------------- client/gui-gtk-4.0/gui_main.h | 3 --- client/gui-gtk-4.0/voteinfo_bar.c | 1 - 7 files changed, 80 deletions(-) delete mode 100644 client/gui-gtk-4.0/gtkcompat.c delete mode 100644 client/gui-gtk-4.0/gtkcompat.h diff --git a/client/gui-gtk-4.0/Makefile.am b/client/gui-gtk-4.0/Makefile.am index c724276a2a..2ffc02c236 100644 --- a/client/gui-gtk-4.0/Makefile.am +++ b/client/gui-gtk-4.0/Makefile.am @@ -50,8 +50,6 @@ libgui_gtk4_la_SOURCES = \ gotodlg.h \ graphics.c \ graphics.h \ - gtkcompat.c \ - gtkcompat.h \ gui_main.c \ gui_main.h \ gui_stuff.c \ diff --git a/client/gui-gtk-4.0/citizensinfo.c b/client/gui-gtk-4.0/citizensinfo.c index 80053f46e9..3593cb8dec 100644 --- a/client/gui-gtk-4.0/citizensinfo.c +++ b/client/gui-gtk-4.0/citizensinfo.c @@ -28,7 +28,6 @@ #include "player.h" /* client/gui-gtk-4.0 */ -#include "gtkcompat.h" #include "gui_stuff.h" #include "plrdlg.h" diff --git a/client/gui-gtk-4.0/citydlg.c b/client/gui-gtk-4.0/citydlg.c index d5d265ebd3..e9a58c77a1 100644 --- a/client/gui-gtk-4.0/citydlg.c +++ b/client/gui-gtk-4.0/citydlg.c @@ -3221,9 +3221,7 @@ static void impr_callback(GtkTreeView *view, GtkTreePath *path, { GtkTreeModel *model; GtkTreeIter it; -#ifdef GTKCOMPAT_GTK4_FINAL GdkSeat *seat; -#endif GdkModifierType mask; struct impr_type *pimprove; @@ -3235,12 +3233,8 @@ static void impr_callback(GtkTreeView *view, GtkTreePath *path, gtk_tree_model_get(model, &it, 0, &pimprove, -1); -#ifdef GTKCOMPAT_GTK4_FINAL seat = gdk_display_get_default_seat(gtk_widget_get_display(GTK_WIDGET(view))); mask = gdk_device_get_modifier_state(gdk_seat_get_keyboard(seat)); -#else - mask = 0; -#endif if (!(mask & GDK_CONTROL_MASK)) { sell_callback(pimprove, data); diff --git a/client/gui-gtk-4.0/gtkcompat.c b/client/gui-gtk-4.0/gtkcompat.c deleted file mode 100644 index 712fa318eb..0000000000 --- a/client/gui-gtk-4.0/gtkcompat.c +++ /dev/null @@ -1,35 +0,0 @@ -/*********************************************************************** - Freeciv - Copyright (C) 1996-2005 - Freeciv Development Team - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#define GTKCOMPAT_ITSELF -#include "gtkcompat.h" - - -#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 deleted file mode 100644 index 8d05b77d2a..0000000000 --- a/client/gui-gtk-4.0/gtkcompat.h +++ /dev/null @@ -1,32 +0,0 @@ -/*********************************************************************** - Freeciv - Copyright (C) 1996-2005 - Freeciv Development Team - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. -***********************************************************************/ -#ifndef FC__GTKCOMPAT_H -#define FC__GTKCOMPAT_H - -#if GTK_CHECK_VERSION(4,0,0) -#define GTKCOMPAT_GTK4_FINAL -#endif - - -#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.h b/client/gui-gtk-4.0/gui_main.h index 4d9122605a..5a1db0b3ac 100644 --- a/client/gui-gtk-4.0/gui_main.h +++ b/client/gui-gtk-4.0/gui_main.h @@ -18,9 +18,6 @@ /* client */ #include "gui_main_g.h" -/* gui-gtk-4.0 */ -#include "gtkcompat.h" - #define GUI_GTK_OPTION(optname) gui_options.gui_gtk4_##optname #define GUI_GTK_OPTION_STR(optname) "gui_gtk4_" #optname #define GUI_GTK_DEFAULT_THEME_NAME FC_GTK4_DEFAULT_THEME_NAME diff --git a/client/gui-gtk-4.0/voteinfo_bar.c b/client/gui-gtk-4.0/voteinfo_bar.c index 4ae1e589ac..ce65c99bcb 100644 --- a/client/gui-gtk-4.0/voteinfo_bar.c +++ b/client/gui-gtk-4.0/voteinfo_bar.c @@ -28,7 +28,6 @@ /* client/gui-gtk-4.0 */ #include "chatline.h" -#include "gtkcompat.h" #include "pages.h" #include "voteinfo_bar.h" -- 2.34.1