#include "setting-accessibility.h"
#include "WidgetFactory.hpp"
#include "SettingAccessibility.hpp"
+#include "Genlist.hpp"
#include <vconf.h>
#include <app.h>
for (auto i = 0u; i < utils::lenOf(LAUNCHER_NAMES); ++i)
items[i].name = LAUNCHER_NAMES[i];
- int ret;
int state = 0;
- GenGroupItemData *item = NULL;
- Evas_Object *genlist = elm_genlist_add(ad->md.getNaviframe()->getObject());
- if (genlist == NULL) {
- SETTING_TRACE_ERROR("Cannot set genlist object as content of layout");
- delete[] items;
- return;
- }
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
- elm_genlist_clear(genlist);
+ auto genlist = Widget::make<Genlist>(ad->md.getNaviframe());
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
+ genlist->clear(); // TODO check if necessary
- ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_STATE, &state);
+ auto ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_STATE, &state);
if (ret != VCONF_OK) {
SETTING_TRACE("FAIL: vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_STATE)");
}
- item = createGendialGroupItem(
- genlist, &itc_1text_1icon, onMouseUpGendialListCb, items, SwallowType::ICON_RADIO, state,
- state ? "IDS_ACCS_ACCESSIBILITY_LAUNCHER_ON" : "IDS_ACCS_ACCESSIBILITY_LAUNCHER_OFF",
- {}, checkboxCb);
+ auto item = createGendialGroupItem(
+ genlist->getObject(), &itc_1text_1icon, onMouseUpGendialListCb, items, SwallowType::ICON_RADIO, state,
+ state ? "IDS_ACCS_ACCESSIBILITY_LAUNCHER_ON" : "IDS_ACCS_ACCESSIBILITY_LAUNCHER_OFF",
+ {}, checkboxCb);
if (item)
item->userdata = items;
item = createGendialGroupItem(
- genlist, &ad->itc_multiline_sub,
+ genlist->getObject(), &ad->itc_multiline_sub,
NULL, ad, SwallowType::INVALID, 0,
{},
"IDS_ACCS_ACCESSIBILITY_LAUNCHER_COMMENT",
}
for (auto i = 0u; i < utils::lenOf(LAUNCHER_NAMES); i++) {
GenGroupItemData *item = createGendialGroupItem(
- genlist, &itc_1text_1icon,
+ genlist->getObject(), &itc_1text_1icon,
onItemSelectedCb, ad, SwallowType::ICON_RADIO, vconf_state & (1 << i),
items[i].name,
{}, onCheckboxChangeCb);
}
- ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_ACCESSIBILITY_LAUNCHER"), NULL, NULL, genlist, NULL);
+ ad->md.naviframe_it = elm_naviframe_item_push(ad->md.getNaviframe()->getObject(), _("IDS_ACCS_ACCESSIBILITY_LAUNCHER"), NULL, NULL, genlist->getObject(), NULL);
elm_naviframe_item_pop_cb_set(ad->md.naviframe_it, onNaviframePopCb, items);
elm_object_item_domain_text_translatable_set(ad->md.naviframe_it, PACKAGE, EINA_TRUE);
std::vector<std::string> {"IDS_ACCS_UNIVERSAL_SWITCH_OK"});
auto layout = createLayout(settingPopup_->getObject(), EDJ_ACCESSORY_POPUP, GRP_ACCESSORY_POPUP);
- layout->setPartText(PRT_ACCESSORY_POPUP_LABEL,"IDS_ACCS_UNIVERSAL_SWITCH_ALREADY_ADDED");
+ layout->setPartText(PRT_ACCESSORY_POPUP_LABEL, "IDS_ACCS_UNIVERSAL_SWITCH_ALREADY_ADDED");
settingPopup_->getObject()->setContent(layout);
}
#include "setting-accessibility.h"
#include "WidgetFactory.hpp"
+#include "Genlist.hpp"
#include <app.h>
: context_(ad)
{
retm_if(ad == NULL, "Input parameter is NULL");
- Evas_Object *genlist = elm_genlist_add(context_->md.getNaviframe()->getObject());
- retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
- elm_genlist_clear(genlist);
+ auto genlist = Widget::make<Genlist>(context_->md.getNaviframe());
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
+ genlist->clear(); // TODO check if necessary
for (auto &it : context_->config.switch_providers) {
auto item = createGendialGroupItem(
- genlist, &context_->itc_multiline_sub,
+ genlist->getObject(), &context_->itc_multiline_sub,
onSwitchAddition, &it->info->id,
SwallowType::INVALID, 0,
it->info->name,
}
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH"), NULL, NULL, genlist->getObject(), NULL);
elm_naviframe_item_pop_cb_set(navi_it, onNaviframePopCb, context_);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
uniqueObj_.reset(elm_box_add(parent->getObject()));
}
-void Box::packEnd(Widget * widget)
+void Box::packEnd(Widget *widget)
{
elm_box_pack_end(uniqueObj_.get(), widget->getObject());
}
{
public:
Box(Widget *parent);
- void packEnd(Widget * widget);
+
+ void packEnd(Widget *widget);
};
#endif
#include "setting-accessibility.h"
#include "WidgetFactory.hpp"
+#include "Genlist.hpp"
#include <app.h>
CameraSwitchesPage::CameraSwitchesPage(SettingAccessibility *ad)
: context_(ad)
{
- Evas_Object *genlist = elm_genlist_add(context_->md.getNaviframe()->getObject());
- retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
-
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
- elm_genlist_clear(genlist);
+ auto genlist = Widget::make<Genlist>(context_->md.getNaviframe());
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
+ genlist->clear(); // TODO check if necessary
universal_switch_camera_comment = createGendialGroupItem(
- genlist, &context_->itc_multiline_sub,
+ genlist->getObject(), &context_->itc_multiline_sub,
NULL, context_, SwallowType::INVALID, 0,
{},
"IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_COMMENT",
return;
elm_genlist_item_select_mode_set(universal_switch_camera_comment->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- createGendialTitleItem(genlist, &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD");
+ createGendialTitleItem(genlist->getObject(), &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD");
auto switches = setting_accessibility_universal_switch_dbus_config_get_switches(&context_->config, ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER);
for (auto &it : switches) {
- auto item = createGendialGroupItem(genlist, &context_->itc_multiline_sub, addSwitchCb, it,
+ auto item = createGendialGroupItem(genlist->getObject(), &context_->itc_multiline_sub, addSwitchCb, it,
SwallowType::INVALID, 0,
it->name,
it->description,
}
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_TITLE"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_TITLE"), NULL, NULL, genlist->getObject(), NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
Evas_Object *back_btn = WidgetFactory::createButton(context_->md.getNaviframe()->getObject(), {}, WidgetFactory::BACK_BUTTON_ARROW_STYLE, backCb, context_);
{
elm_genlist_clear(uniqueObj_.get());
}
+
+size_t Genlist::size()
+{
+ return elm_genlist_items_count(uniqueObj_.get());
+}
Genlist(Widget *parent);
void setMode(Elm_List_Mode mode);
- void clear(); //TODO: check if necessary
+ void clear();
+ size_t size();
};
#endif
void Layout::setText(const std::string &part, const TranslatedString &text)
{
- if(elm_layout_text_set(uniqueObj_.get(), part.c_str(), text.c_str()) == EINA_FALSE)
+ if (elm_layout_text_set(uniqueObj_.get(), part.c_str(), text.c_str()) == EINA_FALSE)
SETTING_TRACE("Failed to set text: %s", text.c_str());
}
return;
prepareViewList();
-
- if (!genlist)
- SETTING_TRACE_ERROR("No genlist");
- elm_object_part_content_set(layout_->getObject(), "elm.swallow.content", genlist);
-
- evas_object_show(genlist);
+ layout_->setPartContent("elm.swallow.content", genlist_);
}
Window *MainData::getWindow() const
return naviframe_;
}
-Evas_Object *MainData::getGenlist() const
+Genlist *MainData::getGenlist() const
{
- return genlist;
+ return genlist_;
}
int MainData::initViewWithoutGenlist(const std::string &name)
void MainData::prepareViewList()
{
- auto gl = elm_genlist_add(layout_->getObject());
- retm_if(gl == NULL, "Cannot set genlist object as content of layout");
-
- /* resolve abnormal height issue */
- elm_genlist_mode_set(gl, ELM_LIST_COMPRESS);
- evas_object_smart_callback_add(gl, "realized", onAllGenlistRealizedCb, this);
- evas_object_show(gl);
-
- genlist = gl;
+ genlist_ = Widget::make<Genlist>(layout_);
+ genlist_->setMode(ELM_LIST_COMPRESS);
+ genlist_->setStyle("dialogue");
+ genlist_->show();
}
void MainData::createMainWindow(const std::string &name)
}
-void MainData::onAllGenlistRealizedCb(void *data, Evas_Object *obj, void *event_info)
-{
- __gl_realized_cb(data, obj, event_info);
- setting_retm_if(event_info == NULL, "invalid parameter: event_info is NULL");
- Elm_Object_Item *item = (Elm_Object_Item *)event_info;
- auto item_data = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
- ret_if(!item_data);
-}
-
void MainData::addBackButton(Elm_Naviframe_Item_Pop_Cb view_pop_cb, void *ad) const
{
auto back_button = WidgetFactory::createButton(naviframe_->getObject(), "IDS_ST_BUTTON_BACK", WidgetFactory::BACK_BUTTON_ARROW_STYLE, softkeyBackClickCb, naviframe_->getObject());
#include "Conformant.hpp"
#include "Naviframe.hpp"
#include "Layout.hpp"
+#include "Genlist.hpp"
#include <Elementary.h>
void initView(const std::string &name);
Window *getWindow() const;
Naviframe *getNaviframe() const;
- Evas_Object *getGenlist() const;
+ Genlist *getGenlist() const;
void addBackButton(Elm_Naviframe_Item_Pop_Cb view_pop_cb, void *ad) const;
Elm_Object_Item *naviframe_it;
void addRotateSupport();
void prepareViewList();
void createMainWindow(const std::string &name);
- static void onAllGenlistRealizedCb(void *data, Evas_Object *obj, void *event_info);
static void softkeyBackClickCb(void *data, Evas_Object *obj, void *event_inf);
Evas *evas = nullptr;
std::unique_ptr<Window> window;
Naviframe *naviframe_ = nullptr;
Layout *layout_ = nullptr;
- Evas_Object *genlist = nullptr;
+ Genlist *genlist_ = nullptr;
};
#endif
: context_(ad)
{
context_->md.initView(_("IDS_ST_BODY_ACCESSIBILITY"));
- elm_object_style_set(context_->md.getGenlist(), "dialogue");
+ context_->md.getGenlist()->setStyle("dialogue");
context_->md.addBackButton(cancelCb, nullptr);
- Evas_Object *scroller = context_->md.getGenlist();
+ Evas_Object *scroller = context_->md.getGenlist()->getObject();
createGendialTitleItem(scroller, &(itc_group_item), "IDS_ST_HEADER_VISION");
int screen_reader = 0;
auto self = static_cast<RemoveSwitchPage *>(data);
retm_if(self->context_->set_value_layout.getGenlist() == NULL, "No genlist provided");
- int genlist_size = elm_genlist_items_count(self->context_->set_value_layout.getGenlist());
+ auto genlist_size = self->context_->set_value_layout.getGenlist()->size();
bool all_selected = (self->context_->switches_to_remove_counter == genlist_size);
- Elm_Object_Item *item = elm_genlist_first_item_get(self->context_->set_value_layout.getGenlist());
+ Elm_Object_Item *item = elm_genlist_first_item_get(self->context_->set_value_layout.getGenlist()->getObject());
while (item != NULL) {
auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
setting_update_gl_item_chk_status(list_item, !all_selected);
void RemoveSwitchPage::useNaviframeTitleAsCounter(RemoveSwitchPage *self)
{
- elm_check_state_set(self->all_checkbox, self->context_->switches_to_remove_counter == (int)elm_genlist_items_count(self->context_->set_value_layout.getGenlist()));
+ Eina_Bool state = self->context_->switches_to_remove_counter == self->context_->set_value_layout.getGenlist()->size();
+ elm_check_state_set(self->all_checkbox, state);
std::string title;
if (self->context_->switches_to_remove_counter > SWITCH_COUNTER_MAX) {
popup->setPartText("title,text", TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES"});
- if (vconf_val && context_->switches_to_remove_counter == (int)elm_genlist_items_count(context_->set_value_layout.getGenlist())) {
+ if (vconf_val && context_->switches_to_remove_counter == context_->set_value_layout.getGenlist()->size()) {
popup->setText("IDS_ACCS_UNIVERSAL_SWITCH_DELETE_ALL_SWITCHES_DESC");
} else {
auto s = std::to_string(context_->switches_to_remove_counter) + " " + TranslatedString{"IDS_ACCS_UNIVERSAL_SWITCH_DELETE_SWITCHES_DESC"} .str();
auto removeSwitchCb = [removeCb, this]() {
- Elm_Object_Item *item = elm_genlist_last_item_get(context_->set_value_layout.getGenlist());
+ Elm_Object_Item *item = elm_genlist_last_item_get(context_->set_value_layout.getGenlist()->getObject());
while (item != NULL) {
auto list_item = static_cast<GenGroupItemData *>(elm_object_item_data_get(item));
item = elm_genlist_item_prev_get(item);
removeCb();
context_->md.getNaviframe()->popBack();
- bool disable_universal_switch = (context_->switches_to_remove_counter == (int)elm_genlist_items_count(context_->set_value_layout.getGenlist()));
+ bool disable_universal_switch = context_->switches_to_remove_counter == context_->set_value_layout.getGenlist()->size();
if (disable_universal_switch && vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, 0))
LOGE("Failed to set vconf key %s.", VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE);
*/
#include "ScreenReaderPage.hpp"
+#include "Genlist.hpp"
#include "setting-accessibility.h"
ScreenReaderPage::ScreenReaderPage(SettingAccessibility *data)
: context_(data)
{
- Evas_Object *genlist = elm_genlist_add(context_->md.getNaviframe()->getObject());
- retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
- elm_genlist_clear(genlist);
+ auto genlist = Widget::make<Genlist>(context_->md.getNaviframe());
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
+ genlist->clear(); // TODO check if necessary
screenreader_checkbox = createGendialGroupItem(
- genlist, &itc_1text_1icon,
+ genlist->getObject(), &itc_1text_1icon,
listCb,
context_, SwallowType::ICON_RADIO, 1,
"IDS_ST_MBODY_SCREEN_READER_HTTS",
}
multiline_screen_reader_comment = createGendialGroupItem(
- genlist, &context_->itc_multiline_sub,
+ genlist->getObject(), &context_->itc_multiline_sub,
NULL, context_, SwallowType::INVALID, 0,
{},
"IDS_ACCS_BODY_WHILE_SCREEN_READER_IS_ENABLED_YOUR_PHONE_WILL_PROVIDE_VOICE_FEEDBACK_FOR_EXAMPLE_SCREEN_READER_WILL_MSG",
}
screen_reader_settings = createGendialGroupItem(
- genlist, &itc_1text,
+ genlist->getObject(), &itc_1text,
settingsListCb,
this, SwallowType::INVALID, 0,
"IDS_ST_OPT_SETTINGS",
if (screen_reader_settings)
screen_reader_settings->userdata = context_;
- Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ST_MBODY_SCREEN_READER_HTTS"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ST_MBODY_SCREEN_READER_HTTS"), NULL, NULL, genlist->getObject(), NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE,
EINA_TRUE);
int vconf_val = 0;
int vconf_ret;
- Evas_Object *genlist = elm_genlist_add(context_->md.getNaviframe()->getObject());
- retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
- elm_genlist_clear(genlist);
+ auto genlist = Widget::make<Genlist>(context_->md.getNaviframe());
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
+ genlist->clear(); // TODO check if necessary
SETTING_TRACE("Creating items");
/* Item 1 : Speech Rate */
speech_rate_item = createGendialGroupItem(
- genlist, &itc_2text,
+ genlist->getObject(), &itc_2text,
speechRateCb,
this, SwallowType::INVALID, 1,
"IDS_ST_BODY_SPEECH_RATE",
}
keyboard_feedback_item = createGendialGroupItem(
- genlist, &itc_multiline_2text,
+ genlist->getObject(), &itc_multiline_2text,
keyboardFeedbackCb,
context_, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
"IDS_ACCS_OPT_KEYBOARD_FEEDBACK_TTS",
}
hints_item = createGendialGroupItem(
- genlist, &itc_1text_1icon,
+ genlist->getObject(), &itc_1text_1icon,
hintsCb,
context_, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
"IDS_ACCS_MBODY_READ_OUT_USAGE_HINTS_ABB",
}
vibration_feedback_item = createGendialGroupItem(
- genlist, &itc_1text_1icon,
+ genlist->getObject(), &itc_1text_1icon,
vibrationFeedbackCb,
context_, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
"IDS_ACCS_MBODY_VIBRATION_FEEDBACK",
}
sound_feedback_item = createGendialGroupItem(
- genlist, &itc_1text_1icon,
+ genlist->getObject(), &itc_1text_1icon,
soundFeedbackCb,
context_, SwallowType::ICON_RADIO, vconf_val ? 1 : 0,
"IDS_ACCS_MBODY_SOUND_FEEDBACK",
}
status_bar_information_item = createGendialGroupItem(
- genlist, &itc_1text,
+ genlist->getObject(), &itc_1text,
mouseUpGendialListCb,
this, SwallowType::INVALID, 1,
"IDS_ACCS_TMBODY_STATUS_BAR_INFORMATION",
status_bar_information_item->userdata = context_;
multiline_status_bar_information_description = createGendialGroupItem(
- genlist, &context_->itc_multiline_sub,
+ genlist->getObject(), &context_->itc_multiline_sub,
NULL, context_, SwallowType::INVALID, 0,
{},
"IDS_ACCS_SBODY_SELECT_WHICH_INFORMATION_FROM_INDICATORS_SHOWN_ON_THE_STATUS_BAR_WILL_BE_READ_OUT_WHEN_YOU_TRIPLE_TAP_THE_SCREEN_WITH_TWO_FINGERS_MSG",
ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
- Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ST_OPT_SETTINGS"), NULL, NULL, genlist, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ST_OPT_SETTINGS"), NULL, NULL, genlist->getObject(), NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
elm_naviframe_item_pop_cb_set(navi_it, hidePage, context_);
auto status = vconfValueGet(vConfCheckData[i].vconf_key.c_str());
auto screenreader_checkbox = createGendialGroupItem(
- genlist->getObject(), &itc_1text_1icon,
- onListItemClicked, self->context_,
- SwallowType::ICON_RADIO, status,
- vConfCheckData[i].label,
- {}, onCheckStateChanged);
+ genlist->getObject(), &itc_1text_1icon,
+ onListItemClicked, self->context_,
+ SwallowType::ICON_RADIO, status,
+ vConfCheckData[i].label,
+ {}, onCheckStateChanged);
vConfCheckData[i].status = screenreader_checkbox->chk_status;
items.push_back(screenreader_checkbox);
this->check = check;
}
-Evas_Object *SetValueLayout::getGenlist() const
+Genlist *SetValueLayout::getGenlist() const
{
- return genlist;
+ return genlist_;
}
-void SetValueLayout::setGenlist(Evas_Object *genlist)
+void SetValueLayout::setGenlist(Genlist *genlist)
{
- this->genlist = genlist;
+ genlist_ = genlist;
}
std::vector<OptionsItem *> &SetValueLayout::getOptionsData()
#include <Elementary.h>
#include "Layout.hpp"
+#include "Genlist.hpp"
#include <vector>
#include <string>
void setBox(Evas_Object *box);
Evas_Object *getCheck() const;
void setCheck(Evas_Object *check);
- Evas_Object *getGenlist() const;
- void setGenlist(Evas_Object *genlist);
+ Genlist *getGenlist() const;
+ void setGenlist(Genlist *genlist);
std::vector<OptionsItem *> &getOptionsData();
double getMinVal() const;
void setMinVal(double val);
Evas_Object *scroller = nullptr;
Evas_Object *box = nullptr;
Evas_Object *check = nullptr;
- Evas_Object *genlist = nullptr;
+ Genlist *genlist_ = nullptr;
std::vector<OptionsItem *> options_data;
double min_val = 0.0;
double max_val = 0.0;
break;
case ValueEditorType::RADIOS:
ad->set_value_layout.radio_item_change_cb = NULL;
- ad->set_value_layout.setGenlist(createGenlist(ad->set_value_layout.getLayout()->getObject(), NULL));
+ ad->set_value_layout.setGenlist(createGenlist(ad->set_value_layout.getLayout(), NULL));
break;
case ValueEditorType::SWITCHES:
- ad->set_value_layout.setGenlist(createGenlist(ad->set_value_layout.getLayout()->getObject(), NULL));
+ ad->set_value_layout.setGenlist(createGenlist(ad->set_value_layout.getLayout(), NULL));
break;
case ValueEditorType::LIST_SWITCH:
ad->set_value_layout.setCheck(createCheck(ad->set_value_layout.getLayout()->getObject(), EINA_FALSE, checkStateChangedCb, ad));
- ad->set_value_layout.setGenlist(createGenlist(ad->set_value_layout.getLayout()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_OPTIONS")));
+ ad->set_value_layout.setGenlist(createGenlist(ad->set_value_layout.getLayout(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK_OPTIONS")));
break;
default:
LOGE("Wrong value type");
{
retm_if(ad == NULL, "Input parameter is NULL");
- GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &itc_1text_1icon_3,
+ GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist()->getObject(), &itc_1text_1icon_3,
gendialRadioItemSelectedCb, NULL,
SwallowType::RADIO_1TEXT, selected ? 0 : -1,
caption,
{
retm_if(ad == NULL, "Input parameter is NULL");
- GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &ad->itc_multiline_sub,
+ GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist()->getObject(), &ad->itc_multiline_sub,
gl_sel, NULL,
SwallowType::ICON_RADIO, (int)state,
caption ? caption : std::string{},
{
retm_if(ad == NULL, "Input parameter is NULL");
- GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &itc_1text_1icon_3,
+ GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist()->getObject(), &itc_1text_1icon_3,
gendialRemoveSelectedItemCb, NULL,
SwallowType::CHECK, (int)state,
caption,
ad->set_value_layout.getOptionsData().push_back(opt_item);
- GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist(), &itc_2text,
+ GenGroupItemData *item = createGendialGroupItem(ad->set_value_layout.getGenlist()->getObject(), &itc_2text,
listItemClickCb, opt_item,
SwallowType::INVALID, 0,
main_text ? main_text : std::string{},
}
}
-Evas_Object *SetValuePage::createGenlist(Evas_Object *parent, const char *title)
+Genlist *SetValuePage::createGenlist(Widget *parent, const char *title)
{
retvm_if(parent == NULL, NULL, "Input parameter is NULL");
- Evas_Object *genlist = elm_genlist_add(parent);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
+ auto genlist = Widget::make<Genlist>(parent);
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
if (title)
- createGendialTitleItem(genlist, &itc_group_item, title);
-
- elm_object_part_content_set(parent, PRT_SET_VALUE_LIST, genlist);
- evas_object_show(genlist);
+ createGendialTitleItem(genlist->getObject(), &itc_group_item, title);
+ parent->setPartContent(PRT_SET_VALUE_LIST, genlist);
+ genlist->show();
return genlist;
}
ad->set_value_layout.getLayout()->setPartText(PRT_SET_VALUE_SWITCH_LABEL, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF");
if (ad->set_value_layout.getGenlist()) {
- Elm_Object_Item *item = elm_genlist_first_item_get(ad->set_value_layout.getGenlist());
+ Elm_Object_Item *item = elm_genlist_first_item_get(ad->set_value_layout.getGenlist()->getObject());
do {
elm_object_item_disabled_set(item, !state);
item = elm_genlist_item_next_get(item);
static void gendialRemoveSelectedItemCb(void *data, Evas_Object *obj, void *event_info);
static void gendialRemoveCheckboxItemCb(void *data, Evas_Object *obj, void *event_info);
static void switchItemCheckboxCb(void *data, Evas_Object *obj, void *event_info);
- static Evas_Object *createGenlist(Evas_Object *parent, const char *title);
+ Genlist *createGenlist(Widget *parent, const char *title);
static Evas_Object *createCheck(Evas_Object *parent, bool state, Evas_Smart_Cb onChanged, void *cbData);
static Evas_Object *createLabel(Evas_Object *parent, const char *caption);
static Evas_Object *createBox(Evas_Object *parent);
UniversalSwitchDbusConfig config;
UniversalSwitchConfiguration us_configuration;
- int switches_to_remove_counter;
+ size_t switches_to_remove_counter;
std::unique_ptr<MainPage> mainPage_;
std::unique_ptr<AddSwitchPage> addSwitchPage_;
SwitchesPage::SwitchesPage(SettingAccessibility *ad)
: context_(ad)
{
- Evas_Object *genlist = elm_genlist_add(context_->md.getNaviframe()->getObject());
- retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
+ switches_ = Widget::make<Genlist>(context_->md.getNaviframe());
+ switches_->setMode(ELM_LIST_COMPRESS);
+ switches_->setStyle("dialogue");
- context_->md.naviframe_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES"), NULL, NULL, genlist, NULL);
+ context_->md.naviframe_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES"), NULL, NULL, switches_->getObject(), NULL);
elm_naviframe_item_pop_cb_set(context_->md.naviframe_it, naviframePopCb, this);
elm_object_item_domain_text_translatable_set(context_->md.naviframe_it, PACKAGE, EINA_TRUE);
remove_switches_page_button = WidgetFactory::createButton(context_->md.getNaviframe()->getObject(), "IDS_ACCS_DELETE_CAPS", "naviframe/title_right", createRemovePageCb, this);
elm_layout_content_set(context_->md.getNaviframe()->getObject(), "title_right_btn", remove_switches_page_button);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
-
- updateSwitchesList(genlist);
- universal_switch_switches = genlist;
+ updateSwitchesList();
}
void SwitchesPage::attachCallback(back_cb callback, void *data)
universal_switch_switches_back_data = data;
}
-void SwitchesPage::updateSwitchesList(Evas_Object *genlist)
+void SwitchesPage::updateSwitchesList()
{
- retm_if(genlist == NULL, "Input argument is NULL");
-
- elm_genlist_clear(genlist);
- createSwitchesGroup(genlist);
- createAddButton(genlist);
+ switches_->clear();
+ createSwitchesGroup();
+ createAddButton();
elm_object_disabled_set(remove_switches_page_button, context_->config.configuration_items.size() == 0);
}
-void SwitchesPage::createAddButton(Evas_Object *genlist)
+void SwitchesPage::createAddButton()
{
- GenGroupItemData *item = createGendialGroupItem(genlist, &itc_1text_1icon_3,
+ GenGroupItemData *item = createGendialGroupItem(switches_->getObject(), &itc_1text_1icon_3,
addSwitchClickedCb, this,
SwallowType::ICON_IMAGE, 0,
"IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SWITCHES_ADD_SWITCH",
}
}
-void SwitchesPage::createSwitchesGroup(Evas_Object *genlist)
+void SwitchesPage::createSwitchesGroup()
{
for (auto &it : context_->config.configuration_items) {
auto activity_name = setting_accessibility_universal_switch_dbus_config_get_activity_name(&context_->config, it->activity_type);
- addMappedSwitchMenuItem(genlist, it->user_name, activity_name, switchClickCb, it);
+ addMappedSwitchMenuItem(it->user_name, activity_name, switchClickCb, it);
}
}
SETTING_TRACE_DEBUG("Switch updated, id: %s, name: %s, action: %s.", switch_id.c_str(), switch_name.c_str(), switch_action.c_str());
setting_accessibility_universal_switch_dbus_config_updateSwitchConfigurationItem(&self->context_->config, switch_id.c_str(), switch_name.c_str(), switch_action.c_str());
- self->updateSwitchesList(self->universal_switch_switches);
+ self->updateSwitchesList();
}
void SwitchesPage::switchRemovedCb(void *data, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name)
SETTING_TRACE_DEBUG("Switch removed, name: %s, id: %s, action: %s.", switch_name.c_str(), switch_id.c_str(), switch_action.c_str());
setting_accessibility_universal_switch_dbus_config_removeSwitchConfigurationItem(&self->context_->config, switch_id.c_str());
- self->updateSwitchesList(self->universal_switch_switches);
+ self->updateSwitchesList();
}
void SwitchesPage::addSwitchCb(void *data, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name)
SETTING_TRACE_DEBUG("Add switch, id: %s, name: %s, action: %s.", switch_id.c_str(), switch_name.c_str(), switch_action.c_str());
setting_accessibility_universal_switch_dbus_config_addSwitchConfigurationItem(&self->context_->config, switch_id.c_str(), switch_name.c_str(), switch_action.c_str());
- self->updateSwitchesList(self->universal_switch_switches);
+ self->updateSwitchesList();
}
-GenGroupItemData *SwitchesPage::addMappedSwitchMenuItem(Evas_Object *genlist, const std::string &main_text,
- const std::string &sub_text, SettingCallback item_cb, void *user_data)
+GenGroupItemData *SwitchesPage::addMappedSwitchMenuItem(const std::string &main_text, const std::string &sub_text, SettingCallback item_cb, void *user_data)
{
- retvm_if(genlist == NULL, NULL, "Input genlist argument is NULL");
-
- auto item = createGendialGroupItem(genlist, &itc_2text_1icon_3,
+ auto item = createGendialGroupItem(switches_->getObject(), &itc_2text_1icon_3,
item_cb, this,
SwallowType::INVALID, 0,
main_text,
self->universal_switch_switches_back = NULL;
self->universal_switch_switches_back_data = nullptr;
- self->universal_switch_switches = nullptr;
self->context_->md.naviframe_it = NULL;
return EINA_TRUE;
#include "RemoveSwitchPage.hpp"
#include "AddSwitchPage.hpp"
#include "UpdateSwitchPage.hpp"
+#include "Genlist.hpp"
class RemoveSwitchPage;
class AddSwitchPage;
static void addSwitchCb(void *data, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name);
private:
- void updateSwitchesList(Evas_Object *genlist);
- void createAddButton(Evas_Object *genlist);
- void createSwitchesGroup(Evas_Object *genlist);
+ void updateSwitchesList();
+ void createAddButton();
+ void createSwitchesGroup();
static void createRemovePageCb(void *data, Evas_Object *obj, void *event_info);
static void addSwitchClickedCb(void *data, Evas_Object *obj, void *event_info);
static void switchClickCb(void *data, Evas_Object *obj, void *event_info);
static void switchUpdatedCb(void *data, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name);
static void switchRemovedCb(void *data, const std::string &switch_id, const std::string &switch_action, const std::string &switch_name);
- GenGroupItemData *addMappedSwitchMenuItem(Evas_Object *genlist, const std::string &main_text,
- const std::string &sub_text, SettingCallback item_cb, void *user_data);
+ GenGroupItemData *addMappedSwitchMenuItem(const std::string &main_text, const std::string &sub_text, SettingCallback item_cb, void *user_data);
static Eina_Bool naviframePopCb(void *data, Elm_Object_Item *it);
static void backCb(void *data, Evas_Object *obj, void *event_info);
Evas_Object *remove_switches_page_button = nullptr;
back_cb universal_switch_switches_back = nullptr;
void *universal_switch_switches_back_data = nullptr;
- Elm_Genlist *universal_switch_switches;
+ Genlist *switches_ = nullptr;
std::unique_ptr<RemoveSwitchPage> removeSwitchPage_;
std::unique_ptr<AddSwitchPage> addSwitchPage_;
std::unique_ptr<UpdateSwitchPage> updateSwitchPage_;
UniversalSwitchPage::UniversalSwitchPage(SettingAccessibility *ad)
: context_(ad)
{
- int ret;
int state = false;
context_->md.naviframe_it = NULL;
- Evas_Object *genlist = (Evas_Object *)elm_genlist_add(context_->md.getNaviframe()->getObject());
- retm_if(genlist == NULL, "Cannot set genlist object as content of layout");
+ auto genlist = Widget::make<Genlist>(context_->md.getNaviframe());
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
+ genlist->clear(); // TODO check if necessary
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
- elm_genlist_clear(genlist);
-
- ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, &state);
+ auto ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, &state);
if (ret == VCONF_OK) {
ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE, onVconfKeyChange, this);
warn_if(ret != VCONF_OK, "FAIL: vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE)");
}
universal_switch_off_checkbox = createGendialGroupItem(
- genlist, &itc_1text_1icon,
+ genlist->getObject(), &itc_1text_1icon,
listCb,
context_, SwallowType::ICON_RADIO, state,
"IDS_ACCS_UNIVERSAL_SWITCH_OFF",
}
universal_switch_comment = createGendialGroupItem(
- genlist, &context_->itc_multiline_sub,
+ genlist->getObject(), &context_->itc_multiline_sub,
NULL, context_, SwallowType::INVALID, 0,
{},
"IDS_ACCS_UNIVERSAL_SWITCH_COMMENT",
elm_genlist_item_select_mode_set(universal_switch_comment->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
- context_->md.naviframe_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH"), NULL, NULL, genlist, NULL);
+ context_->md.naviframe_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH"), NULL, NULL, genlist->getObject(), NULL);
elm_object_item_domain_text_translatable_set(context_->md.naviframe_it, PACKAGE, EINA_TRUE);
elm_naviframe_item_pop_cb_set(context_->md.naviframe_it, naviframePopCb, this);
: context_(ad)
{
context_->md.naviframe_it = NULL;
- genlist_ = elm_genlist_add(context_->md.getNaviframe()->getObject());
- retm_if(genlist_ == NULL, "Cannot set genlist object as content of layout");
-
- elm_genlist_mode_set(genlist_, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist_, "dialogue");
+ genlist_ = Widget::make<Genlist>(context_->md.getNaviframe());
+ genlist_->setMode(ELM_LIST_COMPRESS);
+ genlist_->setStyle("dialogue");
getVconfSettings();
createSwitchesGroup();
createFeedbackGroup();
createManageGroup();
- Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS"), NULL, NULL, genlist_, NULL);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(context_->md.getNaviframe()->getObject(), _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS"), NULL, NULL, genlist_->getObject(), NULL);
elm_naviframe_item_pop_cb_set(navi_it, naviframPopCb, context_);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);
void UniversalSwitchSettingsPage::createFeedbackGroup()
{
const char *str = "Undefined";
- createGendialTitleItem(genlist_, &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK");
+ createGendialTitleItem(genlist_->getObject(), &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_FEEDBACK");
for (auto i = 0u; i < CURSOR_COLORS_COUNT; i++)
if (_cursor_color[i].id == context_->us_configuration.cursor_color) {
void UniversalSwitchSettingsPage::createAdditionalSettingsGroup()
{
std::string str;
- createGendialTitleItem(genlist_, &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS");
+ createGendialTitleItem(genlist_->getObject(), &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_ADD_SETTINGS");
str = getValueUnitText(NULL, &context_->us_configuration.pause_on_first_value, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_SECONDS"),
!context_->us_configuration.pause_on_first_state, _("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_OFF"));
void UniversalSwitchSettingsPage::createScanningGroup()
{
std::string str;
- createGendialTitleItem(genlist_, &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING");
+ createGendialTitleItem(genlist_->getObject(), &itc_group_item, "IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING");
GenGroupItemData *item = addMenuItem(_("IDS_ACCS_UNIVERSAL_SWITCH_SETTINGS_GROUP_SCANNING_AUTO_SCAN"), {}, onAutoScanItemSelection, true, context_->us_configuration.auto_scan, autoScanCheckboxCb);
item->userdata = this;
if (chk)
item_type = SwallowType::ICON_RADIO;
- GenGroupItemData *item = createGendialGroupItem(genlist_, &context_->itc_multiline_sub,
+ GenGroupItemData *item = createGendialGroupItem(genlist_->getObject(), &context_->itc_multiline_sub,
item_cb, this,
item_type, (int)chk_state,
main_text,
#include "SettingAccessibility.hpp"
#include "SwitchesPage.hpp"
#include "SetValuePage.hpp"
+#include "Genlist.hpp"
#include <vconf.h>
static void autoMoveIntervalValueChangedCb(void *data, double value);
SettingAccessibility *context_ = nullptr;
- Evas_Object *genlist_ = nullptr;
+ Genlist *genlist_ = nullptr;
std::unique_ptr<SwitchesPage> switchesPage_;
std::unique_ptr<SetValuePage> setValuePage_;
GenGroupItemData *universal_switch_scan_dir;
context_->set_value_layout.getLayout()->setPartText(PRT_SET_VALUE_DESC, "IDS_ACCS_UNIVERSAL_SWITCH_NAME");
- update_accessories_action_genlist_ = createGenlist(context_->set_value_layout.getLayout()->getObject(), NULL);
- createGendialGroupItem(update_accessories_action_genlist_, &itc_1text,
+ update_accessories_action_genlist_ = createGenlist(context_->set_value_layout.getLayout(), NULL);
+ createGendialGroupItem(update_accessories_action_genlist_->getObject(), &itc_1text,
updateSwitchAction, this,
SwallowType::INVALID, 0,
"IDS_ACCS_UNIVERSAL_SWITCH_ACTION",
return layout;
}
-Evas_Object *UpdateSwitchPage::createGenlist(Evas_Object *parent, const char *title)
+Genlist *UpdateSwitchPage::createGenlist(Widget *parent, const char *title)
{
retvm_if(parent == NULL, NULL, "Input parameter is NULL");
- Evas_Object *genlist = elm_genlist_add(parent);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_object_style_set(genlist, "dialogue");
+ auto genlist = Widget::make<Genlist>(parent);
+ genlist->setMode(ELM_LIST_COMPRESS);
+ genlist->setStyle("dialogue");
if (title)
- createGendialTitleItem(genlist, &itc_group_item, title);
-
- elm_object_part_content_set(parent, PRT_SET_VALUE_LIST, genlist);
- evas_object_show(genlist);
+ createGendialTitleItem(genlist->getObject(), &itc_group_item, title);
+ parent->setPartContent(PRT_SET_VALUE_LIST, genlist);
+ genlist->show();
return genlist;
}
auto self = static_cast<UpdateSwitchPage *>(user_data);
self->config_item_to_update_.activity_type = action;
- elm_genlist_clear(self->update_accessories_action_genlist_);
- createGendialGroupItem(self->update_accessories_action_genlist_, &itc_1text,
+ self->update_accessories_action_genlist_->clear();
+ createGendialGroupItem(self->update_accessories_action_genlist_->getObject(), &itc_1text,
updateSwitchAction, self,
SwallowType::INVALID, 0,
"IDS_ACCS_UNIVERSAL_SWITCH_ACTION",
#include "SettingAccessibility.hpp"
#include "ActionPage.hpp"
#include "Layout.hpp"
+#include "Genlist.hpp"
/**
* View allowing to edit existing mapping between switches and activities
void createUpdateAccessoriesSwitchPage();
static void closeUpdateAccessoriesSwitchPage(void *data, Evas_Object *obj, void *event_info);
Layout *createLayout(Widget *parent, const std::string &layout_grp);
- Evas_Object *createGenlist(Evas_Object *parent, const char *title);
+ Genlist *createGenlist(Widget *parent, const char *title);
static void updateSwitchAction(void *data, Evas_Object *obj, void *event_info);
static void updateSwitchChooseAction(SettingAccessibility *ad, const std::string &action, void *user_data);
std::unique_ptr<ActionPage> actionPage_;
Elm_Object_Item *save_object_item = nullptr;
Evas_Object *entry_ = nullptr;
- Evas_Object *update_accessories_action_genlist_ = nullptr;
+ Genlist *update_accessories_action_genlist_ = nullptr;
};
#endif
Widget(Widget &&) = delete;
template <typename T, typename ... Args>
- static T *make(Widget *parent, Args&&... args)
+ static T *make(Widget *parent, Args &&... args)
{
auto w = std::make_unique<T>(parent, std::forward<Args>(args)...);
auto raw = w.get();
if (itc && itc->item_style)
item_data->itc = itc->item_style;
- const char *insert_type = (const char *)evas_object_data_get(genlist, "InsertType");
-
if (!gl_sel)
gl_sel = _gl_Gendial_sel;
- if (0 == safeStrCmp(insert_type, "Insert before")) {
- item_data->item = elm_genlist_item_insert_before(genlist, itc, item_data, NULL, NULL, ELM_GENLIST_ITEM_NONE, gl_sel, sel_data);
- } else if (0 == safeStrCmp(insert_type, "Insert after")) {
- item_data->item = elm_genlist_item_insert_after(genlist, itc, item_data, NULL, NULL, ELM_GENLIST_ITEM_NONE, gl_sel, sel_data);
- } else if (0 == safeStrCmp(insert_type, "Prepend")) {
- item_data->item = elm_genlist_item_prepend(genlist, itc, item_data, NULL, ELM_GENLIST_ITEM_NONE, gl_sel, sel_data);
- } else {
- item_data->item = elm_genlist_item_append(genlist, itc, item_data, NULL, ELM_GENLIST_ITEM_NONE, gl_sel, sel_data);
- }
- /*redundant process,it should be due to invokers,but maybe they
- * forget it */
- evas_object_data_set(genlist, "InsertType", NULL);
+ item_data->item = elm_genlist_item_append(genlist, itc, item_data, NULL, ELM_GENLIST_ITEM_NONE, gl_sel, sel_data);
return item_data;
}
-void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info)
-{
- setting_retm_if(event_info == NULL,
- "invalid parameter: event_info is NULL");
- Elm_Object_Item *item = (Elm_Object_Item *)event_info;
-
- elm_object_item_data_get(item);
-}
-
/*for check,radio,slider etc.. */
void setting_update_gl_item_chk_status(GenGroupItemData *item_data,
int status)
void *sel_data, SwallowType swallow_type, int chk_status, const std::string &keyStr,
const std::string &sub_desc, SettingCallback chk_change_cb);
-extern void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info);
-
extern void setting_update_gl_item_chk_status(
GenGroupItemData *item_data, int status);