summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
authorzautrix <zautrix>2005-06-30 11:05:14 (UTC)
committer zautrix <zautrix>2005-06-30 11:05:14 (UTC)
commitb03b54ce54c1391db8979db0df1369e1c68656fa (patch) (unidiff)
treeadf1bb74f5f56cb54a18a2bbfa3bc327e2e32217 /korganizer/kotodoview.cpp
parent00e631189f1dca0d596b6ce5816f2fcde9124bd7 (diff)
downloadkdepimpi-b03b54ce54c1391db8979db0df1369e1c68656fa.zip
kdepimpi-b03b54ce54c1391db8979db0df1369e1c68656fa.tar.gz
kdepimpi-b03b54ce54c1391db8979db0df1369e1c68656fa.tar.bz2
fixxx
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 1bfdef9..873a776 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -499,2 +499,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
499{ 499{
500 mCategoryPopupMenu = 0;
500 mPendingUpdateBeforeRepaint = false; 501 mPendingUpdateBeforeRepaint = false;
@@ -1160,6 +1161,10 @@ QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1160{ 1161{
1161 QPopupMenu* tempMenu = new QPopupMenu (this); 1162 if ( !mCategoryPopupMenu ) {
1163 mCategoryPopupMenu = new QPopupMenu (this);
1164 mCategoryPopupMenu->setCheckable (true);
1165 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1166 }
1167 mCategoryPopupMenu->clear();
1162 QStringList checkedCategories = todoItem->todo()->categories (); 1168 QStringList checkedCategories = todoItem->todo()->categories ();
1163 1169
1164 tempMenu->setCheckable (true);
1165 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); 1170 for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
@@ -1167,11 +1172,7 @@ QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
1167 ++it) { 1172 ++it) {
1168 int index = tempMenu->insertItem (*it); 1173 int index = mCategoryPopupMenu->insertItem (*it);
1169 mCategory[index] = *it; 1174 mCategory[index] = *it;
1170 if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); 1175 if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true);
1171 } 1176 }
1172 1177 return mCategoryPopupMenu;
1173 connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
1174 return tempMenu;
1175
1176
1177} 1178}