diff options
author | Denis Ollier <larchunix@users.noreply.github.com> | 2018-04-14 23:39:57 +0300 |
---|---|---|
committer | larchunix <larchunix@users.noreply.github.com> | 2018-04-15 13:30:09 +0300 |
commit | 8a443bd272ea565135624c10261894bb0ffca676 (patch) | |
tree | 089c79c00c501ce3a365839bd92a0ed9736bb3ea | |
parent | 6233f931a5208a76ef896c1f81d1c04f135b3b4f (diff) |
Remove checks for GTK >= 3 since GTK2 is not supported anymore
-rw-r--r-- | cmake/FindGTK.cmake | 10 | ||||
-rw-r--r-- | cmake/FindGTK2.cmake | 133 | ||||
-rw-r--r-- | config.h.in | 2 | ||||
-rw-r--r-- | plugins/nx/nx_plugin.c | 4 | ||||
-rw-r--r-- | plugins/rdp/rdp_graphics.c | 4 | ||||
-rw-r--r-- | plugins/tool_hello_world/plugin.c | 6 | ||||
-rw-r--r-- | plugins/xdmcp/xdmcp_plugin.c | 4 | ||||
-rw-r--r-- | remmina/src/remmina_protocol_widget.c | 4 | ||||
-rw-r--r-- | remmina/src/remmina_ssh_plugin.c | 2 |
9 files changed, 6 insertions, 163 deletions
diff --git a/cmake/FindGTK.cmake b/cmake/FindGTK.cmake index ab3308204..8d430f8d5 100644 --- a/cmake/FindGTK.cmake +++ b/cmake/FindGTK.cmake @@ -25,20 +25,10 @@ if(GTK_VERSION) set(GTK_FOUND false) endif() else() - # Prefer GTK+ 3 over GTK+ 2 - find_package(GTK3 QUIET) if(GTK3_FOUND) set(GTK_VERSION 3) set(GTK_FOUND true) - else() - find_package(GTK2 QUIET) - if(GTK2_FOUND) - set(GTK_VERSION 2) - set(GTK_FOUND true) - elseif() - set(GTK_FOUND false) - endif() endif() endif() diff --git a/cmake/FindGTK2.cmake b/cmake/FindGTK2.cmake deleted file mode 100644 index f39bdde74..000000000 --- a/cmake/FindGTK2.cmake +++ /dev/null @@ -1,133 +0,0 @@ -# Remmina - The GTK+ Remote Desktop Client -# -# Copyright (C) 2012 Daniel M. Weeks -# -# 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 of the License, 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -set(_GTK2_found_all true) - -# Gtk - -pkg_check_modules(PC_GTK2 gtk+-2.0) - -if(NOT PC_GTK2_FOUND) - set(_GTK2_found_all false) -endif() - -find_path(GTK2_INCLUDE_DIR NAMES gtk/gtk.h - PATH_SUFFIXES gtk-2.0) - -find_library(GTK2_LIBRARY NAMES gtk-x11-2.0) - -# Gdk - -pkg_check_modules(PC_GDK2 gdk-x11-2.0) - -if(NOT PC_GDK2_FOUND) - set(_GTK2_found_all false) -endif() - -find_library(GDK2_LIBRARY NAMES gdk-x11-2.0) - -find_path(GDK2_INCLUDE_DIR gdkconfig.h - HINTS ${PC_GDK2_INCLUDEDIR} ${PC_GDK2_INCLUDE_DIRS} - PATH_SUFFIXES gtk-2.0/include) - -# Gdk-Pixbuf - -pkg_check_modules(PC_GDKPIXBUF gdk-pixbuf-2.0) - -if(NOT PC_GDKPIXBUF_FOUND) - set(_GTK2_found_all false) -endif() - -find_path(GDKPIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h - HINTS ${PC_GDKPIXBUF_INCLUDEDIR} ${PC_GDKPIXBUF_INCLUDE_DIRS} - PATH_SUFFIXES gdk-pixbuf-2.0) - -find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 - HINTS ${PC_GDKPIXBUF_LIBDIR} ${PC_GDKPIXBUF_LIBRARY_DIRS}) - -# Glib - -find_required_package(GLIB2) -if(NOT GLIB2_FOUND) - set(_GTK2_found_all false) -endif() - -# Pango - -pkg_check_modules(PC_PANGO pango) - -if(NOT PC_PANGO_FOUND) - set(_GTK2_found_all false) -endif() - -find_path(PANGO_INCLUDE_DIR pango/pango.h - HINTS ${PC_PANGO_INCLUDEDIR} ${PC_PANGO_INCLUDE_DIRS} - PATH_SUFFIXES pango-1.0) - -find_library(PANGO_LIBRARY NAMES pango-1.0 - HINTS ${PC_PANGO_LIBDIR} ${PC_PANGO_LIBRARY_DIRS}) - -# Cairo - -set(CAIRO_DEFINITIONS ${PC_CAIRO_CXXFLAGS_OTHER}) - -find_path(CAIRO_INCLUDE_DIR cairo.h - HINTS ${PC_CAIRO_INCLUDEDIR} ${PC_CAIRO_INCLUDE_DIRS} - PATH_SUFFIXES cairo) - -find_library(CAIRO_LIBRARY NAMES cairo - HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS}) - -# Atk - -pkg_check_modules(PC_ATK atk) - -if(NOT PC_ATK_FOUND) - set(_GTK2_found_all false) -endif() - -find_path(ATK_INCLUDE_DIR atk/atk.h - HINTS ${PC_ATK_INCLUDEDIR} ${PC_ATK_INCLUDE_DIRS} - PATH_SUFFIXES atk-1.0) - -find_library(ATK_LIBRARY NAMES atk-1.0 - HINTS ${PC_ATK_LIBDIR} ${PC_ATK_LIBRARY_DIRS}) - -# Finalize - -if(_GTK2_found_all) - include(FindPackageHandleStandardArgs) - - find_package_handle_standard_args(GTK2 DEFAULT_MSG GTK2_LIBRARY GTK2_INCLUDE_DIR) - - set(GTK2_LIBRARIES ${GTK2_LIBRARY} ${GDK2_LIBRARY} ${GLIB2_LIBRARIES} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) - set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIR} ${GDK2_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) - - mark_as_advanced(GTK2_INCLUDE_DIR GTK2_LIBRARY) - - set(GTK2_FOUND true) -else() - unset(GTK2_LIBRARY) - unset(GTK2_INCLUDE_DIR) - - unset(GDK2_LIBRARY) - unset(GDK2_INCLUDE_DIR) - - set(GTK2_FOUND false) -endif() diff --git a/config.h.in b/config.h.in index 3befe6614..8f3a09b4f 100644 --- a/config.h.in +++ b/config.h.in @@ -12,8 +12,6 @@ #cmakedefine HAVE_SYS_UN_H #cmakedefine HAVE_ERRNO_H -#cmakedefine GTK_VERSION ${GTK_VERSION} - #define remmina "remmina" #define UNIQUE_APPNAME "${UNIQUE_APPNAME}" #define VERSION "${REMMINA_VERSION}" diff --git a/plugins/nx/nx_plugin.c b/plugins/nx/nx_plugin.c index 1116c2837..16959b459 100644 --- a/plugins/nx/nx_plugin.c +++ b/plugins/nx/nx_plugin.c @@ -37,9 +37,7 @@ #include <errno.h> #include <pthread.h> #include "common/remmina_plugin.h" -#if GTK_VERSION == 3 -# include <gtk/gtkx.h> -#endif +#include <gtk/gtkx.h> #include <time.h> #define LIBSSH_STATIC 1 #include <libssh/libssh.h> diff --git a/plugins/rdp/rdp_graphics.c b/plugins/rdp/rdp_graphics.c index 162812b5a..bd22a9050 100644 --- a/plugins/rdp/rdp_graphics.c +++ b/plugins/rdp/rdp_graphics.c @@ -205,11 +205,7 @@ void rf_Pointer_Free(rdpContext* context, rdpPointer* pointer) RemminaPluginRdpUiObject* ui; rfContext* rfi = (rfContext*)context; -#if GTK_VERSION == 2 - if (((rfPointer*)pointer)->cursor != NULL) -#else if (G_IS_OBJECT(((rfPointer*)pointer)->cursor)) -#endif { ui = g_new0(RemminaPluginRdpUiObject, 1); ui->type = REMMINA_RDP_UI_CURSOR; diff --git a/plugins/tool_hello_world/plugin.c b/plugins/tool_hello_world/plugin.c index e29d19cb3..321894fa1 100644 --- a/plugins/tool_hello_world/plugin.c +++ b/plugins/tool_hello_world/plugin.c @@ -38,10 +38,8 @@ #include "common/remmina_plugin.h" -#if GTK_VERSION == 3 -# include <gtk/gtkx.h> -# include <gdk/gdkx.h> -#endif +#include <gtk/gtkx.h> +#include <gdk/gdkx.h> static RemminaPluginService *remmina_plugin_service = NULL; diff --git a/plugins/xdmcp/xdmcp_plugin.c b/plugins/xdmcp/xdmcp_plugin.c index 7bf24a630..86a5ab785 100644 --- a/plugins/xdmcp/xdmcp_plugin.c +++ b/plugins/xdmcp/xdmcp_plugin.c @@ -35,9 +35,7 @@ */ #include "common/remmina_plugin.h" -#if GTK_VERSION == 3 -# include <gtk/gtkx.h> -#endif +#include <gtk/gtkx.h> INCLUDE_GET_AVAILABLE_XDISPLAY diff --git a/remmina/src/remmina_protocol_widget.c b/remmina/src/remmina_protocol_widget.c index 6753036da..d332a0dcc 100644 --- a/remmina/src/remmina_protocol_widget.c +++ b/remmina/src/remmina_protocol_widget.c @@ -37,9 +37,7 @@ #include "config.h" #include <gtk/gtk.h> -#if GTK_VERSION == 3 -# include <gtk/gtkx.h> -#endif +#include <gtk/gtkx.h> #include <glib/gi18n.h> #include <stdlib.h> diff --git a/remmina/src/remmina_ssh_plugin.c b/remmina/src/remmina_ssh_plugin.c index b9daf173f..af661651f 100644 --- a/remmina/src/remmina_ssh_plugin.c +++ b/remmina/src/remmina_ssh_plugin.c @@ -719,7 +719,7 @@ remmina_plugin_ssh_init(RemminaProtocolWidget *gp) remmina_plugin_service->protocol_plugin_register_hostkey(gp, vte); -#if VTE_CHECK_VERSION(0, 28, 0) && GTK_CHECK_VERSION(3, 0, 0) +#if VTE_CHECK_VERSION(0, 28, 0) vadjustment = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(vte)); #else vadjustment = vte_terminal_get_adjustment(VTE_TERMINAL(vc->vte.terminal)); |