m_DoneButton = page->addTitleButton(Ui::ButtonRight, "IDS_TPLATFORM_ACBUTTON_DONE_ABB",
makeCallback(&InputView::onDonePressed), this);
- elm_object_disabled_set(m_DoneButton, EINA_TRUE);
+
+ const char *name = m_Group.getName();
+ elm_object_disabled_set(m_DoneButton, !(name && *name));
page->setTitle(m_Group.getId() == 0 ? "IDS_PB_HEADER_CREATE" : "IDS_PB_HEADER_EDIT");
}
#include "Ui/Editfield.h"
#include "Utils/Callback.h"
+#include "Utils/String.h"
#include "GroupItemLayout.h"
{
if (m_Group.getType() == GroupCustom) {
char *text = elm_entry_markup_to_utf8(elm_entry_entry_get(entry));
- contacts_record_set_str(m_Group.getRecord(), _contacts_group.name, text ? text : "");
+ bool isEmpty = Utils::isStrEmpty(text);
+ contacts_record_set_str(m_Group.getRecord(), _contacts_group.name, !isEmpty ? text : "");
free(text);
+
+ m_OnFilled(!isEmpty);
}
- m_OnFilled(!elm_entry_is_empty(entry));
}
void NameItem::onActivated(Evas_Object *entry, void *eventInfo)