diff options
author | Perberos <[email protected]> | 2011-12-08 04:14:52 -0300 |
---|---|---|
committer | Perberos <[email protected]> | 2011-12-08 04:14:52 -0300 |
commit | ac33351b9863ec59c639a53147c95e90c07bc3eb (patch) | |
tree | 6dc72be7db30c9318ebd208d07e79914434e7811 | |
parent | 53662809de96a42dd05bd1535bd20e72818c9de7 (diff) | |
download | mate-control-center-ac33351b9863ec59c639a53147c95e90c07bc3eb.tar.bz2 mate-control-center-ac33351b9863ec59c639a53147c95e90c07bc3eb.tar.xz |
removing deprecated GDK_DISPLAY()
-rw-r--r-- | capplets/keybindings/eggaccelerators.c | 130 |
1 files changed, 61 insertions, 69 deletions
diff --git a/capplets/keybindings/eggaccelerators.c b/capplets/keybindings/eggaccelerators.c index c1c582cc..1a3e91ec 100644 --- a/capplets/keybindings/eggaccelerators.c +++ b/capplets/keybindings/eggaccelerators.c @@ -84,97 +84,89 @@ static inline gboolean is_ctrl(const gchar* string) (string[5] == '>')); } -static inline gboolean -is_shft (const gchar *string) +static inline gboolean is_shft (const gchar* string) { - return ((string[0] == '<') && - (string[1] == 's' || string[1] == 'S') && - (string[2] == 'h' || string[2] == 'H') && - (string[3] == 'f' || string[3] == 'F') && - (string[4] == 't' || string[4] == 'T') && - (string[5] == '>')); + return ((string[0] == '<') && + (string[1] == 's' || string[1] == 'S') && + (string[2] == 'h' || string[2] == 'H') && + (string[3] == 'f' || string[3] == 'F') && + (string[4] == 't' || string[4] == 'T') && + (string[5] == '>')); } -static inline gboolean -is_shift (const gchar *string) +static inline gboolean is_shift(const gchar* string) { return ((string[0] == '<') && - (string[1] == 's' || string[1] == 'S') && - (string[2] == 'h' || string[2] == 'H') && - (string[3] == 'i' || string[3] == 'I') && - (string[4] == 'f' || string[4] == 'F') && - (string[5] == 't' || string[5] == 'T') && - (string[6] == '>')); + (string[1] == 's' || string[1] == 'S') && + (string[2] == 'h' || string[2] == 'H') && + (string[3] == 'i' || string[3] == 'I') && + (string[4] == 'f' || string[4] == 'F') && + (string[5] == 't' || string[5] == 'T') && + (string[6] == '>')); } -static inline gboolean -is_control (const gchar *string) +static inline gboolean is_control(const gchar* string) { - return ((string[0] == '<') && - (string[1] == 'c' || string[1] == 'C') && - (string[2] == 'o' || string[2] == 'O') && - (string[3] == 'n' || string[3] == 'N') && - (string[4] == 't' || string[4] == 'T') && - (string[5] == 'r' || string[5] == 'R') && - (string[6] == 'o' || string[6] == 'O') && - (string[7] == 'l' || string[7] == 'L') && - (string[8] == '>')); + return ((string[0] == '<') && + (string[1] == 'c' || string[1] == 'C') && + (string[2] == 'o' || string[2] == 'O') && + (string[3] == 'n' || string[3] == 'N') && + (string[4] == 't' || string[4] == 'T') && + (string[5] == 'r' || string[5] == 'R') && + (string[6] == 'o' || string[6] == 'O') && + (string[7] == 'l' || string[7] == 'L') && + (string[8] == '>')); } -static inline gboolean -is_release (const gchar *string) +static inline gboolean is_release(const gchar* string) { - return ((string[0] == '<') && - (string[1] == 'r' || string[1] == 'R') && - (string[2] == 'e' || string[2] == 'E') && - (string[3] == 'l' || string[3] == 'L') && - (string[4] == 'e' || string[4] == 'E') && - (string[5] == 'a' || string[5] == 'A') && - (string[6] == 's' || string[6] == 'S') && - (string[7] == 'e' || string[7] == 'E') && - (string[8] == '>')); + return ((string[0] == '<') && + (string[1] == 'r' || string[1] == 'R') && + (string[2] == 'e' || string[2] == 'E') && + (string[3] == 'l' || string[3] == 'L') && + (string[4] == 'e' || string[4] == 'E') && + (string[5] == 'a' || string[5] == 'A') && + (string[6] == 's' || string[6] == 'S') && + (string[7] == 'e' || string[7] == 'E') && + (string[8] == '>')); } -static inline gboolean -is_meta (const gchar *string) +static inline gboolean is_meta(const gchar* string) { - return ((string[0] == '<') && - (string[1] == 'm' || string[1] == 'M') && - (string[2] == 'e' || string[2] == 'E') && - (string[3] == 't' || string[3] == 'T') && - (string[4] == 'a' || string[4] == 'A') && - (string[5] == '>')); + return ((string[0] == '<') && + (string[1] == 'm' || string[1] == 'M') && + (string[2] == 'e' || string[2] == 'E') && + (string[3] == 't' || string[3] == 'T') && + (string[4] == 'a' || string[4] == 'A') && + (string[5] == '>')); } -static inline gboolean -is_super (const gchar *string) +static inline gboolean is_super(const gchar* string) { - return ((string[0] == '<') && - (string[1] == 's' || string[1] == 'S') && - (string[2] == 'u' || string[2] == 'U') && - (string[3] == 'p' || string[3] == 'P') && - (string[4] == 'e' || string[4] == 'E') && - (string[5] == 'r' || string[5] == 'R') && - (string[6] == '>')); + return ((string[0] == '<') && + (string[1] == 's' || string[1] == 'S') && + (string[2] == 'u' || string[2] == 'U') && + (string[3] == 'p' || string[3] == 'P') && + (string[4] == 'e' || string[4] == 'E') && + (string[5] == 'r' || string[5] == 'R') && + (string[6] == '>')); } -static inline gboolean -is_hyper (const gchar *string) +static inline gboolean is_hyper (const gchar *string) { - return ((string[0] == '<') && - (string[1] == 'h' || string[1] == 'H') && - (string[2] == 'y' || string[2] == 'Y') && - (string[3] == 'p' || string[3] == 'P') && - (string[4] == 'e' || string[4] == 'E') && - (string[5] == 'r' || string[5] == 'R') && - (string[6] == '>')); + return ((string[0] == '<') && + (string[1] == 'h' || string[1] == 'H') && + (string[2] == 'y' || string[2] == 'Y') && + (string[3] == 'p' || string[3] == 'P') && + (string[4] == 'e' || string[4] == 'E') && + (string[5] == 'r' || string[5] == 'R') && + (string[6] == '>')); } -static inline gboolean -is_keycode (const gchar *string) +static inline gboolean is_keycode(const gchar *string) { - return ((string[0] == '0') && - (string[1] == 'x')); + return ((string[0] == '0') && + (string[1] == 'x')); } /** @@ -349,7 +341,7 @@ egg_accelerator_parse_virtual (const gchar *accelerator, } else if (keycode != NULL) { - *keycode = XKeysymToKeycode (GDK_DISPLAY(), keyval); + *keycode = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), keyval); if (*keycode == 0) bad_keyval = TRUE; } |