From 5cb690e9ba6f3cd32325926f24b537e9690e6aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= Date: Thu, 14 Dec 2017 10:31:11 +0000 Subject: general: Get key values from gdk/gdkkeysyms.h, not X11/XF86keysym.h We already included gdk/gdkkeysyms.h, which is generated from X11/XF86keysym.h Doing this, we can drop the ifdefs. --- config.h.meson | 1 - meson.build | 4 ---- src/nautilus-files-view.c | 12 ++---------- src/nautilus-window.c | 29 ++++++++++++----------------- 4 files changed, 14 insertions(+), 32 deletions(-) diff --git a/config.h.meson b/config.h.meson index fa8c1315e..4f5cb5848 100644 --- a/config.h.meson +++ b/config.h.meson @@ -4,7 +4,6 @@ #mesondefine HAVE_EXEMPI #mesondefine HAVE_EXIF #mesondefine HAVE_SELINUX -#mesondefine HAVE_X11_XF86KEYSYM_H #mesondefine ENABLE_DESKTOP #mesondefine ENABLE_PACKAGEKIT #mesondefine LOCALEDIR diff --git a/meson.build b/meson.build index 3f6ac4f81..68505be7d 100644 --- a/meson.build +++ b/meson.build @@ -86,10 +86,6 @@ if not tracker_sparql.found() tracker_sparql = dependency ('tracker-sparql-1.0') endif -if cc.has_header ('X11/XF86keysym.h') - conf.set10 ('HAVE_X11_XF86KEYSYM_H', true) -endif - if get_option ('enable-xmp') exempi = dependency ('exempi-2.0', version: exempi_ver) conf.set10 ('HAVE_EXEMPI', true) diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index 6ba41f2e5..4f58d4239 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -42,11 +42,6 @@ #include "nautilus-window.h" #include "nautilus-toolbar.h" #include "nautilus-view.h" - -#ifdef HAVE_X11_XF86KEYSYM_H -#include -#endif - #include #include #include @@ -345,12 +340,9 @@ static const struct const char *action; } extra_view_keybindings [] = { -#ifdef HAVE_X11_XF86KEYSYM_H /* View actions */ - { XF86XK_ZoomIn, "zoom-in" }, - { XF86XK_ZoomOut, "zoom-out" }, - -#endif + { GDK_KEY_ZoomIn, "zoom-in" }, + { GDK_KEY_ZoomOut, "zoom-out" }, }; /* diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 5e9079e04..9eaae353c 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -46,9 +46,6 @@ #include #include #include -#ifdef HAVE_X11_XF86KEYSYM_H -#include -#endif #include "nautilus-dnd.h" #include "nautilus-file-utilities.h" #include "nautilus-file-attributes.h" @@ -171,21 +168,19 @@ static const struct const char *action; } extra_window_keybindings [] = { -#ifdef HAVE_X11_XF86KEYSYM_H /* Window actions */ - { XF86XK_AddFavorite, "bookmark-current-location" }, - { XF86XK_Favorites, "bookmarks" }, - { XF86XK_Go, "enter-location" }, - { XF86XK_HomePage, "go-home" }, - { XF86XK_OpenURL, "enter-location" }, - { XF86XK_Refresh, "reload" }, - { XF86XK_Reload, "reload" }, - { XF86XK_Search, "search" }, - { XF86XK_Start, "go-home" }, - { XF86XK_Stop, "stop" }, - { XF86XK_Back, "back" }, - { XF86XK_Forward, "forward" }, -#endif + { GDK_KEY_AddFavorite, "bookmark-current-location" }, + { GDK_KEY_Favorites, "bookmarks" }, + { GDK_KEY_Go, "enter-location" }, + { GDK_KEY_HomePage, "go-home" }, + { GDK_KEY_OpenURL, "enter-location" }, + { GDK_KEY_Refresh, "reload" }, + { GDK_KEY_Reload, "reload" }, + { GDK_KEY_Search, "search" }, + { GDK_KEY_Start, "go-home" }, + { GDK_KEY_Stop, "stop" }, + { GDK_KEY_Back, "back" }, + { GDK_KEY_Forward, "forward" }, }; static const GtkPadActionEntry pad_actions[] = { -- cgit v1.2.1