-rw-r--r-- | kaddressbook/kabcore.cpp | 19 | ||||
-rw-r--r-- | kaddressbook/xxportselectdialog.cpp | 16 |
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 @@ -680,7 +680,6 @@ void KABCore::setContactSelected( const QString &uid ) mActionBeamVCard->setEnabled( selected ); mActionWhoAmI->setEnabled( selected ); - mActionCategories->setEnabled( selected ); } void KABCore::sendMail() @@ -1013,6 +1012,18 @@ void KABCore::editCategories() } void KABCore::setCategories() { + + QStringList uids; + XXPortSelectDialog dlgx( this, false, this ); + if ( dlgx.exec() ) + uids = dlgx.uids(); + else + return; + if ( uids.isEmpty() ) + return; + // qDebug("count %d ", uids.count()); + + KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); if ( !dlg.exec() ) { message( i18n("Setting categories cancelled") ); @@ -1026,7 +1037,7 @@ void KABCore::setCategories() message( i18n("Setting categories ... please wait!") ); QStringList categories = dlg.selectedCategories(); - QStringList uids = mViewManager->selectedUids(); + //QStringList uids = mViewManager->selectedUids(); QStringList::Iterator it; for ( it = uids.begin(); it != uids.end(); ++it ) { KABC::Addressee addr = mAddressBook->findByUid( *it ); @@ -2108,6 +2119,10 @@ void KABCore::addActionsManually() mActionWhoAmI->plug( settingsMenu ); mActionEditCategories->plug( settingsMenu ); + mActionEditCategories->plug( changeMenu ); + mActionCategories->plug( changeMenu ); + mActionManageCategories->plug( changeMenu ); + mActionCategories->plug( settingsMenu ); mActionManageCategories->plug( settingsMenu ); diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp index be254c0..ab95d5f 100644 --- a/kaddressbook/xxportselectdialog.cpp +++ b/kaddressbook/xxportselectdialog.cpp @@ -53,7 +53,7 @@ $Id$ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, QWidget* parent, const char* name ) - : KDialogBase( Plain, i18n( "Choose which contacts to export" ), Help | Ok | Cancel, + : KDialogBase( Plain, i18n( "Choose which contacts to select" ), Help | Ok | Cancel, Ok, parent, name, true, true ), mCore( core ), mUseSorting( sort ) { @@ -204,7 +204,7 @@ void XXPortSelectDialog::initGUI() QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Which contacts do you want to export?" ), page ); + QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page ); topLayout->addWidget( label ); mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page ); @@ -217,32 +217,32 @@ void XXPortSelectDialog::initGUI() mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup ); mUseWholeBook->setChecked( true ); - QWhatsThis::add( mUseWholeBook, i18n( "Export the entire address book" ) ); + QWhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) ); groupLayout->addWidget( mUseWholeBook, 0, 0 ); mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup ); - QWhatsThis::add( mUseSelection, i18n( "Only export contacts selected in KAddressBook.\n" + QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n" "This option is disabled if no contacts are selected." ) ); groupLayout->addWidget( mUseSelection, 1, 0 ); mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup ); - QWhatsThis::add( mUseFilters, i18n( "Only export contacts matching the selected filter.\n" + QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n" "This option is disabled if you haven't defined any filters" ) ); groupLayout->addWidget( mUseFilters, 2, 0 ); mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup ); - QWhatsThis::add( mUseCategories, i18n( "Only export contacts who are members of a category that is checked on the list to the left.\n" + QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n" "This option is disabled if you have no categories." ) ); groupLayout->addWidget( mUseCategories, 3, 0 ); mFiltersCombo = new QComboBox( false, mButtonGroup ); - QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to export." ) ); + QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) ); groupLayout->addWidget( mFiltersCombo, 2, 1 ); mCategoriesView = new QListView( mButtonGroup ); mCategoriesView->addColumn( "" ); mCategoriesView->header()->hide(); - QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to export." ) ); + QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) ); groupLayout->addWidget( mCategoriesView, 3, 1 ); topLayout->addWidget( mButtonGroup ); |