-rw-r--r-- | korganizer/calendarview.cpp | 3 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 31 |
2 files changed, 21 insertions, 13 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index ab69158..5a2482e 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2797,33 +2797,34 @@ void CalendarView::checkConflictForEvent() test = testlist.next(); } if ( found ) { QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( mConflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; qApp->processEvents(); int km = KMessageBox::warningContinueCancel(this,mess, i18n("KO/Pi Conflict delected"),i18n("Show date"),i18n("No problem!")); if ( km != KMessageBox::Continue ) return; if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) mViewManager->showDayView(); mNavigator->slotDaySelect( conflict.date() ); int hour = conflict.time().hour(); mViewManager->agendaView()->setStartHour( hour ); topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( mConflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); - } + } else + topLevelWidget()->setCaption( i18n("No conflict found") ); mConflictingEvent = 0; return; } void CalendarView::updateTodoViews() { mTodoList->updateView(); mViewManager->currentView()->updateView(); } void CalendarView::clearAllViews() { diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 94f35e6..3ae977d 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -510,57 +510,64 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : QBoxLayout *topLayout = new QVBoxLayout(this); mName = QString ( name ); mBlockUpdate = false; mQuickBar = new QWidget( this ); topLayout->addWidget(mQuickBar); mQuickAdd = new KOQuickTodo(mQuickBar); QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); quickLayout->addWidget( mQuickAdd ); mNewSubBut = new QPushButton( "sub",mQuickBar ); QPushButton * s_done = new QPushButton( "D",mQuickBar ); QPushButton * s_run = new QPushButton( "R",mQuickBar ); QPushButton * allopen = new QPushButton( "O",mQuickBar ); QPushButton * allclose = new QPushButton( "C",mQuickBar ); QPushButton * flat = new QPushButton( "F",mQuickBar ); - int fixwid = flat->sizeHint().height(); - if ( QApplication::desktop()->width() >= 800 ) + int fixwid = mQuickAdd->sizeHint().height(); + if ( QApplication::desktop()->width() > 800 ) fixwid *= 2; - flat->setFixedWidth( fixwid ); connect ( flat, SIGNAL ( clicked()), SLOT ( setAllFlat())); - allopen->setFixedWidth( fixwid ); connect ( allopen, SIGNAL ( clicked()), SLOT ( setAllOpen())); - allclose->setFixedWidth( fixwid ); connect ( allclose, SIGNAL ( clicked()), SLOT ( setAllClose())); s_done->setPixmap( SmallIcon("greenhook16")); - s_done->setFixedWidth( fixwid ); s_done->setFixedHeight( flat->sizeHint().height() ); connect ( s_done, SIGNAL ( clicked()), SLOT ( toggleCompleted())); s_run->setPixmap( SmallIcon("ko16old")); - s_run->setFixedWidth( fixwid ); - s_run->setFixedHeight( flat->sizeHint().height() ); connect ( s_run, SIGNAL ( clicked()), SLOT ( toggleRunning())); - mNewSubBut->setFixedWidth( fixwid*3/2 ); connect ( mNewSubBut, SIGNAL ( clicked()), SLOT ( newSubTodo())); + + mNewSubBut->setFixedWidth(mNewSubBut->sizeHint().width() ); mNewSubBut->setEnabled( false ); + flat->setFixedWidth( fixwid ); + s_done->setFixedWidth( fixwid ); + allopen->setFixedWidth( fixwid ); + allclose->setFixedWidth( fixwid ); + s_run->setFixedWidth( fixwid ); + if ( QApplication::desktop()->width() < 800 ) { + flat->setFixedHeight( fixwid ); + s_done->setFixedHeight( fixwid ); + allopen->setFixedHeight( fixwid ); + allclose->setFixedHeight( fixwid ); + s_run->setFixedHeight( fixwid ); + mNewSubBut->setFixedHeight( fixwid ); + } quickLayout->addWidget( mNewSubBut ); quickLayout->addWidget( s_done ); quickLayout->addWidget( s_run ); - quickLayout->addWidget( allopen ); quickLayout->addWidget( allclose ); quickLayout->addWidget( flat ); if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickBar->hide(); mTodoListView = new KOTodoListView(calendar,this, name ); topLayout->addWidget(mTodoListView); //mTodoListView->header()->setMaximumHeight(30); mTodoListView->setRootIsDecorated(true); mTodoListView->setAllColumnsShowFocus(true); mTodoListView->setShowSortIndicator(true); mTodoListView->addColumn(i18n("Todo")); mTodoListView->addColumn(i18n("Prio")); @@ -1101,35 +1108,35 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) emit showTodoSignal(((KOTodoViewItem *)item)->todo()); } void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) { pendingSubtodo = 0; mActiveItem = (KOTodoViewItem *)item; if (item) { switch (column){ case 1: mPriorityPopupMenu->popup(QCursor::pos ()); break; case 2: mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; case 3: moveTodo(); break; - case 8: + case 7: mCategoryPopupMenu->popup(QCursor::pos ()); break; - case 9: + case 8: mCalPopupMenu->popup(QCursor::pos ()); break; default: mItemPopupMenu->popup(QCursor::pos()); } } else mPopupMenu->popup(QCursor::pos()); } void KOTodoView::newTodo() { emit newTodoSignal(); } void KOTodoView::newSubTodo() { mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); if (mActiveItem) { if ( mQuickAdd->isVisible() && !mQuickAdd->text().isEmpty() && mQuickAdd->text() != i18n("Click to add new Todo") ) { |