yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=7ba5cdb7f58da283f8f874b7243e6316a26c9258

commit 7ba5cdb7f58da283f8f874b7243e6316a26c9258
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Sun Apr 26 16:41:55 2015 +0300

    Add tab for Erigo Settings into Settings Win
---
 src/bin/egui_gui/egui_layout.json | 91 +++++++++++++++++++++++++++++----------
 src/bin/egui_gui/settings_view.c  | 50 +++++++++++++++------
 src/bin/egui_gui/settings_view.h  |  3 +-
 3 files changed, 106 insertions(+), 38 deletions(-)

diff --git a/src/bin/egui_gui/egui_layout.json 
b/src/bin/egui_gui/egui_layout.json
index 29f3c29..6e9eca4 100644
--- a/src/bin/egui_gui/egui_layout.json
+++ b/src/bin/egui_gui/egui_layout.json
@@ -628,7 +628,7 @@
       {
         "delete,request":["Invoke", "_settings_win_request_delete", null]
       },
-      "Contains":["settings_bg", "settings_vbox"]
+      "Contains":["settings_bg", "settings_table"]
     },
     "settings_logo":
     {
@@ -657,25 +657,11 @@
         "Efl.Gfx.Base.visible":[true]
       }
     },
-    "settings_vbox":
-    {
-      "Desc":
-      {
-        "parent":"settings_win",
-        "class":"Elm_Box"
-      },
-      "Properties":
-      {
-        "Evas.Object.size_hint_weight":[1, 1],
-        "Efl.Gfx.Base.visible":[true]
-      },
-      "Contains":["settings_toolbar", "settings_table", "settings_buttons_box"]
-    },
     "settings_toolbar":
     {
       "Desc":
       {
-        "parent":"settings_vbox",
+        "parent":"settings_table",
         "class":"Elm_Toolbar",
         "public":true
       },
@@ -698,14 +684,22 @@
           "icon":"preferences-system",
           "label":"Project Settings",
           "callback":"_settingsview_toolbar_clicked"
+        },
+        "settings_toolbar_it1":
+        {
+          "type":"regular",
+          "public":true,
+          "icon":"preferences-system",
+          "label":"Erigo Settings",
+          "callback":"_settingsview_toolbar_clicked"
         }
       }
     },
