yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=17a54802266e02ef37a44d3933bb34739c812205

commit 17a54802266e02ef37a44d3933bb34739c812205
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Mon Aug 17 15:20:22 2015 +0300

    Ajust(shorten) selected theme name
---
 src/bin/gui/editor.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 69de7b4..f4fe11a 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -79,6 +79,9 @@ _canvas_resize_cb(void *data EINA_UNUSED, Eo *obj, const 
Eo_Event_Description *d
 Eina_Bool
 _theme_selector_hover_selected_cb(void *data EINA_UNUSED, Eo *obj, const 
Eo_Event_Description *desc EINA_UNUSED, void *event_info);
 
+/*Cut theme name for hoversel*/
+#define THEME_NAME_GET(_t) (strrchr(_t, '/') ? strrchr(_t, '/') : _t)
+
 void
 _active_context_set(Gui_Context *ctx)
 {
@@ -4573,7 +4576,7 @@ _switch_to_context(Gui_Context *ctx)
    _canvas_resize_cb(NULL, g->main_win->canvas_scroller, NULL, NULL);
    _canvas_name_update(ctx);
    Eina_Stringshare *theme_name = 
gui_context_edit_theme_name_get(_active_context_get());
-   eo_do(g->main_win->theme_selector_hoversel, 
elm_obj_widget_part_text_set(NULL, theme_name));
+   eo_do(g->main_win->theme_selector_hoversel, 
elm_obj_widget_part_text_set(NULL, THEME_NAME_GET(theme_name)));
    _theme_selector_hover_selected_cb(NULL, NULL, NULL, NULL);
 }
 
@@ -4834,7 +4837,7 @@ _theme_selector_hover_selected_cb(void *data EINA_UNUSED, 
Eo *obj, const Eo_Even
      {
         const char *choosen_value;
         eo_do(event_info, choosen_value = elm_wdg_item_part_text_get(NULL));
-        eo_do(obj, elm_obj_widget_part_text_set(NULL, choosen_value));
+        eo_do(obj, elm_obj_widget_part_text_set(NULL, 
THEME_NAME_GET(choosen_value)));
         gui_context_edit_theme_name_set(_active_context_get(), choosen_value);
      }
 
@@ -4891,7 +4894,7 @@ _theme_hoversel_fill()
 
    /* Set name of selected theme as header of hoversel. */
    theme_name = gui_context_edit_theme_name_get(_active_context_get());
-   eo_do(g->main_win->theme_selector_hoversel, 
elm_obj_widget_part_text_set(NULL, theme_name));
+   eo_do(g->main_win->theme_selector_hoversel, 
elm_obj_widget_part_text_set(NULL, THEME_NAME_GET(theme_name)));
 }
 
 /* define the most right and the mos bottom coord of the frames. */

-- 


Reply via email to