summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-11-08 21:51:06 (UTC)
committer zautrix <zautrix>2004-11-08 21:51:06 (UTC)
commit4e06ab7da7f56f579010e93b1b9009ed9fd6a33e (patch) (unidiff)
treec5a9bc71126dfd136d7d6394675d8d1b3d70d1d1
parent91edd790af2bb6c19954638da1e22158382203a0 (diff)
downloadkdepimpi-4e06ab7da7f56f579010e93b1b9009ed9fd6a33e.zip
kdepimpi-4e06ab7da7f56f579010e93b1b9009ed9fd6a33e.tar.gz
kdepimpi-4e06ab7da7f56f579010e93b1b9009ed9fd6a33e.tar.bz2
word fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp19
-rw-r--r--kaddressbook/xxportselectdialog.cpp16
2 files changed, 25 insertions, 10 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d99a9cd..7be5db8 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -671,25 +671,24 @@ void KABCore::setContactSelected( const QString &uid )
671 mActionCopy->setEnabled( selected ); 671 mActionCopy->setEnabled( selected );
672 mActionDelete->setEnabled( selected ); 672 mActionDelete->setEnabled( selected );
673 mActionEditAddressee->setEnabled( selected ); 673 mActionEditAddressee->setEnabled( selected );
674 mActionMail->setEnabled( selected ); 674 mActionMail->setEnabled( selected );
675 mActionMailVCard->setEnabled( selected ); 675 mActionMailVCard->setEnabled( selected );
676 //if (mActionBeam) 676 //if (mActionBeam)
677 //mActionBeam->setEnabled( selected ); 677 //mActionBeam->setEnabled( selected );
678 678
679 if (mActionBeamVCard) 679 if (mActionBeamVCard)
680 mActionBeamVCard->setEnabled( selected ); 680 mActionBeamVCard->setEnabled( selected );
681 681
682 mActionWhoAmI->setEnabled( selected ); 682 mActionWhoAmI->setEnabled( selected );
683 mActionCategories->setEnabled( selected );
684} 683}
685 684
686void KABCore::sendMail() 685void KABCore::sendMail()
687{ 686{
688 sendMail( mViewManager->selectedEmails().join( ", " ) ); 687 sendMail( mViewManager->selectedEmails().join( ", " ) );
689} 688}
690 689
691void KABCore::sendMail( const QString& emaillist ) 690void KABCore::sendMail( const QString& emaillist )
692{ 691{
693 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " 692 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... "
694 if (emaillist.contains(",") > 0) 693 if (emaillist.contains(",") > 0)
695 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); 694 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null );
@@ -1004,38 +1003,50 @@ void KABCore::setWhoAmI()
1004 1003
1005 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1004 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
1006 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) 1005 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
1007 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1006 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1008} 1007}
1009void KABCore::editCategories() 1008void KABCore::editCategories()
1010{ 1009{
1011 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); 1010 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true );
1012 dlg.exec(); 1011 dlg.exec();
1013} 1012}
1014void KABCore::setCategories() 1013void KABCore::setCategories()
1015{ 1014{
1015
1016 QStringList uids;
1017 XXPortSelectDialog dlgx( this, false, this );
1018 if ( dlgx.exec() )
1019 uids = dlgx.uids();
1020 else
1021 return;
1022 if ( uids.isEmpty() )
1023 return;
1024 // qDebug("count %d ", uids.count());
1025
1026
1016 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 1027 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
1017 if ( !dlg.exec() ) { 1028 if ( !dlg.exec() ) {
1018 message( i18n("Setting categories cancelled") ); 1029 message( i18n("Setting categories cancelled") );
1019 return; 1030 return;
1020 } 1031 }
1021 bool merge = false; 1032 bool merge = false;
1022 QString msg = i18n( "Merge with existing categories?" ); 1033 QString msg = i18n( "Merge with existing categories?" );
1023 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 1034 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
1024 merge = true; 1035 merge = true;
1025 1036
1026 message( i18n("Setting categories ... please wait!") ); 1037 message( i18n("Setting categories ... please wait!") );
1027 QStringList categories = dlg.selectedCategories(); 1038 QStringList categories = dlg.selectedCategories();
1028 1039
1029 QStringList uids = mViewManager->selectedUids(); 1040 //QStringList uids = mViewManager->selectedUids();
1030 QStringList::Iterator it; 1041 QStringList::Iterator it;
1031 for ( it = uids.begin(); it != uids.end(); ++it ) { 1042 for ( it = uids.begin(); it != uids.end(); ++it ) {
1032 KABC::Addressee addr = mAddressBook->findByUid( *it ); 1043 KABC::Addressee addr = mAddressBook->findByUid( *it );
1033 if ( !addr.isEmpty() ) { 1044 if ( !addr.isEmpty() ) {
1034 if ( !merge ) 1045 if ( !merge )
1035 addr.setCategories( categories ); 1046 addr.setCategories( categories );
1036 else { 1047 else {
1037 QStringList addrCategories = addr.categories(); 1048 QStringList addrCategories = addr.categories();
1038 QStringList::Iterator catIt; 1049 QStringList::Iterator catIt;
1039 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 1050 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
1040 if ( !addrCategories.contains( *catIt ) ) 1051 if ( !addrCategories.contains( *catIt ) )
1041 addrCategories.append( *catIt ); 1052 addrCategories.append( *catIt );
@@ -2099,24 +2110,28 @@ void KABCore::addActionsManually()
2099 settingsMenu->insertSeparator(); 2110 settingsMenu->insertSeparator();
2100 2111
2101 mActionJumpBar->plug( settingsMenu ); 2112 mActionJumpBar->plug( settingsMenu );
2102 mActionDetails->plug( settingsMenu ); 2113 mActionDetails->plug( settingsMenu );
2103 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2114 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2104 mActionDetails->plug( tb ); 2115 mActionDetails->plug( tb );
2105 settingsMenu->insertSeparator(); 2116 settingsMenu->insertSeparator();
2106 mActionBR->plug(settingsMenu ); 2117 mActionBR->plug(settingsMenu );
2107 settingsMenu->insertSeparator(); 2118 settingsMenu->insertSeparator();
2108 2119
2109 mActionWhoAmI->plug( settingsMenu ); 2120 mActionWhoAmI->plug( settingsMenu );
2110 mActionEditCategories->plug( settingsMenu ); 2121 mActionEditCategories->plug( settingsMenu );
2122 mActionEditCategories->plug( changeMenu );
2123 mActionCategories->plug( changeMenu );
2124 mActionManageCategories->plug( changeMenu );
2125
2111 mActionCategories->plug( settingsMenu ); 2126 mActionCategories->plug( settingsMenu );
2112 mActionManageCategories->plug( settingsMenu ); 2127 mActionManageCategories->plug( settingsMenu );
2113 2128
2114 2129
2115 mActionWN->plug( helpMenu ); 2130 mActionWN->plug( helpMenu );
2116 mActionSyncHowto->plug( helpMenu ); 2131 mActionSyncHowto->plug( helpMenu );
2117 mActionKdeSyncHowto->plug( helpMenu ); 2132 mActionKdeSyncHowto->plug( helpMenu );
2118 mActionMultiSyncHowto->plug( helpMenu ); 2133 mActionMultiSyncHowto->plug( helpMenu );
2119 mActionFaq->plug( helpMenu ); 2134 mActionFaq->plug( helpMenu );
2120 mActionLicence->plug( helpMenu ); 2135 mActionLicence->plug( helpMenu );
2121 mActionAboutKAddressbook->plug( helpMenu ); 2136 mActionAboutKAddressbook->plug( helpMenu );
2122 2137
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index be254c0..ab95d5f 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -44,25 +44,25 @@ $Id$
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qradiobutton.h> 45#include <qradiobutton.h>
46#include <qstringlist.h> 46#include <qstringlist.h>
47#include <qwhatsthis.h> 47#include <qwhatsthis.h>
48 48
49#include "kabcore.h" 49#include "kabcore.h"
50#include "kabprefs.h" 50#include "kabprefs.h"
51 51
52#include "xxportselectdialog.h" 52#include "xxportselectdialog.h"
53 53
54XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, 54XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
55 QWidget* parent, const char* name ) 55 QWidget* parent, const char* name )
56 : KDialogBase( Plain, i18n( "Choose which contacts to export" ), Help | Ok | Cancel, 56 : KDialogBase( Plain, i18n( "Choose which contacts to select" ), Help | Ok | Cancel,
57 Ok, parent, name, true, true ), mCore( core ), 57 Ok, parent, name, true, true ), mCore( core ),
58 mUseSorting( sort ) 58 mUseSorting( sort )
59{ 59{
60 initGUI(); 60 initGUI();
61 61
62 connect( mFiltersCombo, SIGNAL( activated( int ) ), 62 connect( mFiltersCombo, SIGNAL( activated( int ) ),
63 SLOT( filterChanged( int ) ) ); 63 SLOT( filterChanged( int ) ) );
64 connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ), 64 connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ),
65 SLOT( categoryClicked( QListViewItem* ) ) ); 65 SLOT( categoryClicked( QListViewItem* ) ) );
66 66
67 // setup filters 67 // setup filters
68#ifndef KAB_EMBEDDED 68#ifndef KAB_EMBEDDED
@@ -195,63 +195,63 @@ void XXPortSelectDialog::slotHelp()
195 qDebug("XXPortSelectDialog::slotHelp is not implemented yet"); 195 qDebug("XXPortSelectDialog::slotHelp is not implemented yet");
196#endif //KAB_EMBEDDED 196#endif //KAB_EMBEDDED
197 197
198} 198}
199 199
200void XXPortSelectDialog::initGUI() 200void XXPortSelectDialog::initGUI()
201{ 201{
202 QFrame *page = plainPage(); 202 QFrame *page = plainPage();
203 203
204 QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHint(), 204 QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHint(),
205 KDialog::spacingHint() ); 205 KDialog::spacingHint() );
206 206
207 QLabel *label = new QLabel( i18n( "Which contacts do you want to export?" ), page ); 207 QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page );
208 topLayout->addWidget( label ); 208 topLayout->addWidget( label );
209 209
210 mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page ); 210 mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page );
211 mButtonGroup->setColumnLayout( 0, Qt::Vertical ); 211 mButtonGroup->setColumnLayout( 0, Qt::Vertical );
212 mButtonGroup->layout()->setSpacing( KDialog::spacingHint() ); 212 mButtonGroup->layout()->setSpacing( KDialog::spacingHint() );
213 mButtonGroup->layout()->setMargin( KDialog::marginHint() ); 213 mButtonGroup->layout()->setMargin( KDialog::marginHint() );
214 214
215 QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); 215 QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() );
216 groupLayout->setAlignment( Qt::AlignTop ); 216 groupLayout->setAlignment( Qt::AlignTop );
217 217
218 mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup ); 218 mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup );
219 mUseWholeBook->setChecked( true ); 219 mUseWholeBook->setChecked( true );
220 QWhatsThis::add( mUseWholeBook, i18n( "Export the entire address book" ) ); 220 QWhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) );
221 groupLayout->addWidget( mUseWholeBook, 0, 0 ); 221 groupLayout->addWidget( mUseWholeBook, 0, 0 );
222 222
223 mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup ); 223 mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup );
224 QWhatsThis::add( mUseSelection, i18n( "Only export contacts selected in KAddressBook.\n" 224 QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n"
225 "This option is disabled if no contacts are selected." ) ); 225 "This option is disabled if no contacts are selected." ) );
226 groupLayout->addWidget( mUseSelection, 1, 0 ); 226 groupLayout->addWidget( mUseSelection, 1, 0 );
227 227
228 mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup ); 228 mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup );
229 QWhatsThis::add( mUseFilters, i18n( "Only export contacts matching the selected filter.\n" 229 QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n"
230 "This option is disabled if you haven't defined any filters" ) ); 230 "This option is disabled if you haven't defined any filters" ) );
231 groupLayout->addWidget( mUseFilters, 2, 0 ); 231 groupLayout->addWidget( mUseFilters, 2, 0 );
232 232
233 mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup ); 233 mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup );
234 QWhatsThis::add( mUseCategories, i18n( "Only export contacts who are members of a category that is checked on the list to the left.\n" 234 QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n"
235 "This option is disabled if you have no categories." ) ); 235 "This option is disabled if you have no categories." ) );
236 groupLayout->addWidget( mUseCategories, 3, 0 ); 236 groupLayout->addWidget( mUseCategories, 3, 0 );
237 237
238 mFiltersCombo = new QComboBox( false, mButtonGroup ); 238 mFiltersCombo = new QComboBox( false, mButtonGroup );
239 QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to export." ) ); 239 QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) );
240 groupLayout->addWidget( mFiltersCombo, 2, 1 ); 240 groupLayout->addWidget( mFiltersCombo, 2, 1 );
241 241
242 mCategoriesView = new QListView( mButtonGroup ); 242 mCategoriesView = new QListView( mButtonGroup );
243 mCategoriesView->addColumn( "" ); 243 mCategoriesView->addColumn( "" );
244 mCategoriesView->header()->hide(); 244 mCategoriesView->header()->hide();
245 QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to export." ) ); 245 QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) );
246 groupLayout->addWidget( mCategoriesView, 3, 1 ); 246 groupLayout->addWidget( mCategoriesView, 3, 1 );
247 247
248 topLayout->addWidget( mButtonGroup ); 248 topLayout->addWidget( mButtonGroup );
249 249
250 QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page ); 250 QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page );
251 sortingGroup->setColumnLayout( 0, Qt::Vertical ); 251 sortingGroup->setColumnLayout( 0, Qt::Vertical );
252 QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2, 252 QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2,
253 KDialog::spacingHint() ); 253 KDialog::spacingHint() );
254 sortLayout->setAlignment( Qt::AlignTop ); 254 sortLayout->setAlignment( Qt::AlignTop );
255 255
256 label = new QLabel( i18n( "Criterion:" ), sortingGroup ); 256 label = new QLabel( i18n( "Criterion:" ), sortingGroup );
257 sortLayout->addWidget( label, 0, 0 ); 257 sortLayout->addWidget( label, 0, 0 );