From 971bfd3cf502fbbafc96bef70e21beb545e450b5 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 03 Jul 2005 08:42:34 +0000 Subject: fixes --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index a10e93c..72221fd 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -674,17 +674,23 @@ void CalendarView::scrollBarValue(int val ) static bool block = false; if ( block ) return; block = true; - val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); - //qDebug("VAL %d ",val ); int count = mNavigator->selectedDates().count(); - int year = mNavigator->selectedDates().first().year(); int day = mNavigator->selectedDates().first().dayOfYear(); - if ( val == day -1 ) { + int stepdays = val; + if ( mDateScrollBar->lineStep () <= count ) { + val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); + //qDebug("VAL %d ",val ); + stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); + stepdays = day-1+stepdays; + if ( stepdays < 0 ) stepdays = 0; + } + if ( stepdays == day -1 ) { block = false; return; } + int year = mNavigator->selectedDates().first().year(); QDate d ( year,1,1 ); - mNavigator->selectDates( d.addDays( val ), count ); + mNavigator->selectDates( d.addDays( stepdays) , count ); block = false; #endif 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::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; } } diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index cec0476..25e599d 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -320,10 +320,12 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, SLOT(hideAll()),true); selPopup->insertSeparator(); + QPopupMenu * exportPO = new QPopupMenu ( this ); + selPopup->insertItem( i18n("Export"), exportPO ); #ifdef DESKTOP_VERSION mPopupMenu->insertSeparator(); mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), - i18n("Print complete list"),this, + i18n("Print complete list..."),this, SLOT(printList()),true); #endif mCalPopup = new QPopupMenu ( this ); @@ -347,8 +349,6 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, SLOT( setCalendar( int ) )); QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, SLOT( catChanged( Incidence * ) )); - QPopupMenu * exportPO = new QPopupMenu ( this ); - selPopup->insertItem( i18n("Export"), exportPO ); exportPO->insertItem( i18n("As iCal (ics) file..."),this, SLOT(saveToFile())); exportPO->insertItem( i18n("As vCal (vcs) file..."),this, @@ -1312,7 +1312,6 @@ KOListViewListView::KOListViewListView(KOListView * lv ) } bool KOListViewListView::hasMultiSelection(QListViewItem* item) { - int selCount = 0; QListViewItem *qitem = firstChild (); while ( qitem ) { if ( qitem->isSelected() && item != qitem ) diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 792a7b8..ba3bc05 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -555,7 +555,6 @@ void KOViewManager::showDayView() globalFlagBlockLabel = 0; mMainView->dateNavigator()->selectDates( 1 ); mCurrentAgendaView = 1 ; - mMainView->setScrollBarStep( 1 ); } @@ -573,7 +572,6 @@ void KOViewManager::showWorkWeekView() globalFlagBlockLabel = 0; mMainView->dateNavigator()->selectWorkWeek(); mCurrentAgendaView = 5 ; - mMainView->setScrollBarStep( 1 ); } @@ -592,7 +590,6 @@ void KOViewManager::showWeekView() globalFlagBlockLabel = 0; mMainView->dateNavigator()->selectWeek(); mCurrentAgendaView = 7 ; - mMainView->setScrollBarStep( 1 ); } void KOViewManager::showNextXView() diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 7a5f3e5..5d26d35 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -830,10 +830,6 @@ void MainWindow::initActions() mCancelAction->addTo( mCurrentItemMenu ); connect( mCancelAction, SIGNAL( activated() ), mView, SLOT( toggleCancelIncidence() ) ); -#ifdef DESKTOP_VERSION - actionMenu->insertSeparator(); -#endif - QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); ne_action->addTo( actionMenu ); -- cgit v0.9.0.2