modify theme set of toolbar2 and searchbar
authorNoha Park <noha.park@samsung.com>
Wed, 19 May 2010 01:06:11 +0000 (10:06 +0900)
committerNoha Park <noha.park@samsung.com>
Wed, 19 May 2010 01:06:11 +0000 (10:06 +0900)
src/lib/elm_searchbar.c
src/lib/elm_toolbar2.c

index 5acf5d5..2a7d57c 100755 (executable)
@@ -38,12 +38,7 @@ static void _theme_hook(Evas_Object *obj)
        Widget_Data *wd = elm_widget_data_get(obj);
        if (!wd) return;
 
-       /* Temp */
-       Elm_Theme *th = NULL;
-       th = elm_theme_new();
-
-
-       _elm_theme_set(th, wd->base, "searchbar", "base", elm_widget_style_get(obj));
+       _elm_theme_object_set(obj, wd->base, "searchbar", "base", elm_widget_style_get(obj));
 
        if (wd->eb)
                edje_object_part_swallow(wd->base, "btn_text", wd->eb);
@@ -163,11 +158,7 @@ EAPI Evas_Object *elm_searchbar_add(Evas_Object *parent)
        wd->base = edje_object_add(e);
        if (wd->base == NULL) return NULL;
 
-       /* Temp */
-       Elm_Theme *th = NULL;
-       th = elm_theme_new();
-
-       _elm_theme_set(th, wd->base, "searchbar", "base", "default");
+       _elm_theme_object_set(obj, wd->base, "searchbar", "base", "default");
 
 //     evas_object_size_hint_weight_set(wd->base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 //     evas_object_size_hint_align_set(wd->base, EVAS_HINT_FILL, EVAS_HINT_FILL);
index e69149e..27889e4 100755 (executable)
@@ -106,7 +106,7 @@ static void _theme_hook(Evas_Object *obj)
           edje_object_scale_set(it->base, scale);
 
                
-          _elm_theme_set(th, it->base, "toolbar2", "item", style);
+          _elm_theme_object_set(obj, it->base, "toolbar2", "item", style);
           if (it->icon)
           {
 
@@ -365,7 +365,7 @@ EAPI Elm_Toolbar2_Item *elm_toolbar2_item_add(Evas_Object *obj, Evas_Object *ico
        Elm_Theme *th = NULL;
        th = elm_theme_new();
 
-       _elm_theme_set(th, it->base, "toolbar2", "item", elm_widget_style_get(obj));
+       _elm_theme_object_set(obj, it->base, "toolbar2", "item", elm_widget_style_get(obj));
 
        evas_object_event_callback_add(it->icon, EVAS_CALLBACK_MOUSE_DOWN,  press_down_cb, it);
        evas_object_event_callback_add(it->icon, EVAS_CALLBACK_MOUSE_UP,  press_up_cb, it);