[gthumb: 5/20] Replace GDK_<keyname> with GDK_KEY_<keyname> through the code



commit f85d383dce8fe3304dfd6f5188dc1ce950b9aac4
Author: Lincoln de Sousa <lincoln comum org>
Date:   Fri May 6 23:37:22 2011 -0300

    Replace GDK_<keyname> with GDK_KEY_<keyname> through the code

 extensions/file_tools/callbacks.c                |   14 +++++-----
 extensions/list_tools/dlg-personalize-scripts.c  |    4 +-
 extensions/list_tools/gth-script-editor-dialog.c |   12 ++++----
 gthumb/gedit-message-area.c                      |    2 +-
 gthumb/gth-browser.c                             |   22 ++++++++--------
 gthumb/gth-image-viewer.c                        |   30 +++++++++++-----------
 6 files changed, 42 insertions(+), 42 deletions(-)
---
diff --git a/extensions/file_tools/callbacks.c b/extensions/file_tools/callbacks.c
index 16863ea..cf59468 100644
--- a/extensions/file_tools/callbacks.c
+++ b/extensions/file_tools/callbacks.c
@@ -57,26 +57,26 @@ file_tools__gth_browser_file_list_key_press_cb (GthBrowser  *browser,
 		return NULL;
 
 	switch (event->keyval) {
-	case GDK_h:
+	case GDK_KEY_h:
 		tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_ENHANCE);
 		break;
-	case GDK_l:
+	case GDK_KEY_l:
 		tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_FLIP);
 		break;
-	case GDK_m:
+	case GDK_KEY_m:
 		tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_MIRROR);
 		break;
-	case GDK_r:
+	case GDK_KEY_r:
 		tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_ROTATE_RIGHT);
 		break;
-	case GDK_R:
+	case GDK_KEY_R:
 		tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_ROTATE_LEFT);
 		break;
-	case GDK_C:
+	case GDK_KEY_C:
 		gth_browser_show_viewer_tools (browser, TRUE);
 		tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_CROP);
 		break;
-	case GDK_S:
+	case GDK_KEY_S:
 		gth_browser_show_viewer_tools (browser, TRUE);
 		tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_RESIZE);
 		break;
diff --git a/extensions/list_tools/dlg-personalize-scripts.c b/extensions/list_tools/dlg-personalize-scripts.c
index 06b1b01..a6c5204 100644
--- a/extensions/list_tools/dlg-personalize-scripts.c
+++ b/extensions/list_tools/dlg-personalize-scripts.c
@@ -137,8 +137,8 @@ get_script_shortcut (GthScript *script)
 	char        *shortcut;
 
 	keyval = gth_script_get_shortcut (script);
-	if ((keyval >= GDK_KP_0) && (keyval <= GDK_KP_9))
-		shortcut = g_strdup_printf ("%c", '0' + (keyval - GDK_KP_0));
+	if ((keyval >= GDK_KEY_KP_0) && (keyval <= GDK_KEY_KP_9))
+		shortcut = g_strdup_printf ("%c", '0' + (keyval - GDK_KEY_KP_0));
 	else
 		shortcut = g_strdup ("");
 
diff --git a/extensions/list_tools/gth-script-editor-dialog.c b/extensions/list_tools/gth-script-editor-dialog.c
index 2d4ed61..257b632 100644
--- a/extensions/list_tools/gth-script-editor-dialog.c
+++ b/extensions/list_tools/gth-script-editor-dialog.c
@@ -248,8 +248,8 @@ gth_script_editor_dialog_set_script (GthScriptEditorDialog *self,
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("wait_command_checkbutton")), gth_script_wait_command (script));
 
 		keyval = gth_script_get_shortcut (script);
-		if ((keyval >= GDK_KP_0) && (keyval <= GDK_KP_9))
-			gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("shortcut_combobox")), (keyval - GDK_KP_0) + 1);
+		if ((keyval >= GDK_KEY_KP_0) && (keyval <= GDK_KEY_KP_9))
+			gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("shortcut_combobox")), (keyval - GDK_KEY_KP_0) + 1);
 		else
 			gtk_combo_box_set_active (GTK_COMBO_BOX (GET_WIDGET ("shortcut_combobox")), NO_SHORTCUT);
 	}
