summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2017-12-14 10:31:11 +0000
committerErnestas Kulik <ernestask@gnome.org>2018-03-24 20:09:37 +0200
commit5cb690e9ba6f3cd32325926f24b537e9690e6aae (patch)
tree2acc6cafc86ba8c800fbdb9b4d6379607389a1b5
parenteccbbff4cc8ec0dabade01b06fbe6ab98e63bce6 (diff)
downloadnautilus-5cb690e9ba6f3cd32325926f24b537e9690e6aae.tar.gz
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.
-rw-r--r--config.h.meson1
-rw-r--r--meson.build4
-rw-r--r--src/nautilus-files-view.c12
-rw-r--r--src/nautilus-window.c29
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 <X11/XF86keysym.h>
-#endif
-
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
@@ -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 <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#ifdef HAVE_X11_XF86KEYSYM_H
-#include <X11/XF86keysym.h>
-#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[] = {