[gthumb] added the _KEY prefix to the GDK key constants



commit bd47cf9429e62a83318f09971bdd88fc11493343
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Oct 16 11:55:29 2011 +0200

    added the _KEY prefix to the GDK key constants

 extensions/edit_metadata/callbacks.c  |    2 +-
 extensions/file_manager/callbacks.c   |    4 ++--
 extensions/image_rotation/callbacks.c |    4 ++--
 extensions/list_tools/gth-script.c    |    4 ++--
 extensions/slideshow/gth-slideshow.c  |   24 ++++++++++++------------
 gthumb/gth-icon-view.c                |    4 ++--
 gthumb/gth-image-navigator.c          |   12 ++++++------
 gthumb/gth-image-viewer.c             |   20 ++++++++++----------
 gthumb/gth-time-selector.c            |    2 +-
 9 files changed, 38 insertions(+), 38 deletions(-)
---
diff --git a/extensions/edit_metadata/callbacks.c b/extensions/edit_metadata/callbacks.c
index 53c1929..fbf8d69 100644
--- a/extensions/edit_metadata/callbacks.c
+++ b/extensions/edit_metadata/callbacks.c
@@ -383,7 +383,7 @@ edit_metadata__gth_browser_file_list_key_press_cb (GthBrowser  *browser,
 		return NULL;
 
 	switch (gdk_keyval_to_lower (event->keyval)) {
-	case GDK_c:
+	case GDK_KEY_c:
 		gth_browser_activate_action_edit_metadata (NULL, browser);
 		result = GINT_TO_POINTER (1);
 		break;
diff --git a/extensions/file_manager/callbacks.c b/extensions/file_manager/callbacks.c
index 3b02f67..3ed5212 100644
--- a/extensions/file_manager/callbacks.c
+++ b/extensions/file_manager/callbacks.c
@@ -1172,7 +1172,7 @@ fm__gth_browser_file_list_key_press_cb (GthBrowser  *browser,
 	modifiers = gtk_accelerator_get_default_mod_mask ();
 
 	switch (event->keyval) {
-	case GDK_g:
+	case GDK_KEY_g:
 		if ((event->state & modifiers) == 0) {
 			items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view (browser)));
 			file_data_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
@@ -1186,7 +1186,7 @@ fm__gth_browser_file_list_key_press_cb (GthBrowser  *browser,
 		}
 		break;
 
-	case GDK_Delete:
+	case GDK_KEY_Delete:
 		if (((event->state & modifiers) == 0) || ((event->state & modifiers) == GDK_SHIFT_MASK)) {
 			if (gth_browser_get_location_source (browser) != NULL) {
 				items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view (browser)));
diff --git a/extensions/image_rotation/callbacks.c b/extensions/image_rotation/callbacks.c
index 1059871..81fa992 100644
--- a/extensions/image_rotation/callbacks.c
+++ b/extensions/image_rotation/callbacks.c
@@ -143,12 +143,12 @@ ir__gth_browser_file_list_key_press_cb (GthBrowser  *browser,
 	gpointer result = NULL;
 
 	switch (event->keyval) {
-	case GDK_bracketright:
+	case GDK_KEY_bracketright:
 		gth_browser_activate_action_tool_rotate_right (NULL, browser);
 		result = GINT_TO_POINTER (1);
 		break;
 
-	case GDK_bracketleft:
+	case GDK_KEY_bracketleft:
 		gth_browser_activate_action_tool_rotate_left (NULL, browser);
 		result = GINT_TO_POINTER (1);
 		break;
diff --git a/extensions/list_tools/gth-script.c b/extensions/list_tools/gth-script.c
index 118a72c..0b7a8d7 100644
--- a/extensions/list_tools/gth-script.c
+++ b/extensions/list_tools/gth-script.c
@@ -85,7 +85,7 @@ _gdk_keyval_from_name (const gchar *keyval_name)
 	if (keyval_name != NULL)
 		return gdk_keyval_from_name (keyval_name);
 	else
-		return GDK_VoidSymbol;
+		return GDK_KEY_VoidSymbol;
 }
 
 
@@ -311,7 +311,7 @@ gth_script_class_init (GthScriptClass *klass)
 							    "The keyboard shortcut to activate the script",
 							    0,
 							    G_MAXUINT,
-							    GDK_VoidSymbol,
+							    GDK_KEY_VoidSymbol,
 							    G_PARAM_READWRITE));
 }
 
diff --git a/extensions/slideshow/gth-slideshow.c b/extensions/slideshow/gth-slideshow.c
index 8bf80f0..002cf8d 100644
--- a/extensions/slideshow/gth-slideshow.c
+++ b/extensions/slideshow/gth-slideshow.c
@@ -641,35 +641,35 @@ viewer_event_cb (GtkWidget    *widget,
 	}
 	else if (event->type == GDK_KEY_PRESS) {
 		switch (((GdkEventKey *) event)->keyval) {
-		case GDK_F5:
+		case GDK_KEY_F5:
 			_gth_slideshow_close (self);
 			break;
 		}
 	}
 	else if (event->type == GDK_KEY_RELEASE) {
 		switch (((GdkEventKey *) event)->keyval) {
-		case GDK_Escape:
-		case GDK_q:
+		case GDK_KEY_Escape:
+		case GDK_KEY_q:
 			_gth_slideshow_close (self);
 			break;
-		case GDK_p:
+		case GDK_KEY_p:
 			_gth_slideshow_toggle_pause (self);
 			break;
 
-		case GDK_space:
-		case GDK_Down:
-		case GDK_Right:
-		case GDK_Page_Down:
+		case GDK_KEY_space:
+		case GDK_KEY_Down:
+		case GDK_KEY_Right:
+		case GDK_KEY_Page_Down:
 			if (self->priv->paused)
 				_gth_slideshow_toggle_pause (self);
 			else
 				_gth_slideshow_load_next_image (self);
 			break;
 
-		case GDK_BackSpace:
-		case GDK_Up:
-		case GDK_Left:
-		case GDK_Page_Up:
+		case GDK_KEY_BackSpace:
+		case GDK_KEY_Up:
+		case GDK_KEY_Left:
+		case GDK_KEY_Page_Up:
 			_gth_slideshow_load_prev_image (self);
 			break;
 		}
diff --git a/gthumb/gth-icon-view.c b/gthumb/gth-icon-view.c
index 161f610..0eaef26 100644
--- a/gthumb/gth-icon-view.c
+++ b/gthumb/gth-icon-view.c
@@ -554,9 +554,9 @@ gth_icon_view_class_init (GthIconViewClass *klass)
 
 	binding_set = gtk_binding_set_by_class (klass);
 
-	gtk_icon_view_add_move_binding (binding_set, GDK_Right, 0,
+	gtk_icon_view_add_move_binding (binding_set, GDK_KEY_Right, 0,
 					GTK_MOVEMENT_LOGICAL_POSITIONS, 1);
-	gtk_icon_view_add_move_binding (binding_set, GDK_Left, 0,
+	gtk_icon_view_add_move_binding (binding_set, GDK_KEY_Left, 0,
 					GTK_MOVEMENT_LOGICAL_POSITIONS, -1);
 }
 
diff --git a/gthumb/gth-image-navigator.c b/gthumb/gth-image-navigator.c
index 117ab6a..874d6eb 100644
--- a/gthumb/gth-image-navigator.c
+++ b/gthumb/gth-image-navigator.c
@@ -232,17 +232,17 @@ popup_window_event_cb (GtkWidget *widget,
 
 	case GDK_KEY_PRESS:
 		switch (event->key.keyval) {
-		case GDK_plus:
-		case GDK_minus:
-		case GDK_1:
+		case GDK_KEY_plus:
+		case GDK_KEY_minus:
+		case GDK_KEY_1:
 			switch (event->key.keyval) {
-			case GDK_plus:
+			case GDK_KEY_plus:
 				gth_image_viewer_zoom_in (viewer);
 				break;
-			case GDK_minus:
+			case GDK_KEY_minus:
 				gth_image_viewer_zoom_out (viewer);
 				break;
-			case GDK_1:
+			case GDK_KEY_1:
 				gth_image_viewer_set_zoom (viewer, 1.0);
 				break;
 			}
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index 39fcaae..dd69cde 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -1331,45 +1331,45 @@ gth_image_viewer_class_init (GthImageViewerClass *class)
 
 	/* For scrolling */
 
-	gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Right, 0,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_RIGHT,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE);
-	gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Left, 0,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_LEFT,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE);
-	gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, 0,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN);
-	gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, 0,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP);
 
-	gtk_binding_entry_add_signal (binding_set, GDK_Right, GDK_SHIFT_MASK,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Right, GDK_SHIFT_MASK,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_RIGHT,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE);
-	gtk_binding_entry_add_signal (binding_set, GDK_Left, GDK_SHIFT_MASK,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Left, GDK_SHIFT_MASK,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_LEFT,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE);
-	gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_SHIFT_MASK,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, GDK_SHIFT_MASK,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_DOWN);
-	gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_SHIFT_MASK,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, GDK_SHIFT_MASK,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_UP);
 
-	gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Down, 0,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_DOWN);
-	gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Up, 0,
 			      "scroll", 2,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_NONE,
 			      GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_UP);
diff --git a/gthumb/gth-time-selector.c b/gthumb/gth-time-selector.c
index 6cf4174..4508a61 100644
--- a/gthumb/gth-time-selector.c
+++ b/gthumb/gth-time-selector.c
@@ -370,7 +370,7 @@ calendar_popup_key_press_event_cb (GtkWidget   *widget,
 	GthTimeSelector *self = user_data;
 
 	switch (event->keyval) {
-	case GDK_Escape:
+	case GDK_KEY_Escape:
 		hide_calendar_popup (self);
 		break;
 



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