actually give widgets type name strings and set parent by default
authorCarsten Haitzler <raster@rasterman.com>
Wed, 13 May 2009 12:21:52 +0000 (12:21 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Wed, 13 May 2009 12:21:52 +0000 (12:21 +0000)
SVN revision: 40618

32 files changed:
data/themes/default.edc
src/lib/elc_anchorblock.c
src/lib/elc_anchorview.c
src/lib/elc_hoversel.c
src/lib/elc_notepad.c
src/lib/elm_bg.c
src/lib/elm_box.c
src/lib/elm_bubble.c
src/lib/elm_button.c
src/lib/elm_carousel.c
src/lib/elm_check.c
src/lib/elm_clock.c
src/lib/elm_entry.c
src/lib/elm_frame.c
src/lib/elm_genlist.c
src/lib/elm_hover.c
src/lib/elm_icon.c
src/lib/elm_image.c
src/lib/elm_label.c
src/lib/elm_layout.c
src/lib/elm_list.c
src/lib/elm_pager.c
src/lib/elm_photo.c
src/lib/elm_priv.h
src/lib/elm_radio.c
src/lib/elm_scroller.c
src/lib/elm_slider.c
src/lib/elm_table.c
src/lib/elm_toggle.c
src/lib/elm_toolbar.c
src/lib/elm_widget.c
src/lib/elm_win.c

index a1ff0b7..19701ca 100644 (file)
@@ -3734,7 +3734,7 @@ collections {
       styles
        {
           style { name: "entry_textblock_style";
-             base: "font=Sans font_size=10 align=left color=#000 wrap=word";
+             base: "font=Sans font_size=10 align=left color=#000 wrap=word";
              tag:  "br" "\n";
              tag:  "tab" "\t";
              tag:  "em" "+ font=Sans:style=Oblique";
index c4626b5..e4a4e34 100644 (file)
@@ -129,6 +129,8 @@ elm_anchorblock_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "anchorblock");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_pre_hook_set(obj, _del_pre_hook);
    elm_widget_del_hook_set(obj, _del_hook);
index dc5f944..d78e4c5 100644 (file)
@@ -118,6 +118,8 @@ elm_anchorview_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "anchorview");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_pre_hook_set(obj, _del_pre_hook);
    elm_widget_del_hook_set(obj, _del_hook);
index dac1e90..02c7262 100644 (file)
@@ -159,6 +159,8 @@ elm_hoversel_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "hoversel");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_pre_hook_set(obj, _del_pre_hook);
    elm_widget_del_hook_set(obj, _del_hook);
index 8c17e3b..c65f5af 100644 (file)
@@ -215,6 +215,8 @@ elm_notepad_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "notepad");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
index 4a799ba..f3700a7 100644 (file)
@@ -61,6 +61,8 @@ elm_bg_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "bg");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index dff97c1..9baed29 100644 (file)
@@ -65,6 +65,8 @@ elm_box_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "box");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    
index 128894c..a0e50e5 100644 (file)
@@ -89,6 +89,8 @@ elm_bubble_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "bubble");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index eff1ad6..0047230 100644 (file)
@@ -107,6 +107,8 @@ elm_button_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "button");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 16aa487..0a926b3 100644 (file)
@@ -158,6 +158,8 @@ elm_carousel_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "carousel");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index c2421f5..e236d41 100644 (file)
@@ -134,6 +134,8 @@ elm_check_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "check");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 28165e8..eaf9bdf 100644 (file)
@@ -368,6 +368,8 @@ elm_clock_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "clock");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index d91deff..4a9783a 100644 (file)
@@ -126,13 +126,13 @@ _on_focus_hook(void *data, Evas_Object *obj)
      {
         evas_object_focus_set(wd->ent, 1);
         edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
-        elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
+        if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
      }
    else
      {
         edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
         evas_object_focus_set(wd->ent, 0);
-        elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
+        if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
      }
 }
 
