summaryrefslogtreecommitdiff
path: root/lib-contact/ct-list/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-contact/ct-list/src')
-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
4 files changed, 24 insertions, 11 deletions
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;