[gnome-control-center] bgo#629299 - Prefix key constants with _KEY



commit 4859ae9b30c1cfc2536945c2a76198e1dbfc3e3b
Author: Kalev Lember <kalev smartlink ee>
Date:   Fri Sep 10 19:09:48 2010 +0300

    bgo#629299 - Prefix key constants with _KEY
    
    In GTK+ 3 key constants have gained _KEY prefix.

 panels/keybindings/eggaccelerators.c             |   18 ++++----
 panels/keybindings/eggcellrendererkeys.c         |    8 ++--
 panels/keybindings/gnome-keybinding-properties.c |   48 +++++++++++-----------
 shell/gnome-control-center.c                     |    4 +-
 typing-break/drw-break-window.c                  |    2 +-
 5 files changed, 40 insertions(+), 40 deletions(-)
---
diff --git a/panels/keybindings/eggaccelerators.c b/panels/keybindings/eggaccelerators.c
index 0728229..80c06c5 100644
--- a/panels/keybindings/eggaccelerators.c
+++ b/panels/keybindings/eggaccelerators.c
@@ -556,20 +556,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/panels/keybindings/eggcellrendererkeys.c b/panels/keybindings/eggcellrendererkeys.c
index 4476bcb..c39db3b 100644
--- a/panels/keybindings/eggcellrendererkeys.c
+++ b/panels/keybindings/eggcellrendererkeys.c
@@ -406,8 +406,8 @@ grab_key_callback (GtkWidget    *widget,
 
   upper = event->keyval;
   accel_keyval = gdk_keyval_to_lower (upper);
-  if (accel_keyval == GDK_ISO_Left_Tab)
-    accel_keyval = GDK_Tab;
+  if (accel_keyval == GDK_KEY_ISO_Left_Tab)
+    accel_keyval = GDK_KEY_Tab;
 
 
 
@@ -442,11 +442,11 @@ grab_key_callback (GtkWidget    *widget,
   else
     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/panels/keybindings/gnome-keybinding-properties.c b/panels/keybindings/gnome-keybinding-properties.c
index 5c4ad67..6c9a633 100644
--- a/panels/keybindings/gnome-keybinding-properties.c
+++ b/panels/keybindings/gnome-keybinding-properties.c
@@ -1029,22 +1029,22 @@ cb_check_for_uniqueness (GtkTreeModel *model,
 
 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
@@ -1127,17 +1127,17 @@ accel_edited_callback (GtkCellRendererText   *cell,
   /* 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)) {
         GtkWidget *dialog;
 	char *name;
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 67b34a1..ce4e430 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -497,7 +497,7 @@ search_entry_key_press_event_cb (GtkEntry    *entry,
                                  GdkEventKey *event,
                                  GnomeControlCenterPrivate   *priv)
 {
-  if (event->keyval == GDK_Return)
+  if (event->keyval == GDK_KEY_Return)
     {
       GtkTreePath *path;
 
@@ -511,7 +511,7 @@ search_entry_key_press_event_cb (GtkEntry    *entry,
       return TRUE;
     }
 
-  if (event->keyval == GDK_Escape)
+  if (event->keyval == GDK_KEY_Escape)
     {
       gtk_entry_set_text (entry, "");
       return TRUE;
diff --git a/typing-break/drw-break-window.c b/typing-break/drw-break-window.c
index 5a0b1dd..fd65c59 100644
--- a/typing-break/drw-break-window.c
+++ b/typing-break/drw-break-window.c
@@ -483,7 +483,7 @@ postpone_entry_key_press_event_cb (GtkEntry       *entry,
 
 	priv = window->priv;
 
-	if (event->keyval == GDK_Escape) {
+	if (event->keyval == GDK_KEY_Escape) {
 		if (priv->postpone_timeout_id) {
 			g_source_remove (priv->postpone_timeout_id);
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]