summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-01-30 15:38:08 (UTC)
committer zautrix <zautrix>2005-01-30 15:38:08 (UTC)
commit11736af9b5348f251b0e8a3cf90fdb960c877936 (patch) (unidiff)
treeeda181731c3dd76cb448d103b8d8f9d30757450c /korganizer
parent8d543aa1d1d1ed20001c8b18352d1d29c2979e48 (diff)
downloadkdepimpi-11736af9b5348f251b0e8a3cf90fdb960c877936.zip
kdepimpi-11736af9b5348f251b0e8a3cf90fdb960c877936.tar.gz
kdepimpi-11736af9b5348f251b0e8a3cf90fdb960c877936.tar.bz2
fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/datenavigator.cpp3
-rw-r--r--korganizer/komonthview.cpp9
-rw-r--r--korganizer/koviewmanager.cpp4
4 files changed, 8 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 96fb5ca..db33017 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3684,17 +3684,17 @@ void CalendarView::toggleExpand()
3684{ 3684{
3685 // if ( mLeftFrame->isHidden() ) { 3685 // if ( mLeftFrame->isHidden() ) {
3686 // mLeftFrame->show(); 3686 // mLeftFrame->show();
3687 // emit calendarViewExpanded( false ); 3687 // emit calendarViewExpanded( false );
3688 // } else { 3688 // } else {
3689 // mLeftFrame->hide(); 3689 // mLeftFrame->hide();
3690 // emit calendarViewExpanded( true ); 3690 // emit calendarViewExpanded( true );
3691 // } 3691 // }
3692 3692 //qDebug(" CalendarView::toggleExpand()");
3693 globalFlagBlockAgenda = 1; 3693 globalFlagBlockAgenda = 1;
3694 emit calendarViewExpanded( !mLeftFrame->isHidden() ); 3694 emit calendarViewExpanded( !mLeftFrame->isHidden() );
3695 globalFlagBlockAgenda = 5; 3695 globalFlagBlockAgenda = 5;
3696 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); 3696 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() );
3697 //mViewManager->showView( 0, true ); 3697 //mViewManager->showView( 0, true );
3698} 3698}
3699 3699
3700void CalendarView::calendarModified( bool modified, Calendar * ) 3700void CalendarView::calendarModified( bool modified, Calendar * )
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index 3156b2b..d2824de 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -205,18 +205,17 @@ void DateNavigator::selectTodayMonth()
205 selectDates( date , date.daysInMonth ()); 205 selectDates( date , date.daysInMonth ());
206 206
207} 207}
208void DateNavigator::selectToday() 208void DateNavigator::selectToday()
209{ 209{
210 QDate d = QDate::currentDate(); 210 QDate d = QDate::currentDate();
211 211
212 int dateCount = mSelectedDates.count(); 212 int dateCount = mSelectedDates.count();
213 213 if ( dateCount == 5 && d.dayOfWeek() < 6 ) selectWorkWeek( d );
214 if ( dateCount == 5 ) selectWorkWeek( d );
215 else if ( dateCount == 7 ) selectWeek( d ); 214 else if ( dateCount == 7 ) selectWeek( d );
216 else selectDates( d, dateCount ); 215 else selectDates( d, dateCount );
217} 216}
218 217
219void DateNavigator::selectPreviousYear() 218void DateNavigator::selectPreviousYear()
220{ 219{
221 QDate firstSelected = mSelectedDates.first(); 220 QDate firstSelected = mSelectedDates.first();
222 int weekDay = firstSelected.dayOfWeek(); 221 int weekDay = firstSelected.dayOfWeek();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 10e4f1d..4cefb26 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -962,17 +962,17 @@ void KOMonthView::updateView()
962 int i; 962 int i;
963 for( i = 0; i < mCells.count(); ++i ) { 963 for( i = 0; i < mCells.count(); ++i ) {
964 mCells[i]->updateCell(); 964 mCells[i]->updateCell();
965 } 965 }
966 966
967 //qDebug("KOMonthView::updateView() "); 967 //qDebug("KOMonthView::updateView() ");
968 processSelectionChange(); 968 processSelectionChange();
969 // qDebug("---------------------------------------------------------------------+ "); 969 // qDebug("---------------------------------------------------------------------+ ");
970 setFocus(); 970 mCells[0]->setFocus();
971} 971}
972 972
973void KOMonthView::resizeEvent(QResizeEvent * e) 973void KOMonthView::resizeEvent(QResizeEvent * e)
974{ 974{
975 computeLayout(); 975 computeLayout();
976} 976}
977void KOMonthView::computeLayout() 977void KOMonthView::computeLayout()
978{ 978{
@@ -1126,29 +1126,30 @@ void KOMonthView::clearSelection()
1126{ 1126{
1127 if ( mSelectedCell ) { 1127 if ( mSelectedCell ) {
1128 mSelectedCell->deselect(); 1128 mSelectedCell->deselect();
1129 mSelectedCell = 0; 1129 mSelectedCell = 0;
1130 } 1130 }
1131} 1131}
1132void KOMonthView::keyPressEvent ( QKeyEvent * e ) 1132void KOMonthView::keyPressEvent ( QKeyEvent * e )
1133{ 1133{
1134 //qDebug("KOMonthView::keyPressEvent ");
1134 switch(e->key()) { 1135 switch(e->key()) {
1135 break;
1136 case Key_Up: 1136 case Key_Up:
1137 { 1137 {
1138 emit prevMonth(); 1138 emit prevMonth();
1139 setFocus(); 1139 mCells[0]->setFocus();
1140 } 1140 }
1141 e->accept(); 1141 e->accept();
1142 break; 1142 break;
1143 case Key_Down: 1143 case Key_Down:
1144 { 1144 {
1145 emit nextMonth(); 1145 emit nextMonth();
1146 setFocus(); 1146 mCells[0]->setFocus();
1147
1147 } 1148 }
1148 e->accept(); 1149 e->accept();
1149 break; 1150 break;
1150 default: 1151 default:
1151 e->ignore(); 1152 e->ignore();
1152 break; 1153 break;
1153 } 1154 }
1154} 1155}
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 6da4799..4c03f9a 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -97,17 +97,17 @@ void KOViewManager::readSettings(KConfig *config)
97 showAgendaView(); 97 showAgendaView();
98 } 98 }
99} 99}
100 100
101 101
102void KOViewManager::showDateView( int view, QDate date) 102void KOViewManager::showDateView( int view, QDate date)
103{ 103{
104 104
105 qDebug("date %d %s", view, date.toString().latin1()); 105 //qDebug("date %d %s", view, date.toString().latin1());
106#if 0 106#if 0
107 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); 107 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 );
108 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 ); 108 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 );
109 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 ); 109 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 );
110 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 ); 110 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 );
111 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); 111 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
112#endif 112#endif
113 if ( view == 3 ) { 113 if ( view == 3 ) {
@@ -187,17 +187,16 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
187 } 187 }
188 bool full = fullScreen; 188 bool full = fullScreen;
189 if(view == mCurrentView && view != mWhatsNextView ) { 189 if(view == mCurrentView && view != mWhatsNextView ) {
190 if ( mCurrentAgendaView < 0 ) 190 if ( mCurrentAgendaView < 0 )
191 return; 191 return;
192 full = mMainView->leftFrame()->isVisible(); 192 full = mMainView->leftFrame()->isVisible();
193 } else { 193 } else {
194 mCurrentView = view; 194 mCurrentView = view;
195
196 // bool full = fullScreen; 195 // bool full = fullScreen;
197 bool isFull = !mMainView->leftFrame()->isVisible(); 196 bool isFull = !mMainView->leftFrame()->isVisible();
198 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) 197 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
199 full = true; 198 full = true;
200 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) 199 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
201 full = false; 200 full = false;
202 } 201 }
203 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); 202 if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
@@ -205,17 +204,16 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
205 mMainView->processIncidenceSelection( 0 ); 204 mMainView->processIncidenceSelection( 0 );
206 mMainView->updateView(); 205 mMainView->updateView();
207 raiseCurrentView( full ); 206 raiseCurrentView( full );
208 mMainView->adaptNavigationUnits(); 207 mMainView->adaptNavigationUnits();
209} 208}
210 209
211void KOViewManager::raiseCurrentView( bool fullScreen ) 210void KOViewManager::raiseCurrentView( bool fullScreen )
212{ 211{
213 //qDebug("raiseCurrentView ");
214 mCurrentAgendaView = 0; 212 mCurrentAgendaView = 0;
215 int wid = mMainView->width() ; 213 int wid = mMainView->width() ;
216 int hei = mMainView->height(); 214 int hei = mMainView->height();
217 if ( mCurrentView == mMonthView ) { 215 if ( mCurrentView == mMonthView ) {
218 mMainView->navigatorBar()->show(); 216 mMainView->navigatorBar()->show();
219 hei -= mMainView->navigatorBar()->sizeHint().height(); 217 hei -= mMainView->navigatorBar()->sizeHint().height();
220 //mMainView->navigatorBar()->hide(); 218 //mMainView->navigatorBar()->hide();
221 } else { 219 } else {