msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "الاسم الصوتي"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "إفتراضي"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "الهاتف"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetik ad"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "İlkin təyin olunan"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Фонетично име"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "По подразбиране"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Телефон"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nom fonètic"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Predeterminat"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telèfon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetické jméno"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Výchozí"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetisk navn"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Standard"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Phonetischer Name"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Standard"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Φωνητικό όνομα"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Προεπιλογή"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Τηλέφωνο"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Phonetic name"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Default"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Phone"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Phonetic name"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Default"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Phone"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Phonetic name"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Default"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Phone"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonética"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Predeterminado"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Teléfono"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonética"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Predeterminado"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Teléfono"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Häälduslik nimi"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Vaikimisi"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Izen fonetikoa"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Lehenetsia"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Foneettinen nimi"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Oletus"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Puhelin"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nom phonétique"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Par défaut"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Téléph."
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nom phonétique"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Par défaut"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Téléph."
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Ainm foghraíochta"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Réamhshocrú"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Fón"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nome fonético"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Predeterminada"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Teléf."
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "फोनेटिक नाम"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "डिफॉल्ट"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "फोन"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetsko ime"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Zadano"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Név fonetikusan"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Alapértelmezett"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Հնչյունային անուն"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Լռելյայն"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Հեռախոս"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Hljóðritað nafn"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Sjálfgefið"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Í síma"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nome fonetico"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Predefinito"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefono"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "よみがな"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "標準"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "携帯電話"
msgstr "日付を設定"
msgid "IDS_PB_TAB_CONTACTS"
-msgstr "é\9b»è©±å¸³"
+msgstr "é\80£çµ¡å\85\88"
msgid "IDS_TPLATFORM_ACBUTTON_DONE_ABB"
msgstr "完了"
msgstr "日付"
msgid "IDS_PB_BODY_CONTACTS"
-msgstr "é\9b»è©±å¸³"
+msgstr "é\80£çµ¡å\85\88"
msgid "IDS_PB_TPOP_ONLY_FIRST_PD_CONTACTS_DISPLAYED"
msgstr "最初の%d件の連絡先のみ表示されます。"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "ფონეტიკური სახელი"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "ნაგულისხმევი"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "ტელეფონი"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Фонетикалық атау"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Өздігінен"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Телефон"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "이름(소리나는 대로)"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "기본"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "휴대전화"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetinis pavadinimas"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Numatytoji"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telef."
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Vārds fonētiski"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Noklusējums"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Tālrunis"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Фонетско име"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Основно"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Телефон"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetisk navn"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Standard"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Naam fonetisch"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Standaard"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefoon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nazwa fonetyczna"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Domyślnie"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nome fonético"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Padrão"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefone"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nome fonético"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Padrão"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefone"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Nume fonetic"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Implicit"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Фонетическое имя"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "По умолчанию"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Телефон"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Výslovnosť mena"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Predvolený"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefón"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetsko ime"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Privzeto"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetski napisano ime"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Podrazumevano"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetiskt namn"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Standard"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetik ad"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Varsayılan"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Фонетичне ім’я"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Стандартний"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Телефон"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "Fonetik nomi"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "Birlamchi"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "Telefon"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "姓名发音"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "默认"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "手机"
msgstr "编辑"
msgid "IDS_PB_OPT_DOMESTIC_PARTNER_ABB2"
-msgstr "å\90\8cå±\85ä¼´ä¾£"
+msgstr "室å\8f\8b"
msgid "IDS_PB_OPT_CUSTOM"
msgstr "自定义"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "語音名稱"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "預設"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "電話"
msgid "IDS_PB_BODY_PHONETIC_NAME"
msgstr "語音名稱"
+msgid "IDS_PB_BODY_DEFAULT"
+msgstr "預設"
+
msgid "IDS_PB_BUTTON_PHONE_ABB"
msgstr "電話"
AppControl request("setting-ringtone-efl");
request.addExtra("marked_mode", selectedPath);
request.addExtra("path", "/opt/share/settings/Ringtones");
+ request.addExtra("default", "default show");
return request;
}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef CONTACTS_DETAILS_RINGTONE_FIELD_ITEM_H
+#define CONTACTS_DETAILS_RINGTONE_FIELD_ITEM_H
+
+#include "Contacts/Details/FieldItem.h"
+
+namespace Contacts
+{
+ namespace Details
+ {
+ /**
+ * @brief Genlist item representing Ringtone field.
+ */
+ class RingtoneFieldItem : public FieldItem
+ {
+ public:
+ using FieldItem::FieldItem;
+
+ protected:
+ /**
+ * @see GenlistItem::getText()
+ */
+ virtual char *getText(Evas_Object *parent, const char *part) override;
+ };
+ }
+}
+
+#endif /* CONTACTS_DETAILS_RINGTONE_FIELD_ITEM_H */
ContactDateFieldControl(Model::ContactDateField &field);
/**
- * @brief Show date picker popup.
- */
- void showPicker();
-
- /**
* @brief Update the control using field's value.
*/
void update();
*/
virtual bool isFocusable() const override;
+ /**
+ * @see ContactFieldSubItem::update()
+ */
+ virtual void update() override;
+
private:
virtual Elm_Genlist_Item_Class *getItemClass() const override;
virtual char *getText(Evas_Object *parent, const char *part) override;
virtual void onInserted() override;
virtual void onSelected() override;
- virtual void onFocused() override;
-
- char *getRingtonePath() const;
- void pickRingtone();
void onPickResult(app_control_h request, app_control_h reply,
app_control_result_e result);
ContactFieldItem *addFieldItem(Model::ContactObject &field);
void removeFieldItem(ContactFieldItem *item);
+ void addEventField();
+ void addRingtoneField();
+
void onAddField(Model::ContactFieldId fieldId);
void onRemoveField(ContactFieldItem *item);
void onContactFilled(bool isFilled);
#include "Contacts/Details/DetailsView.h"
#include "Contacts/Details/BasicInfoItem.h"
#include "Contacts/Details/MultilineFieldItem.h"
+#include "Contacts/Details/RingtoneFieldItem.h"
#include "Contacts/Details/TypedActionFieldItem.h"
#include "Contacts/Input/InputView.h"
#include "Contacts/Model/ContactArray.h"
} else if (fieldId == FieldNote) {
/* FIXME: Use MultilineFieldItem when style will be available */
item = new FieldItem(field);
+ } else if (fieldId == FieldRingtone) {
+ item = new RingtoneFieldItem(field);
} else if (field.getInterfaces() & InterfaceTypedObject) {
item = new TypedFieldItem(field);
} else {
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "Contacts/Details/RingtoneFieldItem.h"
+
+using namespace Contacts::Details;
+
+char *RingtoneFieldItem::getText(Evas_Object *parent, const char *part)
+{
+ if (strcmp(part, "elm.text") == 0) {
+ char *path = FieldItem::getText(parent, "elm.text");
+ char *name = strdup(basename(path));
+ free(path);
+ return name;
+ }
+
+ return FieldItem::getText(parent, part);
+}
{
}
-void ContactDateFieldControl::showPicker()
-{
- Ui::DatePopup *popup = new Ui::DatePopup(m_Field.getValue());
- popup->setResultCallback([this](const tm &date) {
- m_Field.setValue(date);
- update();
- });
- popup->create(getEvasObject());
-}
-
void ContactDateFieldControl::update()
{
tm date = m_Field.getValue();
void ContactDateFieldControl::onButtonPressed(Evas_Object *button, void *eventInfo)
{
- showPicker();
+ Ui::DatePopup *popup = new Ui::DatePopup(m_Field.getValue());
+ popup->setResultCallback([this](const tm &date) {
+ m_Field.setValue(date);
+ update();
+ });
+ popup->create(getEvasObject());
}
if (m_Field.getType() == TypeText) {
auto textControl = static_cast<ContactTextFieldControl *>(control);
elm_object_focus_set(textControl->getEntry(), EINA_TRUE);
- } else if (m_Field.getType() == TypeDate) {
- auto dateControl = static_cast<ContactDateFieldControl *>(control);
- dateControl->showPicker();
}
}
}
return false;
}
+void ContactRingtoneFieldItem::update()
+{
+ elm_genlist_item_fields_update(getObjectItem(), "elm.text", ELM_GENLIST_ITEM_FIELD_TEXT);
+}
+
Elm_Genlist_Item_Class *ContactRingtoneFieldItem::getItemClass() const
{
static Elm_Genlist_Item_Class itc = createItemClass("type2");
char *ContactRingtoneFieldItem::getText(Evas_Object *parent, const char *part)
{
if (strcmp(part, "elm.text") == 0) {
- char *value = getRingtonePath();
- char *substr = strdup(basename(value));
- free(value);
- return substr;
+ const char *value = getField().cast<ContactTextField>().getValue();
+ if (value) {
+ std::string path = value;
+ return strdup(basename(&path[0]));
+ }
+
+ return strdup(_("IDS_PB_BODY_DEFAULT"));
} else if (strcmp(part, "elm.text.sub") == 0) {
const char *name = Common::getContactFieldName(ContactFieldId(getObject().getId()));
return Utils::safeDup(_(name));
void ContactRingtoneFieldItem::onSelected()
{
- pickRingtone();
-}
-
-void ContactRingtoneFieldItem::onFocused()
-{
- pickRingtone();
-}
-
-char *ContactRingtoneFieldItem::getRingtonePath() const
-{
- char *value = nullptr;
- const char *fieldValue = getField().cast<ContactTextField>().getValue();
- if (fieldValue) {
- value = strdup(fieldValue);
- } else {
- char *defaultValue = nullptr;
- system_settings_get_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, &defaultValue);
- value = defaultValue;
- }
-
- return value;
-}
-
-void ContactRingtoneFieldItem::pickRingtone()
-{
- char *value = getRingtonePath();
- m_AppControl = App::requestPickRingtone(value);
+ const char *value = getField().cast<ContactTextField>().getValue();
+ m_AppControl = App::requestPickRingtone(value ? value : "default");
m_AppControl.launch(makeCallbackWithLastParam(&ContactRingtoneFieldItem::onPickResult), this);
- free(value);
}
void ContactRingtoneFieldItem::onPickResult(app_control_h request, app_control_h reply,
int err = app_control_get_extra_data(reply, "result", &path);
WARN_IF_ERR(err, "app_control_get_extra_data() failed.");
- getField().cast<ContactTextField>().setValue(path);
+ if (strcmp(path, "default") == 0) {
+ getField().reset();
+ } else {
+ getField().cast<ContactTextField>().setValue(path);
+ }
+
+ update();
free(path);
}
#include "Contacts/Details/DetailsView.h"
#include "Contacts/Model/ContactArray.h"
+#include "Contacts/Model/ContactDateField.h"
#include "Contacts/Model/ContactTextField.h"
#include "Contacts/Model/ContactCompoundObject.h"
+#include "App/AppControlRequest.h"
#include "App/Path.h"
+#include "Ui/DatePopup.h"
#include "Ui/Genlist.h"
#include "Ui/Navigator.h"
#include "Ui/Popup.h"
delete item;
}
+void InputView::addEventField()
+{
+ time_t now = time(nullptr);
+ Ui::DatePopup *popup = new Ui::DatePopup(*localtime(&now));
+ popup->setResultCallback([this](const tm &date) {
+ ContactObject &field = addField(FieldEvent);
+ field.getField<ContactDateField>(0)->setValue(date);
+ addFieldItem(field);
+ });
+ popup->create(getEvasObject());
+}
+
+void InputView::addRingtoneField()
+{
+ auto request = App::requestPickRingtone("default");
+ request.launch([](app_control_h request, app_control_h reply,
+ app_control_result_e result, void *data) {
+ InputView *view = (InputView *) data;
+
+ char *path = nullptr;
+ int err = app_control_get_extra_data(reply, "result", &path);
+ RETM_IF_ERR(err, "app_control_get_extra_data() failed.");
+
+ if (strcmp(path, "default") != 0) {
+ ContactObject &field = view->addField(FieldRingtone);
+ field.getField<ContactTextField>(0)->setValue(path);
+ view->addFieldItem(field);
+ }
+
+ free(path);
+ }, this);
+ request.detach();
+}
+
void InputView::onAddField(ContactFieldId fieldId)
{
- ContactFieldItem *item = addFieldItem(addField(fieldId));
- item->focus(ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ if (fieldId == FieldRingtone) {
+ addRingtoneField();
+ } else if (fieldId == FieldEvent) {
+ addEventField();
+ } else {
+ ContactFieldItem *item = addFieldItem(addField(fieldId));
+ item->focus(ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ }
}
void InputView::onRemoveField(ContactFieldItem *item)