aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/shot/e_mod_main.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-02 12:19:11 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-08-02 12:19:11 +0000
commit3ca3ba9215d4dc78c1f6893b8d7a9ce072f2fea6 (patch)
tree397ce646514e0dc0274564832f48305e3d3cf31b /src/modules/shot/e_mod_main.c
parente40eb173bba0972c50fc5bc60dd02ebba978948d (diff)
downloadenlightenment-3ca3ba9215d4dc78c1f6893b8d7a9ce072f2fea6.tar.gz
enlightenment-3ca3ba9215d4dc78c1f6893b8d7a9ce072f2fea6.tar.xz
enlightenment-3ca3ba9215d4dc78c1f6893b8d7a9ce072f2fea6.zip
escape now triggers shot save cancel
SVN revision: 74804
Diffstat (limited to 'src/modules/shot/e_mod_main.c')
-rw-r--r--src/modules/shot/e_mod_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 1c618308c..fa2c55836 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -30,6 +30,7 @@ static E_Dialog *fsel_dia = NULL;
static E_Border_Menu_Hook *border_hook = NULL;
static void _file_select_ok_cb(void *data __UNUSED__, E_Dialog *dia);
+static void _file_select_cancel_cb(void *data __UNUSED__, E_Dialog *dia);
static void
_win_delete_cb(E_Win *w __UNUSED__)
@@ -115,9 +116,9 @@ _save_key_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __
{
Evas_Event_Key_Down *ev = event;
if ((!strcmp(ev->keyname, "Return")) || (!strcmp(ev->keyname, "KP_Enter")))
- {
- _file_select_ok_cb(NULL, fsel_dia);
- }
+ _file_select_ok_cb(NULL, fsel_dia);
+ else if (!strcmp(ev->keyname, "Escape"))
+ _file_select_cancel_cb(NULL, fsel_dia);
}
static void
@@ -260,6 +261,8 @@ _win_save_cb(void *data __UNUSED__, void *data2 __UNUSED__)
if (!evas_object_key_grab(o, "Return", mask, ~mask, 0)) printf("grab err\n");
mask = 0;
if (!evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0)) printf("grab err\n");
+ mask = 0;
+ if (!evas_object_key_grab(o, "Escape", mask, ~mask, 0)) printf("grab err\n");
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, _save_key_down_cb, NULL);
e_dialog_show(dia);
}