diff -r c18f9fa7f42e -r 640d30f4fb64 phonebookui/cntcommonui/collections/cntfavoritesview.cpp --- a/phonebookui/cntcommonui/collections/cntfavoritesview.cpp Fri Oct 08 11:42:51 2010 +0300 +++ b/phonebookui/cntcommonui/collections/cntfavoritesview.cpp Fri Oct 15 12:24:46 2010 +0300 @@ -71,9 +71,9 @@ mContact = new QContact(aArgs.value(ESelectedGroupContact).value()); mViewManager = &mEngine->viewManager(); - HbPushButton *addButton = static_cast(mDocumentLoader.findWidget(QString("cnt_button_add"))); - connect(addButton, SIGNAL(clicked()), this, SLOT(openSelectionPopup())); - connect(addButton, SIGNAL(longPress(QPointF)), this, SLOT(openSelectionPopup())); + mAddButton = static_cast(mDocumentLoader.findWidget(QString("cnt_button_add"))); + connect(mAddButton, SIGNAL(released()), this, SLOT(openSelectionPopup())); + // If no contacts are present, then disable the button QContactDetailFilter filter; @@ -83,7 +83,7 @@ QList contactIds = getContactManager()->contactIds(filter); if (contactIds.isEmpty()) { - addButton->setEnabled(false); + mAddButton->setEnabled(false); } } @@ -94,15 +94,18 @@ void CntFavoritesView::openSelectionPopup() { - CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup( - hbTrId("txt_phob_title_favorite_contacts"), - hbTrId("txt_common_button_save"), - *getContactManager()); - connect(popup, SIGNAL(fetchReady(QSet)), - this, SLOT(handleMemberSelection(QSet))); - QSet ids; - popup->setSelectedContacts(ids); - popup->showPopup(); + if(mAddButton->isUnderMouse()) + { + CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup( + hbTrId("txt_phob_title_favorite_contacts"), + hbTrId("txt_common_button_save"), + *getContactManager()); + connect(popup, SIGNAL(fetchReady(QSet)), + this, SLOT(handleMemberSelection(QSet))); + QSet ids; + popup->setSelectedContacts(ids); + popup->showPopup(); + } } void CntFavoritesView::handleMemberSelection( QSet aIds )