summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--korganizer/koeditorgeneraltodo.cpp2
-rw-r--r--korganizer/komonthview.cpp18
-rw-r--r--korganizer/komonthview.h3
-rw-r--r--korganizer/koviewmanager.cpp3
5 files changed, 25 insertions, 6 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 4251283..e21bb44 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -2,12 +2,17 @@ Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.4 ************ 3********** VERSION 2.0.4 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed problem loading translations for summary/location edit boxes in event/todo editor. 6Fixed problem loading translations for summary/location edit boxes in event/todo editor.
7 7
8Added a general "select week number" to the toolbar.
9
10Fixed some small problem of the new features introduced in version 2.0.3.
11
12
8********** VERSION 2.0.3 ************ 13********** VERSION 2.0.3 ************
9 14
10KO/Pi: 15KO/Pi:
11Added feature for changing alarm settings for many items at once: 16Added feature for changing alarm settings for many items at once:
12Open list view (or search dialog), select the desired items and choose in 17Open list view (or search dialog), select the desired items and choose in
13the popup menu: Set alarm for selected... 18the popup menu: Set alarm for selected...
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index ce66863..da5ef07 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -161,13 +161,13 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
161 mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); 161 mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) );
162 162
163 if ( QApplication::desktop()->width() <= 480 ) { 163 if ( QApplication::desktop()->width() <= 480 ) {
164 if ( QApplication::desktop()->width() < 320 ) 164 if ( QApplication::desktop()->width() < 320 )
165 mCompleteDateEdit->setMaximumWidth( 85 ); 165 mCompleteDateEdit->setMaximumWidth( 85 );
166 else 166 else
167 mCompleteDateEdit->setMaximumWidth( 130 ); 167 mCompleteDateEdit->setMaximumWidth( 140 );
168 topLayout->setSpacing( 0 ); 168 topLayout->setSpacing( 0 );
169 } 169 }
170} 170}
171 171
172void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) 172void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
173{ 173{
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 5926abe..ffb2e1e 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -550,19 +550,20 @@ void MonthViewCell::insertEvent(Event *event)
550 mItemList->insertItem( item ); 550 mItemList->insertItem( item );
551 mToolTip += "\n"; 551 mToolTip += "\n";
552} 552}
553void MonthViewCell::insertTodo(Todo *todo) 553void MonthViewCell::insertTodo(Todo *todo)
554{ 554{
555 QString text; 555 QString text;
556 mItemList->setFocusPolicy(WheelFocus);
556 if (todo->hasDueDate()) { 557 if (todo->hasDueDate()) {
557 if (!todo->doesFloat()) { 558 if (!todo->doesFloat()) {
558 text += KGlobal::locale()->formatTime(todo->dtDue().time()); 559 text += KGlobal::locale()->formatTime(todo->dtDue().time());
559 text += " "; 560 text += " ";
560 } 561 }
561 } 562 }
562 text += i18n("Td: %1").arg(todo->summary()); 563 text += i18n("T: %1").arg(todo->summary());
563 564
564 MonthViewItem *item = new MonthViewItem( todo, mDate, text ); 565 MonthViewItem *item = new MonthViewItem( todo, mDate, text );
565 //item->setPalette( mStandardPalette ); 566 //item->setPalette( mStandardPalette );
566 QPalette pal; 567 QPalette pal;
567 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { 568 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) {
568 QStringList categories = todo->categories(); 569 QStringList categories = todo->categories();
@@ -779,13 +780,12 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
779 if ( incidence ) mMonthView->showContextMenu( incidence ); 780 if ( incidence ) mMonthView->showContextMenu( incidence );
780} 781}
781 782
782void MonthViewCell::selection( QListBoxItem *item ) 783void MonthViewCell::selection( QListBoxItem *item )
783{ 784{
784 if ( !item ) return; 785 if ( !item ) return;
785
786 mMonthView->setSelectedCell( this ); 786 mMonthView->setSelectedCell( this );
787} 787}
788 788
789 789
790// ******************************************************************************* 790// *******************************************************************************
791// ******************************************************************************* 791// *******************************************************************************
@@ -1262,16 +1262,22 @@ void KOMonthView::updateView()
1262} 1262}
1263 1263
1264void KOMonthView::resizeEvent(QResizeEvent * e) 1264void KOMonthView::resizeEvent(QResizeEvent * e)
1265{ 1265{
1266 qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); 1266 qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
1267 if ( ignoreResizeEvent ) { 1267 if ( ignoreResizeEvent ) {
1268 int diff = e->size().height() - e->oldSize().height();
1269 if ( diff < 0 )
1270 diff = diff * (-1);
1271 if ( diff == ignoreResizeEventHeight ) {
1268 qDebug("KOMonthView::resizeEvent ignored "); 1272 qDebug("KOMonthView::resizeEvent ignored ");
1269 --ignoreResizeEvent; 1273 --ignoreResizeEvent;
1270 return; 1274 return;
1271 } 1275 }
1276 ignoreResizeEvent = 0;
1277 }
1272 if ( e->size().width()+ e->size().height() < 240 ) 1278 if ( e->size().width()+ e->size().height() < 240 )
1273 return; 1279 return;
1274 computeLayout(); 1280 computeLayout();
1275 clPending = true; 1281 clPending = true;
1276 if ( mShowWeekView ) 1282 if ( mShowWeekView )
1277 mCellsW[0]->setFocus(); 1283 mCellsW[0]->setFocus();
@@ -1508,13 +1514,13 @@ void KOMonthView::showContextMenu( Incidence *incidence )
1508MonthViewCell * KOMonthView::selectedCell( ) 1514MonthViewCell * KOMonthView::selectedCell( )
1509{ 1515{
1510 return mSelectedCell; 1516 return mSelectedCell;
1511} 1517}
1512void KOMonthView::setSelectedCell( MonthViewCell *cell ) 1518void KOMonthView::setSelectedCell( MonthViewCell *cell )
1513{ 1519{
1514 // qDebug("KOMonthView::setSelectedCell "); 1520 //qDebug("KOMonthView::setSelectedCell %x ", cell);
1515 if ( mSelectedCell && mSelectedCell != cell ) { 1521 if ( mSelectedCell && mSelectedCell != cell ) {
1516 MonthViewCell * mvc = mSelectedCell; 1522 MonthViewCell * mvc = mSelectedCell;
1517 mSelectedCell = cell; 1523 mSelectedCell = cell;
1518 mvc->deselect(); 1524 mvc->deselect();
1519 } else 1525 } else
1520 mSelectedCell = cell; 1526 mSelectedCell = cell;
@@ -1547,19 +1553,25 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
1547{ 1553{
1548 //qDebug("KOMonthView::keyPressEvent "); 1554 //qDebug("KOMonthView::keyPressEvent ");
1549 switch(e->key()) { 1555 switch(e->key()) {
1550 case Key_Up: 1556 case Key_Up:
1551 { 1557 {
1552 emit prevMonth(); 1558 emit prevMonth();
1559 if ( mShowWeekView )
1560 mCellsW[0]->setFocus();
1561 else
1553 mCells[0]->setFocus(); 1562 mCells[0]->setFocus();
1554 } 1563 }
1555 e->accept(); 1564 e->accept();
1556 break; 1565 break;
1557 case Key_Down: 1566 case Key_Down:
1558 { 1567 {
1559 emit nextMonth(); 1568 emit nextMonth();
1569 if ( mShowWeekView )
1570 mCellsW[0]->setFocus();
1571 else
1560 mCells[0]->setFocus(); 1572 mCells[0]->setFocus();
1561 1573
1562 } 1574 }
1563 e->accept(); 1575 e->accept();
1564 break; 1576 break;
1565 case Key_Return: 1577 case Key_Return:
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 9dbe319..d70cda1 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -223,13 +223,13 @@ class KOMonthView: public KOEventView
223 virtual DateList selectedDates(); 223 virtual DateList selectedDates();
224 224
225 virtual void printPreview(CalPrinter *calPrinter, 225 virtual void printPreview(CalPrinter *calPrinter,
226 const QDate &, const QDate &); 226 const QDate &, const QDate &);
227 bool isMonthView() { return true; } 227 bool isMonthView() { return true; }
228 bool isUpdatePossible() { return updatePossible; } 228 bool isUpdatePossible() { return updatePossible; }
229 void setIgnoreResizeEvent( int c ) { ignoreResizeEvent = c ;} 229 void setIgnoreResizeEvent( int c, int h ) { ignoreResizeEvent = c ;ignoreResizeEventHeight = h;}
230 230
231 MonthViewCell * selectedCell(); 231 MonthViewCell * selectedCell();
232 public slots: 232 public slots:
233 virtual void updateView(); 233 virtual void updateView();
234 virtual void updateConfig(); 234 virtual void updateConfig();
235 virtual void showDates(const QDate &start, const QDate &end); 235 virtual void showDates(const QDate &start, const QDate &end);
@@ -257,12 +257,13 @@ class KOMonthView: public KOEventView
257 void resizeEvent(QResizeEvent *); 257 void resizeEvent(QResizeEvent *);
258 void viewChanged(); 258 void viewChanged();
259 void updateDayLabels(); 259 void updateDayLabels();
260 260
261 private: 261 private:
262 int ignoreResizeEvent; 262 int ignoreResizeEvent;
263 int ignoreResizeEventHeight;
263 int currentWeek(); 264 int currentWeek();
264 bool clPending; 265 bool clPending;
265 QWidgetStack * mWidStack; 266 QWidgetStack * mWidStack;
266 QWidget* mMonthView; 267 QWidget* mMonthView;
267 QWidget* mWeekView; 268 QWidget* mWeekView;
268 bool mShowWeekView; 269 bool mShowWeekView;
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index dcb51dc..c35de0a 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -220,13 +220,14 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
220{ 220{
221 mCurrentAgendaView = 0; 221 mCurrentAgendaView = 0;
222 int wid = mMainView->width() ; 222 int wid = mMainView->width() ;
223 int hei = mMainView->height(); 223 int hei = mMainView->height();
224 if ( mCurrentView == mMonthView ) { 224 if ( mCurrentView == mMonthView ) {
225 if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { 225 if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
226 mMonthView->setIgnoreResizeEvent( 2 ); 226
227 mMonthView->setIgnoreResizeEvent( 2 ,mMainView->navigatorBar()->height());
227 mMainView->navigatorBar()->show(); 228 mMainView->navigatorBar()->show();
228 hei -= mMainView->navigatorBar()->sizeHint().height(); 229 hei -= mMainView->navigatorBar()->sizeHint().height();
229 } 230 }
230 //mMainView->navigatorBar()->hide(); 231 //mMainView->navigatorBar()->hide();
231 } else { 232 } else {
232 mMainView->navigatorBar()->hide(); 233 mMainView->navigatorBar()->hide();