summaryrefslogtreecommitdiff
path: root/lib-contact
diff options
context:
space:
mode:
Diffstat (limited to 'lib-contact')
-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
14 files changed, 38 insertions, 96 deletions
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;