hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=c4e3ac89fdec6513c8db961e059465c8701390c5

commit c4e3ac89fdec6513c8db961e059465c8701390c5
Author: ChunEon Park <[email protected]>
Date:   Mon Aug 11 17:56:33 2014 +0900

    tools: renew tools items.
    
    remove new/save/load
    add menu
---
 data/themes/default/images.edc         |  17 +++--------------
 data/themes/default/images/Makefile.am |   3 +--
 data/themes/default/images/file.png    | Bin 511 -> 0 bytes
 data/themes/default/images/menu.png    | Bin 0 -> 287 bytes
 src/bin/menu.c                         |   5 ++++-
 src/bin/tools.c                        |  21 +++++++++++++--------
 6 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/data/themes/default/images.edc b/data/themes/default/images.edc
index 97586ea..bf199e7 100644
--- a/data/themes/default/images.edc
+++ b/data/themes/default/images.edc
@@ -1,11 +1,10 @@
 images {
    image: "plus.png" COMP;
    image: "minus.png" COMP;
-   image: "file.png" COMP;
+   image: "menu.png" COMP;
    image: "find.png" COMP;
    image: "highlight.png" COMP;
    image: "lines.png" COMP;
-   image: "new.png" COMP;
    image: "console.png" COMP;
    image: "status.png" COMP;
    image: "swallow_s.png" COMP;
@@ -30,12 +29,12 @@ group { name: "line";
    }
 }
 
-group { name: "file";
+group { name: "menu";
    parts {
       part { name: "img";
          type: IMAGE;
          description { state: "default" 0.0;
-            image.normal: "file.png";
+            image.normal: "menu.png";
          }
       }
    }
@@ -73,16 +72,6 @@ group { name: "lines";
       }
    }
 }
-group { name: "new";
-   parts {
-      part { name: "img";
-         type: IMAGE;
-         description { state: "default" 0.0;
-            image.normal: "new.png";
-         }
-      }
-   }
-}
 
 group { name: "console";
    parts {
diff --git a/data/themes/default/images/Makefile.am 
b/data/themes/default/images/Makefile.am
index 56729a6..c87c980 100644
--- a/data/themes/default/images/Makefile.am
+++ b/data/themes/default/images/Makefile.am
@@ -43,11 +43,10 @@ EXTRA_DIST = \
    vgrad_med_lighter.png \
    warning.png \
    pm_fill.png \
-   file.png \
+   menu.png \
    find.png \
    highlight.png \
    lines.png \
-   new.png \
    setting_icon.png \
    console.png \
    status.png \
diff --git a/data/themes/default/images/file.png 
b/data/themes/default/images/file.png
deleted file mode 100644
index 0fe3ba6..0000000
Binary files a/data/themes/default/images/file.png and /dev/null differ
diff --git a/data/themes/default/images/menu.png 
b/data/themes/default/images/menu.png
new file mode 100644
index 0000000..a194018
Binary files /dev/null and b/data/themes/default/images/menu.png differ
diff --git a/src/bin/menu.c b/src/bin/menu.c
index 2ebe9fd..dd14db2 100644
--- a/src/bin/menu.c
+++ b/src/bin/menu.c
@@ -759,7 +759,10 @@ menu_toggle(void)
 
    //Main Menu 
    if (md->active_request) menu_close(md);
-   else menu_open(md);
+   else
+     {
+        menu_open(md);
+     }
 }
 
 void
diff --git a/src/bin/tools.c b/src/bin/tools.c
index cef7992..5d94a52 100644
--- a/src/bin/tools.c
+++ b/src/bin/tools.c
@@ -18,9 +18,18 @@ item_unselect(Elm_Object_Item *it)
 }
 
 static void
-new_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
+menu_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
 {
-   menu_edc_new();
+   edit_data *ed = data;
+
+   if (search_is_opened() || goto_is_opened())
+     {
+        goto_close();
+        search_close();
+        edit_focus_set(ed);
+     }
+
+   menu_toggle();
    item_unselect((Elm_Object_Item *)event_info);
 }
 
@@ -123,12 +132,8 @@ tools_create(Evas_Object *parent, edit_data *ed)
    elm_object_focus_allow_set(toolbar, EINA_FALSE);
 
    Elm_Object_Item *it;
-   it = elm_toolbar_item_append(toolbar, NULL, "New", new_cb, NULL);
-   elm_toolbar_item_icon_file_set(it, EDJE_PATH, "new");
-   it = elm_toolbar_item_append(toolbar, NULL, "Save", save_cb, NULL);
-   elm_toolbar_item_icon_file_set(it, EDJE_PATH, "file");
-   it = elm_toolbar_item_append(toolbar, NULL, "Load", load_cb, NULL);
-   elm_toolbar_item_icon_file_set(it, EDJE_PATH, "file");
+   it = elm_toolbar_item_append(toolbar, NULL, "Menu", menu_cb, ed);
+   elm_toolbar_item_icon_file_set(it, EDJE_PATH, "menu");
    it = elm_toolbar_item_append(toolbar, NULL, "Highlight", highlight_cb, ed);
    elm_toolbar_item_icon_file_set(it, EDJE_PATH, "highlight");
    it = elm_toolbar_item_append(toolbar, NULL, "Swallow", swallow_cb, NULL);

-- 


Reply via email to