TizenRefApp-8221 [Gallery] Implement ThumbnailPage presenter class 78/120678/3
authorIgor Nazarov <i.nazarov@samsung.com>
Thu, 23 Mar 2017 16:55:07 +0000 (18:55 +0200)
committerIgor Nazarov <i.nazarov@samsung.com>
Fri, 24 Mar 2017 09:32:47 +0000 (11:32 +0200)
- Added ThumbnailPage class implementation;
- ImageGrid refactoring. Added Unrealizer feature;
- presentation/types.h added;
- Changes in UCL.

Change-Id: Ice2383d0bf9ebe855aa0128f947518f587f62830

inc/presentation/IImageGridListener.h [new file with mode: 0644]
inc/presentation/ImageGrid.h
inc/presentation/Page.h
inc/presentation/ThumbnailPage.h [new file with mode: 0644]
inc/presentation/types.h [new file with mode: 0644]
src/presentation/ImageGrid.cpp
src/presentation/Page.cpp
src/presentation/ThumbnailPage.cpp [new file with mode: 0644]
src/presentation/common.h [new file with mode: 0644]
ucl/inc/ucl/gui/Naviframe.h
ucl/src/gui/Naviframe.cpp

diff --git a/inc/presentation/IImageGridListener.h b/inc/presentation/IImageGridListener.h
new file mode 100644 (file)
index 0000000..96291a1
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GALLERY_PRESENTATION_I_IMAGE_GRID_LISTENER_H__
+#define __GALLERY_PRESENTATION_I_IMAGE_GRID_LISTENER_H__
+
+#include "types.h"
+
+namespace gallery {
+
+       class IImageGridListener : public ucl::Polymorphic {
+       public:
+               virtual void onItemRealized(int itemIndex) = 0;
+               virtual void onItemUnrealized(int itemIndex) = 0;
+       };
+}
+
+#endif // __GALLERY_PRESENTATION_I_IMAGE_GRID_LISTENER_H__
index 083a92068f600ca835308ee9be45f1b30dea8456..084d41022ee290f5f65636b34d980f38c7754ebb 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __GALLERY_VIEW_IMAGE_GRID_H__
-#define __GALLERY_VIEW_IMAGE_GRID_H__
+#ifndef __GALLERY_PRESENTATION_IMAGE_GRID_H__
+#define __GALLERY_PRESENTATION_IMAGE_GRID_H__
 
 #include <deque>
 
 #include "ucl/gui/StyledWidget.h"
 
