author | zautrix <zautrix> | 2005-08-17 14:48:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 14:48:16 (UTC) |
commit | 9e6d1f7f45ef1444dc6ee96347a2dbd67a0d79dd (patch) (side-by-side diff) | |
tree | 4db3dfc9b67b56f415a9aab4306cc6375c6e7310 | |
parent | cb4e02944327194bc6066c4ec96826afc0ea178f (diff) | |
download | kdepimpi-9e6d1f7f45ef1444dc6ee96347a2dbd67a0d79dd.zip kdepimpi-9e6d1f7f45ef1444dc6ee96347a2dbd67a0d79dd.tar.gz kdepimpi-9e6d1f7f45ef1444dc6ee96347a2dbd67a0d79dd.tar.bz2 |
kapi dlete conf
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 6 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 20 | ||||
-rw-r--r-- | kaddressbook/kabprefs.cpp | 1 | ||||
-rw-r--r-- | kaddressbook/kabprefs.h | 1 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.h | 1 |
7 files changed, 36 insertions, 2 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 59ef12f..2e5cf50 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -2,12 +2,15 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 2.2.1 ************ KO/Pi: Fixed a problem displaying very long allday events in agenda view in single day mode. +KA/Pi: +Added a config option to turn on asking before a contact is deleted. + ********** VERSION 2.2.0 ************ New stable release! Fixed some minor usability problems. Added writing of next alarm to a file for usage on pdaXrom. diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index e874b85..f369169 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -805,11 +805,17 @@ { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
{ "Writing back file ...","Schreibe Datei zurück..." },
{ "Sending back file ...","Sende Datei zurück..." },
{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" },
{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
+{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" },
+{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" },
+{ "","" },
+{ "","" },
+{ "","" },
+{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
\ No newline at end of file diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index d5de9cb..b9830b1 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1025,13 +1025,29 @@ void KABCore::deleteContacts() QStringList uidList = mViewManager->selectedUids(); deleteContacts( uidList ); } void KABCore::deleteContacts( const QStringList &uids ) { + if ( uids.count() > 0 ) { + + if ( KABPrefs::instance()->mAskForDelete ) { + int count = uids.count(); + if ( count > 5 ) count = 5; + QString cNames; + int i; + for ( i = 0; i < count ; ++i ) { + cNames += KGlobal::formatMessage( mAddressBook->findByUid( uids[i] ).realName() ,0) + "\n"; + } + if ( uids.count() > 5 ) + cNames += i18n("...and %1 more\ncontact(s) selected").arg( uids.count() - 5 ); + QString text = i18n( "Do you really\nwant to delete the\nsetected contact(s)?\n\n" ) + cNames ; + if ( KMessageBox::questionYesNo( this, text ) != KMessageBox::Yes ) + return; + } PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); UndoStack::instance()->push( command ); RedoStack::instance()->clear(); // now if we deleted anything, refresh setContactSelected( QString::null ); @@ -1095,13 +1111,13 @@ void KABCore::setWhoAmI() if ( addrList.count() > 1 ) { KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); return; } QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); - if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) + if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].realName() ) ) == KMessageBox::Yes ) static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); } void KABCore::editCategories() { KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); dlg.exec(); @@ -2663,13 +2679,13 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString anni = "INVALID"; birthdayList.append(formattedbday); anniversaryList.append(anni); //should be ISODate realNameList.append((*it).realName()); preferredEmailList.append((*it).preferredEmail()); - assembledNameList.append((*it).assembledName()); + assembledNameList.append((*it).realName()); uidList.append((*it).uid()); //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); } } diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index ea254b7..42d541b 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -53,12 +53,13 @@ KABPrefs::KABPrefs() addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); KPrefs::setCurrentGroup( "General" ); addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true ); addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 ); #ifdef KAB_EMBEDDED + addItemBool("AskForDelete",&mAskForDelete,true); addItemBool("AskForQuit",&mAskForQuit,true); addItemBool("ToolBarHor",&mToolBarHor, true ); addItemBool("ToolBarUp",&mToolBarUp, false ); addItemBool("SearchWithReturn",&mSearchWithReturn, false ); addItemBool("AutoSearchWithWildcard",&mAutoSearchWithWildcard, false ); addItemBool("HideSearchOnSwitch",&mHideSearchOnSwitch, false ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index 2bb173d..ddbc0c0 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -69,12 +69,13 @@ class KABPrefs : public KPimPrefs bool mJumpButtonBarVisible; bool mDetailsPageVisible; bool mMultipleViewsAtOnce; bool mSearchWithReturn; bool mAutoSearchWithWildcard; bool mHideSearchOnSwitch; + bool mAskForDelete; QValueList<int> mExtensionsSplitter; QValueList<int> mDetailsSplitter; // Extensions stuff int mCurrentExtension; QStringList mActiveExtensions; diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 1b4652a..9e4db74 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -139,12 +139,15 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new contacts" ), vBox, "mparse" ); boxLayout->addWidget( mNameParsing ); mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); boxLayout->addWidget( mMultipleViewsAtOnce ); + mAskForDelete = new QCheckBox( i18n( "Ask before delete contact" ), vBox, "mdel" ); + boxLayout->addWidget( mAskForDelete ); + mAskForQuit = new QCheckBox( i18n( "Show exit confirmation" ), vBox, "mquit" ); boxLayout->addWidget( mAskForQuit ); layout->addWidget( vBox ); tabWidget->addTab( generalPage, i18n( "General" ) ); @@ -182,12 +185,13 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mAutoSearchWithWildcardBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mHideSearchOnSwitchBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); + connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), SLOT( selectionChanged( QListViewItem* ) ) ); connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), SLOT( itemClicked( QListViewItem* ) ) ); connect( mConfigureButton, SIGNAL( clicked() ), SLOT( configureExtension() ) ); @@ -212,12 +216,13 @@ void KABConfigWidget::usrReadConfig() mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); mAutoSearchWithWildcardBox->setChecked( prefs->mAutoSearchWithWildcard ); mHideSearchOnSwitchBox->setChecked( prefs->mHideSearchOnSwitch ); mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); mAskForQuit->setChecked( prefs->mAskForQuit ); + mAskForDelete->setChecked( prefs->mAskForDelete ); mAddresseeWidget->restoreSettings(); restoreExtensionSettings(); blockSignals( blocked ); @@ -233,12 +238,13 @@ void KABConfigWidget::usrWriteConfig() prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); prefs->mAutoSearchWithWildcard = mAutoSearchWithWildcardBox->isChecked(); prefs->mHideSearchOnSwitch = mHideSearchOnSwitchBox->isChecked(); prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); prefs->mAskForQuit = mAskForQuit->isChecked(); + prefs->mAskForDelete = mAskForDelete->isChecked(); mAddresseeWidget->saveSettings(); saveExtensionSettings(); } diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h index a172e97..f2a6b1b 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.h +++ b/kaddressbook/kcmconfigs/kabconfigwidget.h @@ -66,12 +66,13 @@ class KABConfigWidget : public KPrefsWidget QCheckBox *mViewsSingleClickBox; QCheckBox *mAutoSearchWithWildcardBox; QCheckBox *mHideSearchOnSwitchBox; QCheckBox *mMultipleViewsAtOnce; QCheckBox *mAskForQuit; QCheckBox *mMenuBarBox; + QCheckBox *mAskForDelete; QPushButton *mConfigureButton; AddresseeWidget *mAddresseeWidget; }; #endif |