[nautilus/wip/ernestask/long-live-the-desktop: 1/11] general: Get key values from gdk/gdkkeysyms.h, not X11/XF86keysym.h



commit a43a0c8eb2342b755bf8b68c2529a3af6f96625c
Author: António Fernandes <antoniof gnome org>
Date:   Thu Dec 14 10:31:11 2017 +0000

    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. Also, revert the build
    configuration introduced in 2c5882aaffd88ebd4bc477c8d94a3e56d2fcb2fb.

 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 ad2817675..8014bb678 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -3,7 +3,6 @@
 #mesondefine GETTEXT_PACKAGE
 #mesondefine HAVE_EXEMPI
 #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 576edbe35..17865c47e 100644
--- a/meson.build
+++ b/meson.build
@@ -81,10 +81,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
-
 configure_file (input: 'config.h.meson',
                 output: 'config.h',
                 configuration: conf)
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index da922e568..2d5465aee 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -43,11 +43,6 @@
 #include "nautilus-toolbar.h"
 #include "nautilus-view.h"
 #include "nautilus-tag-manager.h"
-
-#ifdef HAVE_X11_XF86KEYSYM_H
-#include <X11/XF86keysym.h>
-#endif
-
 #include <gdk/gdkx.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
@@ -351,12 +346,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 df669f81a..ccf274644 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[] = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]