#include <dpl/foreach.h>
#include <dpl/assert.h>
#include <dpl/utils/wrt_global_settings.h>
+#include <dpl/localization/w3c_file_localization.h>
#include <ui-gadget-module.h>
void DetailView::getLocalizedInfo(void)
{
- DPL::OptionalString locale;
-
- Assert(m_dao);
-
- locale = m_dao->getDefaultlocale();
- if (locale.IsNull()) {
- DPL::String lang_tag(L"");
- m_localizedInfo = m_dao->getLocalizedInfo(lang_tag);
- } else {
- m_localizedInfo = m_dao->getLocalizedInfo(*locale);
- }
+ m_localizedInfo = W3CFileLocalization::getLocalizedInfo(m_appID);
}
void DetailView::addField(const char *title)
}
void DetailView::viewlicenseCallback(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object *obj,
+ void *event_info)
{
- //TODO : implementation here.
- Evas_Object *popup = static_cast<Evas_Object *>(data);
- evas_object_del(popup);
+ Evas_Object *popup;
+ Evas_Object *btn;
+ DetailData *detailData;
+
+ Elm_Object_Item *it;
+ it = static_cast<Elm_Object_Item *>(event_info);
+ Assert(it);
+ elm_genlist_item_selected_set(it, EINA_FALSE);
+ Assert(data);
+ detailData = static_cast<DetailData *>(data);
+
+ popup = elm_popup_add(detailData->m_detailView->m_naviframe);
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_text_set(popup, detailData->m_subtitle.c_str());
+ btn = elm_button_add(popup);
+ elm_object_text_set(btn, "OK");
+ elm_object_part_content_set(popup, "button1", btn);
+ evas_object_smart_callback_add(btn, "clicked", closeCallback, popup);
+ evas_object_show(popup);
}
void DetailView::closeCallback(void *data,
Assert(gl);
try {
detailData = new DetailData(this,
- title,
- title);
+ title,
+ DPL::ToUTF8String(
+ *m_localizedInfo.license).c_str());
itc.item_style = "dialogue/1text";
itc.func.text_get =getTitle ;
itc.func.content_get = NULL;
itc.func.del = NULL;
it = elm_genlist_item_append(gl,
- &itc,
- static_cast<void *>(detailData),
- NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL,
- NULL);
- elm_object_item_disabled_set(it, EINA_TRUE);
+ &itc,
+ static_cast<void *>(detailData),
+ NULL,
+ ELM_GENLIST_ITEM_NONE,
+ viewlicenseCallback,
+ static_cast<void *>(detailData));
} catch (const std::bad_alloc &) {
}
}
addAdvancedSetting(m_gl, U_("IDS_ST_HEADER_ADVANCED_SETTINGS"));
pushToNaviFrame();
- return win;
+ return win;
} catch (const std::bad_alloc &) {
return NULL;
}