summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-03 17:25:22 +0300
committerMonsta <[email protected]>2015-08-03 17:25:22 +0300
commit4a9a87bf8cd3b8c38ef5ccf09c80a533173e895f (patch)
tree72a4818c46c2403e35380fd042b9099d3c8977f6 /capplets
parent6bc0f4e76eaf22758002af90bac5ecbdc4ade742 (diff)
downloadmate-control-center-4a9a87bf8cd3b8c38ef5ccf09c80a533173e895f.tar.bz2
mate-control-center-4a9a87bf8cd3b8c38ef5ccf09c80a533173e895f.tar.xz
drop gdkkeysyms-compat usage, use modern key names
Diffstat (limited to 'capplets')
-rw-r--r--capplets/keybindings/eggaccelerators.c22
-rw-r--r--capplets/keybindings/eggcellrendererkeys.c11
-rw-r--r--capplets/keybindings/mate-keybinding-properties.c51
3 files changed, 37 insertions, 47 deletions
diff --git a/capplets/keybindings/eggaccelerators.c b/capplets/keybindings/eggaccelerators.c
index c81c567e..03ffca71 100644
--- a/capplets/keybindings/eggaccelerators.c
+++ b/capplets/keybindings/eggaccelerators.c
@@ -26,10 +26,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
-#include <gdk/gdkkeysyms-compat.h>
-#endif
-
enum {
EGG_MODMAP_ENTRY_SHIFT = 0,
EGG_MODMAP_ENTRY_LOCK = 1,
@@ -565,20 +561,20 @@ reload_modmap (GdkKeymap *keymap,
mask = 0;
for (j = 0; j < n_entries; ++j)
{
- if (keyvals[j] == GDK_Num_Lock)
+ if (keyvals[j] == GDK_KEY_Num_Lock)
mask |= EGG_VIRTUAL_NUM_LOCK_MASK;
- else if (keyvals[j] == GDK_Scroll_Lock)
+ else if (keyvals[j] == GDK_KEY_Scroll_Lock)
mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK;
- else if (keyvals[j] == GDK_Meta_L ||
- keyvals[j] == GDK_Meta_R)
+ else if (keyvals[j] == GDK_KEY_Meta_L ||
+ keyvals[j] == GDK_KEY_Meta_R)
mask |= EGG_VIRTUAL_META_MASK;
- else if (keyvals[j] == GDK_Hyper_L ||
- keyvals[j] == GDK_Hyper_R)
+ else if (keyvals[j] == GDK_KEY_Hyper_L ||
+ keyvals[j] == GDK_KEY_Hyper_R)
mask |= EGG_VIRTUAL_HYPER_MASK;
- else if (keyvals[j] == GDK_Super_L ||
- keyvals[j] == GDK_Super_R)
+ else if (keyvals[j] == GDK_KEY_Super_L ||
+ keyvals[j] == GDK_KEY_Super_R)
mask |= EGG_VIRTUAL_SUPER_MASK;
- else if (keyvals[j] == GDK_Mode_switch)
+ else if (keyvals[j] == GDK_KEY_Mode_switch)
mask |= EGG_VIRTUAL_MODE_SWITCH_MASK;
}
diff --git a/capplets/keybindings/eggcellrendererkeys.c b/capplets/keybindings/eggcellrendererkeys.c
index 22ea7a79..11d89a39 100644
--- a/capplets/keybindings/eggcellrendererkeys.c
+++ b/capplets/keybindings/eggcellrendererkeys.c
@@ -3,9 +3,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
-#include <gdk/gdkkeysyms-compat.h>
-#endif
#include "eggcellrendererkeys.h"
#include "eggaccelerators.h"
@@ -402,9 +399,9 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
upper = event->keyval;
accel_keyval = gdk_keyval_to_lower(upper);
- if (accel_keyval == GDK_ISO_Left_Tab)
+ if (accel_keyval == GDK_KEY_ISO_Left_Tab)
{
- accel_keyval = GDK_Tab;
+ accel_keyval = GDK_KEY_Tab;
}
/* Put shift back if it changed the case of the key, not otherwise. */
@@ -441,13 +438,13 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
g_assert_not_reached();
}
- if (accel_mods == 0 && accel_keyval == GDK_Escape)
+ if (accel_mods == 0 && accel_keyval == GDK_KEY_Escape)
{
goto out; /* cancel */
}
/* clear the accelerator on Backspace */
- if (accel_mods == 0 && accel_keyval == GDK_BackSpace)
+ if (accel_mods == 0 && accel_keyval == GDK_KEY_BackSpace)
{
cleared = TRUE;
goto out;
diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c
index ae9bee96..ee3e45aa 100644
--- a/capplets/keybindings/mate-keybinding-properties.c
+++ b/capplets/keybindings/mate-keybinding-properties.c
@@ -12,9 +12,6 @@
#include <X11/Xatom.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
-#include <gdk/gdkkeysyms-compat.h>
-#endif
#include "wm-common.h"
#include "capplet-util.h"
@@ -1149,22 +1146,22 @@ static gboolean cb_check_for_uniqueness(GtkTreeModel* model, GtkTreePath* path,
static const guint forbidden_keyvals[] = {
/* Navigation keys */
- GDK_Home,
- GDK_Left,
- GDK_Up,
- GDK_Right,
- GDK_Down,
- GDK_Page_Up,
- GDK_Page_Down,
- GDK_End,
- GDK_Tab,
+ GDK_KEY_Home,
+ GDK_KEY_Left,
+ GDK_KEY_Up,
+ GDK_KEY_Right,
+ GDK_KEY_Down,
+ GDK_KEY_Page_Up,
+ GDK_KEY_Page_Down,
+ GDK_KEY_End,
+ GDK_KEY_Tab,
/* Return */
- GDK_KP_Enter,
- GDK_Return,
+ GDK_KEY_KP_Enter,
+ GDK_KEY_Return,
- GDK_space,
- GDK_Mode_switch
+ GDK_KEY_space,
+ GDK_KEY_Mode_switch
};
static gboolean keyval_is_forbidden(guint keyval)
@@ -1242,17 +1239,17 @@ static void accel_edited_callback(GtkCellRendererText* cell, const char* path_st
/* Check for unmodified keys */
if (tmp_key.mask == 0 && tmp_key.keycode != 0)
{
- if ((tmp_key.keyval >= GDK_a && tmp_key.keyval <= GDK_z)
- || (tmp_key.keyval >= GDK_A && tmp_key.keyval <= GDK_Z)
- || (tmp_key.keyval >= GDK_0 && tmp_key.keyval <= GDK_9)
- || (tmp_key.keyval >= GDK_kana_fullstop && tmp_key.keyval <= GDK_semivoicedsound)
- || (tmp_key.keyval >= GDK_Arabic_comma && tmp_key.keyval <= GDK_Arabic_sukun)
- || (tmp_key.keyval >= GDK_Serbian_dje && tmp_key.keyval <= GDK_Cyrillic_HARDSIGN)
- || (tmp_key.keyval >= GDK_Greek_ALPHAaccent && tmp_key.keyval <= GDK_Greek_omega)
- || (tmp_key.keyval >= GDK_hebrew_doublelowline && tmp_key.keyval <= GDK_hebrew_taf)
- || (tmp_key.keyval >= GDK_Thai_kokai && tmp_key.keyval <= GDK_Thai_lekkao)
- || (tmp_key.keyval >= GDK_Hangul && tmp_key.keyval <= GDK_Hangul_Special)
- || (tmp_key.keyval >= GDK_Hangul_Kiyeog && tmp_key.keyval <= GDK_Hangul_J_YeorinHieuh)
+ if ((tmp_key.keyval >= GDK_KEY_a && tmp_key.keyval <= GDK_KEY_z)
+ || (tmp_key.keyval >= GDK_KEY_A && tmp_key.keyval <= GDK_KEY_Z)
+ || (tmp_key.keyval >= GDK_KEY_0 && tmp_key.keyval <= GDK_KEY_9)
+ || (tmp_key.keyval >= GDK_KEY_kana_fullstop && tmp_key.keyval <= GDK_KEY_semivoicedsound)
+ || (tmp_key.keyval >= GDK_KEY_Arabic_comma && tmp_key.keyval <= GDK_KEY_Arabic_sukun)
+ || (tmp_key.keyval >= GDK_KEY_Serbian_dje && tmp_key.keyval <= GDK_KEY_Cyrillic_HARDSIGN)
+ || (tmp_key.keyval >= GDK_KEY_Greek_ALPHAaccent && tmp_key.keyval <= GDK_KEY_Greek_omega)
+ || (tmp_key.keyval >= GDK_KEY_hebrew_doublelowline && tmp_key.keyval <= GDK_KEY_hebrew_taf)
+ || (tmp_key.keyval >= GDK_KEY_Thai_kokai && tmp_key.keyval <= GDK_KEY_Thai_lekkao)
+ || (tmp_key.keyval >= GDK_KEY_Hangul && tmp_key.keyval <= GDK_KEY_Hangul_Special)
+ || (tmp_key.keyval >= GDK_KEY_Hangul_Kiyeog && tmp_key.keyval <= GDK_KEY_Hangul_J_YeorinHieuh)
|| keyval_is_forbidden (tmp_key.keyval))
{