[gnome-screensaver] Use GDK_KEY prefix for keysyms
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screensaver] Use GDK_KEY prefix for keysyms
- Date: Wed, 29 Sep 2010 16:47:49 +0000 (UTC)
commit b22f84f990bc17f41423e1f8d39bec1696cfb606
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 29 12:40:05 2010 -0400
Use GDK_KEY prefix for keysyms
Previously, keysyms were named, e.g., GDK_space. This causes
a headache for gobject-introspection, since it means keysyms compete
for other things in the gdk namespace.
The "modern" way to name keysyms is with a GDK_KEY prefix.
https://bugzilla.gnome.org/show_bug.cgi?id=630593
src/gs-lock-plug.c | 2 +-
src/gs-window-x11.c | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 8365bb2..080ab91 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -1038,7 +1038,7 @@ gs_lock_plug_class_init (GSLockPlugClass *klass)
binding_set = gtk_binding_set_by_class (klass);
- gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
"close", 0);
}
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index c1b667b..74822ed 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -2009,10 +2009,10 @@ queue_key_event (GSWindow *window,
{
/* Eat the first return, enter, escape, or space */
if (window->priv->key_events == NULL
- && (event->keyval == GDK_Return
- || event->keyval == GDK_KP_Enter
- || event->keyval == GDK_Escape
- || event->keyval == GDK_space)) {
+ && (event->keyval == GDK_KEY_Return
+ || event->keyval == GDK_KEY_KP_Enter
+ || event->keyval == GDK_KEY_Escape
+ || event->keyval == GDK_KEY_space)) {
return;
}
@@ -2020,9 +2020,9 @@ queue_key_event (GSWindow *window,
something is wrong */
/* Don't queue keys that may cause focus navigation in the dialog */
if (g_list_length (window->priv->key_events) < MAX_QUEUED_EVENTS
- && event->keyval != GDK_Tab
- && event->keyval != GDK_Up
- && event->keyval != GDK_Down) {
+ && event->keyval != GDK_KEY_Tab
+ && event->keyval != GDK_KEY_Up
+ && event->keyval != GDK_KEY_Down) {
window->priv->key_events = g_list_prepend (window->priv->key_events,
gdk_event_copy ((GdkEvent *)event));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]