-rw-r--r-- | korganizer/mainwindow.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 20f8b57..25e76ee 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1038,58 +1038,59 @@ void MainWindow::initActions() | |||
1038 | 1038 | ||
1039 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 1039 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
1040 | this ); | 1040 | this ); |
1041 | action->addTo( beamMenu_X ); | 1041 | action->addTo( beamMenu_X ); |
1042 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 1042 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
1043 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 1043 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
1044 | #else | 1044 | #else |
1045 | //importMenu->insertSeparator(); | 1045 | //importMenu->insertSeparator(); |
1046 | icon = loadPixmap( pathString + "print" ); | 1046 | icon = loadPixmap( pathString + "print" ); |
1047 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 1047 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
1048 | action->addTo( beamMenu_X ); | 1048 | action->addTo( beamMenu_X ); |
1049 | connect( action, SIGNAL( activated() ), | 1049 | connect( action, SIGNAL( activated() ), |
1050 | this, SLOT( printCal() ) ); | 1050 | this, SLOT( printCal() ) ); |
1051 | 1051 | ||
1052 | icon = loadPixmap( pathString + "print" ); | 1052 | icon = loadPixmap( pathString + "print" ); |
1053 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 1053 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
1054 | action->addTo( beamMenu_X ); | 1054 | action->addTo( beamMenu_X ); |
1055 | connect( action, SIGNAL( activated() ), | 1055 | connect( action, SIGNAL( activated() ), |
1056 | this, SLOT( printSel() ) ); | 1056 | this, SLOT( printSel() ) ); |
1057 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 1057 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
1058 | action->addTo( beamMenu_X ); | 1058 | action->addTo( beamMenu_X ); |
1059 | connect( action, SIGNAL( activated() ), | 1059 | connect( action, SIGNAL( activated() ), |
1060 | mView->viewManager(), SLOT( slotprintWNV() ) ); | 1060 | mView->viewManager(), SLOT( slotprintWNV() ) ); |
1061 | 1061 | ||
1062 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); | 1062 | |
1063 | icon = loadPixmap( pathString + "print" ); | ||
1064 | action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); | ||
1063 | action->addTo( beamMenu_X ); | 1065 | action->addTo( beamMenu_X ); |
1064 | connect( action, SIGNAL( activated() ), | 1066 | connect( action, SIGNAL( activated() ), |
1065 | mView, SLOT( slotprintSelInc() ) ); | 1067 | this, SLOT( printListView() ) ); |
1066 | 1068 | ||
1067 | icon = loadPixmap( pathString + "print" ); | 1069 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); |
1068 | action = new QAction( i18n("Print list view..."),icon,i18n("Print list view..."), 0, this ); | ||
1069 | action->addTo( beamMenu_X ); | 1070 | action->addTo( beamMenu_X ); |
1070 | connect( action, SIGNAL( activated() ), | 1071 | connect( action, SIGNAL( activated() ), |
1071 | this, SLOT( printListView() ) ); | 1072 | mView, SLOT( slotprintSelInc() ) ); |
1072 | 1073 | ||
1073 | importMenu->insertItem( i18n("Print"), beamMenu_X ); | 1074 | importMenu->insertItem( i18n("Print"), beamMenu_X ); |
1074 | #endif | 1075 | #endif |
1075 | importMenu->insertSeparator(); | 1076 | importMenu->insertSeparator(); |
1076 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1077 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1077 | this ); | 1078 | this ); |
1078 | action->addTo( importMenu ); | 1079 | action->addTo( importMenu ); |
1079 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1080 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1080 | importMenu->insertSeparator(); | 1081 | importMenu->insertSeparator(); |
1081 | action = new QAction( "beam all", i18n("Save"), 0, | 1082 | action = new QAction( "beam all", i18n("Save"), 0, |
1082 | this ); | 1083 | this ); |
1083 | action->addTo( importMenu ); | 1084 | action->addTo( importMenu ); |
1084 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 1085 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
1085 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 1086 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
1086 | this ); | 1087 | this ); |
1087 | action->addTo( importMenu ); | 1088 | action->addTo( importMenu ); |
1088 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 1089 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
1089 | 1090 | ||
1090 | //menuBar->insertItem( "Configure",configureMenu ); | 1091 | //menuBar->insertItem( "Configure",configureMenu ); |
1091 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 1092 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
1092 | icon = loadPixmap( "korganizer/korganizer" ); | 1093 | icon = loadPixmap( "korganizer/korganizer" ); |
1093 | 1094 | ||
1094 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 1095 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
1095 | action->addTo( helpMenu ); | 1096 | action->addTo( helpMenu ); |
@@ -2406,49 +2407,52 @@ void MainWindow::syncFileRequest() | |||
2406 | { | 2407 | { |
2407 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2408 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
2408 | mSyncManager->slotSyncMenu( 999 ); | 2409 | mSyncManager->slotSyncMenu( 999 ); |
2409 | } | 2410 | } |
2410 | 2411 | ||
2411 | setCaption(i18n("Saving Data to temp file ..." )); | 2412 | setCaption(i18n("Saving Data to temp file ..." )); |
2412 | mView->saveCalendar( sentSyncFile() ); | 2413 | mView->saveCalendar( sentSyncFile() ); |
2413 | setCaption(i18n("Data saved to temp file!" )); | 2414 | setCaption(i18n("Data saved to temp file!" )); |
2414 | 2415 | ||
2415 | } | 2416 | } |
2416 | void MainWindow::getFile( bool success ) | 2417 | void MainWindow::getFile( bool success ) |
2417 | { | 2418 | { |
2418 | if ( ! success ) { | 2419 | if ( ! success ) { |
2419 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 2420 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
2420 | return; | 2421 | return; |
2421 | } | 2422 | } |
2422 | mView->openCalendar( sentSyncFile() ); | 2423 | mView->openCalendar( sentSyncFile() ); |
2423 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2424 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
2424 | mSyncManager->slotSyncMenu( 999 ); | 2425 | mSyncManager->slotSyncMenu( 999 ); |
2425 | } | 2426 | } |
2426 | setCaption( i18n("Pi-Sync successful!") ); | 2427 | setCaption( i18n("Pi-Sync successful!") ); |
2427 | } | 2428 | } |
2428 | void MainWindow::printListView() | 2429 | void MainWindow::printListView() |
2429 | { | 2430 | { |
2430 | qDebug("MainWindow::printListView() "); | 2431 | |
2432 | QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items."); | ||
2433 | |||
2434 | KMessageBox::information( this, message); | ||
2431 | } | 2435 | } |
2432 | void MainWindow::printSel( ) | 2436 | void MainWindow::printSel( ) |
2433 | { | 2437 | { |
2434 | mView->viewManager()->agendaView()->agenda()->printSelection(); | 2438 | mView->viewManager()->agendaView()->agenda()->printSelection(); |
2435 | } | 2439 | } |
2436 | 2440 | ||
2437 | void MainWindow::printCal() | 2441 | void MainWindow::printCal() |
2438 | { | 2442 | { |
2439 | mView->print();//mCp->showDialog(); | 2443 | mView->print();//mCp->showDialog(); |
2440 | } | 2444 | } |
2441 | 2445 | ||
2442 | 2446 | ||
2443 | #include "libkdepim/kdatepicker.h" | 2447 | #include "libkdepim/kdatepicker.h" |
2444 | #include <kdatetbl.h> | 2448 | #include <kdatetbl.h> |
2445 | 2449 | ||
2446 | void MainWindow::weekAction() | 2450 | void MainWindow::weekAction() |
2447 | { | 2451 | { |
2448 | int month; | 2452 | int month; |
2449 | KPopupFrame* popup = new KPopupFrame(this); | 2453 | KPopupFrame* popup = new KPopupFrame(this); |
2450 | KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); | 2454 | KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); |
2451 | // ----- | 2455 | // ----- |
2452 | picker->resize(picker->sizeHint()); | 2456 | picker->resize(picker->sizeHint()); |
2453 | popup->setMainWidget(picker); | 2457 | popup->setMainWidget(picker); |
2454 | picker->setFocus(); | 2458 | picker->setFocus(); |