diff options
author | Monsta <[email protected]> | 2015-08-03 15:45:39 +0300 |
---|---|---|
committer | Monsta <[email protected]> | 2015-08-03 15:45:39 +0300 |
commit | bfcbaa0bf02cc3914f8cf04cba666267324a834b (patch) | |
tree | a480ddc9f789f5ff50a31b4c474fa69b8798e2bc /applets | |
parent | 0d50ed798d6c52977d557a2d6857a8f4318ccda1 (diff) | |
download | mate-power-manager-bfcbaa0bf02cc3914f8cf04cba666267324a834b.tar.bz2 mate-power-manager-bfcbaa0bf02cc3914f8cf04cba666267324a834b.tar.xz |
brightness applet: drop gdkkeysyms-compat usage, use modern key names
Diffstat (limited to 'applets')
-rw-r--r-- | applets/brightness/brightness-applet.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/applets/brightness/brightness-applet.c b/applets/brightness/brightness-applet.c index d3570b8..b0a5f91 100644 --- a/applets/brightness/brightness-applet.c +++ b/applets/brightness/brightness-applet.c @@ -36,7 +36,6 @@ #include <glib/gi18n.h> #include <gdk/gdkkeysyms.h> #if GTK_CHECK_VERSION (3, 0, 0) -#include <gdk/gdkkeysyms-compat.h> #define GtkObject GtkWidget #endif #include <glib-object.h> @@ -520,13 +519,13 @@ gpm_applet_key_press_cb (GpmBrightnessApplet *applet, GdkEventKey *event) int i; switch (event->keyval) { - case GDK_KP_Enter: - case GDK_ISO_Enter: - case GDK_3270_Enter: - case GDK_Return: - case GDK_space: - case GDK_KP_Space: - case GDK_Escape: + case GDK_KEY_KP_Enter: + case GDK_KEY_ISO_Enter: + case GDK_KEY_3270_Enter: + case GDK_KEY_Return: + case GDK_KEY_space: + case GDK_KEY_KP_Space: + case GDK_KEY_Escape: /* if yet popped, release focus and hide then redraw applet unselected */ if (applet->popped) { gdk_keyboard_ungrab (GDK_CURRENT_TIME); @@ -542,25 +541,25 @@ gpm_applet_key_press_cb (GpmBrightnessApplet *applet, GdkEventKey *event) return FALSE; } break; - case GDK_Page_Up: + case GDK_KEY_Page_Up: for (i = 0;i < 10;i++) { gpm_applet_plus_cb (NULL, applet); } return TRUE; break; - case GDK_Left: - case GDK_Up: + case GDK_KEY_Left: + case GDK_KEY_Up: gpm_applet_plus_cb (NULL, applet); return TRUE; break; - case GDK_Page_Down: + case GDK_KEY_Page_Down: for (i = 0;i < 10;i++) { gpm_applet_minus_cb (NULL, applet); } return TRUE; break; - case GDK_Right: - case GDK_Down: + case GDK_KEY_Right: + case GDK_KEY_Down: gpm_applet_minus_cb (NULL, applet); return TRUE; break; |