rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=8962b16a76208242ce3b64cf519aac498f62680c

commit 8962b16a76208242ce3b64cf519aac498f62680c
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Mar 23 17:31:00 2016 +0200

    project_navigator: add save project shortcut (CTRL+S)
---
 src/bin/ui/project_navigator.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/bin/ui/project_navigator.c b/src/bin/ui/project_navigator.c
index 6706db7..cd49751 100644
--- a/src/bin/ui/project_navigator.c
+++ b/src/bin/ui/project_navigator.c
@@ -630,6 +630,16 @@ _unselected_cb(void *data __UNUSED__,
    elm_object_disabled_set(project_navigator.btn_del, true);
 }
 
+static void
+_shortcut_save_cb(void *data __UNUSED__,
+                  Evas_Object *obj __UNUSED__,
+                  void *event_info __UNUSED__)
+{
+   if (!ap.project) return; /* when pressing ctrl + s without open project */
+
+   project_save();
+}
+
 Evas_Object *
 project_navigator_add(void)
 {
@@ -690,6 +700,7 @@ project_navigator_add(void)
    evas_object_smart_callback_add(ap.win, SIGNAL_GROUP_ADDED, _group_add, 
NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_GROUP_DELETED, _group_del, 
NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_ADD_GROUP, 
_btn_add_group_cb, NULL);
+   evas_object_smart_callback_add(ap.win, SIGNAL_SHORTCUT_SAVE, 
_shortcut_save_cb, NULL);
 
    TODO("Add deletion callback and free resources");
 

-- 


Reply via email to