* evas_object_show(cp);
*/
+/**
+ * @brief Creates new info popup instance.
+ */
Evas_Object *info_popup_create(Evas_Object *parent);
+/**
+ * @brief Set title of popup.
+ */
void info_popup_title_set(Evas_Object *popup, const char *title);
+/**
+ * @brief Set main text.
+ */
void info_popup_text_set(Evas_Object *popup, const char *text);
+/**
+ * @brief Set "OK" button text.
+ */
void info_popup_ok_text_set(Evas_Object *popup, const char *text);
/**
- * @Utility function creating and showing info popup with "OK" button
+ * @Utility function creating and showing info popup
*/
-void info_popup_show_message(Evas_Object *parent, const char *title, const char *text);
+void info_popup_show_message(Evas_Object *parent, const char *title, const char *text, const char *ok_text);
#endif /* end of include guard: INFO_POPUP_H */
}
EXPORT_PUBLIC
-void info_popup_show_message(Evas_Object *parent, const char *title, const char *text)
+void info_popup_show_message(Evas_Object *parent, const char *title, const char *text, const char *ok_text)
{
Evas_Object *cp = info_popup_create(parent);
info_popup_title_set(cp, title);
info_popup_text_set(cp, text);
+ info_popup_ok_text_set(cp, ok_text);
evas_object_show(cp);
}
const char *title = _("IDS_ST_BODY_RESET_INITIAL_CONFIGURATION");
const char *content = result ? _("IDS_IM_BODY_SUCCESSFULLY_COMPLETED") : _("IDS_IM_POP_UNEXPECTED_ERROR");
- info_popup_show_message(parent, title, content);
+ info_popup_show_message(parent, title, content, _("IDS_ST_BUTTON_OK_ABB"));
}
static void _on_confirmed_reset_initial_config(void *data, Evas_Object *obj, void *event_info)
{
int result = setting_reset_initial_config();
evas_object_del(obj);
- _show_reset_initial_config_result_popup(obj, result == 0);
+ _show_reset_initial_config_result_popup(data, result == 0);
}
static void setting_reset_initial_config_clicked(void *data, Evas_Object *obj, void *event_info)
snprintf(popupmsg, MAX_POPUPMSG, "<align=center>%s<br>%s</align>",
_("IDS_MSG_RESET_INITIAL_CONFIGURATION"), _("IDS_MSG_RESET_CANNOT_BE_UNDONE"));
confirm_popup_text_set(confirm_popup, popupmsg);
- evas_object_smart_callback_add(confirm_popup, "confirmed", _on_confirmed_reset_initial_config, NULL);
+ evas_object_smart_callback_add(confirm_popup, "confirmed", _on_confirmed_reset_initial_config, md->window);
evas_object_smart_callback_add(confirm_popup, "rejected", _dismiss_popup, NULL);
elm_genlist_item_selected_set(event_info, EINA_FALSE);
evas_object_show(confirm_popup);