@@ -205,10 +205,13 @@ _paste(void *data, Evas_Object *obj, void *event_info)
    if (wd->sel_notify_handler)
      {
 #ifdef HAVE_ELEMENTARY_X
-        if (elm_win_xwindow_get(elm_widget_top_get(data)))
+        Evas_Object *top;
+        
+        top = elm_widget_top_get(data);
+        if ((top) && (elm_win_xwindow_get(top)))
           {
              ecore_x_selection_primary_request
-               (elm_win_xwindow_get(elm_widget_top_get(data)),
+               (elm_win_xwindow_get(top), 
                 ECORE_X_SELECTION_TARGET_UTF8_STRING);
              wd->selection_asked = 1;
           }
@@ -265,11 +268,13 @@ static int
 _long_press(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
+   Evas_Object *top;
    if (wd->hoversel) evas_object_del(wd->hoversel);
    wd->hoversel = elm_hoversel_add(data);
    elm_widget_sub_object_add(data, wd->hoversel);
    elm_hoversel_label_set(wd->hoversel, "Text");
-   elm_hoversel_hover_parent_set(wd->hoversel, elm_widget_top_get(data));
+   top = elm_widget_top_get(data);
+   if (top) elm_hoversel_hover_parent_set(wd->hoversel, top);
    evas_object_smart_callback_add(wd->hoversel, "dismissed", _dismissed, data);
    if (!wd->selmode)
      {
@@ -614,10 +619,12 @@ _signal_selection_start(void *data, Evas_Object *obj, const char *emission, cons
         if (txt)
           {
 #ifdef HAVE_ELEMENTARY_X
-             if (elm_win_xwindow_get(elm_widget_top_get(data)))
-                 ecore_x_selection_primary_set
-                 (elm_win_xwindow_get(elm_widget_top_get(data)),
-                  txt, strlen(txt));
+             Evas_Object *top;
+             
+             top = elm_widget_top_get(data);
+             if ((top) && (elm_win_xwindow_get(top)))
+               ecore_x_selection_primary_set
+               (elm_win_xwindow_get(top), txt, strlen(txt));
 #endif             
              free(txt);
           }
@@ -636,10 +643,12 @@ _signal_selection_changed(void *data, Evas_Object *obj, const char *emission, co
         if (txt)
           {
 #ifdef HAVE_ELEMENTARY_X
-             if (elm_win_xwindow_get(elm_widget_top_get(data)))
+             Evas_Object *top;
+             
+             top = elm_widget_top_get(data);
+             if ((top) && (elm_win_xwindow_get(top)))
                ecore_x_selection_primary_set
-               (elm_win_xwindow_get(elm_widget_top_get(data)),
-                txt, strlen(txt));
+               (elm_win_xwindow_get(top), txt, strlen(txt));
 #endif             
              free(txt);
           }
@@ -658,7 +667,10 @@ _signal_selection_cleared(void *data, Evas_Object *obj, const char *emission, co
         if (wd->cut_sel)
           {
 #ifdef HAVE_ELEMENTARY_X
-             if (elm_win_xwindow_get(elm_widget_top_get(data)))
+             Evas_Object *top;
+             
+             top = elm_widget_top_get(data);
+             if ((top) && (elm_win_xwindow_get(top)))
                {
                   char *t;
                   
@@ -666,8 +678,7 @@ _signal_selection_cleared(void *data, Evas_Object *obj, const char *emission, co
                   if (t)
                     {
                        ecore_x_selection_primary_set
-                         (elm_win_xwindow_get(elm_widget_top_get(data)),
-                          t, strlen(t));
+                         (elm_win_xwindow_get(top), t, strlen(t));
                        free(t);
                     }
                }
@@ -678,7 +689,10 @@ _signal_selection_cleared(void *data, Evas_Object *obj, const char *emission, co
         else
           {
 #ifdef HAVE_ELEMENTARY_X
-             if (elm_win_xwindow_get(elm_widget_top_get(data)))
+             Evas_Object *top;
+             
+             top = elm_widget_top_get(data);
+             if ((top) && (elm_win_xwindow_get(top)))
                ecore_x_selection_primary_clear();
 #endif        
           }
@@ -693,10 +707,13 @@ _signal_entry_paste_request(void *data, Evas_Object *obj, const char *emission,
    if (wd->sel_notify_handler)
      {
 #ifdef HAVE_ELEMENTARY_X
-        if (elm_win_xwindow_get(elm_widget_top_get(data)))
+        Evas_Object *top;
+        
+        top = elm_widget_top_get(data);
+        if ((top) && (elm_win_xwindow_get(top)))
           {
              ecore_x_selection_primary_request
-               (elm_win_xwindow_get(elm_widget_top_get(data)),
+               (elm_win_xwindow_get(top),
                 ECORE_X_SELECTION_TARGET_UTF8_STRING);
              wd->selection_asked = 1;
           }
@@ -880,13 +897,15 @@ _event_selection_clear(void *data, int type, void *event)
 EAPI Evas_Object *
 elm_entry_add(Evas_Object *parent)
 {
-   Evas_Object *obj;
+   Evas_Object *obj, *top;
    Evas *e;
    Widget_Data *wd;
    
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "entry");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
@@ -923,7 +942,8 @@ elm_entry_add(Evas_Object *parent)
    _sizing_eval(obj);
 
 #ifdef HAVE_ELEMENTARY_X
-   if (elm_win_xwindow_get(elm_widget_top_get(parent)) != 0)
+   top = elm_widget_top_get(obj);
+   if ((top) && (elm_win_xwindow_get(top)))
      {
         wd->sel_notify_handler = 
           ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,
index 954e984..94bcc79 100644 (file)
@@ -76,6 +76,8 @@ elm_frame_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "frame");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 79abb37..fe2c6a1 100644 (file)
@@ -792,6 +792,8 @@ elm_genlist_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "genlist");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index abf0783..e7210ea 100644 (file)
@@ -258,6 +258,8 @@ elm_hover_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "hover");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_pre_hook_set(obj, _del_pre_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index dd9a33d..1d2bfc3 100644 (file)
@@ -87,6 +87,8 @@ elm_icon_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "icon");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 6bdde22..e8b162b 100644 (file)
@@ -87,6 +87,8 @@ elm_image_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "image");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 72708ec..44dea13 100644 (file)
@@ -52,6 +52,8 @@ elm_label_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "label");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 2949d0b..a438bb3 100644 (file)
@@ -102,6 +102,8 @@ elm_layout_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "layout");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 4c4ca8d..63c0ccc 100644 (file)
@@ -395,6 +395,8 @@ elm_list_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "list");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
index 6ceb75d..9c115e2 100644 (file)
@@ -173,6 +173,8 @@ elm_pager_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "pager");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 184b02f..d368f4e 100644 (file)
@@ -65,6 +65,8 @@ elm_photo_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "photo");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 4776578..a3f112b 100644 (file)
@@ -107,6 +107,8 @@ EAPI void         elm_widget_scale_set(Evas_Object *obj, double scale);
 EAPI double       elm_widget_scale_get(const Evas_Object *obj);
 EAPI void         elm_widget_style_set(Evas_Object *obj, const char *style);
 EAPI const char  *elm_widget_style_get(const Evas_Object *obj);
+EAPI void         elm_widget_type_set(Evas_Object *obj, const char *type);
+EAPI const char  *elm_widget_type_get(const Evas_Object *obj);
 
 extern char *_elm_appname;
 extern Elm_Config *_elm_config;
index 31e162a..68ad130 100644 (file)
@@ -151,6 +151,8 @@ elm_radio_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "radio");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 2800f54..deca794 100644 (file)
@@ -178,6 +178,8 @@ elm_scroller_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "scroller");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index c869825..d7d5632 100644 (file)
@@ -218,6 +218,8 @@ elm_slider_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "slider");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index d18ed70..33189a0 100644 (file)
@@ -65,6 +65,8 @@ elm_table_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "table");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    
index a8576fa..af00d3e 100644 (file)
@@ -123,6 +123,8 @@ elm_toggle_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "toggle");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index ac4424b..746158f 100644 (file)
@@ -179,6 +179,8 @@ elm_toolbar_add(Evas_Object *parent)
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
    obj = elm_widget_add(e);