-    "settings_table":
+    "project_settings_table":
     {
       "Desc":
       {
-        "parent":"settings_vbox",
+        "parent":"project_settings_box",
         "class":"Elm_Table",
         "public":true
       },
@@ -728,7 +722,7 @@
     {
       "Desc":
       {
-        "parent":"settings_vbox",
+        "parent":"project_settings_box",
         "class":"Elm_Box",
         "public":true
       },
@@ -764,7 +758,7 @@
     {
       "Desc":
       {
-        "parent":"settings_table",
+        "parent":"project_settings_table",
         "class":"Elm_Label"
       },
       "Properties":
@@ -777,7 +771,7 @@
     {
       "Desc":
       {
-        "parent":"settings_table",
+        "parent":"project_settings_table",
         "class":"Elm_Entry",
         "public":true
       },
@@ -799,7 +793,7 @@
     {
       "Desc":
       {
-        "parent":"settings_table",
+        "parent":"project_settings_table",
         "class":"Elm_Label"
       },
       "Properties":
@@ -812,7 +806,7 @@
     {
       "Desc":
       {
-        "parent":"settings_table",
+        "parent":"project_settings_table",
         "class":"Elm_Genlist",
         "public":true
       },
@@ -3823,6 +3817,57 @@
         "Efl.Gfx.Base.size":[40, 40],
         "Efl.File.file":["move_down_icon", null]
       }
+    },
+    "project_settings_box":
+    {
+      "Desc":
+      {
+        "parent":"settings_table",
+        "class":"Elm_Box",
+        "public":true
+      },
+      "Properties":
+      {
+        "Evas.Object.size_hint_weight":[1, 1],
+        "Efl.Gfx.Base.visible":[true],
+        "Evas.Object.size_hint_align":[-1, -1]
+      },
+      "Contains":["project_settings_table", "settings_buttons_box"]
+    },
+    "settings_table":
+    {
+      "Desc":
+      {
+        "parent":"settings_win",
+        "class":"Elm_Table"
+      },
+      "Properties":
+      {
+        "Evas.Object.size_hint_weight":[1, 1],
+        "Efl.Gfx.Base.visible":[true],
+        "Efl.Gfx.Base.size":[70, 60]
+      },
+      "Contains":
+      {
+        "settings_toolbar":[0, 0, 1, 1],
+        "project_settings_box":[0, 1, 1, 1],
+        "erigo_settings_box":[0, 1, 1, 1]
+      }
+    },
+    "erigo_settings_box":
+    {
+      "Desc":
+      {
+        "parent":"settings_table",
+        "class":"Elm_Box",
+        "public":true
+      },
+      "Properties":
+      {
+        "Evas.Object.size_hint_weight":[1, 1],
+        "Efl.Gfx.Base.visible":[true],
+        "Evas.Object.size_hint_align":[-1, -1]
+      }
     }
   }
  }
\ No newline at end of file
diff --git a/src/bin/egui_gui/settings_view.c b/src/bin/egui_gui/settings_view.c
index b8a08c1..85dc819 100644
--- a/src/bin/egui_gui/settings_view.c
+++ b/src/bin/egui_gui/settings_view.c
@@ -39,21 +39,41 @@ _settingsview_toolbar_clicked(void *data, Evas_Object *obj 
EINA_UNUSED, void *ev
      return;
    _toolbar_selected_type = type;
 
-   const Gui_Context *ctx = _active_context_get();
-   eo_do(g_settings_win->project_name_entry, 
elm_obj_widget_part_text_set(NULL, gui_context_project_name_get(ctx)));
+   eo_do(g_settings_win->project_settings_box, 
efl_gfx_visible_set(EINA_FALSE));
+   eo_do(g_settings_win->erigo_settings_box, efl_gfx_visible_set(EINA_FALSE));
 
-   elm_genlist_clear(g_settings_win->start_points_genlist);
-   const Eina_List *itr;
-   Eid *wdg_id;
-   EINA_LIST_FOREACH(gui_context_main_widgets_get(ctx), itr, wdg_id)
+   switch (_toolbar_selected_type)
      {
-        if (wdg_get(wdg_id))
-          {
-             Eina_Bool state = 
!!eina_list_data_find(gui_context_start_points_get(ctx), wdg_id);
-             elm_genlist_item_append(g_settings_win->start_points_genlist, 
_start_pt_itc, (void *) (uintptr_t) wdg_id, NULL,
-                   ELM_GENLIST_ITEM_NONE, NULL, NULL);
-             if (state) _start_pts = eina_list_append(_start_pts, wdg_id);
-          }
+      case PROJECT_SETTINGSVIEW:
+           {
+              eo_do(g_settings_win->project_settings_box, 
efl_gfx_visible_set(EINA_TRUE));
+              const Gui_Context *ctx = _active_context_get();
+              eo_do(g_settings_win->project_name_entry, 
elm_obj_widget_part_text_set(NULL, gui_context_project_name_get(ctx)));
+
+              elm_genlist_clear(g_settings_win->start_points_genlist);
+              const Eina_List *itr;
+              Eid *wdg_id;
+              EINA_LIST_FOREACH(gui_context_main_widgets_get(ctx), itr, wdg_id)
+                {
+                   if (wdg_get(wdg_id))
+                     {
+                        Eina_Bool state = 
!!eina_list_data_find(gui_context_start_points_get(ctx), wdg_id);
+                        
elm_genlist_item_append(g_settings_win->start_points_genlist, _start_pt_itc, 
(void *) (uintptr_t) wdg_id, NULL,
+                                                ELM_GENLIST_ITEM_NONE, NULL, 
NULL);
+                        if (state) _start_pts = eina_list_append(_start_pts, 
wdg_id);
+                     }
+                }
+              break;
+           }
+      case ERIGO_SETTINGSVIEW:
+           {
+              eo_do(g_settings_win->erigo_settings_box, 
efl_gfx_visible_set(EINA_TRUE));
+              break;
+           }
+      default:
+           {
+              ERR("switch default");
+           }
      }
 }
 
@@ -100,7 +120,9 @@ _settings_win_request_delete(void *data EINA_UNUSED, Eo 
*obj EINA_UNUSED, const
 void
 settings_win_post_configure()
 {
-   elm_object_item_data_set(g_settings_win->settings_toolbar_it0, (void *) 
(intptr_t) SETTINGSVIEW_MAIN);
+   elm_object_item_data_set(g_settings_win->settings_toolbar_it0, (void *) 
(intptr_t) PROJECT_SETTINGSVIEW);
+   elm_object_item_data_set(g_settings_win->settings_toolbar_it1, (void *) 
(intptr_t) ERIGO_SETTINGSVIEW);
+   _settingsview_toolbar_clicked((void *) PROJECT_SETTINGSVIEW, NULL, NULL);
 }
 
 static Eina_Bool
diff --git a/src/bin/egui_gui/settings_view.h b/src/bin/egui_gui/settings_view.h
index 638e084..ec58d78 100644
--- a/src/bin/egui_gui/settings_view.h
+++ b/src/bin/egui_gui/settings_view.h
@@ -7,7 +7,8 @@
 typedef enum
 {
    SETTINGSVIEW_NOT_SELECTED,
-   SETTINGSVIEW_MAIN
+   ERIGO_SETTINGSVIEW,
+   PROJECT_SETTINGSVIEW
 } SettingsView_Type;
 
 void settingsview_init();

-- 


Reply via email to