author | zautrix <zautrix> | 2005-08-17 14:48:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 14:48:16 (UTC) |
commit | 9e6d1f7f45ef1444dc6ee96347a2dbd67a0d79dd (patch) (unidiff) | |
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 | |||
@@ -7,2 +7,5 @@ Fixed a problem displaying very long allday events in agenda view in single day | |||
7 | 7 | ||
8 | KA/Pi: | ||
9 | Added a config option to turn on asking before a contact is deleted. | ||
10 | |||
8 | ********** VERSION 2.2.0 ************ | 11 | ********** VERSION 2.2.0 ************ |
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 | |||
@@ -810,2 +810,8 @@ | |||
810 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, | 810 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, |
811 | { "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" }, | ||
812 | { "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" }, | ||
813 | { "","" }, | ||
814 | { "","" }, | ||
815 | { "","" }, | ||
816 | { "","" }, | ||
811 | { "","" }, | 817 | { "","" }, |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index d5de9cb..b9830b1 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1030,3 +1030,19 @@ void KABCore::deleteContacts( const QStringList &uids ) | |||
1030 | { | 1030 | { |
1031 | |||
1031 | if ( uids.count() > 0 ) { | 1032 | if ( uids.count() > 0 ) { |
1033 | |||
1034 | if ( KABPrefs::instance()->mAskForDelete ) { | ||
1035 | int count = uids.count(); | ||
1036 | if ( count > 5 ) count = 5; | ||
1037 | QString cNames; | ||
1038 | int i; | ||
1039 | for ( i = 0; i < count ; ++i ) { | ||
1040 | cNames += KGlobal::formatMessage( mAddressBook->findByUid( uids[i] ).realName() ,0) + "\n"; | ||
1041 | } | ||
1042 | if ( uids.count() > 5 ) | ||
1043 | cNames += i18n("...and %1 more\ncontact(s) selected").arg( uids.count() - 5 ); | ||
1044 | QString text = i18n( "Do you really\nwant to delete the\nsetected contact(s)?\n\n" ) + cNames ; | ||
1045 | if ( KMessageBox::questionYesNo( this, text ) != KMessageBox::Yes ) | ||
1046 | return; | ||
1047 | } | ||
1032 | PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); | 1048 | PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); |
@@ -1100,3 +1116,3 @@ void KABCore::setWhoAmI() | |||
1100 | QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); | 1116 | QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); |
1101 | if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) | 1117 | if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].realName() ) ) == KMessageBox::Yes ) |
1102 | static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); | 1118 | static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); |
@@ -2668,3 +2684,3 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString | |||
2668 | preferredEmailList.append((*it).preferredEmail()); | 2684 | preferredEmailList.append((*it).preferredEmail()); |
2669 | assembledNameList.append((*it).assembledName()); | 2685 | assembledNameList.append((*it).realName()); |
2670 | uidList.append((*it).uid()); | 2686 | uidList.append((*it).uid()); |
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index ea254b7..42d541b 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp | |||
@@ -58,2 +58,3 @@ KABPrefs::KABPrefs() | |||
58 | #ifdef KAB_EMBEDDED | 58 | #ifdef KAB_EMBEDDED |
59 | addItemBool("AskForDelete",&mAskForDelete,true); | ||
59 | addItemBool("AskForQuit",&mAskForQuit,true); | 60 | addItemBool("AskForQuit",&mAskForQuit,true); |
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index 2bb173d..ddbc0c0 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h | |||
@@ -74,2 +74,3 @@ class KABPrefs : public KPimPrefs | |||
74 | bool mHideSearchOnSwitch; | 74 | bool mHideSearchOnSwitch; |
75 | bool mAskForDelete; | ||
75 | QValueList<int> mExtensionsSplitter; | 76 | QValueList<int> mExtensionsSplitter; |
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 | |||
@@ -144,2 +144,5 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
144 | 144 | ||
145 | mAskForDelete = new QCheckBox( i18n( "Ask before delete contact" ), vBox, "mdel" ); | ||
146 | boxLayout->addWidget( mAskForDelete ); | ||
147 | |||
145 | mAskForQuit = new QCheckBox( i18n( "Show exit confirmation" ), vBox, "mquit" ); | 148 | mAskForQuit = new QCheckBox( i18n( "Show exit confirmation" ), vBox, "mquit" ); |
@@ -187,2 +190,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * | |||
187 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 190 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
191 | connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | ||
188 | connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), | 192 | connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), |
@@ -217,2 +221,3 @@ void KABConfigWidget::usrReadConfig() | |||
217 | mAskForQuit->setChecked( prefs->mAskForQuit ); | 221 | mAskForQuit->setChecked( prefs->mAskForQuit ); |
222 | mAskForDelete->setChecked( prefs->mAskForDelete ); | ||
218 | 223 | ||
@@ -238,2 +243,3 @@ void KABConfigWidget::usrWriteConfig() | |||
238 | prefs->mAskForQuit = mAskForQuit->isChecked(); | 243 | prefs->mAskForQuit = mAskForQuit->isChecked(); |
244 | prefs->mAskForDelete = mAskForDelete->isChecked(); | ||
239 | 245 | ||
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 | |||
@@ -71,2 +71,3 @@ class KABConfigWidget : public KPrefsWidget | |||
71 | QCheckBox *mMenuBarBox; | 71 | QCheckBox *mMenuBarBox; |
72 | QCheckBox *mAskForDelete; | ||
72 | QPushButton *mConfigureButton; | 73 | QPushButton *mConfigureButton; |