+   elm_widget_type_set(obj, "toolbar");
+   elm_widget_sub_object_add(parent, obj);
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
index 2404a5a..f520d6d 100644 (file)
@@ -16,6 +16,7 @@ typedef struct _Smart_Data Smart_Data;
 struct _Smart_Data
 { 
    Evas_Object   *obj;
+   const char    *type;
    Evas_Object   *parent_obj;
    Evas_Coord     x, y, w, h;
    Eina_List     *subobjs;
@@ -74,7 +75,6 @@ _sub_obj_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
      {
         sd->subobjs = eina_list_remove(sd->subobjs, obj);
      }
-   if (sd->style) eina_stringshare_del(sd->style);
    evas_object_smart_callback_call(sd->obj, "sub-object-del", obj);
 }
 
@@ -788,6 +788,24 @@ elm_widget_style_get(const Evas_Object *obj)
    return "default";
 }
 
+EAPI void
+elm_widget_type_set(Evas_Object *obj, const char *type)
+{
+   const char *old;
+   API_ENTRY return;
+   old = sd->type;
+   sd->type = eina_stringshare_add(type);
+   if (old) eina_stringshare_del(old);
+}
+
+EAPI const char *
+elm_widget_type_get(const Evas_Object *obj)
+{
+   API_ENTRY return "";
+   if (sd->type) return sd->type;
+   return "";
+}
+
 /* local subsystem functions */
 static void
 _smart_reconfigure(Smart_Data *sd)
@@ -850,6 +868,8 @@ _smart_del(Evas_Object *obj)
        evas_object_del(sobj);
      }
    if (sd->del_func) sd->del_func(obj);
+   if (sd->style) eina_stringshare_del(sd->style);
+   if (sd->type) eina_stringshare_del(sd->type);
    free(sd);
 }
 
index c2378a8..9ef2b4a 100644 (file)
@@ -336,6 +336,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
    
    win->evas = ecore_evas_get(win->ee);
    win->win_obj = elm_widget_add(win->evas);
+   elm_widget_type_set(win->win_obj, "win");
    elm_widget_data_set(win->win_obj, win);
    evas_object_color_set(win->win_obj, 0, 0, 0, 0);
    evas_object_move(win->win_obj, 0, 0);
@@ -676,6 +677,8 @@ elm_win_inwin_add(Evas_Object *obj)
    if (!win) return NULL;
    wd = ELM_NEW(Widget_Data);
    obj2 = elm_widget_add(win->evas);
+   elm_widget_type_set(obj2, "inwin");
+   elm_widget_sub_object_add(obj, obj2);
    evas_object_size_hint_weight_set(obj2, 1.0, 1.0);
    evas_object_size_hint_align_set(obj2, -1.0, -1.0);
    elm_win_resize_object_add(obj, obj2);