summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-assist-efl/src/WView.cpp3
-rwxr-xr-xapp-control/ct-detail-app/CMakeLists.txt1
-rwxr-xr-xapp-control/ct-detail-app/src/CtDetailApp.cpp46
-rw-r--r--app-control/ct-detail-app/src/CtDetailApp.h5
-rwxr-xr-xapp-control/ct-list-app/src/CtListApp.cpp32
-rw-r--r--app-control/ct-list-app/src/CtListApp.h3
-rw-r--r--lib-common/inc/ContactsAppControl.h6
-rw-r--r--lib-common/src/ContactsAppControl.cpp9
-rwxr-xr-xlib-contact/ct-detail/inc/CtMyProfileInputView.h1
-rwxr-xr-xlib-contact/ct-detail/src/CtInputViewBasicInfoItem.cpp43
-rw-r--r--lib-contact/ct-detail/src/CtInputViewBasicInfoItem.h5
-rw-r--r--lib-contact/ct-detail/src/CtInputViewControl.cpp12
-rwxr-xr-xlib-contact/ct-detail/src/CtInputViewControl.h1
-rwxr-xr-xlib-contact/ct-detail/src/CtInputViewGenlistItem.cpp4
-rwxr-xr-xlib-contact/ct-detail/src/CtInputViewGenlistItem.h1
-rw-r--r--lib-contact/ct-detail/src/CtInputViewRelationItem.h14
-rwxr-xr-xlib-contact/ct-detail/src/CtMyProfileInputView.cpp17
-rw-r--r--lib-contact/ct-list/CMakeLists.txt1
-rwxr-xr-xlib-contact/ct-list/src/CtListBasicController.cpp7
-rwxr-xr-xlib-contact/ct-list/src/CtListModelDb.cpp4
-rw-r--r--lib-contact/ct-list/src/CtListUgMultiPickController.cpp21
-rwxr-xr-xlib-contact/ct-list/src/CtListView.cpp3
-rw-r--r--lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp14
-rw-r--r--lib-phone/ph-speeddial/inc/PhSpeedDialItem.h3
-rw-r--r--lib-phone/ph-speeddial/src/PhSpeedDialItem.cpp36
-rwxr-xr-xmain-app/res/edje/phone/ph-loglist.edc6
-rw-r--r--widget/inc/Widget.h1
-rw-r--r--widget/src/Widget.cpp33
28 files changed, 107 insertions, 225 deletions
diff --git a/app-assist-efl/src/WView.cpp b/app-assist-efl/src/WView.cpp
index 288b6ce..d5cb047 100644
--- a/app-assist-efl/src/WView.cpp
+++ b/app-assist-efl/src/WView.cpp
@@ -135,7 +135,8 @@ bool WView::popOut()
// }
if( __pv->__naviItem != elm_naviframe_top_item_get(getNaviframe()->getEvasObj()) )
{
- elm_object_item_del(__pv->__naviItem);
+ WASSERT_EX(0,"This view is not on Top of Naviframe!");
+ return false;
}
destroyPopup(); // Before popping out view, pop-up is destroyed, if it has.Because pop-up is disappeared too late.
diff --git a/app-control/ct-detail-app/CMakeLists.txt b/app-control/ct-detail-app/CMakeLists.txt
index e9e21ad..d761a18 100755
--- a/app-control/ct-detail-app/CMakeLists.txt
+++ b/app-control/ct-detail-app/CMakeLists.txt
@@ -9,7 +9,6 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/lib-common/inc
${CMAKE_SOURCE_DIR}/lib-contact/ct-common/inc
${CMAKE_SOURCE_DIR}/lib-contact/ct-detail/inc
- ${CMAKE_SOURCE_DIR}/lib-contact/ct-list/inc
)
FILE(GLOB SRCS "src/*.cpp")
diff --git a/app-control/ct-detail-app/src/CtDetailApp.cpp b/app-control/ct-detail-app/src/CtDetailApp.cpp
index 8afe49b..cc4aee0 100755
--- a/app-control/ct-detail-app/src/CtDetailApp.cpp
+++ b/app-control/ct-detail-app/src/CtDetailApp.cpp
@@ -64,14 +64,7 @@ void CtDetailApp::onAppControl(app_control_h request, bool firstLaunch)
app_control_get_operation(m_Request, &operation);
if (operation) {
- int personId = 0;
-
- char *personIdStr = NULL;
- app_control_get_extra_data(request, APP_CONTROL_DATA_ID, &personIdStr);
- if (personIdStr) {
- personId = atoi(personIdStr);
- free(personIdStr);
- }
+ int personId = getPersonId(m_Request, APP_CONTROL_DATA_ID);
if (strcmp(operation, APP_CONTROL_OPERATION_VIEW) == 0) {
if (personId > 0) {
@@ -81,13 +74,14 @@ void CtDetailApp::onAppControl(app_control_h request, bool firstLaunch)
view = createInputView(personId, m_Request);
} else if(strcmp(operation, APP_CONTROL_OPERATION_EDIT) == 0) {
if (personId == 0) {
- using namespace std::placeholders;
- CtListView *listView = new CtListView(LIST_SELECT_SINGLE, LIST_RESULT_ID, 0);
- listView->setOnSingleResult(std::bind(&CtDetailApp::onContactPick, this, _1, _2));
- view = listView;
- } else {
- view = createInputView(personId, m_Request);
+ launchContactPick(APP_CONTROL_DATA_SELECTION_MODE_SINGLE,
+ APP_CONTROL_DATA_TYPE_ID, &CtDetailApp::onContactPick, this);
+
+ free(operation);
+ return;
}
+
+ view = createInputView(personId, m_Request);
}
free(operation);
@@ -106,17 +100,33 @@ void CtDetailApp::onAppControl(app_control_h request, bool firstLaunch)
WLEAVE();
}
-void CtDetailApp::onContactPick(const char *result, CtListResultType resultType)
+int CtDetailApp::getPersonId(app_control_h request, const char *key)
+{
+ int personId = 0;
+ char *itemId = NULL;
+
+ app_control_get_extra_data(request, key, &itemId);
+ if (itemId) {
+ personId = atoi(itemId);
+ free(itemId);
+ }
+
+ return personId;
+}
+
+void CtDetailApp::onContactPick(app_control_h request, app_control_h reply,
+ app_control_result_e result, void *user_data)
{
WENTER();
- int personId = result ? atoi(result) : 0;
+ int personId = getPersonId(reply, APP_CONTROL_DATA_SELECTED);
if (personId < 1) {
ui_app_exit();
}
- CtInputView *view = createInputView(personId, m_Request);
- m_Naviframe->push(view);
+ CtDetailApp *app = (CtDetailApp*) user_data;
+ CtInputView *view = createInputView(personId, app->m_Request);
+ app->m_Naviframe->push(view);
}
CtInputView * CtDetailApp::createInputView(int personId, app_control_h request)
diff --git a/app-control/ct-detail-app/src/CtDetailApp.h b/app-control/ct-detail-app/src/CtDetailApp.h
index f04d591..53fac9e 100644
--- a/app-control/ct-detail-app/src/CtDetailApp.h
+++ b/app-control/ct-detail-app/src/CtDetailApp.h
@@ -19,7 +19,6 @@
#define _CT_DETAIL_APP_H_
#include "WApp.h"
-#include "CtListView.h"
class CtInputView;
class WNaviframe;
@@ -35,7 +34,9 @@ protected:
virtual void onAppControl(app_control_h request, bool firstLaunch);
private:
- void onContactPick(const char *result, CtListResultType resultType);
+ static int getPersonId(app_control_h request, const char *key);
+ static void onContactPick(app_control_h request, app_control_h reply,
+ app_control_result_e result, void *user_data);
static CtInputView * createInputView(int personId, app_control_h request);
static void replyPersonId(int personId, app_control_h request, app_control_result_e result);
diff --git a/app-control/ct-list-app/src/CtListApp.cpp b/app-control/ct-list-app/src/CtListApp.cpp
index 71379da..6ea57b0 100755
--- a/app-control/ct-list-app/src/CtListApp.cpp
+++ b/app-control/ct-list-app/src/CtListApp.cpp
@@ -73,14 +73,6 @@ void CtListApp::onAppControl(app_control_h request, bool firstLaunch)
app_control_clone(&m_Request, request);
app_control_get_operation(m_Request, &operation);
- app_control_launch_mode_e launchMode = APP_CONTROL_LAUNCH_MODE_SINGLE;
- app_control_get_launch_mode(m_Request, &launchMode);
-
- if (launchMode == APP_CONTROL_LAUNCH_MODE_SINGLE) {
- evas_object_smart_callback_add(getWindow()->getEvasObj(), "iconified",
- &CtListApp::onLowered, this);
- }
-
if (operation) {
if (strcmp(operation, APP_CONTROL_OPERATION_PICK) == 0) {
m_SelectMode = getSelectMode(m_Request);
@@ -114,19 +106,15 @@ void CtListApp::onAppControl(app_control_h request, bool firstLaunch)
if (view) {
m_Naviframe->push(view);
- } else {
- replyFailure();
+ } else {
+ app_control_h reply;
+ app_control_create(&reply);
+ app_control_reply_to_launch_request(reply, m_Request, APP_CONTROL_RESULT_FAILED);
+ app_control_destroy(reply);
ui_app_exit();
}
}
-void CtListApp::onLowered(void *data, Evas_Object *obj, void *event_info)
-{
- CtListApp *app = (CtListApp *) data;
- app->replyFailure();
- ui_app_exit();
-}
-
CtListSelectMode CtListApp::getSelectMode(app_control_h request)
{
char *selectMode = NULL;
@@ -183,14 +171,6 @@ int CtListApp::getSelectLimit(app_control_h request)
return limit;
}
-void CtListApp::replyFailure()
-{
- app_control_h reply;
- app_control_create(&reply);
- app_control_reply_to_launch_request(reply, m_Request, APP_CONTROL_RESULT_FAILED);
- app_control_destroy(reply);
-}
-
void CtListApp::replySingleResult(const char *data, CtListResultType type)
{
WHIT();
@@ -199,7 +179,7 @@ void CtListApp::replySingleResult(const char *data, CtListResultType type)
if (data) {
app_control_add_extra_data(reply, APP_CONTROL_DATA_TYPE, resultTypes[type]);
- app_control_add_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &data, 1);
+ app_control_add_extra_data(reply, APP_CONTROL_DATA_SELECTED, data);
}
app_control_reply_to_launch_request(reply, m_Request, APP_CONTROL_RESULT_SUCCEEDED);
diff --git a/app-control/ct-list-app/src/CtListApp.h b/app-control/ct-list-app/src/CtListApp.h
index fa5445a..5b67caf 100644
--- a/app-control/ct-list-app/src/CtListApp.h
+++ b/app-control/ct-list-app/src/CtListApp.h
@@ -34,13 +34,10 @@ protected:
virtual void onAppControl(app_control_h request, bool firstLaunch);
private:
- static void onLowered(void *data, Evas_Object *obj, void *event_info);
-
static CtListSelectMode getSelectMode(app_control_h request);
static CtListResultType getResultType(app_control_h request);
static int getSelectLimit(app_control_h request);
- void replyFailure();
void replySingleResult(const char *data, CtListResultType type);
void replyMultiResult(const char **data, size_t count);
diff --git a/lib-common/inc/ContactsAppControl.h b/lib-common/inc/ContactsAppControl.h
index 2cba5a2..59237cd 100644
--- a/lib-common/inc/ContactsAppControl.h
+++ b/lib-common/inc/ContactsAppControl.h
@@ -75,15 +75,11 @@ int launchContactEdit(int personId, const char *number);
* @param[in] resultType One of APP_CONTROL_DATA_TYPE_* values
* @param[in] replyCallback Callback to receive selection result
* @param[in] userData Data passed to @a replyCallback
- * @param[in] groupMode Whether to group launched application with current
- * @param[out] appControl Created App Control handle if not nullptr
- * @remark If appControl is not nullptr it should be destroyed by the caller
* @return App Control launch result
* @see app_control_send_launch_request()
*/
int launchContactPick(const char *selectionMode, const char *resultType,
- app_control_reply_cb replyCallback, void *userData,
- bool groupMode = true, app_control_h *appControl = nullptr);
+ app_control_reply_cb replyCallback, void *userData, bool groupMode = true);
/**
* @brief Request telephony call
diff --git a/lib-common/src/ContactsAppControl.cpp b/lib-common/src/ContactsAppControl.cpp
index 6d9897e..be940ae 100644
--- a/lib-common/src/ContactsAppControl.cpp
+++ b/lib-common/src/ContactsAppControl.cpp
@@ -75,8 +75,7 @@ int launchContactEdit(int personId, const char *number)
}
int launchContactPick(const char *selectionMode, const char *resultType,
- app_control_reply_cb replyCallback, void *userData,
- bool groupMode, app_control_h *appControl)
+ app_control_reply_cb replyCallback, void *userData, bool groupMode)
{
if (!selectionMode || !resultType) {
return APP_CONTROL_ERROR_INVALID_PARAMETER;
@@ -95,11 +94,7 @@ int launchContactPick(const char *selectionMode, const char *resultType,
}
int result = app_control_send_launch_request(request, replyCallback, userData);
- if (appControl) {
- *appControl = request;
- } else {
- app_control_destroy(request);
- }
+ app_control_destroy(request);
return result;
}
diff --git a/lib-contact/ct-detail/inc/CtMyProfileInputView.h b/lib-contact/ct-detail/inc/CtMyProfileInputView.h
index ad06b18..83bc22e 100755
--- a/lib-contact/ct-detail/inc/CtMyProfileInputView.h
+++ b/lib-contact/ct-detail/inc/CtMyProfileInputView.h
@@ -91,7 +91,6 @@ private:
static void __saveCb(void *data, Evas_Object *obj, void *event_info);
static void __cancelCb(void *data, Evas_Object *obj, void *event_info);
static void __genlistRealizedCb(void *data, Evas_Object *obj, void *event_info);
- static void __genlistUnrealizedCb(void *data, Evas_Object *obj, void *event_info);
static void __galleryReplyCb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
static void __launchGallery(CtMyProfileInputView *view);
diff --git a/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.cpp b/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.cpp
index 502ee8e..61d6b36 100755
--- a/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.cpp
+++ b/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.cpp
@@ -78,7 +78,6 @@ CtInputViewBasicInfoItem::~CtInputViewBasicInfoItem()
void CtInputViewBasicInfoItem::__initialize()
{
- __focusEntry = NULL;
__addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
__oldBaseInfoExpanded = false;
__baseInfoExpanded = true;
@@ -141,7 +140,7 @@ void CtInputViewBasicInfoItem::__initialize()
__addOrganization = false;
}
__updateItem = false;
- __isRealized = false;
+
__subItemSize = 0;
}
@@ -575,12 +574,8 @@ Evas_Object* CtInputViewBasicInfoItem::__createPhoneticFirstNameField(CtInputVie
evas_object_smart_callback_add(entry, "preedit,changed", __basicInfoPhoneticFirstNameChangedCb, item);
evas_object_smart_callback_add(entry, "activated", __activatedCb, item);
if (INPUT_ADDED_ITEM_INDEX_PHONETIC_INFO == item->__addedIndex ) {
- if (item->__isRealized) {
- elm_object_focus_set(entry, EINA_TRUE);
- item->__addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
- } else {
- item->__focusEntry = entry;
- }
+ elm_object_focus_set(entry, EINA_TRUE);
+ item->__addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
}
setEntryText(entry, phoneticName);
@@ -711,12 +706,8 @@ Evas_Object* CtInputViewBasicInfoItem::__createNicknameField(CtInputViewBasicInf
evas_object_smart_callback_add(entry, "preedit,changed", __basicInfoNicknameChangedCb, item);
evas_object_smart_callback_add(entry, "activated", __activatedCb, item);
if (INPUT_ADDED_ITEM_INDEX_NICKNAME == item->__addedIndex ) {
- if (item->__isRealized) {
- elm_object_focus_set(entry, EINA_TRUE);
- item->__addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
- } else {
- item->__focusEntry = entry;
- }
+ elm_object_focus_set(entry, EINA_TRUE);
+ item->__addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
}
setEntryText(entry, nickname);
@@ -763,12 +754,8 @@ Evas_Object* CtInputViewBasicInfoItem::__createCompanyField(CtInputViewBasicInfo
evas_object_smart_callback_add(entry, "preedit,changed", __basicInfoCompanyChangedCb, item);
evas_object_smart_callback_add(entry, "activated", __activatedCb, item);
if (INPUT_ADDED_ITEM_INDEX_ORGANIZATION == item->__addedIndex ) {
- if (item->__isRealized) {
- elm_object_focus_set(entry, EINA_TRUE);
- item->__addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
- } else {
- item->__focusEntry = entry;
- }
+ elm_object_focus_set(entry, EINA_TRUE);
+ item->__addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
}
setEntryText(entry, company);
@@ -1498,19 +1485,3 @@ void CtInputViewBasicInfoItem::setAddedIndex(int addedIndex)
{
__addedIndex = addedIndex;
}
-
-void CtInputViewBasicInfoItem::onRealized()
-{
- __isRealized = true;
- if (__focusEntry) {
- elm_object_focus_set(__focusEntry, EINA_TRUE);
- __focusEntry = NULL;
- __addedIndex = INPUT_ADDED_ITEM_INDEX_NONE;
- }
-}
-
-void CtInputViewBasicInfoItem::onUnrealized()
-{
- __isRealized = false;
- __focusEntry = NULL;
-}
diff --git a/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.h b/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.h
index 8fe2d5e..3a9e3e7 100644
--- a/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.h
+++ b/lib-contact/ct-detail/src/CtInputViewBasicInfoItem.h
@@ -83,9 +83,6 @@ public:
bool getAddOrganization();
void setAddOrganization(bool addOrganization);
void setAddedIndex(int addedIndex);
-
- virtual void onRealized();
- virtual void onUnrealized();
private:
void __initialize();
@@ -138,7 +135,6 @@ private:
int __addedIndex;
std::shared_ptr<CtData> __inputData;
Evas_Object** __nameEntry;
- Evas_Object* __focusEntry;
std::function<void ()> __itemChangedCb;
std::function<void (ITEM_DELETED)> __itemDeletedCb;
@@ -195,7 +191,6 @@ private:
bool __addNickname;
bool __addOrganization;
bool __updateItem;
- bool __isRealized;
Evas_Coord __subItemSize;
};
diff --git a/lib-contact/ct-detail/src/CtInputViewControl.cpp b/lib-contact/ct-detail/src/CtInputViewControl.cpp
index 3779959..117e9c1 100644
--- a/lib-contact/ct-detail/src/CtInputViewControl.cpp
+++ b/lib-contact/ct-detail/src/CtInputViewControl.cpp
@@ -121,7 +121,6 @@ Evas_Object* CtInputViewControl::onCreate(Evas_Object* parent, void* viewParam)
__genlist = genlist;
evas_object_smart_callback_add(genlist, "realized", __genlistRealizedCb, this);
- evas_object_smart_callback_add(genlist, "unrealized", __genlistUnrealizedCb, this);
__addAllItems(genlist);
// set virtual keypad
@@ -137,8 +136,6 @@ Evas_Object* CtInputViewControl::onCreate(Evas_Object* parent, void* viewParam)
void CtInputViewControl::onDestroy()
{
- evas_object_smart_callback_del(__genlist, "unrealized", __genlistUnrealizedCb);
- evas_object_smart_callback_del(__genlist, "realized", __genlistRealizedCb);
SystemSettingsMgr::getInstance().unregisterChangedCallback(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, __regionFormatChangedCb);
}
@@ -440,15 +437,6 @@ void CtInputViewControl:: __genlistRealizedCb(void *data, Evas_Object *obj, void
}
}
-void CtInputViewControl::__genlistUnrealizedCb(void *data, Evas_Object *obj, void *event_info)
-{
- Elm_Object_Item *objectItem = (Elm_Object_Item*) event_info;
- CtInputViewGenlistItem *item = (CtInputViewGenlistItem*) elm_object_item_data_get(objectItem);
- if (item) {
- item->onUnrealized();
- }
-}
-
void CtInputViewControl::__updateNoteBtn(bool isNoteInput)
{
WHIT();
diff --git a/lib-contact/ct-detail/src/CtInputViewControl.h b/lib-contact/ct-detail/src/CtInputViewControl.h
index dddb0d5..6a0948b 100755
--- a/lib-contact/ct-detail/src/CtInputViewControl.h
+++ b/lib-contact/ct-detail/src/CtInputViewControl.h
@@ -64,7 +64,6 @@ private:
void __initialize();
void __addAllItems(Evas_Object* genlist);
static void __genlistRealizedCb(void *data, Evas_Object *obj, void *event_info);
- static void __genlistUnrealizedCb(void *data, Evas_Object *obj, void *event_info);
static void __importantSubitemSelectedCb(void* data, Evas_Object* obj, void* event_info);
diff --git a/lib-contact/ct-detail/src/CtInputViewGenlistItem.cpp b/lib-contact/ct-detail/src/CtInputViewGenlistItem.cpp
index be35f19..6025e3c 100755
--- a/lib-contact/ct-detail/src/CtInputViewGenlistItem.cpp
+++ b/lib-contact/ct-detail/src/CtInputViewGenlistItem.cpp
@@ -52,10 +52,6 @@ void CtInputViewGenlistItem::onRealized()
}
}
-void CtInputViewGenlistItem::onUnrealized()
-{
-}
-
bool CtInputViewGenlistItem::getIsChanged()
{
return __isChanged;
diff --git a/lib-contact/ct-detail/src/CtInputViewGenlistItem.h b/lib-contact/ct-detail/src/CtInputViewGenlistItem.h
index e4cf211..4d83be4 100755
--- a/lib-contact/ct-detail/src/CtInputViewGenlistItem.h
+++ b/lib-contact/ct-detail/src/CtInputViewGenlistItem.h
@@ -32,7 +32,6 @@ public:
public:
virtual void onRealized();
- virtual void onUnrealized();
virtual bool getIsChanged();
virtual bool getIsEmpty();
diff --git a/lib-contact/ct-detail/src/CtInputViewRelationItem.h b/lib-contact/ct-detail/src/CtInputViewRelationItem.h
index 4b4310c..2001aca 100644
--- a/lib-contact/ct-detail/src/CtInputViewRelationItem.h
+++ b/lib-contact/ct-detail/src/CtInputViewRelationItem.h
@@ -188,15 +188,14 @@ private:
static void __contactPickCb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
{
CtInputViewRelationItem *item = (CtInputViewRelationItem*)data;
- char **personIds = NULL;
- int count = 0;
- int ret = app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &personIds, &count);
+ char *personIdStr = NULL;
+ int ret = app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &personIdStr);
- if (ret == APP_CONTROL_ERROR_NONE && personIds && personIds[0]) {
+ if (ret == APP_CONTROL_ERROR_NONE) {
contacts_record_h record = NULL;
char *displayName = NULL;
- int err = contacts_db_get_record(_contacts_person._uri, atoi(personIds[0]), &record);
+ int err = contacts_db_get_record(_contacts_person._uri, atoi(personIdStr), &record);
WPWARN(err != CONTACTS_ERROR_NONE, "contacts_db_get_record() failed(%d)", err);
err = contacts_record_get_str_p(record, _contacts_person.display_name, &displayName);
@@ -209,10 +208,7 @@ private:
contacts_record_destroy(record, true);
}
- for (int i = 0; i < count; ++i) {
- free(personIds[i]);
- }
- free(personIds);
+ free(personIdStr);
}
private:
diff --git a/lib-contact/ct-detail/src/CtMyProfileInputView.cpp b/lib-contact/ct-detail/src/CtMyProfileInputView.cpp
index 9e8cc26..d6cb295 100755
--- a/lib-contact/ct-detail/src/CtMyProfileInputView.cpp
+++ b/lib-contact/ct-detail/src/CtMyProfileInputView.cpp
@@ -122,7 +122,6 @@ Evas_Object* CtMyProfileInputView::onCreate(Evas_Object* parent, void* viewParam
elm_object_part_content_set(base, "elm.swallow.content", genlist);
evas_object_smart_callback_add(genlist, "realized", __genlistRealizedCb, this);
- evas_object_smart_callback_add(genlist, "unrealized", __genlistUnrealizedCb, this);
return base;
}
@@ -186,16 +185,6 @@ void CtMyProfileInputView:: __genlistRealizedCb(void *data, Evas_Object *obj, vo
}
}
-
-void CtMyProfileInputView::__genlistUnrealizedCb(void *data, Evas_Object *obj, void *event_info)
-{
- Elm_Object_Item *objectItem = (Elm_Object_Item*) event_info;
- CtInputViewGenlistItem *item = (CtInputViewGenlistItem*) elm_object_item_data_get(objectItem);
- if (item) {
- item->onUnrealized();
- }
-}
-
void CtMyProfileInputView::__save()
{
int err = CONTACTS_ERROR_NONE;
@@ -245,7 +234,7 @@ void CtMyProfileInputView::onPushed(Elm_Object_Item* naviItem)
WHIT();
//add title button
__saveBtn = elm_button_add(getNaviframe()->getEvasObj());
- elm_object_style_set(__saveBtn, "naviframe/title_right");
+ elm_object_style_set(__saveBtn, "naviframe/title_done");
elm_object_text_set(__saveBtn, V_("IDS_TPLATFORM_ACBUTTON_DONE_ABB"));
evas_object_smart_callback_add(__saveBtn, "clicked", __saveCb, this);
elm_object_item_part_content_set(naviItem, "title_right_btn", __saveBtn);
@@ -255,7 +244,7 @@ void CtMyProfileInputView::onPushed(Elm_Object_Item* naviItem)
}
Evas_Object* cancelButton = elm_button_add(getNaviframe()->getEvasObj());
- elm_object_style_set(cancelButton, "naviframe/title_left");
+ elm_object_style_set(cancelButton, "naviframe/title_cancel");
elm_object_text_set(cancelButton, V_("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB"));
evas_object_smart_callback_add(cancelButton, "clicked", __cancelCb, this);
elm_object_item_part_content_set(naviItem, "title_left_btn", cancelButton);
@@ -1062,8 +1051,6 @@ void CtMyProfileInputView::__addAllItems()
void CtMyProfileInputView::onDestroy()
{
WHIT();
- evas_object_smart_callback_del(__genlist, "unrealized", __genlistUnrealizedCb);
- evas_object_smart_callback_del(__genlist, "realized", __genlistRealizedCb);
}
void CtMyProfileInputView::onEvent(int eventType)
diff --git a/lib-contact/ct-list/CMakeLists.txt b/lib-contact/ct-list/CMakeLists.txt
index 5b4bfa3..3280c75 100644
--- a/lib-contact/ct-list/CMakeLists.txt
+++ b/lib-contact/ct-list/CMakeLists.txt
@@ -19,7 +19,6 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${TIZEN_PKGS_LDFLAGS}
"app-assist-efl"
"contacts-common"
"ct-common"
- "ct-detail"
"ct-importer"
"ct-vcard"
)
diff --git a/lib-contact/ct-list/src/CtListBasicController.cpp b/lib-contact/ct-list/src/CtListBasicController.cpp
index 35a2fa0..72cc6e7 100755
--- a/lib-contact/ct-list/src/CtListBasicController.cpp
+++ b/lib-contact/ct-list/src/CtListBasicController.cpp
@@ -33,7 +33,6 @@
#include "ContactsDebug.h"
#include "ContactsAppControl.h"
#include "ContactsAppControlLauncher.h"
-#include "CtDetailView.h"
#include "CtType.h"
#include "CtListBasicController.h"
#include "CtListDataPerson.h"
@@ -199,7 +198,6 @@ bool CtListBasicController::__getCheckState(Elm_Object_Item *item)
void CtListBasicController::onSelectItem(Elm_Object_Item *selectedItem, CtListView *view, CtCheckState checkState)
{
WHIT();
- WPRET_M(!view, "invalid view");
Elm_Object_Item *item = selectedItem;
elm_genlist_item_selected_set(selectedItem, EINA_FALSE);
@@ -209,10 +207,7 @@ void CtListBasicController::onSelectItem(Elm_Object_Item *selectedItem, CtListVi
switch(__ctrlType){
case LIST_CTRL_DEFAULT:
- {
- WView *detailView = new CtDetailView(itemData->personData->getPersonId());
- view->getNaviframe()->push(detailView);
- }
+ launchContactDetails(itemData->personData->getPersonId());
break;
case LIST_CTRL_DELETE_CONTACTS:
case LIST_CTRL_SHARE_CONTACTS:
diff --git a/lib-contact/ct-list/src/CtListModelDb.cpp b/lib-contact/ct-list/src/CtListModelDb.cpp
index 2ba6348..6c94e24 100755
--- a/lib-contact/ct-list/src/CtListModelDb.cpp
+++ b/lib-contact/ct-list/src/CtListModelDb.cpp
@@ -1128,6 +1128,10 @@ bool CtListModelDb::checkIsSelectAllOnSearching()
int curCheckedCount = __curCheckCount;
int curCount = __personDataList.size();
int maxCount = __originalCount;
+ int limitCount = getLimitCount();
+
+ if(limitCount > 0 && limitCount < curCount)
+ curCount = limitCount;
WDEBUG("originCheckedCount %d, maxCount %d, curCount %d, curCheckedCount %d", originCheckedCount, maxCount, curCount, curCheckedCount);
diff --git a/lib-contact/ct-list/src/CtListUgMultiPickController.cpp b/lib-contact/ct-list/src/CtListUgMultiPickController.cpp
index d3e4101..5d754ea 100644
--- a/lib-contact/ct-list/src/CtListUgMultiPickController.cpp
+++ b/lib-contact/ct-list/src/CtListUgMultiPickController.cpp
@@ -330,7 +330,9 @@ bool CtListUgMultiPickController::__changeCheckState(Elm_Object_Item *item, CtCh
else {
int checkedCount = __listModel->getCheckedDataCount();
int maxCount = __listModel->getPersonListCount(LIST_QUERY_DEFAULT);
- WDEBUG("%d, %d", checkedCount, maxCount);
+ int limitCount = __listModel->getLimitCount();
+ if(limitCount > 0 && limitCount < maxCount)
+ maxCount = limitCount;
if(checkedCount == maxCount) {
WDEBUG("check select all");
@@ -609,11 +611,14 @@ void CtListUgMultiPickController::onSelectCheckAll(Elm_Object_Item *selectedItem
Evas_Object *genlist = view->__genlist;
int checkedCount = __listModel->getCheckedDataCount();
int limitCount = __listModel->getLimitCount();
- int maxCount = __listModel->getPersonListCount(LIST_QUERY_DEFAULT);
- if (limitCount > 0 && limitCount < maxCount && checkState == CHECK_ON) {
- __checkLimitCount(maxCount, limitCount);
- return;
+ if(limitCount > 0 && checkState == CHECK_ON) {
+ if(checkedCount == __listModel->getLimitCount()) {
+ __checkLimitCount(checkedCount+1, limitCount);
+ return;
+ }
+ else
+ __checkLimitCount(__listModel->getPersonListCount(LIST_QUERY_DEFAULT), limitCount);
}
WDEBUG("select all %d", checkState);
@@ -635,6 +640,12 @@ void CtListUgMultiPickController::onSelectCheckAll(Elm_Object_Item *selectedItem
continue;
}
+ if (limitCount > 0) {
+ if(checkState == CHECK_ON && checkedCount == limitCount) {
+ break;
+ }
+ }
+
if(__checkItem(item, view, checkState) == false) {
WDEBUG("already checked");
item = elm_genlist_item_next_get(item);
diff --git a/lib-contact/ct-list/src/CtListView.cpp b/lib-contact/ct-list/src/CtListView.cpp
index c4fef11..170282e 100755
--- a/lib-contact/ct-list/src/CtListView.cpp
+++ b/lib-contact/ct-list/src/CtListView.cpp
@@ -1768,6 +1768,9 @@ void CtListView::__updateCheckRelatedInfo()
if (__ctrlType == LIST_CTRL_REMOVE_FAVORITES) {
maxCount += __listModel->getPersonListCount(LIST_QUERY_MFC);
}
+ int limitCount = __listModel->getLimitCount();
+ if(limitCount > 0 && limitCount < maxCount)
+ maxCount = limitCount;
if (checkedIdNum == maxCount) {
__selectAllState = CHECK_ON;
diff --git a/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp b/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp
index 83fbd52..66f012e 100644
--- a/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp
+++ b/lib-phone/ph-dialer/src/PhDialerSpeeddialPopup.cpp
@@ -57,12 +57,11 @@ void PhDialerSpeeddialPopup::onPickResult(app_control_h request, app_control_h r
{
PhDialerSpeeddialPopup *popup = (PhDialerSpeeddialPopup*) data;
- char **numberIds = 0;
- int count = 0;
- int err = app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &numberIds, &count);
+ char *value = 0;
+ int err = app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &value);
WPWARN(err != APP_CONTROL_ERROR_NONE, "app_control_get_extra_data() failed(0x%x)", err);
- if (numberIds && numberIds[0]) {
- int numberId = atoi(numberIds[0]);
+ if (value) {
+ int numberId = atoi(value);
if (numberId > 0) {
if (PhCommon::addSpeedDialNumber(popup->m_SpeedNumber, numberId)) {
notification_status_message_post(T_("IDS_KPD_TPOP_SPEED_DIAL_NUMBER_ASSIGNED"));
@@ -70,12 +69,9 @@ void PhDialerSpeeddialPopup::onPickResult(app_control_h request, app_control_h r
notification_status_message_post(T_("IDS_PB_POP_ALREADY_EXISTS_LC"));
}
}
- }
- for (int i = 0; i < count; ++i) {
- free(numberIds[i]);
+ free(value);
}
- free(numberIds);
popup->destroy();
}
diff --git a/lib-phone/ph-speeddial/inc/PhSpeedDialItem.h b/lib-phone/ph-speeddial/inc/PhSpeedDialItem.h
index b1bb217..9a773f9 100644
--- a/lib-phone/ph-speeddial/inc/PhSpeedDialItem.h
+++ b/lib-phone/ph-speeddial/inc/PhSpeedDialItem.h
@@ -30,7 +30,6 @@ public:
* @param[in] number Speed dial dialer number (1-9)
*/
PhSpeedDialItem(int number);
- ~PhSpeedDialItem();
/**
* @brief Set speed dial item data.
@@ -46,7 +45,6 @@ private:
void setEmptyLayout(Evas_Object *layout);
void setLayoutData(Evas_Object *layout, contacts_record_h record);
void fetchData();
- void closeChooser();
static void onPickResult(app_control_h request, app_control_h reply,
app_control_result_e result, void *data);
@@ -54,7 +52,6 @@ private:
static void onDeletePressed(void *data, Evas_Object *obj, void *event_info);
int m_Number;
- app_control_h m_Chooser;
};
#endif /* _PH_SPEED_DIAL_ITEM_H_ */
diff --git a/lib-phone/ph-speeddial/src/PhSpeedDialItem.cpp b/lib-phone/ph-speeddial/src/PhSpeedDialItem.cpp
index f8e6f93..da6338c 100644
--- a/lib-phone/ph-speeddial/src/PhSpeedDialItem.cpp
+++ b/lib-phone/ph-speeddial/src/PhSpeedDialItem.cpp
@@ -35,15 +35,10 @@ namespace
}
PhSpeedDialItem::PhSpeedDialItem(int number)
- : m_Number(number), m_Chooser(nullptr)
+ : m_Number(number)
{
}
-PhSpeedDialItem::~PhSpeedDialItem()
-{
- closeChooser();
-}
-
void PhSpeedDialItem::setData(contacts_record_h record)
{
if (record) {
@@ -115,27 +110,18 @@ void PhSpeedDialItem::fetchData()
contacts_record_destroy(record, true);
}
-void PhSpeedDialItem::closeChooser()
-{
- if (m_Chooser) {
- app_control_send_terminate_request(m_Chooser);
- app_control_destroy(m_Chooser);
- m_Chooser = nullptr;
- }
-}
-
void PhSpeedDialItem::onPickResult(app_control_h request, app_control_h reply,
app_control_result_e result, void *data)
{
PhSpeedDialItem *item = (PhSpeedDialItem*) data;
- char **numberIds = nullptr;
- int count = 0;
- int err = app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &numberIds, &count);
+ char *value = nullptr;
+ int err = app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &value);
WPRET_M(err != APP_CONTROL_ERROR_NONE, "app_control_get_extra_data() failed(%d)", err);
- if (numberIds && numberIds[0]) {
- int numberId = atoi(numberIds[0]);
+ if (value) {
+ int numberId = atoi(value);
+ free(value);
if (PhCommon::addSpeedDialNumber(item->m_Number, numberId)) {
item->fetchData();
@@ -143,20 +129,12 @@ void PhSpeedDialItem::onPickResult(app_control_h request, app_control_h reply,
notification_status_message_post(PAT_("IDS_PB_POP_ALREADY_EXISTS_LC"));
}
}
-
- for (int i = 0; i < count; ++i) {
- free(numberIds[i]);
- }
- free(numberIds);
}
void PhSpeedDialItem::onItemPressed(void *data, Evas_Object *obj, void *event_info)
{
- PhSpeedDialItem *item = (PhSpeedDialItem*) data;
- item->closeChooser();
-
int err = launchContactPick(APP_CONTROL_DATA_SELECTION_MODE_SINGLE, APP_CONTROL_DATA_TYPE_PHONE,
- &PhSpeedDialItem::onPickResult, data, true, &item->m_Chooser);
+ &PhSpeedDialItem::onPickResult, data);
WPWARN(err != APP_CONTROL_ERROR_NONE, "launchContactPick() failed(%d)", err);
}
diff --git a/main-app/res/edje/phone/ph-loglist.edc b/main-app/res/edje/phone/ph-loglist.edc
index 94a1061..947d2f4 100755
--- a/main-app/res/edje/phone/ph-loglist.edc
+++ b/main-app/res/edje/phone/ph-loglist.edc
@@ -325,14 +325,14 @@ images {
styles {
style {
name: "contact_info_name_textblock_style";
- base: "font=Tizen:style=Light color=#ffffff font_size=56 align=center ellipsis=1.0";
+ base: "font=Tizen:style=Medium text_class=list_item color=#ffffff font_size=30 align=center wrap=mixed ellipsis=1.0";
}
}
styles {
style {
name: "contact_number_textblock_style";
- base: "font=Tizen:style=Regular color=#4C4C4CFF font_size=32 ellipsis=1.0";
+ base: "font=Tizen:style=Regular text_class=list_item color=#4C4C4CFF font_size=32 /*align=left wrap=mixed*/ ellipsis=1.0";
}
}
@@ -493,7 +493,6 @@ collections
name: "text.name";
type: TEXTBLOCK;
mouse_events: 0;
- scale: 1;
repeat_events: 1;
description {
state: "default" 0.0;
@@ -501,6 +500,7 @@ collections
rel2 { relative: CONTACT_INFO_TEXT_PADDING_RIGHT_REL_SIZE CONTACT_INFO_TEXT_PADDING_BOTTOM_REL_SIZE; }
text {
style: "contact_info_name_textblock_style";
+ fit: 0 1;
}
}
}
diff --git a/widget/inc/Widget.h b/widget/inc/Widget.h
index 249f919..a4375a0 100644
--- a/widget/inc/Widget.h
+++ b/widget/inc/Widget.h
@@ -65,7 +65,6 @@ private:
WidgetItems m_Items;
bool m_EditMode;
- bool m_IsPicking;
size_t m_MaxCount;
int m_WidgetHeight;
diff --git a/widget/src/Widget.cpp b/widget/src/Widget.cpp
index 4088981..01b8809 100644
--- a/widget/src/Widget.cpp
+++ b/widget/src/Widget.cpp
@@ -40,7 +40,7 @@ namespace
}
Widget::Widget()
- : m_EditMode(false), m_IsPicking(false), m_MaxCount(0),
+ : m_EditMode(false), m_MaxCount(0),
m_WidgetHeight(0), m_Layout(nullptr), m_Gengrid(nullptr), m_AddButton(nullptr)
{
using namespace std::placeholders;
@@ -182,7 +182,7 @@ void Widget::setAddButton()
if (!m_AddButton) {
m_AddButton = elm_gengrid_item_append(m_Gengrid, getAddButtonItemClass(), this, &Widget::onAddPressed, this);
}
- } else if (m_AddButton) {
+ } else if(m_AddButton) {
elm_object_item_del(m_AddButton);
m_AddButton = nullptr;
}
@@ -195,12 +195,9 @@ void Widget::onAddPressed(void *data, Evas_Object *obj, void *event_info)
elm_gengrid_item_selected_set(widget->m_AddButton, EINA_FALSE);
}
- if (!widget->m_IsPicking) {
- int err = launchContactPick(APP_CONTROL_DATA_SELECTION_MODE_SINGLE, APP_CONTROL_DATA_TYPE_PHONE_OR_EMAIL,
- &Widget::onPickReply, data, false);
- WPRET_M(err != APP_CONTROL_ERROR_NONE, "launchContactPick() failed(%d)", err);
- widget->m_IsPicking = true;
- }
+ int err = launchContactPick(APP_CONTROL_DATA_SELECTION_MODE_SINGLE, APP_CONTROL_DATA_TYPE_PHONE_OR_EMAIL,
+ &Widget::onPickReply, data, false);
+ WPWARN(err != APP_CONTROL_ERROR_NONE, "launchContactPick() failed(%d)", err);
}
void Widget::onEditPressed(void *data, Evas_Object *obj, void *event_info)
@@ -217,31 +214,25 @@ void Widget::onEditPressed(void *data, Evas_Object *obj, void *event_info)
void Widget::onPickReply(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
{
Widget *widget = (Widget*) data;
- widget->m_IsPicking = false;
-
char *type = nullptr;
- char **ids = nullptr;
- int count = 0;
+ char *value = nullptr;
- int err = app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &ids, &count);
+ int err = app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &value);
WPRET_M(err != APP_CONTROL_ERROR_NONE, "app_control_get_extra_data() failed(%d)", err);
app_control_get_extra_data(reply, APP_CONTROL_DATA_TYPE, &type);
- if (type && ids && ids[0]) {
+ if (type) {
if (strcmp(type, APP_CONTROL_DATA_TYPE_PHONE_CALL) == 0) {
- widget->onAddItem(WidgetItemCall, atoi(ids[0]));
+ widget->onAddItem(WidgetItemCall, atoi(value));
} else if (strcmp(type, APP_CONTROL_DATA_TYPE_PHONE_MESSAGE) == 0) {
- widget->onAddItem(WidgetItemMessage, atoi(ids[0]));
+ widget->onAddItem(WidgetItemMessage, atoi(value));
} else if (strcmp(type, APP_CONTROL_DATA_TYPE_EMAIL) == 0) {
- widget->onAddItem(WidgetItemEmail, atoi(ids[0]));
+ widget->onAddItem(WidgetItemEmail, atoi(value));
}
}
free(type);
- for (int i = 0; i < count; ++i) {
- free(ids[i]);
- }
- free(ids);
+ free(value);
}
void Widget::onItemUpdate(WidgetItem &item)