-namespace gallery {
+#include "types.h"
 
-       UCL_DECLARE_REF_ALIASES(ImageGrid);
+namespace gallery {
 
        class ImageGrid : public ucl::Widget {
        public:
@@ -31,29 +31,31 @@ namespace gallery {
                        HCOMB_3X3
                };
 
-               class IListener : public ucl::Polymorphic {
-               public:
-                       virtual void onItemRealized(int itemIndex) = 0;
-                       virtual void onItemUnrealized(int itemIndex) = 0;
-               };
-
                class Builder {
                public:
                        Builder();
                        Builder &setType(Type value);
-                       Builder &setListener(IListener *value);
+                       Builder &setListener(IImageGridListener *value);
                        ImageGridSRef build(Widget &parent) const;
                private:
                        Type m_type;
-                       IListener *m_listener;
+                       IImageGridListener *m_listener;
                };
 
                struct ItemParams {
                        std::string imagePath;
                };
 
+               class Unrealizer : ucl::NonCopyable {
+               public:
+                       Unrealizer(ImageGrid &imageGrid);
+                       ~Unrealizer();
+               private:
+                       ImageGrid &m_imageGrid;
+               };
+
        public:
-               void setListener(IListener *listener);
+               void setListener(IImageGridListener *listener);
 
                void setItemCount(int count);
 
@@ -79,6 +81,9 @@ namespace gallery {
                template <class FUNC>
                ucl::Result doWithItem(int itemIndex, FUNC &&func);
 
+               void addUnrealizeLock();
+               void removeUnrealizeLock();
+
                // Initialization
                void prepare();
 
@@ -137,12 +142,12 @@ namespace gallery {
        private:
                const Info &m_info;
 
-               ucl::StyledWidget m_scroller;
+               ucl::StyledWidgetWRef m_scroller;
                ucl::ElmWidget m_box;
                ucl::Widget m_rect1;
                ucl::Widget m_rect2;
 
-               IListener *m_listener;
+               IImageGridListener *m_listener;
                int m_itemCount;
 
                std::deque<SlotUPtr> m_slots;
@@ -161,7 +166,9 @@ namespace gallery {
                int m_slotSize;
                int m_scrollerSize;
                int m_scrollOffset;
+
+               int m_unrealizeLock;
        };
 }
 
-#endif // __GALLERY_VIEW_IMAGE_GRID_H__
+#endif // __GALLERY_PRESENTATION_IMAGE_GRID_H__
index 0f93d71012f563094757dc67c3bd0ec239519fac..90febec2ca457209fe95b0680d0be1df1cdb7438 100644 (file)
@@ -23,8 +23,6 @@
 
 namespace gallery {
 
-       UCL_DECLARE_REF_ALIASES(Page);
-
        class Page : public ucl::RefCountAware {
        public:
                using ExitRequestHandler = ucl::Delegate<void(Page &page)>;
diff --git a/inc/presentation/ThumbnailPage.h b/inc/presentation/ThumbnailPage.h
new file mode 100644 (file)
index 0000000..8186b25
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GALLERY_PRESENTATION_THUMBNAIL_PAGE_H__
+#define __GALLERY_PRESENTATION_THUMBNAIL_PAGE_H__
+
+#include "Page.h"
+
+#include "IImageGridListener.h"
+
+#include "model/types.h"
+
+namespace gallery {
+
+       class ThumbnailPage final : public Page,
+                       IImageGridListener {
+       public:
+               class Builder {
+               public:
+                       Builder();
+                       ~Builder();
+                       Builder &setNaviframe(const ucl::NaviframeSRef &navi);
+                       Builder &setAlbum(const IMediaAlbumSRef &album);
+                       ThumbnailPageSRef build(ExitRequestHandler onExitRequest) const;
+               private:
+                       ucl::NaviframeSRef m_navi;
+                       IMediaAlbumSRef m_album;
+               };
+
+       private:
+               friend class ucl::RefCountObj<ThumbnailPage>;
+               ThumbnailPage(ucl::RefCountObjBase &rc, const ucl::NaviframeSRef &navi,
+                               ExitRequestHandler onExitRequest, const IMediaAlbumSRef &album);
+               virtual ~ThumbnailPage();
+
+               Result prepare();
+
+               bool onEachMedia(MediaItemUPtr media);
+
+               // IImageGridListener //
+
+               virtual void onItemRealized(int itemIndex) final override;
+               virtual void onItemUnrealized(int itemIndex) final override;
+
+       private:
+               class RealizedItem;
+               using RealizedItemUPtr = std::unique_ptr<RealizedItem>;
+
+       private:
+               const IMediaAlbumSRef m_album;
+               std::vector<MediaItemUPtr> m_mediaItems;
+
+               std::vector<RealizedItemUPtr> m_realizedItems;
+
+               ImageGridSRef m_imageGrid;
+       };
+}
+
+#endif // __GALLERY_PRESENTATION_THUMBNAIL_PAGE_H__
diff --git a/inc/presentation/types.h b/inc/presentation/types.h
new file mode 100644 (file)
index 0000000..b8cf606
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GALLERY_PRESENTATION_TYPES_H__
+#define __GALLERY_PRESENTATION_TYPES_H__
+
+#include "../types.h"
+
+namespace gallery {
+
+       class IImageGridListener;
+
+       UCL_DECLARE_REF_ALIASES(ImageGrid);
+
+       UCL_DECLARE_REF_ALIASES(Page);
+
+       UCL_DECLARE_REF_ALIASES(ThumbnailPage);
+}
+
+#endif // __GALLERY_PRESENTATION_TYPES_H__
index 7ce6f7dc7e03fae8fe76a94c39c7eac9e4690bad..df3a7e4dc661a48be896852b32c25be00edb2a52 100644 (file)
@@ -21,7 +21,9 @@
 
 #include "ucl/gui/Layout.h"
 
-#include "../common.h"
+#include "presentation/IImageGridListener.h"
+
+#include "common.h"
 
 namespace gallery { namespace { namespace impl {
 
@@ -48,7 +50,8 @@ namespace gallery {
                return *this;
        }
 
-       ImageGrid::Builder &ImageGrid::Builder::setListener(IListener *const value)
+       ImageGrid::Builder &ImageGrid::Builder::setListener(
+                       IImageGridListener *const value)
        {
                m_listener = value;
                return *this;
@@ -312,6 +315,19 @@ namespace gallery {
                bool m_isRealized;
        };
 
+       // ImageGrid::Unrealizer //
+
+       ImageGrid::Unrealizer::Unrealizer(ImageGrid &imageGrid) :
+               m_imageGrid(imageGrid)
+       {
+               m_imageGrid.addUnrealizeLock();
+       }
+
+       ImageGrid::Unrealizer::~Unrealizer()
+       {
+               m_imageGrid.removeUnrealizeLock();
+       }
+
        // ImageGrid //
 
        ImageGrid::ImageGrid(RefCountObjBase *const rc, const Type type,
@@ -319,8 +335,8 @@ namespace gallery {
                Widget(rc, scroller, true),
                m_info(getInfo(type)),
 
-               m_scroller(scroller),
-               m_box(elm_box_add(m_scroller)),
+               m_scroller(makeShared<StyledWidget>(scroller)),
+               m_box(elm_box_add(*m_scroller)),
                m_rect1(evas_object_rectangle_add(m_box.getEvas())),
                m_rect2(evas_object_rectangle_add(m_box.getEvas())),
 
@@ -340,7 +356,9 @@ namespace gallery {
 
                m_slotSize(0), // Must not be 0
                m_scrollerSize(1), // Must not be 0
-               m_scrollOffset(0)
+               m_scrollOffset(0),
+
+               m_unrealizeLock(0)
        {
                prepare();
 
@@ -377,31 +395,31 @@ namespace gallery {
                show(m_rect2);
 
                expandAndFill(m_box);
-               m_scroller.setContent(m_box);
+               m_scroller->setContent(m_box);
                elm_box_horizontal_set(m_box, toEina(m_info.isHorizontal));
                show(m_box);
 
-               expandAndFill(m_scroller);
+               expandAndFill(*m_scroller);
                if (m_info.isHorizontal) {
                        elm_scroller_page_scroll_limit_set(
-                                       m_scroller, m_info.scrollLimit, 0);
+                                       *m_scroller, m_info.scrollLimit, 0);
                } else {
                        elm_scroller_page_scroll_limit_set(
-                                       m_scroller, 0, m_info.scrollLimit);
+                                       *m_scroller, 0, m_info.scrollLimit);
                }
-               show(m_scroller);
+               show(*m_scroller);
 
-               m_scroller.addEventHandler(WidgetEvent::RESIZE,
+               m_scroller->addEventHandler(WidgetEvent::RESIZE,
                                WEAK_DELEGATE(ImageGrid::onScrollerResize, asWeak(this)));
 
-               m_scroller.addEventHandler(WidgetEvent::MOVE,
+               m_scroller->addEventHandler(WidgetEvent::MOVE,
                                WEAK_DELEGATE(ImageGrid::onScrollerMove, asWeak(this)));
 
                m_box.addEventHandler(WidgetEvent::MOVE,
                                WEAK_DELEGATE(ImageGrid::onBoxMove, asWeak(this)));
        }
 
-       void ImageGrid::setListener(IListener *const listener)
+       void ImageGrid::setListener(IImageGridListener *const listener)
        {
                m_listener = listener;
        }
@@ -429,8 +447,7 @@ namespace gallery {
 
        void ImageGrid::update()
        {
-               unrealizeSlots(0, m_slotCount);
-               realizeSlots();
+               Unrealizer(*this);
        }
 
        Result ImageGrid::updateItem(const int itemIndex, const ItemParams &params)
@@ -472,6 +489,22 @@ namespace gallery {
                return func(*m_slots[slotOffset], itemOffset);
        }
 
+       void ImageGrid::addUnrealizeLock()
+       {
+               unrealizeSlots(0, m_slotCount);
+               ++m_unrealizeLock;
+       }
+
+       void ImageGrid::removeUnrealizeLock()
+       {
+               if (m_unrealizeLock > 0) {
+                       --m_unrealizeLock;
+                       realizeSlots();
+               } else {
+                       WLOG("m_unrealizeLock = 0!");
+               }
+       }
+
        bool ImageGrid::updateSlotCount()
        {
                const int newSlotCount = calcSlotCount();
@@ -502,9 +535,9 @@ namespace gallery {
                                UCL_ASSERT(!isOdd, "Must be even!");
                                m_slotSize = std::max(slot->calcSize(), 1);
                                if (m_info.isHorizontal) {
-                                       elm_scroller_page_size_set(m_scroller, m_slotSize, 0);
+                                       elm_scroller_page_size_set(*m_scroller, m_slotSize, 0);
                                } else {
-                                       elm_scroller_page_size_set(m_scroller, 0, m_slotSize);
+                                       elm_scroller_page_size_set(*m_scroller, 0, m_slotSize);
                                }
                        }
 
@@ -692,7 +725,7 @@ namespace gallery {
        {
                int scrollerW = 0;
                int scrollerH = 0;
-               getSize(m_scroller, &scrollerW, &scrollerH);
+               getSize(*m_scroller, &scrollerW, &scrollerH);
 
                return std::max((m_info.isHorizontal ? scrollerW : scrollerH), 1);
        }
@@ -715,7 +748,7 @@ namespace gallery {
        {
                int scrollerX = 0;
                int scrollerY = 0;
-               getPosition(m_scroller, &scrollerX, &scrollerY);
+               getPosition(*m_scroller, &scrollerX, &scrollerY);
 
                int boxX = 0;
                int boxY = 0;
@@ -770,16 +803,20 @@ namespace gallery {
 
        void ImageGrid::realizeSlots()
        {
-               for (int i = 0; i < m_slotCount; ++i) {
-                       m_slots[i]->realize(m_beginSlotIndex + i);
+               if (m_unrealizeLock == 0) {
+                       for (int i = 0; i < m_slotCount; ++i) {
+                               m_slots[i]->realize(m_beginSlotIndex + i);
+                       }
                }
        }
 
        void ImageGrid::unrealizeSlots(
                        const int beginSlotOffset, const int endSlotOffset)
        {
-               for (int i = beginSlotOffset; i < endSlotOffset; ++i) {
-                       m_slots[i]->unrealize();
+               if (m_unrealizeLock == 0) {
+                       for (int i = beginSlotOffset; i < endSlotOffset; ++i) {
+                               m_slots[i]->unrealize();
+                       }
                }
        }
 
index 5761cc52c8dc37fceb4b6e8596dbab271d5a388a..43f290e2938801f0f0de0ec025476d6c672b0988 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <efl_extension.h>
 
-#include "../common.h"
+#include "common.h"
 
 namespace gallery { namespace { namespace impl {
 
@@ -32,7 +32,7 @@ namespace gallery {
        using namespace ucl;
 
        Page::Page(RefCountObjBase &rc, const NaviframeSRef &navi,
-                       ExitRequestHandler onExitRequest) :
+                       const ExitRequestHandler onExitRequest) :
                RefCountAware(&rc),
                m_navi(navi),
                m_onExitRequest(onExitRequest),
@@ -70,7 +70,7 @@ namespace gallery {
 
                m_rc->ref();
 
-               if (!m_navi->isInTransition()) {
+               if (!m_navi->isInTransition() && isAtTop()) {
                        dispatchTopPageChanged();
                }
 
@@ -100,9 +100,11 @@ namespace gallery {
 
        void Page::exitNoTransition()
        {
-               if (isValid(m_item)) {
+               if (isAtTop()) {
                        m_item.del();
                        dispatchTopPageChanged();
+               } else if (isValid(m_item)) {
+                       m_item.del();
                }
        }
 
diff --git a/src/presentation/ThumbnailPage.cpp b/src/presentation/ThumbnailPage.cpp
new file mode 100644 (file)
index 0000000..f9c304a
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "presentation/ThumbnailPage.h"
+
+#include "model/IMediaAlbum.h"
+#include "model/MediaItem.h"
+
+#include "presentation/ImageGrid.h"
+
+#include "common.h"
+
+namespace gallery {
+
+       using namespace ucl;
+
+       // ThumbnailPage::Builder //
+
+       ThumbnailPage::Builder::Builder()
+       {
+       }
+
+       ThumbnailPage::Builder::~Builder()
+       {
+       }
+
+       ThumbnailPage::Builder &ThumbnailPage::Builder::setNaviframe(
+                       const NaviframeSRef &navi)
+       {
+               m_navi = navi;
+               return *this;
+       }
+
+       ThumbnailPage::Builder &ThumbnailPage::Builder::setAlbum(
+                       const IMediaAlbumSRef &album)
+       {
+               m_album = album;
+               return *this;
+       }
+
+       ThumbnailPageSRef ThumbnailPage::Builder::build(
+                       const ExitRequestHandler onExitRequest) const
+       {
+               if (!onExitRequest) {
+                       LOG_RETURN_VALUE(RES_INVALID_ARGUMENTS, {},
+                                       "onExitRequest is NULL");
+               }
+
+               if (!m_navi) {
+                       LOG_RETURN_VALUE(RES_INVALID_ARGUMENTS, {}, "m_navi is NULL");
+               }
+
+               if (!m_album) {
+                       LOG_RETURN_VALUE(RES_INVALID_ARGUMENTS, {}, "m_album is NULL");
+               }
+
+               auto result = makeShared<ThumbnailPage>(
+                               m_navi, onExitRequest, m_album);
+
+               FAIL_RETURN_VALUE(result->prepare(), {}, "result->prepare() failed!");
+
+               return result;
+       }
+
+       // ThumbnailPage::RealizedItem //
+
+       class ThumbnailPage::RealizedItem : NonCopyable {
+       public:
+               RealizedItem(ThumbnailPage &parent, const int index) :
+                       m_parent(parent),
+                       m_index(index)
+               {
+                       FAIL_LOG(m_parent.m_mediaItems[m_index]->getThumbnailPath(
+                                       DELEGATE(RealizedItem::onThumbnail, this)),
+                                       "getThumbnailPath() failed!");
+               }
+
+               ~RealizedItem()
+               {
+                       m_parent.m_mediaItems[m_index]->cancelThumbnailPathGet();
+               }
+
+               int getIndex() const
+               {
+                       return m_index;
+               }
+
+       private:
+               void onThumbnail(const Result result, const std::string &path)
+               {
+                       FAIL_RETURN_VOID(result, "Failed to get thumbnail!");
+                       m_parent.m_imageGrid->updateItem(m_index, {path});
+               }
+
+       private:
+               ThumbnailPage &m_parent;
+               int m_index;
+       };
+
+       // ThumbnailPage //
+
+       ThumbnailPage::ThumbnailPage(RefCountObjBase &rc,
+                       const NaviframeSRef &navi,
+                       const ExitRequestHandler onExitRequest,
+                       const IMediaAlbumSRef &album) :
+               Page(rc, navi, onExitRequest),
+               m_album(album)
+       {
+       }
+
+       ThumbnailPage::~ThumbnailPage()
+       {
+               m_imageGrid->setListener(nullptr);
+       }
+
+       Result ThumbnailPage::prepare()
+       {
+               FAIL_RETURN(m_album->forEachMedia(
+                               DELEGATE(ThumbnailPage::onEachMedia, this)),
+                               "m_album->forEachMedia() failed!");
+
+               m_imageGrid = ImageGrid::Builder().
+                               setListener(this).
+                               build(getNaviframe());
+               if (!m_imageGrid) {
+                       LOG_RETURN(RES_FAIL, "ImageGrid::build() failed!");
+               }
+
+               FAIL_RETURN(Page::prepare(
+                       [this]()
+                       {
+                               return getNaviframe().push(*m_imageGrid);
+                       }),
+                       "Page::prepare() failed!");
+
+               m_imageGrid->setItemCount(m_mediaItems.size());
+
+               return RES_OK;
+       }
+
+       bool ThumbnailPage::onEachMedia(MediaItemUPtr media)
+       {
+               m_mediaItems.emplace_back(std::move(media));
+               return true;
+       }
+
+       void ThumbnailPage::onItemRealized(const int itemIndex)
+       {
+               m_realizedItems.emplace_back(new RealizedItem(*this, itemIndex));
+       }
+
+       void ThumbnailPage::onItemUnrealized(const int itemIndex)
+       {
+               const auto it = std::find_if(
+                               m_realizedItems.begin(), m_realizedItems.end(),
+                               [itemIndex](const RealizedItemUPtr &item)
+                               {
+                                       return (item->getIndex() == itemIndex);
+                               });
+               if (it != m_realizedItems.end()) {
+                       m_realizedItems.erase(it);
+               } else {
+                       WLOG("Item is not found in realized list!");
+               }
+       }
+}
diff --git a/src/presentation/common.h b/src/presentation/common.h
new file mode 100644 (file)
index 0000000..63664e1
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GALLERY_PRESENTATION_COMMON_H__
+#define __GALLERY_PRESENTATION_COMMON_H__
+
+#include "../common.h"
+
+#endif // __GALLERY_PRESENTATION_COMMON_H__
index 4471ea15ba16e9ca364642e5928ca630039c7293..c62c3398347fb4d07e637436392b290eab34f5b5 100644 (file)
@@ -45,7 +45,6 @@ namespace ucl {
                };
 
        public:
-               friend class RefCountObj<Naviframe>;
                using StyledWidget::StyledWidget;
 
                bool isInTransition() const;
@@ -89,7 +88,7 @@ namespace ucl {
        private:
                friend class RefCountObj<Naviframe>;
                friend class NaviItem;
-               Naviframe(RefCountObjBase &rc, Evas_Object *eo, bool isOwner = false);
+               Naviframe(RefCountObjBase &rc, Evas_Object *eo);
 
                void startTransition();
 
index 6527094561eefb58e5fb92cecc61b6e7b2d521af..476b054f5597162abe2a4026e02c6e0ec3831955 100644 (file)
@@ -47,8 +47,8 @@ namespace ucl {
 
        // Naviframe //
 
-       Naviframe::Naviframe(RefCountObjBase &rc, Evas_Object *eo, bool isOwner) :
-               StyledWidget(&rc, eo, isOwner),
+       Naviframe::Naviframe(RefCountObjBase &rc, Evas_Object *eo) :
+               StyledWidget(&rc, eo, true),
                m_isInTransition(false)
        {
                addEventHandler(NAVI_TRANSITION_FINISHED, WEAK_DELEGATE(