rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=fde2a148d8c1572a9a5fe3d8c74fab48581bb7a4
commit fde2a148d8c1572a9a5fe3d8c74fab48581bb7a4 Author: Vyacheslav Reutskiy <[email protected]> Date: Tue Mar 29 17:02:46 2016 +0300 shortcut: add hotkey for manage object area visibility Change-Id: I6622c729dec4ea34892bd2bf74ee8cf10b6da0d0 --- src/bin/common/signals.h | 2 ++ src/bin/ui/shortcuts/shortcuts.c | 4 ++++ src/bin/ui/shortcuts/shortcuts.h | 1 + src/bin/ui/tabs.c | 15 +++++++++++++++ 4 files changed, 22 insertions(+) diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h index b87c9cb..4b7b3f9 100644 --- a/src/bin/common/signals.h +++ b/src/bin/common/signals.h @@ -473,6 +473,8 @@ typedef struct { #define SIGNAL_SHORTCUT_ZOOM_IN "SIGNAL_SHORTCUT_ZOOM_IN" #define SIGNAL_SHORTCUT_ZOOM_OUT "SIGNAL_SHORTCUT_ZOOM_OUT" #define SIGNAL_SHORTCUT_ZOOM_RESET "SIGNAL_SHORTCUT_ZOOM_RESET" +#define SIGNAL_SHORTCUT_OBJECT_AREA "SIGNAL_SHORTCUT_OBJECT_AREA" + /** * emited when shortcut is pressed. * eventinfo - tab number. diff --git a/src/bin/ui/shortcuts/shortcuts.c b/src/bin/ui/shortcuts/shortcuts.c index 578b457..a3cb7ca 100644 --- a/src/bin/ui/shortcuts/shortcuts.c +++ b/src/bin/ui/shortcuts/shortcuts.c @@ -173,6 +173,7 @@ _shortcut_handle(Shortcut_Type type) SHORTCUT(ZOOM_IN); SHORTCUT(ZOOM_OUT); SHORTCUT(ZOOM_RESET); + SHORTCUT(OBJECT_AREA); case SHORTCUT_TYPE_NONE: break; @@ -452,6 +453,9 @@ _default_shortcuts_add() MOD_NONE, 82/*KP_-*/); _add_shortcut(SHORTCUT_TYPE_ZOOM_RESET, SHORTCUT_TYPE_NONE, MOD_NONE, 106/*KP_/ */); + _add_shortcut(SHORTCUT_TYPE_OBJECT_AREA, SHORTCUT_TYPE_NONE, + MOD_NONE, 32/*o*/); + } /*=============================================*/ diff --git a/src/bin/ui/shortcuts/shortcuts.h b/src/bin/ui/shortcuts/shortcuts.h index a3a09a7..5d403d0 100644 --- a/src/bin/ui/shortcuts/shortcuts.h +++ b/src/bin/ui/shortcuts/shortcuts.h @@ -90,6 +90,7 @@ typedef enum { SHORTCUT_TYPE_ZOOM_IN, SHORTCUT_TYPE_ZOOM_OUT, SHORTCUT_TYPE_ZOOM_RESET, + SHORTCUT_TYPE_OBJECT_AREA, SHORTCUT_TYPE_LAST, } Shortcut_Type; diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c index 8805e14..a132945 100644 --- a/src/bin/ui/tabs.c +++ b/src/bin/ui/tabs.c @@ -788,6 +788,20 @@ _shortcut_zoom_reset_cb(void *data __UNUSED__, workspace_zoom_factor_set(tabs.current_workspace, 1.0); } +static void +_shortcut_object_area_cb(void *data __UNUSED__, + Evas_Object *obj __UNUSED__, + void *event_info __UNUSED__) +{ + Eina_Bool visible; + + if (tabs.current_workspace) + { + visible = workspace_object_area_visible_get(tabs.current_workspace); + workspace_object_area_visible_set(tabs.current_workspace, !visible); + } +} + Evas_Object * tabs_add(void) { @@ -910,6 +924,7 @@ tabs_add(void) evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_IN, _shortcut_zoom_in_cb, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_OUT, _shortcut_zoom_out_cb, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ZOOM_RESET, _shortcut_zoom_reset_cb, NULL); + evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_OBJECT_AREA, _shortcut_object_area_cb, NULL); return tabs.layout; } --
