author | zautrix <zautrix> | 2005-03-16 23:29:30 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-16 23:29:30 (UTC) |
commit | e0a510893ffcddb8d58f785832622d030900b2f9 (patch) (side-by-side diff) | |
tree | aa9499e0a81c26a24f832b0dd58bc8943db13e3d | |
parent | d2be5ea1cd22f5222aecb0f70a2fe8657fae9698 (diff) | |
download | kdepimpi-e0a510893ffcddb8d58f785832622d030900b2f9.zip kdepimpi-e0a510893ffcddb8d58f785832622d030900b2f9.tar.gz kdepimpi-e0a510893ffcddb8d58f785832622d030900b2f9.tar.bz2 |
fixes
-rw-r--r-- | libkdepim/categoryselectdialog.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index 4d80726..974752c 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp @@ -53,25 +53,28 @@ CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, resize( 300, 360 ); else showMaximized(); connect( mSetColorCat, SIGNAL( clicked() ), this, SLOT( setColorCat() ) ); // connect( mCategories, SIGNAL( clicked(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); } void CategorySelectDialog::editCategoriesDialog() { KPIM::CategoryEditDialog* ced = new KPIM::CategoryEditDialog(mPrefs,this ); ced->exec(); delete ced; + slotApply(); + QStringList temp = mCategoryList; setCategories(); + setSelected( temp ); } void CategorySelectDialog::setCategories() { mColorItem = 0; mCategories->clear(); mCategoryList.clear(); QStringList::Iterator it; for (it = mPrefs->mCustomCategories.begin(); it != mPrefs->mCustomCategories.end(); ++it ) { CategorySelectItem * item = new CategorySelectItem(mCategories,*it,QCheckListItem::CheckBox); QObject::connect( item, SIGNAL( stateChanged(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); @@ -183,39 +186,39 @@ void CategorySelectDialog::slotApply() while (item) { if (item->isOn()) { if ( item == mColorItem) colcat = item->text(); else categories.append(item->text()); } item = (QCheckListItem *)item->nextSibling(); } categories.sort(); if ( ! colcat.isEmpty() ) categories.prepend( colcat ); - QString categoriesStr = categories.join(","); + // QString categoriesStr = categories.join(","); mCategoryList = categories; - emit categoriesSelected(categories); - emit categoriesSelected(categoriesStr); } void CategorySelectDialog::accept() { slotOk(); } void CategorySelectDialog::slotOk() { slotApply(); + emit categoriesSelected(mCategoryList); + emit categoriesSelected(mCategoryList.join(",")); QDialog::accept(); } void CategorySelectDialog::clear() { QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); while (item) { item->setOn(false); item = (QCheckListItem *)item->nextSibling(); } } |