2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <Elementary.h>
20 #include <dpl/wrt-dao-rw/widget_dao.h>
21 #include <dpl/foreach.h>
22 #include <dpl/assert.h>
23 #include <dpl/utils/wrt_global_settings.h>
24 #include <dpl/localization/w3c_file_localization.h>
26 #include <ui-gadget-module.h>
28 #include "detailview.h"
29 #include "advancedview.h"
32 namespace WebAppDetailSetting {
34 const int MAX_PATH_LENGTH = 255;
35 const int ERROR_READ_LINK = -1;
36 // need to move widget_config.h
37 const char* const WRT_LAUNCHER = "wrt-launcher";
38 const char* const WRT_LAUNCHER_WK_MODE_CHANGE_OPTION = "-w";
41 void DetailView::getLocalizedInfo(void)
43 m_localizedInfo = W3CFileLocalization::getLocalizedInfo(m_appID);
46 Evas_Object *DetailView::loadView(void)
52 win = static_cast<Evas_Object *>(ug_get_window());
54 m_gl = elm_genlist_add(m_naviframe);
55 elm_object_style_set(m_gl, "dialogue");
57 m_dao.Reset(new WrtDB::WidgetDAO(m_appID));
61 evas_object_del(m_naviframe);
64 bindtextdomain("ug-webapp-common-efl", "/usr/ug/res/locale");
67 new AdvancedView(m_naviframe,
69 m_advancedView->loadSecuritySettingsMenu(m_gl);
72 } catch (const std::bad_alloc &) {
77 void DetailView::onBackBtnClicked(void *data,
83 This= static_cast<DetailView *>(data);
85 ug_destroy_me(This->m_ug);
87 bool DetailView::pushToNaviFrame(void)
92 btn = elm_button_add(m_naviframe);
96 elm_object_style_set(btn, "naviframe/end_btn/default");
97 evas_object_smart_callback_add(btn, "clicked", onBackBtnClicked, this);
98 bindtextdomain("ug-webapp-common-efl", "/usr/ug/res/locale");
99 elm_naviframe_item_push(m_naviframe,
108 DetailView::DetailView(Evas_Object* navi, ui_gadget_h ug, DPL::String appID) :
119 DetailView::~DetailView(void)
122 delete m_licenseInfo;