-rw-r--r-- | korganizer/mainwindow.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index bfae1b5..5249300 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1119,4 +1119,5 @@ void MainWindow::initActions() importMenu->insertItem( i18n("Export"), exportMenu_X ); + mPrintSelAction = 0; #ifndef DESKTOP_VERSION //importMenu->insertSeparator(); @@ -1145,9 +1146,10 @@ void MainWindow::initActions() this, SLOT( printCal() ) ); - icon = loadPixmap( pathString + "print" ); + icon = loadPixmap( pathString + "week" ); action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), this, SLOT( printSel() ) ); + icon = loadPixmap( pathString + "whatsnext" ); action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); action->addTo( beamMenu_X ); @@ -1156,5 +1158,5 @@ void MainWindow::initActions() - icon = loadPixmap( pathString + "print" ); + icon = loadPixmap( pathString + "list" ); action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); action->addTo( beamMenu_X ); @@ -1162,9 +1164,10 @@ void MainWindow::initActions() this, SLOT( printListView() ) ); + icon = loadPixmap( pathString + "newevent" ); action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), mView, SLOT( slotprintSelInc() ) ); - + mPrintSelAction = action; importMenu->insertItem( i18n("Print"), beamMenu_X ); #endif @@ -1741,4 +1744,17 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) mNewSubTodoAction->setEnabled( false ); } + static QPixmap jP = SmallIcon( "journal" ); + static QPixmap eP = SmallIcon( "newevent" ); + static QPixmap tP = SmallIcon( "newtodo" ); +#ifdef DESKTOP_VERSION + QIconSet icon; + if ( incidence->typeID() == todoID ) + icon = QIconSet ( tP ); + else if ( incidence->typeID() == eventID ) + icon = QIconSet ( eP ); + else if ( incidence->typeID() == journalID ) + icon = QIconSet ( jP ); + mPrintSelAction->setIconSet ( icon ); +#endif } @@ -1753,5 +1769,7 @@ void MainWindow::enableIncidenceActions( bool enabled ) #ifndef DESKTOP_VERSION mBeamAction->setEnabled( enabled ); -#endif +#else + mPrintSelAction->setEnabled( enabled ); +#endif mCancelAction->setEnabled( enabled ); } |