Revert "Add scroller in conform." 91/63791/2
authorwoochan lee <wc0917.lee@samsung.com>
Sun, 27 Mar 2016 07:53:26 +0000 (00:53 -0700)
committerWoochan Lee <wc0917.lee@samsung.com>
Sun, 27 Mar 2016 08:05:25 +0000 (17:05 +0900)
This commit delete ui_view layout.
It makes crash when transition effect going.
need to debug.
This reverts commit 3a31631ae233c6b4082fecbfb11b1b22da43ca1a.

Change-Id: Ic4e235fe5bd260645c70b940fed61918df8adcef

src/include/efl/ui_base_viewmgr.h
src/lib/efl/ui_base_viewmgr.cpp

index 30afc61d85518781daa68adfa0e12a344d8ca2e4..6ce26400ee8a15adadc6efe365190d99f48e559a 100644 (file)
@@ -49,9 +49,8 @@ class ui_base_viewmgr: public viewmgr::ui_iface_viewmgr
        friend class ui_base_view;
 
 private:
-       Elm_Win *win;                              //This is acting like a base object of viewmgr.
+       Elm_Win *win;                                      //This is acting like a base object of viewmgr.
        Elm_Conformant *conform;                   //Conformant for viewmgr.
-       Elm_Scroller *scroller;                    //Scroller for viewmgr.
        Elm_Layout *layout;                        //Viewmgr's base layout.
        ui_base_key_listener *key_listener;        //HW Key Handler such as "BACK" key...
        ui_view_indicator indicator;               //Mode of indicator.
@@ -69,30 +68,15 @@ private:
         */
        bool create_conformant(Elm_Win *win);
 
-       /**
-        *  @brief Create a Scroller.
-        *
-        *  @param conform viewmgr's conformant object. this will be parent of layout object.
-        *
-        *  @note We add a scroller for an exceptional case. If user view content is larger than window,
-        *        then the content will be automatically scrollable by this scroller.
-        *        For instance, if the virtual keypad is enabled in the landscape mode,
-        *        the content area would be smaller than content minimum size.
-        *        We could avoid clipping the content by scroller.
-        *
-        *  @return @c true success or @c false not.
-        */
-
-       bool create_scroller(Elm_Conformant *conform);
        /**
         *  @brief Create a base layout.
         *
-        *  @param scroller viewmgr's scroller object. this will be parent of layout object.
+        *  @param conform viewmgr's conformant object. this will be parent of layout object.
         *  @param style view's transition effect style.
         *
         *  @return @c true success or @c false not.
         */
-       bool create_base_layout(Elm_Scroller *scroller, const char *style);
+       bool create_base_layout(Elm_Conformant *conform, const char *style);
 
        /** @brief Set the indicator mode.
         *
index 530be66f2004fe8ac3e826d2a973544f0452527a..fe2e7219782132711c1a494d12bd55e25055f35e 100644 (file)
@@ -22,19 +22,17 @@ using namespace viewmgr;
 //FIXME: is it correct to define here?
 #define EDJ_PATH "/usr/share/edje/ui-viewmgr/ui-viewmgr.edj"
 
-bool ui_base_viewmgr::create_base_layout(Elm_Scroller *scroller, const char *style)
+bool ui_base_viewmgr::create_base_layout(Elm_Conformant *conform, const char *style)
 {
        char buf[128];
-       Elm_Layout *layout = elm_layout_add(scroller);
+       Elm_Layout *layout = elm_layout_add(conform);
        if (!layout) return false;
 
        //FIXME: Is it C programming style? need to change?
        snprintf(buf, sizeof(buf), "transition/%s", style);
        //default transition layout
        elm_layout_file_set(layout, EDJ_PATH, buf);
-       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-       elm_object_content_set(scroller, layout);
+       elm_object_content_set(conform, layout);
 
        //Push Finished Event
        elm_layout_signal_callback_add(layout, "push,finished", "viewmgr",
@@ -77,7 +75,7 @@ Elm_Layout *ui_base_viewmgr::set_transition_layout(string transition_style)
        if (effect_map.size()) effect_layout = effect_map.find(transition_style)->second;
 
        //Conformant content change to current effect layout and change to hide prev layout.
-       Elm_Layout *playout = elm_object_part_content_unset(this->scroller, "elm.swallow.content");
+       Elm_Layout *playout = elm_object_part_content_unset(this->conform, "elm.swallow.content");
        evas_object_hide(playout);
 
        if (!effect_layout)
@@ -85,12 +83,12 @@ Elm_Layout *ui_base_viewmgr::set_transition_layout(string transition_style)
                //Create and add effect_layouts in map here.
                //FIXME: If we have to support many effects, this logic should be changed.
                effect_map.insert(pair<string, Elm_Layout *>("default", this->layout));
-               this->create_base_layout(this->scroller, transition_style.c_str());
+               this->create_base_layout(this->get_conformant(), transition_style.c_str());
                effect_map.insert(pair<string, Elm_Layout *>(transition_style, this->layout));
        }
        else
        {
-               elm_object_part_content_set(this->scroller, "elm.swallow.content", effect_layout);
+               elm_object_part_content_set(this->conform, "elm.swallow.content", effect_layout);
 
                this->layout = effect_layout;
        }
@@ -171,22 +169,6 @@ bool ui_base_viewmgr::create_conformant(Elm_Win *win)
        return true;
 }
 
-bool ui_base_viewmgr::create_scroller(Elm_Conformant *conform)
-{
-       Elm_Scroller *scroller = elm_scroller_add(conform);
-       if (!scroller) return false;
-
-       elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO);
-       evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
-       elm_object_content_set(conform, scroller);
-
-       this->scroller = scroller;
-
-       return true;
-}
-
 ui_base_viewmgr::ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_listener)
                : ui_iface_viewmgr(), key_listener(key_listener), transition_style("default")
 {
@@ -245,13 +227,7 @@ ui_base_viewmgr::ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_list
                return;
        }
 
-       if (!this->create_scroller(this->conform))
-       {
-               LOGE("Failed to create a scroller (%s)", pkg);
-               return;
-       }
-
-       if (!this->create_base_layout(this->scroller, "default"))
+       if (!this->create_base_layout(this->conform, "default"))
        {
                LOGE("Failed to create a base layout (%s)", pkg);
                return;