fix: Remove a strong theme dependency for the application layout. 41/31941/4 accepted/tizen_common accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/common/20141222.090301 accepted/tizen/mobile/20141223.085928 accepted/tizen/tv/20141223.085907 accepted/tizen/wearable/20141223.085919 submit/tizen_common/20141218.164254 submit/tizen_common/20151229.154718 submit/tizen_mobile/20141223.010103 submit/tizen_tv/20141223.010056 submit/tizen_wearable/20141223.010112 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
authorDaniel Juyung Seo <juyung.seo@samsung.com>
Fri, 12 Dec 2014 11:20:39 +0000 (20:20 +0900)
committerDaniel Juyung Seo <juyung.seo@samsung.com>
Mon, 15 Dec 2014 08:32:49 +0000 (17:32 +0900)
This fixes a calculator empty GUI issue with latest upstream efl.

Change-Id: I6d0e0944d86e7bab8d165051e3f2014f0607eead
Signed-off-by: Daniel Juyung Seo <juyung.seo@samsung.com>
include/calc-main.h
src/calc-main.c
src/calculator_edje.c

index 897b782..ac7827c 100644 (file)
@@ -172,7 +172,6 @@ struct appdata {
        Evas_Object *win;       //main window
        Evas_Object *bg;
        Evas_Object *conform;
-       Evas_Object *layout;
        Evas_Object *edje;
        Evas_Object *eo;
 
index 2561237..036c875 100644 (file)
@@ -319,11 +319,6 @@ static void _on_exit(struct appdata *ad)
                ad->edje = NULL;
        }
 
-       if (ad->layout) {
-               evas_object_del(ad->layout);
-               ad->layout = NULL;
-       }
-
        if (ad->bg) {
                evas_object_del(ad->bg);
                ad->bg = NULL;
index 765e6d7..a64cdb1 100644 (file)
@@ -2591,44 +2591,6 @@ static Evas_Object *__create_bg(Evas_Object *parent)
        return bg;
 }
 
-/**
-* @description
-* Create the main layout
-*
-* @param[in]   parent  main layout's parent
-* @return              when success return a layout, return NULL oppositely
-* @retval      layout  if success, return the main layout
-* @retval      NULL    if create failed or parent is null, return null
-* @exception
-*/
-static Evas_Object *__calc_view_create_layout_main(Evas_Object *parent)
-{
-       CALC_FUN_BEG();
-
-       if (parent == NULL) {
-               return NULL;
-       }
-
-       Evas_Object *layout = elm_layout_add(parent);
-       if (layout == NULL) {
-               return NULL;
-       }
-
-       elm_layout_theme_set(layout, "layout", "application", "default");
-
-       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
-                                        EVAS_HINT_EXPAND);
-       elm_object_content_set(parent, layout);
-
-       edje_object_signal_emit(_EDJ(layout), "elm,state,show,indicator",
-                               "elm");
-       evas_object_show(layout);
-
-       CALC_FUN_END();
-
-       return layout;
-}
-
 void _btn_clicked_cb(void *data, Evas_Object * obj, void *event_info)
 {
        CALC_FUN_BEG();
@@ -2733,7 +2695,7 @@ void __calc_view_create_nf_more_btn_cb(void *data, Evas_Object * obj, void *even
 static Eina_Bool  __calc_view_create_navigation_layout(struct appdata *ad)
 {
        CALC_FUN_BEG();
-       Evas_Object *nf = elm_naviframe_add(ad->layout);
+       Evas_Object *nf = elm_naviframe_add(ad->conform);
        if (nf == NULL) {
                return EINA_FALSE;
        }
@@ -2748,6 +2710,7 @@ static Eina_Bool  __calc_view_create_navigation_layout(struct appdata *ad)
        elm_naviframe_item_title_visible_set(ad->navi_it, EINA_FALSE);
        ad->more_btn = create_toolbar_more_btn(nf, __calc_view_create_nf_more_btn_cb, ad);
        elm_object_item_part_content_set(ad->navi_it, "toolbar_more_btn", ad->more_btn);
+       elm_object_content_set(ad->conform, nf);
        evas_object_show(nf);
        CALC_FUN_END();
        return EINA_TRUE;
@@ -2772,14 +2735,11 @@ void calc_view_load(struct appdata *ad)
        elm_win_resize_object_add(ad->win, ad->conform);
        elm_object_style_set(ad->conform, "nokeypad");
        evas_object_show(ad->conform);
-       ad->layout = __calc_view_create_layout_main(ad->conform);
-       ad->edje = load_edj(ad->layout, LAYOUT_EDJ_NAME, GRP_MAIN);
+       ad->edje = load_edj(ad->win, LAYOUT_EDJ_NAME, GRP_MAIN);
        evas_object_show(ad->edje);
        evas_object_name_set(ad->edje, "edje");
 
-       if (__calc_view_create_navigation_layout(ad)) {
-               elm_object_part_content_set(ad->layout, "elm.swallow.content", ad->nf);
-       }
+       __calc_view_create_navigation_layout(ad);
 
        /* inititialize environment variable */
        locale = localeconv();