summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-01 12:29:24 (UTC)
committer zautrix <zautrix>2005-07-01 12:29:24 (UTC)
commiteee2e65aebe1c93a0c391a927b86ce87a278a4df (patch) (unidiff)
tree43ed9c4e1195edfd0e9d07a6ae9b88e0f86474b6 /korganizer
parent5d603fd22bc8126c6a9a6f377701669d3cee18f2 (diff)
downloadkdepimpi-eee2e65aebe1c93a0c391a927b86ce87a278a4df.zip
kdepimpi-eee2e65aebe1c93a0c391a927b86ce87a278a4df.tar.gz
kdepimpi-eee2e65aebe1c93a0c391a927b86ce87a278a4df.tar.bz2
fixxx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index a5d8824..b6ce7d5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -465,809 +465,803 @@ void MainWindow::toggleBeamReceive()
465 brAction->setOn(true); 465 brAction->setOn(true);
466 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 466 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
467 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 467 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
468#endif 468#endif
469} 469}
470void MainWindow::showMaximized () 470void MainWindow::showMaximized ()
471{ 471{
472#ifndef DESKTOP_VERSION 472#ifndef DESKTOP_VERSION
473 if ( ! globalFlagBlockStartup ) 473 if ( ! globalFlagBlockStartup )
474 if ( mClosed ) 474 if ( mClosed )
475 mView->goToday(); 475 mView->goToday();
476#endif 476#endif
477 QWidget::showMaximized () ; 477 QWidget::showMaximized () ;
478 mClosed = false; 478 mClosed = false;
479} 479}
480void MainWindow::closeEvent( QCloseEvent* ce ) 480void MainWindow::closeEvent( QCloseEvent* ce )
481{ 481{
482 482
483 483
484 484
485 if ( ! KOPrefs::instance()->mAskForQuit ) { 485 if ( ! KOPrefs::instance()->mAskForQuit ) {
486 saveOnClose(); 486 saveOnClose();
487 mClosed = true; 487 mClosed = true;
488 ce->accept(); 488 ce->accept();
489 return; 489 return;
490 490
491 } 491 }
492 492
493 switch( QMessageBox::information( this, "KO/Pi", 493 switch( QMessageBox::information( this, "KO/Pi",
494 i18n("Do you really want\nto close KO/Pi?"), 494 i18n("Do you really want\nto close KO/Pi?"),
495 i18n("Close"), i18n("No"), 495 i18n("Close"), i18n("No"),
496 0, 0 ) ) { 496 0, 0 ) ) {
497 case 0: 497 case 0:
498 saveOnClose(); 498 saveOnClose();
499 mClosed = true; 499 mClosed = true;
500 ce->accept(); 500 ce->accept();
501 break; 501 break;
502 case 1: 502 case 1:
503 ce->ignore(); 503 ce->ignore();
504 break; 504 break;
505 case 2: 505 case 2:
506 506
507 default: 507 default:
508 break; 508 break;
509 } 509 }
510 510
511 511
512} 512}
513 513
514void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 514void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
515{ 515{
516 QDataStream stream( data, IO_ReadOnly ); 516 QDataStream stream( data, IO_ReadOnly );
517 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 517 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
518 //QString datamess; 518 //QString datamess;
519 //qDebug("message "); 519 //qDebug("message ");
520 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 520 qDebug("KO: QCOP message received: %s ", cmsg.data() );
521 521
522 if ( cmsg == "setDocument(QString)" ) { 522 if ( cmsg == "setDocument(QString)" ) {
523 QDataStream stream( data, IO_ReadOnly ); 523 QDataStream stream( data, IO_ReadOnly );
524 QString fileName; 524 QString fileName;
525 stream >> fileName; 525 stream >> fileName;
526 //qDebug("filename %s ", fileName.latin1()); 526 //qDebug("filename %s ", fileName.latin1());
527 showMaximized(); 527 showMaximized();
528 raise(); 528 raise();
529 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 529 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
530 mSyncManager->slotSyncMenu( 1002 ); 530 mSyncManager->slotSyncMenu( 1002 );
531 return; 531 return;
532 } 532 }
533 533
534 if ( cmsg == "-writeFile" ) { 534 if ( cmsg == "-writeFile" ) {
535 // I made from the "-writeFile" an "-writeAlarm" 535 // I made from the "-writeFile" an "-writeAlarm"
536 mView->viewManager()->showWhatsNextView(); 536 mView->viewManager()->showWhatsNextView();
537 mCalendar->checkAlarmForIncidence( 0, true); 537 mCalendar->checkAlarmForIncidence( 0, true);
538 showMaximized(); 538 showMaximized();
539 raise(); 539 raise();
540 return; 540 return;
541 541
542 } 542 }
543 if ( cmsg == "-writeFileSilent" ) { 543 if ( cmsg == "-writeFileSilent" ) {
544 // I made from the "-writeFile" an "-writeAlarm" 544 // I made from the "-writeFile" an "-writeAlarm"
545 // mView->viewManager()->showWhatsNextView(); 545 // mView->viewManager()->showWhatsNextView();
546 mCalendar->checkAlarmForIncidence( 0, true); 546 mCalendar->checkAlarmForIncidence( 0, true);
547 //showMaximized(); 547 //showMaximized();
548 //raise(); 548 //raise();
549 hide(); 549 hide();
550 return; 550 return;
551 } 551 }
552 if ( cmsg == "-newCountdown" ) { 552 if ( cmsg == "-newCountdown" ) {
553 qDebug("newCountdown "); 553 qDebug("newCountdown ");
554 554
555 } 555 }
556 QString msg ; 556 QString msg ;
557 QString allmsg = cmsg; 557 QString allmsg = cmsg;
558 while ( allmsg.length() > 0 ) { 558 while ( allmsg.length() > 0 ) {
559 int nextC = allmsg.find( "-", 1 ); 559 int nextC = allmsg.find( "-", 1 );
560 if ( nextC == -1 ) { 560 if ( nextC == -1 ) {
561 msg = allmsg; 561 msg = allmsg;
562 allmsg = ""; 562 allmsg = "";
563 } else{ 563 } else{
564 msg = allmsg.left( nextC ); 564 msg = allmsg.left( nextC );
565 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 565 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
566 } 566 }
567 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 567 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
568 if ( msg == "-newEvent" ) { 568 if ( msg == "-newEvent" ) {
569 QTimer::singleShot( 0, mView, SLOT ( newEvent())); 569 QTimer::singleShot( 0, mView, SLOT ( newEvent()));
570 } 570 }
571 if ( msg == "-newTodo" ) { 571 if ( msg == "-newTodo" ) {
572 QTimer::singleShot( 0, mView, SLOT ( newTodo())); 572 QTimer::singleShot( 0, mView, SLOT ( newTodo()));
573 } 573 }
574 if ( msg == "-showWN" ) { 574 if ( msg == "-showWN" ) {
575 mView->viewManager()->showWhatsNextView(); 575 mView->viewManager()->showWhatsNextView();
576 } 576 }
577 if ( msg == "-showTodo" ) { 577 if ( msg == "-showTodo" ) {
578 mView->viewManager()->showTodoView(); 578 mView->viewManager()->showTodoView();
579 } 579 }
580 if ( msg == "-showList" ) { 580 if ( msg == "-showList" ) {
581 mView->viewManager()->showListView(); 581 mView->viewManager()->showListView();
582 } 582 }
583 else if ( msg == "-showDay" ) { 583 else if ( msg == "-showDay" ) {
584 mView->viewManager()->showDayView(); 584 mView->viewManager()->showDayView();
585 } 585 }
586 else if ( msg == "-showWWeek" ) { 586 else if ( msg == "-showWWeek" ) {
587 mView->viewManager()->showWorkWeekView(); 587 mView->viewManager()->showWorkWeekView();
588 } 588 }
589 else if ( msg == "-ringSync" ) { 589 else if ( msg == "-ringSync" ) {
590 QTimer::singleShot( 0, this, SLOT (startMultiSync())); 590 QTimer::singleShot( 0, this, SLOT (startMultiSync()));
591 } 591 }
592 else if ( msg == "-showWeek" ) { 592 else if ( msg == "-showWeek" ) {
593 mView->viewManager()->showWeekView(); 593 mView->viewManager()->showWeekView();
594 } 594 }
595 else if ( msg == "-showTodo" ) { 595 else if ( msg == "-showTodo" ) {
596 mView->viewManager()->showTodoView(); 596 mView->viewManager()->showTodoView();
597 } 597 }
598 else if ( msg == "-showJournal" ) { 598 else if ( msg == "-showJournal" ) {
599 mView->dateNavigator()->selectDates( 1 ); 599 mView->dateNavigator()->selectDates( 1 );
600 mView->dateNavigator()->selectToday(); 600 mView->dateNavigator()->selectToday();
601 mView->viewManager()->showJournalView(); 601 mView->viewManager()->showJournalView();
602 } 602 }
603 else if ( msg == "-showKO" ) { 603 else if ( msg == "-showKO" ) {
604 mView->viewManager()->showNextXView(); 604 mView->viewManager()->showNextXView();
605 } 605 }
606 else if ( msg == "-showWNext" ) { 606 else if ( msg == "-showWNext" ) {
607 mView->viewManager()->showWhatsNextView(); 607 mView->viewManager()->showWhatsNextView();
608 } 608 }
609 else if ( msg == "nextView()" ) { 609 else if ( msg == "nextView()" ) {
610 mView->viewManager()->showNextView(); 610 mView->viewManager()->showNextView();
611 } 611 }
612 else if ( msg == "-showNextXView" ) { 612 else if ( msg == "-showNextXView" ) {
613 mView->viewManager()->showNextXView(); 613 mView->viewManager()->showNextXView();
614 } 614 }
615 615
616 616
617 } 617 }
618 618
619 showMaximized(); 619 showMaximized();
620 raise(); 620 raise();
621} 621}
622void MainWindow::startMultiSync() 622void MainWindow::startMultiSync()
623{ 623{
624 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); 624 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
625 if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), 625 if ( QMessageBox::information( this, i18n("KDE-Pim Sync"),
626 question, 626 question,
627 i18n("Yes"), i18n("No"), 627 i18n("Yes"), i18n("No"),
628 0, 0 ) != 0 ) { 628 0, 0 ) != 0 ) {
629 setCaption(i18n("Aborted! Nothing synced!")); 629 setCaption(i18n("Aborted! Nothing synced!"));
630 return; 630 return;
631 } 631 }
632 mSyncManager->multiSync( false ); 632 mSyncManager->multiSync( false );
633#ifndef DESKTOP_VERSION 633#ifndef DESKTOP_VERSION
634 QCopEnvelope e("QPE/Application/kapi", "doRingSync"); 634 QCopEnvelope e("QPE/Application/kapi", "doRingSync");
635#endif 635#endif
636} 636}
637QPixmap MainWindow::loadPixmap( QString name ) 637QPixmap MainWindow::loadPixmap( QString name )
638{ 638{
639 return SmallIcon( name ); 639 return SmallIcon( name );
640 640
641} 641}
642void MainWindow::setUsesBigPixmaps ( bool b ) 642void MainWindow::setUsesBigPixmaps ( bool b )
643{ 643{
644 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 644 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
645 if ( b ) 645 if ( b )
646 qDebug("KO: BigPixmaps are not supported "); 646 qDebug("KO: BigPixmaps are not supported ");
647} 647}
648void MainWindow::initActions() 648void MainWindow::initActions()
649{ 649{
650 //KOPrefs::instance()->mShowFullMenu 650 //KOPrefs::instance()->mShowFullMenu
651 iconToolBar->clear(); 651 iconToolBar->clear();
652 KOPrefs *p = KOPrefs::instance(); 652 KOPrefs *p = KOPrefs::instance();
653 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 653 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
654 654
655 QPopupMenu *viewMenu = new QPopupMenu( this ); 655 QPopupMenu *viewMenu = new QPopupMenu( this );
656 QPopupMenu *actionMenu = new QPopupMenu( this ); 656 QPopupMenu *actionMenu = new QPopupMenu( this );
657#ifdef DESKTOP_VERSION
658 mCurrentItemMenu = actionMenu;
659#else
660 mCurrentItemMenu = new QPopupMenu ( this ); 657 mCurrentItemMenu = new QPopupMenu ( this );
661#endif
662 QPopupMenu *importMenu = new QPopupMenu( this ); 658 QPopupMenu *importMenu = new QPopupMenu( this );
663 QPopupMenu *importMenu_X = new QPopupMenu( this ); 659 QPopupMenu *importMenu_X = new QPopupMenu( this );
664 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 660 QPopupMenu *exportMenu_X = new QPopupMenu( this );
665 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 661 QPopupMenu *beamMenu_X = new QPopupMenu( this );
666 selectFilterMenu = new QPopupMenu( this ); 662 selectFilterMenu = new QPopupMenu( this );
667 selectFilterMenu->setCheckable( true ); 663 selectFilterMenu->setCheckable( true );
668 syncMenu = new QPopupMenu( this ); 664 syncMenu = new QPopupMenu( this );
669 configureAgendaMenu = new QPopupMenu( this ); 665 configureAgendaMenu = new QPopupMenu( this );
670 configureToolBarMenu = new QPopupMenu( this ); 666 configureToolBarMenu = new QPopupMenu( this );
671 QPopupMenu *helpMenu = new QPopupMenu( this ); 667 QPopupMenu *helpMenu = new QPopupMenu( this );
672 QIconSet icon; 668 QIconSet icon;
673 int pixWid = 22, pixHei = 22; 669 int pixWid = 22, pixHei = 22;
674 QString pathString = ""; 670 QString pathString = "";
675 if ( !p->mToolBarMiniIcons ) { 671 if ( !p->mToolBarMiniIcons ) {
676 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { 672 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
677 pathString += "icons16/"; 673 pathString += "icons16/";
678 pixWid = 18; pixHei = 16; 674 pixWid = 18; pixHei = 16;
679 } 675 }
680 } else { 676 } else {
681 pathString += "iconsmini/"; 677 pathString += "iconsmini/";
682 pixWid = 18; pixHei = 16; 678 pixWid = 18; pixHei = 16;
683 } 679 }
684 if ( KOPrefs::instance()->mShowFullMenu ) { 680 if ( KOPrefs::instance()->mShowFullMenu ) {
685 QMenuBar *menuBar1; 681 QMenuBar *menuBar1;
686 menuBar1 = menuBar(); 682 menuBar1 = menuBar();
687 menuBar1->insertItem( i18n("File"), importMenu ); 683 menuBar1->insertItem( i18n("File"), importMenu );
688 menuBar1->insertItem( i18n("View"), viewMenu ); 684 menuBar1->insertItem( i18n("View"), viewMenu );
689 menuBar1->insertItem( i18n("Actions"), actionMenu ); 685 menuBar1->insertItem( i18n("Actions"), actionMenu );
690#ifdef DESKTOP_VERSION 686#ifdef DESKTOP_VERSION
691 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 687 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
692 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 688 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
693#else 689#else
694 menuBar1->insertItem( i18n("Sync"), syncMenu ); 690 menuBar1->insertItem( i18n("Sync"), syncMenu );
695 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 691 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
696#endif 692#endif
697 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 693 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
698 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 694 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
699 menuBar1->insertItem( i18n("Help"), helpMenu ); 695 menuBar1->insertItem( i18n("Help"), helpMenu );
700 } else { 696 } else {
701 QPEMenuBar *menuBar1; 697 QPEMenuBar *menuBar1;
702 menuBar1 = new QPEMenuBar( iconToolBar ); 698 menuBar1 = new QPEMenuBar( iconToolBar );
703 QPopupMenu *menuBar = new QPopupMenu( this ); 699 QPopupMenu *menuBar = new QPopupMenu( this );
704 icon = loadPixmap( pathString + "z_menu" ); 700 icon = loadPixmap( pathString + "z_menu" );
705 menuBar1->insertItem( icon.pixmap(), menuBar); 701 menuBar1->insertItem( icon.pixmap(), menuBar);
706 //menuBar1->insertItem( i18n("ME"), menuBar); 702 //menuBar1->insertItem( i18n("ME"), menuBar);
707 menuBar->insertItem( i18n("File"), importMenu ); 703 menuBar->insertItem( i18n("File"), importMenu );
708 menuBar->insertItem( i18n("View"), viewMenu ); 704 menuBar->insertItem( i18n("View"), viewMenu );
709 menuBar->insertItem( i18n("Actions"), actionMenu ); 705 menuBar->insertItem( i18n("Actions"), actionMenu );
710 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 706 menuBar->insertItem( i18n("Synchronize"), syncMenu );
711 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 707 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
712 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 708 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
713 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 709 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
714 menuBar->insertItem( i18n("Help"), helpMenu ); 710 menuBar->insertItem( i18n("Help"), helpMenu );
715 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 711 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
716 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 712 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
717 } 713 }
718 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 714 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
719 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 715 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
720 716
721 717
722 mWeekBgColor = iconToolBar->backgroundColor(); 718 mWeekBgColor = iconToolBar->backgroundColor();
723 mWeekPixmap.resize( pixWid , pixHei ); 719 mWeekPixmap.resize( pixWid , pixHei );
724 mWeekPixmap.fill( mWeekBgColor ); 720 mWeekPixmap.fill( mWeekBgColor );
725 icon = mWeekPixmap; 721 icon = mWeekPixmap;
726 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 722 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
727 if ( p-> mShowIconWeekNum ) 723 if ( p-> mShowIconWeekNum )
728 mWeekAction->addTo( iconToolBar ); 724 mWeekAction->addTo( iconToolBar );
729 mWeekFont = font(); 725 mWeekFont = font();
730 726
731 int fontPoint = mWeekFont.pointSize(); 727 int fontPoint = mWeekFont.pointSize();
732 QFontMetrics f( mWeekFont ); 728 QFontMetrics f( mWeekFont );
733 int fontWid = f.width( "30" ); 729 int fontWid = f.width( "30" );
734 while ( fontWid > pixWid ) { 730 while ( fontWid > pixWid ) {
735 --fontPoint; 731 --fontPoint;
736 mWeekFont.setPointSize( fontPoint ); 732 mWeekFont.setPointSize( fontPoint );
737 QFontMetrics f( mWeekFont ); 733 QFontMetrics f( mWeekFont );
738 fontWid = f.width( "30" ); 734 fontWid = f.width( "30" );
739 //qDebug("dec-- "); 735 //qDebug("dec-- ");
740 } 736 }
741 737
742 connect( mWeekAction, SIGNAL( activated() ), 738 connect( mWeekAction, SIGNAL( activated() ),
743 this, SLOT( weekAction() ) ); 739 this, SLOT( weekAction() ) );
744 740
745 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 741 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
746 if ( p->mShowIconFilterview ) { 742 if ( p->mShowIconFilterview ) {
747 icon = loadPixmap( pathString + "filter" ); 743 icon = loadPixmap( pathString + "filter" );
748 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 744 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
749 connect( actionFilterMenuTB, SIGNAL( activated() ), 745 connect( actionFilterMenuTB, SIGNAL( activated() ),
750 this, SLOT( fillFilterMenuTB() ) ); 746 this, SLOT( fillFilterMenuTB() ) );
751 actionFilterMenuTB->addTo( iconToolBar ); 747 actionFilterMenuTB->addTo( iconToolBar );
752 selectFilterMenuTB = new QPopupMenu( this ); 748 selectFilterMenuTB = new QPopupMenu( this );
753 selectFilterMenuTB->setCheckable( true ); 749 selectFilterMenuTB->setCheckable( true );
754 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 750 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
755 } 751 }
756 752
757 //#endif 753 //#endif
758 // ****************** 754 // ******************
759 QAction *action; 755 QAction *action;
760 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 756 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
761 configureToolBarMenu->setCheckable( true ); 757 configureToolBarMenu->setCheckable( true );
762 758
763 759
764 configureAgendaMenu->setCheckable( true ); 760 configureAgendaMenu->setCheckable( true );
765 int iii ; 761 int iii ;
766 for ( iii = 1;iii<= 10 ;++iii ){ 762 for ( iii = 1;iii<= 10 ;++iii ){
767 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 763 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
768 } 764 }
769 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 765 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
770 766
771 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 767 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
772 this, SLOT( showConfigureAgenda( ) ) ); 768 this, SLOT( showConfigureAgenda( ) ) );
773 icon = loadPixmap( pathString + "today" ); 769 icon = loadPixmap( pathString + "today" );
774 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 770 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
775 today_action->addTo( actionMenu ); 771 today_action->addTo( actionMenu );
776 connect( today_action, SIGNAL( activated() ), 772 connect( today_action, SIGNAL( activated() ),
777 mView, SLOT( goToday() ) ); 773 mView, SLOT( goToday() ) );
778 774
779 icon = loadPixmap( pathString + "picker" ); 775 icon = loadPixmap( pathString + "picker" );
780 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); 776 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
781 dPickerAction->addTo( actionMenu ); 777 dPickerAction->addTo( actionMenu );
782 connect( dPickerAction, SIGNAL( activated() ), 778 connect( dPickerAction, SIGNAL( activated() ),
783 mView, SLOT( showDatePicker() ) ); 779 mView, SLOT( showDatePicker() ) );
784 780
785 icon = loadPixmap( pathString + "search" ); 781 icon = loadPixmap( pathString + "search" );
786 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 782 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
787 search_action->addTo( actionMenu ); 783 search_action->addTo( actionMenu );
788 connect( search_action, SIGNAL( activated() ), 784 connect( search_action, SIGNAL( activated() ),
789 mView->dialogManager(), SLOT( showSearchDialog() ) ); 785 mView->dialogManager(), SLOT( showSearchDialog() ) );
790 786
791 actionMenu->insertSeparator(); 787 actionMenu->insertSeparator();
792 788
793 789
794 790
795 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 791 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
796 action->addTo( actionMenu ); 792 action->addTo( actionMenu );
797 connect( action, SIGNAL( activated() ), 793 connect( action, SIGNAL( activated() ),
798 mView, SLOT( undo_delete() ) ); 794 mView, SLOT( undo_delete() ) );
799 795
800 icon = loadPixmap( pathString + "newevent" ); 796 icon = loadPixmap( pathString + "newevent" );
801 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 797 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
802 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 798 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
803 configureToolBarMenu->insertSeparator(); 799 configureToolBarMenu->insertSeparator();
804 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 800 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
805 configureToolBarMenu->insertSeparator(); 801 configureToolBarMenu->insertSeparator();
806 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 802 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
807 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 803 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
808 804
809#ifndef DESKTOP_VERSION
810 actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); 805 actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
811#endif
812 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 806 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
813 mShowAction->addTo( mCurrentItemMenu ); 807 mShowAction->addTo( mCurrentItemMenu );
814 connect( mShowAction, SIGNAL( activated() ), 808 connect( mShowAction, SIGNAL( activated() ),
815 mView, SLOT( showIncidence() ) ); 809 mView, SLOT( showIncidence() ) );
816 810
817 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 811 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
818 mEditAction->addTo( mCurrentItemMenu ); 812 mEditAction->addTo( mCurrentItemMenu );
819 connect( mEditAction, SIGNAL( activated() ), 813 connect( mEditAction, SIGNAL( activated() ),
820 mView, SLOT( editIncidence() ) ); 814 mView, SLOT( editIncidence() ) );
821 815
822 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 816 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
823 mDeleteAction->addTo( mCurrentItemMenu ); 817 mDeleteAction->addTo( mCurrentItemMenu );
824 connect( mDeleteAction, SIGNAL( activated() ), 818 connect( mDeleteAction, SIGNAL( activated() ),
825 mView, SLOT( deleteIncidence() ) ); 819 mView, SLOT( deleteIncidence() ) );
826 820
827 821
828 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 822 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
829 mCloneAction->addTo( mCurrentItemMenu ); 823 mCloneAction->addTo( mCurrentItemMenu );
830 connect( mCloneAction, SIGNAL( activated() ), 824 connect( mCloneAction, SIGNAL( activated() ),
831 mView, SLOT( cloneIncidence() ) ); 825 mView, SLOT( cloneIncidence() ) );
832 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 826 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
833 mMoveAction->addTo( mCurrentItemMenu ); 827 mMoveAction->addTo( mCurrentItemMenu );
834 connect( mMoveAction, SIGNAL( activated() ), 828 connect( mMoveAction, SIGNAL( activated() ),
835 mView, SLOT( moveIncidence() ) ); 829 mView, SLOT( moveIncidence() ) );
836 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 830 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
837 mBeamAction->addTo(mCurrentItemMenu ); 831 mBeamAction->addTo(mCurrentItemMenu );
838 connect( mBeamAction, SIGNAL( activated() ), 832 connect( mBeamAction, SIGNAL( activated() ),
839 mView, SLOT( beamIncidence() ) ); 833 mView, SLOT( beamIncidence() ) );
840 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 834 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
841 mCancelAction->addTo( mCurrentItemMenu ); 835 mCancelAction->addTo( mCurrentItemMenu );
842 connect( mCancelAction, SIGNAL( activated() ), 836 connect( mCancelAction, SIGNAL( activated() ),
843 mView, SLOT( toggleCancelIncidence() ) ); 837 mView, SLOT( toggleCancelIncidence() ) );
844#ifdef DESKTOP_VERSION 838#ifdef DESKTOP_VERSION
845 actionMenu->insertSeparator(); 839 actionMenu->insertSeparator();
846#endif 840#endif
847 841
848 842
849 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 843 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
850 ne_action->addTo( actionMenu ); 844 ne_action->addTo( actionMenu );
851 connect( ne_action, SIGNAL( activated() ), 845 connect( ne_action, SIGNAL( activated() ),
852 mView, SLOT( newEvent() ) ); 846 mView, SLOT( newEvent() ) );
853 icon = loadPixmap( pathString + "newtodo" ); 847 icon = loadPixmap( pathString + "newtodo" );
854 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 848 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
855 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 849 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
856 nt_action->addTo( actionMenu ); 850 nt_action->addTo( actionMenu );
857 connect( nt_action, SIGNAL( activated() ), 851 connect( nt_action, SIGNAL( activated() ),
858 mView, SLOT( newTodo() ) ); 852 mView, SLOT( newTodo() ) );
859 853
860 854
861 855
862 // *********************** 856 // ***********************
863 if ( KOPrefs::instance()->mVerticalScreen ) { 857 if ( KOPrefs::instance()->mVerticalScreen ) {
864 icon = SmallIcon( "1updownarrow" ); 858 icon = SmallIcon( "1updownarrow" );
865 } else { 859 } else {
866 icon = SmallIcon("1leftrightarrow" ); 860 icon = SmallIcon("1leftrightarrow" );
867 } 861 }
868 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 862 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
869 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 863 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
870 FSaction->addTo( viewMenu ); 864 FSaction->addTo( viewMenu );
871 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 865 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
872 866
873 867
874 icon = loadPixmap( pathString + "filter" ); 868 icon = loadPixmap( pathString + "filter" );
875 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 869 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
876 icon = loadPixmap( pathString + "configure" ); 870 icon = loadPixmap( pathString + "configure" );
877 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 871 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
878 action->addTo( viewMenu ); 872 action->addTo( viewMenu );
879 connect( action, SIGNAL( activated() ), 873 connect( action, SIGNAL( activated() ),
880 mView, SLOT( toggleFilter() ) ); 874 mView, SLOT( toggleFilter() ) );
881 mToggleFilter = action; 875 mToggleFilter = action;
882 icon = loadPixmap( pathString + "navi" ); 876 icon = loadPixmap( pathString + "navi" );
883 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 877 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
884 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 878 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
885 action->addTo( viewMenu ); 879 action->addTo( viewMenu );
886 connect( action, SIGNAL( activated() ), 880 connect( action, SIGNAL( activated() ),
887 mView, SLOT( toggleDateNavigatorWidget() ) ); 881 mView, SLOT( toggleDateNavigatorWidget() ) );
888 mToggleNav = action ; 882 mToggleNav = action ;
889 icon = loadPixmap( pathString + "allday" ); 883 icon = loadPixmap( pathString + "allday" );
890 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 884 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
891 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 885 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
892 action->addTo( viewMenu ); 886 action->addTo( viewMenu );
893 connect( action, SIGNAL( activated() ), 887 connect( action, SIGNAL( activated() ),
894 mView, SLOT( toggleAllDaySize() ) ); 888 mView, SLOT( toggleAllDaySize() ) );
895 mToggleAllday = action; 889 mToggleAllday = action;
896 890
897 891
898 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 892 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
899 mToggleNav, SLOT( setEnabled ( bool ) ) ); 893 mToggleNav, SLOT( setEnabled ( bool ) ) );
900 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 894 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
901 // mToggleFilter, SLOT( setEnabled ( bool ) ) ); 895 // mToggleFilter, SLOT( setEnabled ( bool ) ) );
902 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 896 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
903 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 897 mToggleAllday, SLOT( setEnabled ( bool ) ) );
904 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 898 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
905 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 899 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
906 900
907 901
908 dPickerAction->addTo( iconToolBar ); 902 dPickerAction->addTo( iconToolBar );
909 viewMenu->insertSeparator(); 903 viewMenu->insertSeparator();
910 904
911 if ( p-> mShowIconToggleFull ) 905 if ( p-> mShowIconToggleFull )
912 FSaction->addTo( iconToolBar ); 906 FSaction->addTo( iconToolBar );
913 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); 907 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
914 908
915 //******************** 909 //********************
916 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); 910 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
917 911
918 912
919 icon = loadPixmap( pathString + "whatsnext" ); 913 icon = loadPixmap( pathString + "whatsnext" );
920 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 914 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
921 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 915 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
922 whatsnext_action->addTo( viewMenu ); 916 whatsnext_action->addTo( viewMenu );
923 connect( whatsnext_action, SIGNAL( activated() ), 917 connect( whatsnext_action, SIGNAL( activated() ),
924 mView->viewManager(), SLOT( showWhatsNextView() ) ); 918 mView->viewManager(), SLOT( showWhatsNextView() ) );
925 919
926 icon = loadPixmap( pathString + "xdays" ); 920 icon = loadPixmap( pathString + "xdays" );
927 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 921 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
928 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 922 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
929 xdays_action->addTo( viewMenu ); 923 xdays_action->addTo( viewMenu );
930 connect( xdays_action, SIGNAL( activated() ), 924 connect( xdays_action, SIGNAL( activated() ),
931 mView->viewManager(), SLOT( showNextXView() ) ); 925 mView->viewManager(), SLOT( showNextXView() ) );
932 926
933 927
934 icon = loadPixmap( pathString + "journal" ); 928 icon = loadPixmap( pathString + "journal" );
935 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 929 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
936 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 930 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
937 viewjournal_action->addTo( viewMenu ); 931 viewjournal_action->addTo( viewMenu );
938 connect( viewjournal_action, SIGNAL( activated() ), 932 connect( viewjournal_action, SIGNAL( activated() ),
939 mView->viewManager(), SLOT( showJournalView() ) ); 933 mView->viewManager(), SLOT( showJournalView() ) );
940 934
941 935
942 icon = loadPixmap( pathString + "day" ); 936 icon = loadPixmap( pathString + "day" );
943 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 937 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
944 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 938 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
945 day1_action->addTo( viewMenu ); 939 day1_action->addTo( viewMenu );
946 // action->addTo( toolBar ); 940 // action->addTo( toolBar );
947 connect( day1_action, SIGNAL( activated() ), 941 connect( day1_action, SIGNAL( activated() ),
948 mView->viewManager(), SLOT( showDayView() ) ); 942 mView->viewManager(), SLOT( showDayView() ) );
949 943
950 icon = loadPixmap( pathString + "workweek" ); 944 icon = loadPixmap( pathString + "workweek" );
951 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 945 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
952 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 946 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
953 day5_action->addTo( viewMenu ); 947 day5_action->addTo( viewMenu );
954 connect( day5_action, SIGNAL( activated() ), 948 connect( day5_action, SIGNAL( activated() ),
955 mView->viewManager(), SLOT( showWorkWeekView() ) ); 949 mView->viewManager(), SLOT( showWorkWeekView() ) );
956 950
957 icon = loadPixmap( pathString + "week" ); 951 icon = loadPixmap( pathString + "week" );
958 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 952 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
959 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 953 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
960 day7_action->addTo( viewMenu ); 954 day7_action->addTo( viewMenu );
961 connect( day7_action, SIGNAL( activated() ), 955 connect( day7_action, SIGNAL( activated() ),
962 mView->viewManager(), SLOT( showWeekView() ) ); 956 mView->viewManager(), SLOT( showWeekView() ) );
963 957
964 icon = loadPixmap( pathString + "workweek2" ); 958 icon = loadPixmap( pathString + "workweek2" );
965 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 959 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
966 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 960 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
967 day6_action->addTo( viewMenu ); 961 day6_action->addTo( viewMenu );
968 connect( day6_action, SIGNAL( activated() ), 962 connect( day6_action, SIGNAL( activated() ),
969 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 963 mView->viewManager(), SLOT( showMonthViewWeek() ) );
970 964
971 icon = loadPixmap( pathString + "month" ); 965 icon = loadPixmap( pathString + "month" );
972 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 966 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
973 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 967 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
974 month_action->addTo( viewMenu ); 968 month_action->addTo( viewMenu );
975 connect( month_action, SIGNAL( activated() ), 969 connect( month_action, SIGNAL( activated() ),
976 mView->viewManager(), SLOT( showMonthView() ) ); 970 mView->viewManager(), SLOT( showMonthView() ) );
977 971
978 icon = loadPixmap( pathString + "list" ); 972 icon = loadPixmap( pathString + "list" );
979 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 973 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
980 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 974 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
981 showlist_action->addTo( viewMenu ); 975 showlist_action->addTo( viewMenu );
982 connect( showlist_action, SIGNAL( activated() ), 976 connect( showlist_action, SIGNAL( activated() ),
983 mView->viewManager(), SLOT( showListView() ) ); 977 mView->viewManager(), SLOT( showListView() ) );
984 978
985 icon = loadPixmap( pathString + "todo" ); 979 icon = loadPixmap( pathString + "todo" );
986 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 980 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
987 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 981 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
988 todoview_action->addTo( viewMenu ); 982 todoview_action->addTo( viewMenu );
989 connect( todoview_action, SIGNAL( activated() ), 983 connect( todoview_action, SIGNAL( activated() ),
990 mView->viewManager(), SLOT( showTodoView() ) ); 984 mView->viewManager(), SLOT( showTodoView() ) );
991 985
992 986
993 987
994#if 0 988#if 0
995 action = new QAction( "view_timespan", "Time Span", 0, this ); 989 action = new QAction( "view_timespan", "Time Span", 0, this );
996 action->addTo( viewMenu ); 990 action->addTo( viewMenu );
997 connect( action, SIGNAL( activated() ), 991 connect( action, SIGNAL( activated() ),
998 mView->viewManager(), SLOT( showTimeSpanView() ) ); 992 mView->viewManager(), SLOT( showTimeSpanView() ) );
999#endif 993#endif
1000 994
1001 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 995 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
1002 this ); 996 this );
1003 mNewSubTodoAction->addTo( actionMenu ); 997 mNewSubTodoAction->addTo( actionMenu );
1004 connect( mNewSubTodoAction, SIGNAL( activated() ), 998 connect( mNewSubTodoAction, SIGNAL( activated() ),
1005 mView, SLOT( newSubTodo() ) ); 999 mView, SLOT( newSubTodo() ) );
1006 1000
1007 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, 1001 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0,
1008 this ); 1002 this );
1009 action->addTo( actionMenu ); 1003 action->addTo( actionMenu );
1010 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 1004 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
1011 1005
1012 1006
1013 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 1007 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
1014 1008
1015 1009
1016 1010
1017 actionMenu->insertSeparator(); 1011 actionMenu->insertSeparator();
1018 action = new QAction( "manage cat", i18n("Edit category list..."), 0, 1012 action = new QAction( "manage cat", i18n("Edit category list..."), 0,
1019 this ); 1013 this );
1020 action->addTo( actionMenu ); 1014 action->addTo( actionMenu );
1021 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); 1015 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) );
1022 1016
1023 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1017 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1024 this ); 1018 this );
1025 action->addTo( actionMenu ); 1019 action->addTo( actionMenu );
1026 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1020 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1027 1021
1028 1022
1029 actionMenu->insertSeparator(); 1023 actionMenu->insertSeparator();
1030 icon = loadPixmap( pathString + "configure" ); 1024 icon = loadPixmap( pathString + "configure" );
1031 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); 1025 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
1032 action->addTo( actionMenu ); 1026 action->addTo( actionMenu );
1033 connect( action, SIGNAL( activated() ), 1027 connect( action, SIGNAL( activated() ),
1034 mView, SLOT( edit_options() ) ); 1028 mView, SLOT( edit_options() ) );
1035 icon = loadPixmap( pathString + "configure" ); 1029 icon = loadPixmap( pathString + "configure" );
1036 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); 1030 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
1037 action->addTo( actionMenu ); 1031 action->addTo( actionMenu );
1038 connect( action, SIGNAL( activated() ), 1032 connect( action, SIGNAL( activated() ),
1039 mView, SLOT( edit_global_options() ) ); 1033 mView, SLOT( edit_global_options() ) );
1040 if ( KOPrefs::instance()->mShowFullMenu ) { 1034 if ( KOPrefs::instance()->mShowFullMenu ) {
1041 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 1035 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
1042 1036
1043 } 1037 }
1044 // actionMenu->insertSeparator(); 1038 // actionMenu->insertSeparator();
1045 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 1039 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
1046 this ); 1040 this );
1047 action->addTo( importMenu_X ); 1041 action->addTo( importMenu_X );
1048 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 1042 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
1049 action = new QAction( "import_quick", i18n("Import last file"), 0, 1043 action = new QAction( "import_quick", i18n("Import last file"), 0,
1050 this ); 1044 this );
1051 action->addTo( importMenu_X ); 1045 action->addTo( importMenu_X );
1052 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 1046 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
1053 importMenu_X->insertSeparator(); 1047 importMenu_X->insertSeparator();
1054 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 1048 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
1055 this ); 1049 this );
1056 action->addTo( importMenu_X ); 1050 action->addTo( importMenu_X );
1057 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 1051 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
1058 //#ifndef DESKTOP_VERSION 1052 //#ifndef DESKTOP_VERSION
1059 importMenu_X->insertSeparator(); 1053 importMenu_X->insertSeparator();
1060 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 1054 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
1061 this ); 1055 this );
1062 action->addTo( importMenu_X ); 1056 action->addTo( importMenu_X );
1063 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 1057 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
1064 //#else 1058 //#else
1065#ifdef _OL_IMPORT_ 1059#ifdef _OL_IMPORT_
1066 importMenu_X->insertSeparator(); 1060 importMenu_X->insertSeparator();
1067 action = new QAction( "import_ol", i18n("Import from OL"), 0, 1061 action = new QAction( "import_ol", i18n("Import from OL"), 0,
1068 this ); 1062 this );
1069 action->addTo( importMenu_X ); 1063 action->addTo( importMenu_X );
1070 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 1064 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
1071#endif 1065#endif
1072 //#endif 1066 //#endif
1073 1067
1074 //importMenu->insertSeparator(); 1068 //importMenu->insertSeparator();
1075#if 0 1069#if 0
1076 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1070 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
1077 this ); 1071 this );
1078 action->addTo( importMenu ); 1072 action->addTo( importMenu );
1079 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1073 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1080#endif 1074#endif
1081 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, 1075 action = new QAction( "save_cal", i18n("Save Calendar Backup..."), 0,
1082 this ); 1076 this );
1083 action->addTo( importMenu ); 1077 action->addTo( importMenu );
1084 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1078 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1085 importMenu->insertSeparator(); 1079 importMenu->insertSeparator();
1086 importMenu->insertItem( i18n("Import"), importMenu_X ); 1080 importMenu->insertItem( i18n("Import"), importMenu_X );
1087 //importMenu->insertSeparator(); 1081 //importMenu->insertSeparator();
1088 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1082 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
1089 this ); 1083 this );
1090 action->addTo( exportMenu_X ); 1084 action->addTo( exportMenu_X );
1091 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1085 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1092 1086
1093 1087
1094 //LR 1088 //LR
1095 QPopupMenu *ex2phone = new QPopupMenu( this ); 1089 QPopupMenu *ex2phone = new QPopupMenu( this );
1096 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1090 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1097 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1091 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1098 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1092 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
1099 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); 1093 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone );
1100 1094
1101 importMenu->insertItem( i18n("Export"), exportMenu_X ); 1095 importMenu->insertItem( i18n("Export"), exportMenu_X );
1102#ifndef DESKTOP_VERSION 1096#ifndef DESKTOP_VERSION
1103 //importMenu->insertSeparator(); 1097 //importMenu->insertSeparator();
1104 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1098 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
1105 this ); 1099 this );
1106 brAction->addTo( beamMenu_X ); 1100 brAction->addTo( beamMenu_X );
1107 brAction->setToggleAction (true ) ; 1101 brAction->setToggleAction (true ) ;
1108 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1102 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1109 1103
1110 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1104 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
1111 this ); 1105 this );
1112 action->addTo( beamMenu_X ); 1106 action->addTo( beamMenu_X );
1113 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1107 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1114 1108
1115 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1109 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
1116 this ); 1110 this );
1117 action->addTo( beamMenu_X ); 1111 action->addTo( beamMenu_X );
1118 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1112 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
1119 importMenu->insertItem( i18n("Beam"), beamMenu_X ); 1113 importMenu->insertItem( i18n("Beam"), beamMenu_X );
1120#else 1114#else
1121 //importMenu->insertSeparator(); 1115 //importMenu->insertSeparator();
1122 icon = loadPixmap( pathString + "print" ); 1116 icon = loadPixmap( pathString + "print" );
1123 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1117 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1124 action->addTo( beamMenu_X ); 1118 action->addTo( beamMenu_X );
1125 connect( action, SIGNAL( activated() ), 1119 connect( action, SIGNAL( activated() ),
1126 this, SLOT( printCal() ) ); 1120 this, SLOT( printCal() ) );
1127 1121
1128 icon = loadPixmap( pathString + "print" ); 1122 icon = loadPixmap( pathString + "print" );
1129 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1123 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1130 action->addTo( beamMenu_X ); 1124 action->addTo( beamMenu_X );
1131 connect( action, SIGNAL( activated() ), 1125 connect( action, SIGNAL( activated() ),
1132 this, SLOT( printSel() ) ); 1126 this, SLOT( printSel() ) );
1133 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1127 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1134 action->addTo( beamMenu_X ); 1128 action->addTo( beamMenu_X );
1135 connect( action, SIGNAL( activated() ), 1129 connect( action, SIGNAL( activated() ),
1136 mView->viewManager(), SLOT( slotprintWNV() ) ); 1130 mView->viewManager(), SLOT( slotprintWNV() ) );
1137 1131
1138 1132
1139 icon = loadPixmap( pathString + "print" ); 1133 icon = loadPixmap( pathString + "print" );
1140 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); 1134 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
1141 action->addTo( beamMenu_X ); 1135 action->addTo( beamMenu_X );
1142 connect( action, SIGNAL( activated() ), 1136 connect( action, SIGNAL( activated() ),
1143 this, SLOT( printListView() ) ); 1137 this, SLOT( printListView() ) );
1144 1138
1145 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1139 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1146 action->addTo( beamMenu_X ); 1140 action->addTo( beamMenu_X );
1147 connect( action, SIGNAL( activated() ), 1141 connect( action, SIGNAL( activated() ),
1148 mView, SLOT( slotprintSelInc() ) ); 1142 mView, SLOT( slotprintSelInc() ) );
1149 1143
1150 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1144 importMenu->insertItem( i18n("Print"), beamMenu_X );
1151#endif 1145#endif
1152 1146
1153 importMenu->insertSeparator(); 1147 importMenu->insertSeparator();
1154 action = new QAction( "beam all", i18n("Save"), 0, 1148 action = new QAction( "beam all", i18n("Save"), 0,
1155 this ); 1149 this );
1156 action->addTo( importMenu ); 1150 action->addTo( importMenu );
1157 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1151 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1158 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1152 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1159 this ); 1153 this );
1160 action->addTo( importMenu ); 1154 action->addTo( importMenu );
1161 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1155 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
1162 1156
1163 //menuBar->insertItem( "Configure",configureMenu ); 1157 //menuBar->insertItem( "Configure",configureMenu );
1164 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1158 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1165 icon = loadPixmap( "korganizer/korganizer" ); 1159 icon = loadPixmap( "korganizer/korganizer" );
1166 1160
1167 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1161 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
1168 action->addTo( helpMenu ); 1162 action->addTo( helpMenu );
1169 connect( action, SIGNAL( activated() ), 1163 connect( action, SIGNAL( activated() ),
1170 SLOT( whatsNew() ) ); 1164 SLOT( whatsNew() ) );
1171 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1165 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
1172 action->addTo( helpMenu ); 1166 action->addTo( helpMenu );
1173 connect( action, SIGNAL( activated() ), 1167 connect( action, SIGNAL( activated() ),
1174 SLOT( features() ) ); 1168 SLOT( features() ) );
1175 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1169 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1176 action->addTo( helpMenu ); 1170 action->addTo( helpMenu );
1177 connect( action, SIGNAL( activated() ), 1171 connect( action, SIGNAL( activated() ),
1178 SLOT( keyBindings() ) ); 1172 SLOT( keyBindings() ) );
1179 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1173 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1180 action->addTo( helpMenu ); 1174 action->addTo( helpMenu );
1181 connect( action, SIGNAL( activated() ), 1175 connect( action, SIGNAL( activated() ),
1182 SLOT( storagehowto() ) ); 1176 SLOT( storagehowto() ) );
1183 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1177 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1184 action->addTo( helpMenu ); 1178 action->addTo( helpMenu );
1185 connect( action, SIGNAL( activated() ), 1179 connect( action, SIGNAL( activated() ),
1186 SLOT( timetrackinghowto() ) ); 1180 SLOT( timetrackinghowto() ) );
1187 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1181 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1188 action->addTo( helpMenu ); 1182 action->addTo( helpMenu );
1189 connect( action, SIGNAL( activated() ), 1183 connect( action, SIGNAL( activated() ),
1190 SLOT( synchowto() ) ); 1184 SLOT( synchowto() ) );
1191 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1185 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1192 action->addTo( helpMenu ); 1186 action->addTo( helpMenu );
1193 connect( action, SIGNAL( activated() ), 1187 connect( action, SIGNAL( activated() ),
1194 SLOT( kdesynchowto() ) ); 1188 SLOT( kdesynchowto() ) );
1195 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1189 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1196 action->addTo( helpMenu ); 1190 action->addTo( helpMenu );
1197 connect( action, SIGNAL( activated() ), 1191 connect( action, SIGNAL( activated() ),
1198 SLOT( multisynchowto() ) ); 1192 SLOT( multisynchowto() ) );
1199 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1193 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
1200 action->addTo( helpMenu ); 1194 action->addTo( helpMenu );
1201 connect( action, SIGNAL( activated() ), 1195 connect( action, SIGNAL( activated() ),
1202 SLOT( aboutAutoSaving() ) ); 1196 SLOT( aboutAutoSaving() ) );
1203 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1197 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
1204 action->addTo( helpMenu ); 1198 action->addTo( helpMenu );
1205 connect( action, SIGNAL( activated() ), 1199 connect( action, SIGNAL( activated() ),
1206 SLOT( aboutKnownBugs() ) ); 1200 SLOT( aboutKnownBugs() ) );
1207 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1201 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1208 action->addTo( helpMenu ); 1202 action->addTo( helpMenu );
1209 connect( action, SIGNAL( activated() ), 1203 connect( action, SIGNAL( activated() ),
1210 SLOT( usertrans() ) ); 1204 SLOT( usertrans() ) );
1211 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1205 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1212 action->addTo( helpMenu ); 1206 action->addTo( helpMenu );
1213 connect( action, SIGNAL( activated() ), 1207 connect( action, SIGNAL( activated() ),
1214 SLOT( faq() ) ); 1208 SLOT( faq() ) );
1215 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1209 action = new QAction( "licence", i18n("Licence..."), 0, this );
1216 action->addTo( helpMenu ); 1210 action->addTo( helpMenu );
1217 connect( action, SIGNAL( activated() ), 1211 connect( action, SIGNAL( activated() ),
1218 SLOT( licence() ) ); 1212 SLOT( licence() ) );
1219 action = new QAction( "about", i18n("About..."), 0, this ); 1213 action = new QAction( "about", i18n("About..."), 0, this );
1220 action->addTo( helpMenu ); 1214 action->addTo( helpMenu );
1221 connect( action, SIGNAL( activated() ), 1215 connect( action, SIGNAL( activated() ),
1222 SLOT( about() ) ); 1216 SLOT( about() ) );
1223 //menuBar->insertSeparator(); 1217 //menuBar->insertSeparator();
1224 1218
1225 // ****************************************************** 1219 // ******************************************************
1226 // menubar icons 1220 // menubar icons
1227 1221
1228 1222
1229 1223
1230 //menuBar->insertItem( iconToolBar ); 1224 //menuBar->insertItem( iconToolBar );
1231 //xdays_action 1225 //xdays_action
1232 if (p-> mShowIconNewEvent) 1226 if (p-> mShowIconNewEvent)
1233 ne_action->addTo( iconToolBar ); 1227 ne_action->addTo( iconToolBar );
1234 if (p->mShowIconNewTodo ) 1228 if (p->mShowIconNewTodo )
1235 nt_action->addTo( iconToolBar ); 1229 nt_action->addTo( iconToolBar );
1236 if (p-> mShowIconSearch) 1230 if (p-> mShowIconSearch)
1237 search_action->addTo( iconToolBar ); 1231 search_action->addTo( iconToolBar );
1238 if (p-> mShowIconWhatsThis) 1232 if (p-> mShowIconWhatsThis)
1239 QWhatsThis::whatsThisButton ( iconToolBar ); 1233 QWhatsThis::whatsThisButton ( iconToolBar );
1240 if (p-> mShowIconNext) 1234 if (p-> mShowIconNext)
1241 whatsnext_action->addTo( viewToolBar ); 1235 whatsnext_action->addTo( viewToolBar );
1242 if (p-> mShowIconNextDays) 1236 if (p-> mShowIconNextDays)
1243 xdays_action->addTo( viewToolBar ); 1237 xdays_action->addTo( viewToolBar );
1244 if (p-> mShowIconJournal) 1238 if (p-> mShowIconJournal)
1245 viewjournal_action->addTo( viewToolBar ); 1239 viewjournal_action->addTo( viewToolBar );
1246 if (p-> mShowIconDay1) 1240 if (p-> mShowIconDay1)
1247 day1_action->addTo( viewToolBar ); 1241 day1_action->addTo( viewToolBar );
1248 if (p-> mShowIconDay5) 1242 if (p-> mShowIconDay5)
1249 day5_action->addTo( viewToolBar ); 1243 day5_action->addTo( viewToolBar );
1250 if (p-> mShowIconDay7) 1244 if (p-> mShowIconDay7)
1251 day7_action->addTo( viewToolBar ); 1245 day7_action->addTo( viewToolBar );
1252 if (p-> mShowIconDay6) 1246 if (p-> mShowIconDay6)
1253 day6_action->addTo( viewToolBar ); 1247 day6_action->addTo( viewToolBar );
1254 if (p-> mShowIconMonth) 1248 if (p-> mShowIconMonth)
1255 month_action->addTo( viewToolBar ); 1249 month_action->addTo( viewToolBar );
1256 if (p-> mShowIconList) 1250 if (p-> mShowIconList)
1257 showlist_action->addTo( viewToolBar ); 1251 showlist_action->addTo( viewToolBar );
1258 if (p-> mShowIconTodoview) 1252 if (p-> mShowIconTodoview)
1259 todoview_action->addTo( viewToolBar ); 1253 todoview_action->addTo( viewToolBar );
1260 1254
1261 icon = loadPixmap( pathString + "2leftarrowB" ); 1255 icon = loadPixmap( pathString + "2leftarrowB" );
1262 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1256 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1263 if (p-> mShowIconBackFast) { 1257 if (p-> mShowIconBackFast) {
1264 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1258 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1265 connect( action, SIGNAL( activated() ), 1259 connect( action, SIGNAL( activated() ),
1266 mView, SLOT( goPreviousMonth() ) ); 1260 mView, SLOT( goPreviousMonth() ) );
1267 action->addTo( navigatorToolBar ); 1261 action->addTo( navigatorToolBar );
1268 } 1262 }
1269 icon = loadPixmap( pathString + "1leftarrowB" ); 1263 icon = loadPixmap( pathString + "1leftarrowB" );
1270 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1264 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1271 if (p-> mShowIconBack) { 1265 if (p-> mShowIconBack) {
1272 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1266 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1273 connect( action, SIGNAL( activated() ), 1267 connect( action, SIGNAL( activated() ),