public:
virtual ~IContactPickerListener() {}
virtual void onContactsPicked(const std::list<ResultData> &numberIdList) {};
+ virtual void onFinish() {};
};
}
size_t len = sizeof(addressesTypes) / sizeof(addressesTypes[0]);
app_control_add_extra_data_array(svc_handle, APP_CONTROL_DATA_TYPE, addressesTypes, len);
app_control_set_launch_mode(svc_handle, APP_CONTROL_LAUNCH_MODE_GROUP);
+ app_control_enable_app_started_result_event(svc_handle);
int ret = app_control_send_launch_request(svc_handle, APP_CONTROL_RES_CALLBACK(ContactPicker, onAppControlRes), this);
MSG_LOG("launching contacts, result-code: ", ret);
res = (ret == APP_CONTROL_ERROR_NONE);
void ContactPicker::onAppControlRes(app_control_h request, app_control_h reply, app_control_result_e result)
{
+ if (m_pListener)
+ m_pListener->onFinish();
+
if (result == APP_CONTROL_RESULT_SUCCEEDED)
{
std::list<int> addressIds;
// IContactPickerListener
virtual void onContactsPicked(const std::list<ResultData> &addressIdList);
+ virtual void onFinish();
// IContactManagerListener:
virtual void onContactChanged();
MSG_LOG("");
int currentRecipientsCount = getItemsCount();
if (currentRecipientsCount < getMaxRecipientCount())
+ {
+ setButtonEnabled(ContactButton, false);
m_Picker.launch(getMaxRecipientCount() - currentRecipientsCount);
+ }
else
showTooManyRecipientsNotif();
}
setEntryFocus(true);
}
+void ConvRecipientsPanel::onFinish()
+{
+ MSG_LOG("");
+ setButtonEnabled(ContactButton, true);
+}
+
void ConvRecipientsPanel::onPopupBtnClicked(Popup &popup, int buttonId)
{
popup.destroy();
void setEditMode(bool isEdit);
void showInvalidIcon(bool show);
void showClearButton(bool show);
-
+ void setButtonEnabled(ButtonType buttonType, bool enabled);
private:
// Out signals:
virtual void onKeyDown(Evas_Event_Key_Down *ev) {};
}
}
+void ConvRecipientsPanelView::setButtonEnabled(ButtonType buttonType, bool enabled)
+{
+ Evas_Object *pBtn = nullptr;
+ switch (buttonType)
+ {
+ case NoneButton:
+ break;
+
+ case ContactButton:
+ pBtn = getContactBtn();
+ break;
+
+ case PlusButton:
+ pBtn = getPlusBtn();
+ break;
+
+ default:
+ assert(false);
+ break;
+ }
+
+ if(pBtn)
+ {
+ elm_object_disabled_set(pBtn, !enabled);
+ }
+}
+
void ConvRecipientsPanelView::addGeometryChangedCb(Evas_Object *obj)
{
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, EVAS_EVENT_CALLBACK(ConvRecipientsPanelView, onGeometryChanged), this);