-rw-r--r-- | kaddressbook/views/cardview.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.cpp | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp index 6351c11..da552c3 100644 --- a/kaddressbook/views/cardview.cpp +++ b/kaddressbook/views/cardview.cpp @@ -31,12 +31,13 @@ #include <qdatetime.h> #include <qlabel.h> #include <qstyle.h> #include <qcursor.h> #include <qtooltip.h> +#include "kabprefs.h" #include <kdebug.h> #include <kglobalsettings.h> //END includes #define MIN_ITEM_WIDTH 80 @@ -653,13 +654,12 @@ CardView::CardView(QWidget *parent, const char *name) viewport()->setMouseTracking( true ); viewport()->setFocusProxy(this); viewport()->setFocusPolicy(WheelFocus); viewport()->setBackgroundMode(PaletteBase); connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); - connect( this, SIGNAL(executed(CardViewItem *)), this, SIGNAL( doubleClicked(CardViewItem *)) ); //US setBackgroundMode(PaletteBackground, PaletteBase); setBackgroundMode(PaletteBackground); // no reason for a vertical scrollbar setVScrollBarMode(AlwaysOff); @@ -1244,13 +1244,13 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e) if ((e->state() & Qt::ShiftButton) || (e->state() & Qt::ControlButton)) return; // Get the item at this position CardViewItem *item = itemAt(e->pos()); - if (item && KGlobalSettings::singleClick()) + if (item && KABPrefs::instance()->mHonorSingleClick) { emit executed(item); } } void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) @@ -1261,13 +1261,13 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) if (item) { d->mCurrentItem = item; } - if (item && !KGlobalSettings::singleClick()) + if (item && !KABPrefs::instance()->mHonorSingleClick) { emit executed(item); } else emit doubleClicked(item); } diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp index 7f33bb4..15f154e 100644 --- a/kaddressbook/views/kaddressbookcardview.cpp +++ b/kaddressbook/views/kaddressbookcardview.cpp @@ -239,22 +239,27 @@ void KAddressBookCardView::readConfig(KConfig *config) mCardView->setItemWidth( config->readNumEntry( "ItemWidth", 200 ) ); mCardView->setItemMargin( config->readNumEntry( "ItemMargin", 0 ) ); mCardView->setItemSpacing( config->readNumEntry( "ItemSpacing", 10 ) ); mCardView->setSeparatorWidth( config->readNumEntry( "SeparatorWidth", 2 ) ); +#if 0 + // LR KABPrefs::instance()->mHonorSingleClick is handled and fixed in cardviews contentsMouseDoubleClickEven disconnect(mCardView, SIGNAL(executed(CardViewItem *)), this, SLOT(addresseeExecuted(CardViewItem *))); if (KABPrefs::instance()->mHonorSingleClick) connect(mCardView, SIGNAL(executed(CardViewItem *)), this, SLOT(addresseeExecuted(CardViewItem *))); else connect(mCardView, SIGNAL(doubleClicked(CardViewItem *)), this, SLOT(addresseeExecuted(CardViewItem *))); +#endif + connect(mCardView, SIGNAL(doubleClicked(CardViewItem *)), + this, SLOT(addresseeExecuted(CardViewItem *))); } void KAddressBookCardView::writeConfig( KConfig *config ) { config->writeEntry( "ItemWidth", mCardView->itemWidth() ); KAddressBookView::writeConfig( config ); |