From 1893a77af55cd2e87e4e249193a9203b1a7a0c69 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Fri, 24 Jan 2014 16:17:17 +0100 Subject: keybindings: Add GTK3 support --- capplets/keybindings/eggaccelerators.c | 4 ++++ capplets/keybindings/eggcellrendererkeys.c | 7 +++++++ capplets/keybindings/mate-keybinding-properties.c | 3 +++ capplets/keybindings/mate-keybinding-properties.ui | 2 -- 4 files changed, 14 insertions(+), 2 deletions(-) (limited to 'capplets') diff --git a/capplets/keybindings/eggaccelerators.c b/capplets/keybindings/eggaccelerators.c index 9806e109..c81c567e 100644 --- a/capplets/keybindings/eggaccelerators.c +++ b/capplets/keybindings/eggaccelerators.c @@ -26,6 +26,10 @@ #include #include +#if GTK_CHECK_VERSION (3, 0, 0) +#include +#endif + enum { EGG_MODMAP_ENTRY_SHIFT = 0, EGG_MODMAP_ENTRY_LOCK = 1, diff --git a/capplets/keybindings/eggcellrendererkeys.c b/capplets/keybindings/eggcellrendererkeys.c index 5d84c2de..9dffeda7 100644 --- a/capplets/keybindings/eggcellrendererkeys.c +++ b/capplets/keybindings/eggcellrendererkeys.c @@ -3,6 +3,9 @@ #include #include #include +#if GTK_CHECK_VERSION (3, 0, 0) +#include +#endif #include "eggcellrendererkeys.h" #include "eggaccelerators.h" @@ -317,7 +320,11 @@ static gboolean is_modifier(guint keycode) XModifierKeymap* mod_keymap; gboolean retval = FALSE; +#if GTK_CHECK_VERSION (3, 0, 0) + mod_keymap = XGetModifierMapping(gdk_x11_display_get_xdisplay(gdk_display_get_default())); +#else mod_keymap = XGetModifierMapping(gdk_display); +#endif map_size = 8 * mod_keymap->max_keypermod; i = 0; diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c index da017f17..3f2d5924 100644 --- a/capplets/keybindings/mate-keybinding-properties.c +++ b/capplets/keybindings/mate-keybinding-properties.c @@ -12,6 +12,9 @@ #include #include #include +#if GTK_CHECK_VERSION (3, 0, 0) +#include +#endif #include "wm-common.h" #include "capplet-util.h" diff --git a/capplets/keybindings/mate-keybinding-properties.ui b/capplets/keybindings/mate-keybinding-properties.ui index 3e9c0498..51090b5a 100644 --- a/capplets/keybindings/mate-keybinding-properties.ui +++ b/capplets/keybindings/mate-keybinding-properties.ui @@ -6,7 +6,6 @@ 5 Keyboard Shortcuts normal - False True @@ -169,7 +168,6 @@ Custom Shortcut dialog - False True -- cgit v1.2.1