summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventpopupmenu.cpp
authorzautrix <zautrix>2005-07-03 08:42:34 (UTC)
committer zautrix <zautrix>2005-07-03 08:42:34 (UTC)
commit971bfd3cf502fbbafc96bef70e21beb545e450b5 (patch) (side-by-side diff)
tree2d4b2d0d291c5a23bb39e3f448403acbe86cc071 /korganizer/koeventpopupmenu.cpp
parent914c795a77d8bb28fc8c2155cfc9524f3effdde1 (diff)
downloadkdepimpi-971bfd3cf502fbbafc96bef70e21beb545e450b5.zip
kdepimpi-971bfd3cf502fbbafc96bef70e21beb545e450b5.tar.gz
kdepimpi-971bfd3cf502fbbafc96bef70e21beb545e450b5.tar.bz2
fixes
Diffstat (limited to 'korganizer/koeventpopupmenu.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventpopupmenu.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index 0b0fe8e..77322e7 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -61,8 +61,10 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
mCalPopup->setCheckable (true);
connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup()));
connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int )));
- mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup ));
- mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup ));
+ //mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup ));
+ //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup ));
+ insertItem (i18n("Categories"),mCatPopup );
+ insertItem (i18n("Calendar"),mCalPopup );
QValueList<int>::Iterator it;
for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
mSingleOnlyItems.append(*it);
@@ -83,10 +85,11 @@ void KOEventPopupMenu::fillCalPopup() // CAL
{
mCalPopup->clear();
if (!mCurrentIncidence) return;
+ bool readO = mCurrentIncidence->isReadOnly()|| isDisabled;
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
while ( kkf ) {
int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber);
- if ( kkf->mErrorOnLoad || kkf->isReadOnly )
+ if ( kkf->mErrorOnLoad || kkf->isReadOnly || readO )
mCalPopup->setItemEnabled( index, false );
mCalPopup->setItemChecked (index, kkf->mCalNumber == mCurrentIncidence->calID());
kkf = KOPrefs::instance()->mCalendars.next();
@@ -102,6 +105,7 @@ void KOEventPopupMenu::fillCatPopup()
{
mCatPopup->clear();
if (!mCurrentIncidence) return;
+ bool readO = mCurrentIncidence->isReadOnly() || isDisabled;
QStringList checkedCategories = mCurrentIncidence->categories();
int index = 0;
for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin ();
@@ -111,6 +115,8 @@ void KOEventPopupMenu::fillCatPopup()
if (checkedCategories.find (*it) != checkedCategories.end ()) {
mCatPopup->setItemChecked (index, true);
}
+ if ( readO )
+ mCatPopup->setItemEnabled( index, false );
++index;
}
}