rimmed pushed a commit to branch master.

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

commit a791b970fec7f8f3f9abe0f3405bc801697cf103
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Wed Apr 6 09:22:28 2016 +0300

    workspace: add to ctx menu item 'Show rulers'
    
    Change-Id: I9195f023b6111243b8f65ec842a6c79f40d2db44
---
 src/bin/ui/menu.c                |  2 +-
 src/bin/ui/workspace/workspace.c | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/menu.c b/src/bin/ui/menu.c
index c9999b5..a93c6e6 100644
--- a/src/bin/ui/menu.c
+++ b/src/bin/ui/menu.c
@@ -314,7 +314,7 @@ ui_menu_add(void)
       ___(MENU_VIEW);
       ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_WORKSPACE_OBJECT_AREA, NULL, _("Show 
object area"), "o")
       ___(MENU_VIEW);
-      ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_RULERS_SHOW, NULL, _("Show/Hide 
rulers"), NULL)
+      ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_RULERS_SHOW, NULL, _("Show rulers"), 
NULL)
       ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_RULERS_ABS, NULL, _("Absolute 
scale"), NULL)
       ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_RULERS_REL, NULL, _("Relative 
scale"), NULL)
       ITEM_MENU_ADD(MENU_VIEW, MENU_VIEW_RULERS_BOTH, NULL, _("Both scales"), 
NULL)
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 501becb..cd124b9 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -565,6 +565,14 @@ _menu_redo(void *data __UNUSED__,
 }
 
 static void
+_menu_rulers_visible(void *data __UNUSED__,
+                     Evas_Object *obj __UNUSED__,
+                     void *event_info __UNUSED__)
+{
+   evas_object_smart_callback_call(ap.win, SIGNAL_SHORTCUT_RULERS_VISIBLED, 
NULL);
+}
+
+static void
 _menu_dismiss(void *data __UNUSED__,
               Evas_Object *obj,
               void *event_info __UNUSED__)
@@ -601,6 +609,8 @@ _menu_cb(void *data,
    evas_object_smart_callback_add(menu, "dismissed", _menu_dismiss, NULL);
    MENU_ITEM_ADD(menu, NULL, NULL, _("Undo"), _menu_undo, "Ctrl-Z");
    MENU_ITEM_ADD(menu, NULL, NULL, _("Redo"), _menu_redo, "Ctrl-Y");
+   elm_menu_item_separator_add(menu, NULL);
+   MENU_ITEM_ADD(menu, NULL, NULL, _("Show rulers"), _menu_rulers_visible, 
NULL);
 
    elm_menu_move(menu, ev->canvas.x, ev->canvas.y);
    evas_object_show(menu);

-- 


Reply via email to