[gthumb] added other keyboard shortcuts in image viewer mode
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] added other keyboard shortcuts in image viewer mode
- Date: Mon, 12 Jul 2010 17:22:02 +0000 (UTC)
commit 0cb0e3b4165004e5f971b451bf892d969b5e9c8c
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Jul 12 19:20:44 2010 +0200
added other keyboard shortcuts in image viewer mode
'C': crop tool
'S': resize tool
extensions/file_tools/callbacks.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/extensions/file_tools/callbacks.c b/extensions/file_tools/callbacks.c
index 7cf1572..6a091f6 100644
--- a/extensions/file_tools/callbacks.c
+++ b/extensions/file_tools/callbacks.c
@@ -26,9 +26,11 @@
#include <glib-object.h>
#include <gdk/gdkkeysyms.h>
#include <gthumb.h>
+#include "gth-file-tool-crop.h"
#include "gth-file-tool-enhance.h"
#include "gth-file-tool-flip.h"
#include "gth-file-tool-mirror.h"
+#include "gth-file-tool-resize.h"
#include "gth-file-tool-rotate-left.h"
#include "gth-file-tool-rotate-right.h"
@@ -51,6 +53,9 @@ file_tools__gth_browser_file_list_key_press_cb (GthBrowser *browser,
sidebar = gth_browser_get_viewer_sidebar (browser);
toolbox = gth_sidebar_get_toolbox (GTH_SIDEBAR (sidebar));
+ if (gth_toolbox_tool_is_active (GTH_TOOLBOX (toolbox)))
+ return NULL;
+
switch (event->keyval) {
case GDK_h:
tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_ENHANCE);
@@ -67,6 +72,14 @@ file_tools__gth_browser_file_list_key_press_cb (GthBrowser *browser,
case GDK_R:
tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_ROTATE_LEFT);
break;
+ case GDK_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:
+ gth_browser_show_viewer_tools (browser, TRUE);
+ tool = (GthFileTool *) gth_toolbox_get_tool (GTH_TOOLBOX (toolbox), GTH_TYPE_FILE_TOOL_RESIZE);
+ break;
}
if (tool != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]