@@ -269,11 +269,11 @@ gth_script_editor_dialog_set_script (GthScriptEditorDialog *self,
 		guint      keyval;
 
 		keyval = gth_script_get_shortcut (other_script);
-		if ((keyval >= GDK_KP_0) && (keyval <= GDK_KP_9)) {
+		if ((keyval >= GDK_KEY_KP_0) && (keyval <= GDK_KEY_KP_9)) {
 			if (g_strcmp0 (gth_script_get_id (other_script), self->priv->script_id) == 0)
 				continue;
 
-			path = gtk_tree_path_new_from_indices (keyval - GDK_KP_0 + 1, -1);
+			path = gtk_tree_path_new_from_indices (keyval - GDK_KEY_KP_0 + 1, -1);
 			gtk_tree_model_get_iter (GTK_TREE_MODEL (GET_WIDGET ("shortcut_liststore")), &iter, path);
 			gtk_list_store_set (GTK_LIST_STORE (GET_WIDGET ("shortcut_liststore")), &iter,
 					    SHORTCUT_SENSITIVE_COLUMN, FALSE,
@@ -302,9 +302,9 @@ gth_script_editor_dialog_get_script (GthScriptEditorDialog  *self,
 
 	keyval_index = gtk_combo_box_get_active (GTK_COMBO_BOX (GET_WIDGET ("shortcut_combobox")));
 	if ((keyval_index >= 1) && (keyval_index <= 10))
-		keyval = GDK_KP_0 + (keyval_index - 1);
+		keyval = GDK_KEY_KP_0 + (keyval_index - 1);
 	else
-		keyval = GDK_VoidSymbol;
+		keyval = GDK_KEY_VoidSymbol;
 
 	g_object_set (script,
 		      "display-name", gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("name_entry"))),
diff --git a/gthumb/gedit-message-area.c b/gthumb/gedit-message-area.c
index 14a2667..364825b 100644
--- a/gthumb/gedit-message-area.c
+++ b/gthumb/gedit-message-area.c
@@ -231,7 +231,7 @@ gedit_message_area_class_init (GeditMessageAreaClass *klass)
 
 	binding_set = gtk_binding_set_by_class (klass);
 
-	gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "close", 0);
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "close", 0);
 }
 
 
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 258cb9a..83b2f70 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -3477,12 +3477,12 @@ gth_file_list_key_press_cb (GtkWidget   *widget,
 
 	if ((event->state & modifiers) == 0) {
 		switch (event->keyval) {
-		case GDK_f:
+		case GDK_KEY_f:
 			gth_browser_fullscreen (browser);
 			result = TRUE;
 			break;
 
-		case GDK_e:
+		case GDK_KEY_e:
 			if (browser->priv->viewer_page != NULL) {
 				gth_window_set_current_page (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER);
 				gth_browser_show_viewer_tools (GTH_BROWSER (browser), TRUE);
@@ -4977,33 +4977,33 @@ gth_browser_viewer_key_press_cb (GthBrowser  *browser,
 	modifiers = gtk_accelerator_get_default_mod_mask ();
 	if ((event->state & modifiers) == 0) {
 		switch (event->keyval) {
-		case GDK_Page_Up:
-		case GDK_BackSpace:
+		case GDK_KEY_Page_Up:
+		case GDK_KEY_BackSpace:
 			gth_browser_show_prev_image (browser, FALSE, FALSE);
 			return TRUE;
 
-		case GDK_Page_Down:
-		case GDK_space:
+		case GDK_KEY_Page_Down:
+		case GDK_KEY_space:
 			gth_browser_show_next_image (browser, FALSE, FALSE);
 			return TRUE;
 
-		case GDK_Home:
+		case GDK_KEY_Home:
 			gth_browser_show_first_image (browser, FALSE, FALSE);
 			return TRUE;
 
-		case GDK_End:
+		case GDK_KEY_End:
 			gth_browser_show_last_image (browser, FALSE, FALSE);
 			return TRUE;
 
-		case GDK_e:
+		case GDK_KEY_e:
 			gth_browser_show_viewer_tools (GTH_BROWSER (browser), ! _gth_browser_get_action_active (browser, "Viewer_Tools"));
 			return TRUE;
 
-		case GDK_i:
+		case GDK_KEY_i:
 			gth_browser_toggle_properties_on_screen (GTH_BROWSER (browser));
 			return TRUE;
 
-		case GDK_f:
+		case GDK_KEY_f:
 			gth_browser_fullscreen (browser);
 			break;
 		}
diff --git a/gthumb/gth-image-viewer.c b/gthumb/gth-image-viewer.c
index 6855536..224260d 100644
--- a/gthumb/gth-image-viewer.c
+++ b/gthumb/gth-image-viewer.c
@@ -1376,53 +1376,53 @@ gth_image_viewer_class_init (GthImageViewerClass *class)
 
 	/* Zoom in */
 
-	gtk_binding_entry_add_signal (binding_set, GDK_plus, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_plus, 0,
 				      "zoom_in", 0);
-	gtk_binding_entry_add_signal (binding_set, GDK_equal, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_equal, 0,
 				      "zoom_in", 0);
-	gtk_binding_entry_add_signal (binding_set, GDK_KP_Add, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Add, 0,
 				      "zoom_in", 0);
 
 	/* Zoom out */
 
-	gtk_binding_entry_add_signal (binding_set, GDK_minus, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_minus, 0,
 				      "zoom_out", 0);
-	gtk_binding_entry_add_signal (binding_set, GDK_KP_Subtract, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Subtract, 0,
 				      "zoom_out", 0);
 
 	/* Set zoom */
 
-	gtk_binding_entry_add_signal (binding_set, GDK_KP_Divide, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Divide, 0,
 				      "set_zoom", 1,
 				      G_TYPE_DOUBLE, 1.0);
-	gtk_binding_entry_add_signal (binding_set, GDK_1, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_1, 0,
 				      "set_zoom", 1,
 				      G_TYPE_DOUBLE, 1.0);
-	gtk_binding_entry_add_signal (binding_set, GDK_z, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_z, 0,
 				      "set_zoom", 1,
 				      G_TYPE_DOUBLE, 1.0);
-	gtk_binding_entry_add_signal (binding_set, GDK_2, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_2, 0,
 				      "set_zoom", 1,
 				      G_TYPE_DOUBLE, 2.0);
-	gtk_binding_entry_add_signal (binding_set, GDK_3, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_3, 0,
 				      "set_zoom", 1,
 				      G_TYPE_DOUBLE, 3.0);
 
 	/* Set fit mode */
 
-	gtk_binding_entry_add_signal (binding_set, GDK_x, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_x, 0,
 				      "set_fit_mode", 1,
 				      GTH_TYPE_FIT, GTH_FIT_SIZE_IF_LARGER);
-	gtk_binding_entry_add_signal (binding_set, GDK_KP_Multiply, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Multiply, 0,
 				      "set_fit_mode", 1,
 				      GTH_TYPE_FIT, GTH_FIT_SIZE_IF_LARGER);
-	gtk_binding_entry_add_signal (binding_set, GDK_x, GDK_SHIFT_MASK,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_x, GDK_SHIFT_MASK,
 				      "set_fit_mode", 1,
 				      GTH_TYPE_FIT, GTH_FIT_SIZE);
-	gtk_binding_entry_add_signal (binding_set, GDK_w, 0,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_w, 0,
 				      "set_fit_mode", 1,
 				      GTH_TYPE_FIT, GTH_FIT_WIDTH_IF_LARGER);
-	gtk_binding_entry_add_signal (binding_set, GDK_w, GDK_SHIFT_MASK,
+	gtk_binding_entry_add_signal (binding_set, GDK_KEY_w, GDK_SHIFT_MASK,
 				      "set_fit_mode", 1,
 				      GTH_TYPE_FIT, GTH_FIT_WIDTH);
 }



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