-rw-r--r-- | korganizer/koeventviewer.cpp | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 42 |
2 files changed, 14 insertions, 30 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index d3b2ccf..f6c252b 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -700,9 +700,9 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) } else { addTag("h3",i18n( "Remote: " ) + text_d ); } } - topLevelWidget()->setCaption("Journal Viewer"); + topLevelWidget()->setCaption(i18n("Journal viewer")); mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); formatReadOnly(jour); addTag("p","<b>"+i18n( "Last modified: " ) + "</b>"+KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 5d26d35..88dbd4f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -797,9 +797,9 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(i18n("Week Number"), 400); configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); - mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); + mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); mShowAction->addTo( mCurrentItemMenu ); connect( mShowAction, SIGNAL( activated() ), mView, SLOT( showIncidence() ) ); @@ -821,12 +821,14 @@ void MainWindow::initActions() mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); mMoveAction->addTo( mCurrentItemMenu ); connect( mMoveAction, SIGNAL( activated() ), mView, SLOT( moveIncidence() ) ); +#ifndef DESKTOP_VERSION mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); mBeamAction->addTo(mCurrentItemMenu ); connect( mBeamAction, SIGNAL( activated() ), mView, SLOT( beamIncidence() ) ); +#endif mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); mCancelAction->addTo( mCurrentItemMenu ); connect( mCancelAction, SIGNAL( activated() ), mView, SLOT( toggleCancelIncidence() ) ); @@ -1646,37 +1648,29 @@ void MainWindow::updateWeekNum(const DateList &selectedDates) updateWeek( selectedDates.first() ); } void MainWindow::processIncidenceSelection( Incidence *incidence ) { - if ( !incidence ) { + mShowAction->setMenuText( i18n("Show") ); enableIncidenceActions( false ); - mNewSubTodoAction->setEnabled( false ); setCaptionToDates(); return; - } - - //KGlobal::locale()->formatDateTime(nextA, true); QString startString = ""; if ( incidence->typeID() != todoID ) { if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { if ( incidence->doesFloat() ) { - startString += ": "+incidence->dtStartDateStr( true ); - startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); - + startString += ": "+incidence->dtStartDateStr( true ); + startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); } else { - startString = ": "+incidence->dtStartStr(true); - startString += " --- "+((Event*)incidence)->dtEndStr(true); - + startString = ": "+incidence->dtStartStr(true); + startString += " --- "+((Event*)incidence)->dtEndStr(true); } - } else { if ( incidence->dtStart().time() != incidence->dtEnd().time() ) startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); - if ( incidence->isBirthday() || incidence->isAnniversary() ) { bool ok; QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); if ( ok ) { @@ -1686,35 +1680,23 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) } else startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); } - } else startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); if ( !incidence->location().isEmpty() ) startString += " (" +incidence->location()+")"; setCaption( incidence->summary()+startString); - enableIncidenceActions( true ); - if ( incidence->typeID() == eventID ) { - mShowAction->setText( i18n("Show Event...") ); - mEditAction->setText( i18n("Edit Event...") ); - mDeleteAction->setText( i18n("Delete Event...") ); - + mShowAction->setMenuText( i18n("Show Event") ); mNewSubTodoAction->setEnabled( false ); } else if ( incidence->typeID() == todoID ) { - mShowAction->setText( i18n("Show Todo...") ); - mEditAction->setText( i18n("Edit Todo...") ); - mDeleteAction->setText( i18n("Delete Todo...") ); - + mShowAction->setMenuText( i18n("Show Todo") ); mNewSubTodoAction->setEnabled( true ); } else { - mShowAction->setText( i18n("Show...") ); - mShowAction->setText( i18n("Edit...") ); - mShowAction->setText( i18n("Delete...") ); - + mShowAction->setMenuText( i18n("Show") ); mNewSubTodoAction->setEnabled( false ); } } @@ -1725,9 +1707,11 @@ void MainWindow::enableIncidenceActions( bool enabled ) mDeleteAction->setEnabled( enabled ); mCloneAction->setEnabled( enabled ); mMoveAction->setEnabled( enabled ); +#ifndef DESKTOP_VERSION mBeamAction->setEnabled( enabled ); +#endif mCancelAction->setEnabled( enabled ); } void MainWindow::importOL() |