rimmed pushed a commit to branch master.

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

commit d3ba13f107c551167121f4a82292fa419ed62a3d
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Wed Jan 6 09:03:59 2016 +0200

    project_export: implement UI side for export release edj
    
    Change-Id: I24e9467227fb20c0391f5a5bf439e3278b85aee5
---
 src/bin/ui/main_window.h    |  8 ++++++++
 src/bin/ui/menu.c           |  5 ++++-
 src/bin/ui/project_export.c | 47 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/main_window.h b/src/bin/ui/main_window.h
index cc2bc74..ac7b56c 100644
--- a/src/bin/ui/main_window.h
+++ b/src/bin/ui/main_window.h
@@ -369,6 +369,14 @@ void
 project_export_develop(void);
 
 /**
+ * Export project as release edj file.
+ *
+ * @ingroup Window
+ */
+void
+project_export_release(void);
+
+/**
  * Update Statusbar field that contains time of last save of current
  * project file.
  *
diff --git a/src/bin/ui/menu.c b/src/bin/ui/menu.c
index a0a04b0..274ad34 100644
--- a/src/bin/ui/menu.c
+++ b/src/bin/ui/menu.c
@@ -115,6 +115,9 @@ _menu_cb(void *data __UNUSED__,
       case MENU_FILE_EXPORT_DEVELOP:
          project_export_develop();
          break;
+      case MENU_FILE_EXPORT_RELEASE:
+         project_export_release();
+         break;
       case MENU_FILE_CLOSE_PROJECT:
            {
               if (!project_close()) break;
@@ -288,7 +291,7 @@ ui_menu_add(void)
    ui_menu_items_list_disable_set(menu, MENU_ITEMS_LIST_STYLE_ONLY, true);
 
    TODO("remove lines after implementation this features")
-   ui_menu_disable_set(menu, MENU_FILE_EXPORT_RELEASE, true);
+   //ui_menu_disable_set(menu, MENU_FILE_EXPORT_RELEASE, true);
    ui_menu_disable_set(menu, MENU_VIEW_WORKSPACE_ZOOM_IN, true);
    ui_menu_disable_set(menu, MENU_VIEW_WORKSPACE_ZOOM_OUT, true);
    ui_menu_disable_set(menu, MENU_VIEW_WORKSPACE_OBJECT_AREA, true);
diff --git a/src/bin/ui/project_export.c b/src/bin/ui/project_export.c
index 5a92985..e23c929 100644
--- a/src/bin/ui/project_export.c
+++ b/src/bin/ui/project_export.c
@@ -77,6 +77,53 @@ project_export_develop(void)
 }
 
 static Eina_Bool
+_export_release_setup(void *data, Splash_Status status __UNUSED__)
+{
+   const char *path  = (const char *)data;
+
+   assert(path != NULL);
+
+   pm_project_release_export(ap.project, path, progress_print, progress_end, 
NULL);
+   return true;
+}
+
+static Eina_Bool
+_export_release(void *data __UNUSED__,
+                Evas_Object *obj, /* this is fileselector from popup */
+                void *event_info)
+{
+   Eina_List *selected = (Eina_List *)event_info;
+   Eina_Strbuf *buf;
+
+   assert(selected != NULL);
+
+   buf = eina_strbuf_new();
+   eina_strbuf_append_printf(buf,
+                             _("<font_size=16>A project file '%s' already 
exist."
+                               "Do you want to replace it?</font_size>"),
+                             (const char *)eina_list_data_get(selected));
+   if (!exist_permission_check(elm_fileselector_path_get(obj),
+                               elm_fileselector_current_name_get(obj),
+                               _("Export to release edj-file"),
+                               eina_strbuf_string_get(buf)))
+     return false;
+   eina_strbuf_free(buf);
+
+   ap.splash = splash_add(ap.win, _export_release_setup, _export_teardown,
+                           NULL, (void 
*)eina_stringshare_add(eina_list_data_get(selected)));
+   evas_object_focus_set(ap.splash, true);
+   evas_object_show(ap.splash);
+
+   return true;
+}
+
+void
+project_export_release(void)
+{
+   popup_fileselector_edj_helper("Export to release edj-file", NULL, NULL, 
_export_release, NULL, false, true);
+}
+
+static Eina_Bool
 _export_source_code_setup(void *data, Splash_Status status __UNUSED__)
 {
    Eina_Stringshare *path = (Eina_Stringshare *)data;

-- 


Reply via email to