summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 298fa82..44b1264 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -438,784 +438,784 @@ void MainWindow::initActions()
438 438
439 viewMenu->insertSeparator(); 439 viewMenu->insertSeparator();
440 icon = loadPixmap( pathString + "picker" ); 440 icon = loadPixmap( pathString + "picker" );
441 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 441 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
442 action->addTo( viewMenu ); 442 action->addTo( viewMenu );
443 connect( action, SIGNAL( activated() ), 443 connect( action, SIGNAL( activated() ),
444 mView, SLOT( showDatePicker() ) ); 444 mView, SLOT( showDatePicker() ) );
445 action->addTo( iconToolBar ); 445 action->addTo( iconToolBar );
446 viewMenu->insertSeparator(); 446 viewMenu->insertSeparator();
447 icon = loadPixmap( pathString + "list" ); 447 icon = loadPixmap( pathString + "list" );
448 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 448 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
449 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 449 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
450 showlist_action->addTo( viewMenu ); 450 showlist_action->addTo( viewMenu );
451 connect( showlist_action, SIGNAL( activated() ), 451 connect( showlist_action, SIGNAL( activated() ),
452 mView->viewManager(), SLOT( showListView() ) ); 452 mView->viewManager(), SLOT( showListView() ) );
453 453
454 454
455 icon = loadPixmap( pathString + "day" ); 455 icon = loadPixmap( pathString + "day" );
456 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 456 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
457 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 457 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
458 day1_action->addTo( viewMenu ); 458 day1_action->addTo( viewMenu );
459 // action->addTo( toolBar ); 459 // action->addTo( toolBar );
460 connect( day1_action, SIGNAL( activated() ), 460 connect( day1_action, SIGNAL( activated() ),
461 mView->viewManager(), SLOT( showDayView() ) ); 461 mView->viewManager(), SLOT( showDayView() ) );
462 462
463 icon = loadPixmap( pathString + "workweek" ); 463 icon = loadPixmap( pathString + "workweek" );
464 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 464 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
465 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 465 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
466 day5_action->addTo( viewMenu ); 466 day5_action->addTo( viewMenu );
467 connect( day5_action, SIGNAL( activated() ), 467 connect( day5_action, SIGNAL( activated() ),
468 mView->viewManager(), SLOT( showWorkWeekView() ) ); 468 mView->viewManager(), SLOT( showWorkWeekView() ) );
469 469
470 icon = loadPixmap( pathString + "week" ); 470 icon = loadPixmap( pathString + "week" );
471 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 471 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
472 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 472 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
473 day7_action->addTo( viewMenu ); 473 day7_action->addTo( viewMenu );
474 connect( day7_action, SIGNAL( activated() ), 474 connect( day7_action, SIGNAL( activated() ),
475 mView->viewManager(), SLOT( showWeekView() ) ); 475 mView->viewManager(), SLOT( showWeekView() ) );
476 476
477 icon = loadPixmap( pathString + "month" ); 477 icon = loadPixmap( pathString + "month" );
478 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 478 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
479 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 479 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
480 month_action->addTo( viewMenu ); 480 month_action->addTo( viewMenu );
481 connect( month_action, SIGNAL( activated() ), 481 connect( month_action, SIGNAL( activated() ),
482 mView->viewManager(), SLOT( showMonthView() ) ); 482 mView->viewManager(), SLOT( showMonthView() ) );
483 483
484 icon = loadPixmap( pathString + "todo" ); 484 icon = loadPixmap( pathString + "todo" );
485 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 485 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
486 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 486 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
487 todoview_action->addTo( viewMenu ); 487 todoview_action->addTo( viewMenu );
488 connect( todoview_action, SIGNAL( activated() ), 488 connect( todoview_action, SIGNAL( activated() ),
489 mView->viewManager(), SLOT( showTodoView() ) ); 489 mView->viewManager(), SLOT( showTodoView() ) );
490 490
491 icon = loadPixmap( pathString + "journal" ); 491 icon = loadPixmap( pathString + "journal" );
492 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 492 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
493 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 493 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
494 viewjournal_action->addTo( viewMenu ); 494 viewjournal_action->addTo( viewMenu );
495 connect( viewjournal_action, SIGNAL( activated() ), 495 connect( viewjournal_action, SIGNAL( activated() ),
496 mView->viewManager(), SLOT( showJournalView() ) ); 496 mView->viewManager(), SLOT( showJournalView() ) );
497 497
498 icon = loadPixmap( pathString + "xdays" ); 498 icon = loadPixmap( pathString + "xdays" );
499 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); 499 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
500 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 500 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
501 xdays_action->addTo( viewMenu ); 501 xdays_action->addTo( viewMenu );
502 connect( xdays_action, SIGNAL( activated() ), 502 connect( xdays_action, SIGNAL( activated() ),
503 mView->viewManager(), SLOT( showNextXView() ) ); 503 mView->viewManager(), SLOT( showNextXView() ) );
504 504
505 icon = loadPixmap( pathString + "whatsnext" ); 505 icon = loadPixmap( pathString + "whatsnext" );
506 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); 506 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 );
507 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 507 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
508 whatsnext_action->addTo( viewMenu ); 508 whatsnext_action->addTo( viewMenu );
509 connect( whatsnext_action, SIGNAL( activated() ), 509 connect( whatsnext_action, SIGNAL( activated() ),
510 mView->viewManager(), SLOT( showWhatsNextView() ) ); 510 mView->viewManager(), SLOT( showWhatsNextView() ) );
511 511
512#if 0 512#if 0
513 action = new QAction( "view_timespan", "Time Span", 0, this ); 513 action = new QAction( "view_timespan", "Time Span", 0, this );
514 action->addTo( viewMenu ); 514 action->addTo( viewMenu );
515 connect( action, SIGNAL( activated() ), 515 connect( action, SIGNAL( activated() ),
516 mView->viewManager(), SLOT( showTimeSpanView() ) ); 516 mView->viewManager(), SLOT( showTimeSpanView() ) );
517#endif 517#endif
518 518
519 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 519 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
520 this ); 520 this );
521 mNewSubTodoAction->addTo( actionMenu ); 521 mNewSubTodoAction->addTo( actionMenu );
522 connect( mNewSubTodoAction, SIGNAL( activated() ), 522 connect( mNewSubTodoAction, SIGNAL( activated() ),
523 mView, SLOT( newSubTodo() ) ); 523 mView, SLOT( newSubTodo() ) );
524 524
525 actionMenu->insertSeparator(); 525 actionMenu->insertSeparator();
526 526
527 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 527 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
528 mShowAction->addTo( actionMenu ); 528 mShowAction->addTo( actionMenu );
529 connect( mShowAction, SIGNAL( activated() ), 529 connect( mShowAction, SIGNAL( activated() ),
530 mView, SLOT( showIncidence() ) ); 530 mView, SLOT( showIncidence() ) );
531 531
532 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 532 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
533 mEditAction->addTo( actionMenu ); 533 mEditAction->addTo( actionMenu );
534 connect( mEditAction, SIGNAL( activated() ), 534 connect( mEditAction, SIGNAL( activated() ),
535 mView, SLOT( editIncidence() ) ); 535 mView, SLOT( editIncidence() ) );
536 536
537 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 537 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
538 mDeleteAction->addTo( actionMenu ); 538 mDeleteAction->addTo( actionMenu );
539 connect( mDeleteAction, SIGNAL( activated() ), 539 connect( mDeleteAction, SIGNAL( activated() ),
540 mView, SLOT( deleteIncidence() ) ); 540 mView, SLOT( deleteIncidence() ) );
541 541
542 actionMenu->insertSeparator(); 542 actionMenu->insertSeparator();
543 543
544 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 544 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
545 this ); 545 this );
546 action->addTo( actionMenu ); 546 action->addTo( actionMenu );
547 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 547 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
548 548
549 icon = loadPixmap( pathString + "search" ); 549 icon = loadPixmap( pathString + "search" );
550 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 550 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
551 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); 551 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4);
552 search_action->addTo( actionMenu ); 552 search_action->addTo( actionMenu );
553 connect( search_action, SIGNAL( activated() ), 553 connect( search_action, SIGNAL( activated() ),
554 mView->dialogManager(), SLOT( showSearchDialog() ) ); 554 mView->dialogManager(), SLOT( showSearchDialog() ) );
555 555
556 icon = loadPixmap( pathString + "today" ); 556 icon = loadPixmap( pathString + "today" );
557 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 557 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
558 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 558 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
559 today_action->addTo( actionMenu ); 559 today_action->addTo( actionMenu );
560 connect( today_action, SIGNAL( activated() ), 560 connect( today_action, SIGNAL( activated() ),
561 mView, SLOT( goToday() ) ); 561 mView, SLOT( goToday() ) );
562 562
563 if ( KOPrefs::instance()->mShowFullMenu ) { 563 if ( KOPrefs::instance()->mShowFullMenu ) {
564 actionMenu->insertSeparator(); 564 actionMenu->insertSeparator();
565 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 565 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
566 566
567 } 567 }
568 // actionMenu->insertSeparator(); 568 // actionMenu->insertSeparator();
569 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 569 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
570 this ); 570 this );
571 action->addTo( importMenu ); 571 action->addTo( importMenu );
572 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 572 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
573 action = new QAction( "import_quick", i18n("Import last file"), 0, 573 action = new QAction( "import_quick", i18n("Import last file"), 0,
574 this ); 574 this );
575 action->addTo( importMenu ); 575 action->addTo( importMenu );
576 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 576 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
577 importMenu->insertSeparator(); 577 importMenu->insertSeparator();
578 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 578 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
579 this ); 579 this );
580 action->addTo( importMenu ); 580 action->addTo( importMenu );
581 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 581 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
582#ifndef DESKTOP_VERSION 582#ifndef DESKTOP_VERSION
583 importMenu->insertSeparator(); 583 importMenu->insertSeparator();
584 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 584 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
585 this ); 585 this );
586 action->addTo( importMenu ); 586 action->addTo( importMenu );
587 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 587 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
588#else 588#else
589#ifdef _WIN32_ 589#ifdef _WIN32_
590 importMenu->insertSeparator(); 590 importMenu->insertSeparator();
591 action = new QAction( "import_ol", i18n("Import from OL"), 0, 591 action = new QAction( "import_ol", i18n("Import from OL"), 0,
592 this ); 592 this );
593 action->addTo( importMenu ); 593 action->addTo( importMenu );
594 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 594 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
595#endif 595#endif
596#endif 596#endif
597 597
598 importMenu->insertSeparator(); 598 importMenu->insertSeparator();
599 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 599 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
600 this ); 600 this );
601 action->addTo( importMenu ); 601 action->addTo( importMenu );
602 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 602 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
603 603
604 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, 604 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0,
605 this ); 605 this );
606 action->addTo( importMenu ); 606 action->addTo( importMenu );
607 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 607 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
608 608
609 importMenu->insertSeparator(); 609 importMenu->insertSeparator();
610 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 610 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
611 this ); 611 this );
612 action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 612 action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
613 importMenu->insertSeparator(); 613 importMenu->insertSeparator();
614 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 614 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
615 this ); 615 this );
616 action->addTo( importMenu ); 616 action->addTo( importMenu );
617 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 617 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
618#ifndef DESKTOP_VERSION 618#ifndef DESKTOP_VERSION
619 importMenu->insertSeparator(); 619 importMenu->insertSeparator();
620 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 620 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
621 this ); 621 this );
622 action->addTo( importMenu ); 622 action->addTo( importMenu );
623 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 623 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
624 624
625 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 625 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
626 this ); 626 this );
627 action->addTo( importMenu ); 627 action->addTo( importMenu );
628 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 628 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
629#else 629#else
630 importMenu->insertSeparator(); 630 importMenu->insertSeparator();
631 icon = loadPixmap( pathString + "print" ); 631 icon = loadPixmap( pathString + "print" );
632 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 632 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
633 action->addTo( importMenu ); 633 action->addTo( importMenu );
634 connect( action, SIGNAL( activated() ), 634 connect( action, SIGNAL( activated() ),
635 this, SLOT( printCal() ) ); 635 this, SLOT( printCal() ) );
636 636
637 icon = loadPixmap( pathString + "print" ); 637 icon = loadPixmap( pathString + "print" );
638 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 638 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
639 action->addTo( importMenu ); 639 action->addTo( importMenu );
640 connect( action, SIGNAL( activated() ), 640 connect( action, SIGNAL( activated() ),
641 this, SLOT( printSel() ) ); 641 this, SLOT( printSel() ) );
642#endif 642#endif
643 importMenu->insertSeparator(); 643 importMenu->insertSeparator();
644 action = new QAction( "beam all", i18n("Save"), 0, 644 action = new QAction( "beam all", i18n("Save"), 0,
645 this ); 645 this );
646 action->addTo( importMenu ); 646 action->addTo( importMenu );
647 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 647 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
648 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 648 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
649 this ); 649 this );
650 action->addTo( importMenu ); 650 action->addTo( importMenu );
651 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 651 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
652 652
653 //menuBar->insertItem( "Configure",configureMenu ); 653 //menuBar->insertItem( "Configure",configureMenu );
654 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 654 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
655 icon = loadPixmap( "korganizer/korganizer" ); 655 icon = loadPixmap( "korganizer/korganizer" );
656 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 656 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
657 action->addTo( helpMenu ); 657 action->addTo( helpMenu );
658 connect( action, SIGNAL( activated() ), 658 connect( action, SIGNAL( activated() ),
659 SLOT( keyBindings() ) ); 659 SLOT( keyBindings() ) );
660 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 660 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
661 action->addTo( helpMenu ); 661 action->addTo( helpMenu );
662 connect( action, SIGNAL( activated() ), 662 connect( action, SIGNAL( activated() ),
663 SLOT( features() ) ); 663 SLOT( features() ) );
664 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 664 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
665 action->addTo( helpMenu ); 665 action->addTo( helpMenu );
666 connect( action, SIGNAL( activated() ), 666 connect( action, SIGNAL( activated() ),
667 SLOT( aboutAutoSaving() ) ); 667 SLOT( aboutAutoSaving() ) );
668 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 668 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
669 action->addTo( helpMenu ); 669 action->addTo( helpMenu );
670 connect( action, SIGNAL( activated() ), 670 connect( action, SIGNAL( activated() ),
671 SLOT( aboutKnownBugs() ) ); 671 SLOT( aboutKnownBugs() ) );
672 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 672 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
673 action->addTo( helpMenu ); 673 action->addTo( helpMenu );
674 connect( action, SIGNAL( activated() ), 674 connect( action, SIGNAL( activated() ),
675 SLOT( usertrans() ) ); 675 SLOT( usertrans() ) );
676 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 676 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
677 action->addTo( helpMenu ); 677 action->addTo( helpMenu );
678 connect( action, SIGNAL( activated() ), 678 connect( action, SIGNAL( activated() ),
679 SLOT( synchowto() ) ); 679 SLOT( synchowto() ) );
680 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 680 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
681 action->addTo( helpMenu ); 681 action->addTo( helpMenu );
682 connect( action, SIGNAL( activated() ), 682 connect( action, SIGNAL( activated() ),
683 SLOT( whatsNew() ) ); 683 SLOT( whatsNew() ) );
684 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 684 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
685 action->addTo( helpMenu ); 685 action->addTo( helpMenu );
686 connect( action, SIGNAL( activated() ), 686 connect( action, SIGNAL( activated() ),
687 SLOT( faq() ) ); 687 SLOT( faq() ) );
688 688
689 689
690 action = new QAction( "about", i18n("About..."), 0, this ); 690 action = new QAction( "about", i18n("About..."), 0, this );
691 action->addTo( helpMenu ); 691 action->addTo( helpMenu );
692 connect( action, SIGNAL( activated() ), 692 connect( action, SIGNAL( activated() ),
693 SLOT( about() ) ); 693 SLOT( about() ) );
694 //menuBar->insertSeparator(); 694 //menuBar->insertSeparator();
695 695
696 // ****************************************************** 696 // ******************************************************
697 // menubar icons 697 // menubar icons
698 698
699 699
700 iconToolBar->setHorizontalStretchable (true ); 700 iconToolBar->setHorizontalStretchable (true );
701 //menuBar->insertItem( iconToolBar ); 701 //menuBar->insertItem( iconToolBar );
702 //xdays_action 702 //xdays_action
703 if (p-> mShowIconNewEvent) 703 if (p-> mShowIconNewEvent)
704 ne_action->addTo( iconToolBar ); 704 ne_action->addTo( iconToolBar );
705 if (p->mShowIconNewTodo ) 705 if (p->mShowIconNewTodo )
706 nt_action->addTo( iconToolBar ); 706 nt_action->addTo( iconToolBar );
707 if (p-> mShowIconSearch) 707 if (p-> mShowIconSearch)
708 search_action->addTo( iconToolBar ); 708 search_action->addTo( iconToolBar );
709 if (p-> mShowIconNext) 709 if (p-> mShowIconNext)
710 whatsnext_action->addTo( iconToolBar ); 710 whatsnext_action->addTo( iconToolBar );
711 if (p-> mShowIconNextDays) 711 if (p-> mShowIconNextDays)
712 xdays_action->addTo( iconToolBar ); 712 xdays_action->addTo( iconToolBar );
713 if (p-> mShowIconList) 713 if (p-> mShowIconList)
714 showlist_action->addTo( iconToolBar ); 714 showlist_action->addTo( iconToolBar );
715 if (p-> mShowIconDay1) 715 if (p-> mShowIconDay1)
716 day1_action->addTo( iconToolBar ); 716 day1_action->addTo( iconToolBar );
717 if (p-> mShowIconDay5) 717 if (p-> mShowIconDay5)
718 day5_action->addTo( iconToolBar ); 718 day5_action->addTo( iconToolBar );
719 if (p-> mShowIconDay7) 719 if (p-> mShowIconDay7)
720 day7_action->addTo( iconToolBar ); 720 day7_action->addTo( iconToolBar );
721 if (p-> mShowIconMonth) 721 if (p-> mShowIconMonth)
722 month_action->addTo( iconToolBar ); 722 month_action->addTo( iconToolBar );
723 if (p-> mShowIconTodoview) 723 if (p-> mShowIconTodoview)
724 todoview_action->addTo( iconToolBar ); 724 todoview_action->addTo( iconToolBar );
725 if (p-> mShowIconJournal) 725 if (p-> mShowIconJournal)
726 viewjournal_action->addTo( iconToolBar ); 726 viewjournal_action->addTo( iconToolBar );
727 icon = loadPixmap( pathString + "2leftarrowB" ); 727 icon = loadPixmap( pathString + "2leftarrowB" );
728 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); 728 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
729 if (p-> mShowIconBackFast) { 729 if (p-> mShowIconBackFast) {
730 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 730 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
731 connect( action, SIGNAL( activated() ), 731 connect( action, SIGNAL( activated() ),
732 mView, SLOT( goPreviousMonth() ) ); 732 mView, SLOT( goPreviousMonth() ) );
733 action->addTo( iconToolBar ); 733 action->addTo( iconToolBar );
734 } 734 }
735 icon = loadPixmap( pathString + "1leftarrowB" ); 735 icon = loadPixmap( pathString + "1leftarrowB" );
736 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); 736 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
737 if (p-> mShowIconBack) { 737 if (p-> mShowIconBack) {
738 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 738 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
739 connect( action, SIGNAL( activated() ), 739 connect( action, SIGNAL( activated() ),
740 mView, SLOT( goPrevious() ) ); 740 mView, SLOT( goPrevious() ) );
741 action->addTo( iconToolBar ); 741 action->addTo( iconToolBar );
742 } 742 }
743 if (p-> mShowIconToday) 743 if (p-> mShowIconToday)
744 today_action->addTo( iconToolBar ); 744 today_action->addTo( iconToolBar );
745 icon = loadPixmap( pathString + "1rightarrowB" ); 745 icon = loadPixmap( pathString + "1rightarrowB" );
746 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 746 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
747 if (p-> mShowIconForward) { 747 if (p-> mShowIconForward) {
748 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 748 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
749 connect( action, SIGNAL( activated() ), 749 connect( action, SIGNAL( activated() ),
750 mView, SLOT( goNext() ) ); 750 mView, SLOT( goNext() ) );
751 action->addTo( iconToolBar ); 751 action->addTo( iconToolBar );
752 } 752 }
753 icon = loadPixmap( pathString + "2rightarrowB" ); 753 icon = loadPixmap( pathString + "2rightarrowB" );
754 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 754 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
755 if (p-> mShowIconForwardFast) { 755 if (p-> mShowIconForwardFast) {
756 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 756 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
757 connect( action, SIGNAL( activated() ), 757 connect( action, SIGNAL( activated() ),
758 mView, SLOT( goNextMonth() ) ); 758 mView, SLOT( goNextMonth() ) );
759 action->addTo( iconToolBar ); 759 action->addTo( iconToolBar );
760 } 760 }
761 761
762 762
763 configureToolBarMenu->insertItem(i18n("What's This?"), 300); 763 configureToolBarMenu->insertItem(i18n("What's This?"), 300);
764 764
765 if (p-> mShowIconNewEvent) 765 if (p-> mShowIconNewEvent)
766 configureToolBarMenu->setItemChecked( 10, true ); 766 configureToolBarMenu->setItemChecked( 10, true );
767 if (p->mShowIconNewTodo ) 767 if (p->mShowIconNewTodo )
768 configureToolBarMenu->setItemChecked( 20, true ); 768 configureToolBarMenu->setItemChecked( 20, true );
769 if (p-> mShowIconSearch) 769 if (p-> mShowIconSearch)
770 configureToolBarMenu->setItemChecked( 120, true ); 770 configureToolBarMenu->setItemChecked( 120, true );
771 if (p-> mShowIconList) 771 if (p-> mShowIconList)
772 configureToolBarMenu->setItemChecked( 30, true ); 772 configureToolBarMenu->setItemChecked( 30, true );
773 if (p-> mShowIconDay1) 773 if (p-> mShowIconDay1)
774 configureToolBarMenu->setItemChecked( 40, true ); 774 configureToolBarMenu->setItemChecked( 40, true );
775 if (p-> mShowIconDay5) 775 if (p-> mShowIconDay5)
776 configureToolBarMenu->setItemChecked( 50, true ); 776 configureToolBarMenu->setItemChecked( 50, true );
777 if (p-> mShowIconDay7) 777 if (p-> mShowIconDay7)
778 configureToolBarMenu->setItemChecked( 60, true ); 778 configureToolBarMenu->setItemChecked( 60, true );
779 if (p-> mShowIconMonth) 779 if (p-> mShowIconMonth)
780 configureToolBarMenu->setItemChecked( 70, true ); 780 configureToolBarMenu->setItemChecked( 70, true );
781 if (p-> mShowIconTodoview) 781 if (p-> mShowIconTodoview)
782 configureToolBarMenu->setItemChecked( 80, true ); 782 configureToolBarMenu->setItemChecked( 80, true );
783 if (p-> mShowIconBackFast) 783 if (p-> mShowIconBackFast)
784 configureToolBarMenu->setItemChecked( 200, true ); 784 configureToolBarMenu->setItemChecked( 200, true );
785 if (p-> mShowIconBack) 785 if (p-> mShowIconBack)
786 configureToolBarMenu->setItemChecked( 210, true ); 786 configureToolBarMenu->setItemChecked( 210, true );
787 if (p-> mShowIconToday) 787 if (p-> mShowIconToday)
788 configureToolBarMenu->setItemChecked( 130, true ); 788 configureToolBarMenu->setItemChecked( 130, true );
789 if (p-> mShowIconForward) 789 if (p-> mShowIconForward)
790 configureToolBarMenu->setItemChecked( 220, true ); 790 configureToolBarMenu->setItemChecked( 220, true );
791 if (p-> mShowIconForwardFast) 791 if (p-> mShowIconForwardFast)
792 configureToolBarMenu->setItemChecked( 230, true ); 792 configureToolBarMenu->setItemChecked( 230, true );
793 if (p-> mShowIconNextDays) 793 if (p-> mShowIconNextDays)
794 configureToolBarMenu->setItemChecked( 100, true ); 794 configureToolBarMenu->setItemChecked( 100, true );
795 if (p-> mShowIconNext) 795 if (p-> mShowIconNext)
796 configureToolBarMenu->setItemChecked( 110, true ); 796 configureToolBarMenu->setItemChecked( 110, true );
797 if (p-> mShowIconJournal) 797 if (p-> mShowIconJournal)
798 configureToolBarMenu->setItemChecked( 90, true ); 798 configureToolBarMenu->setItemChecked( 90, true );
799 if (p-> mShowIconWhatsThis) 799 if (p-> mShowIconWhatsThis)
800 configureToolBarMenu->setItemChecked( 300, true ); 800 configureToolBarMenu->setItemChecked( 300, true );
801 801
802 QLabel* dummy = new QLabel( iconToolBar ); 802 QLabel* dummy = new QLabel( iconToolBar );
803 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 803 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
804 if (!p-> mShowIconStretch) 804 if (!p-> mShowIconStretch)
805 iconToolBar->setStretchableWidget ( dummy ) ; 805 iconToolBar->setStretchableWidget ( dummy ) ;
806 else 806 else
807 configureToolBarMenu->setItemChecked( 5, true ); 807 configureToolBarMenu->setItemChecked( 5, true );
808 if (p-> mShowIconWhatsThis) 808 if (p-> mShowIconWhatsThis)
809 QWhatsThis::whatsThisButton ( iconToolBar ); 809 QWhatsThis::whatsThisButton ( iconToolBar );
810 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 810 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
811 configureAgenda( p->mHourSize ); 811 configureAgenda( p->mHourSize );
812 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 812 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
813} 813}
814void MainWindow::fillSyncMenu() 814void MainWindow::fillSyncMenu()
815{ 815{
816 syncMenu->clear(); 816 syncMenu->clear();
817 syncMenu->insertItem( i18n("Configure..."), 0 ); 817 syncMenu->insertItem( i18n("Configure..."), 0 );
818 syncMenu->insertSeparator(); 818 syncMenu->insertSeparator();
819 syncMenu->insertItem( i18n("Multiple sync"), 1 ); 819 syncMenu->insertItem( i18n("Multiple sync"), 1 );
820 syncMenu->insertSeparator(); 820 syncMenu->insertSeparator();
821 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 821 KConfig config ( locateLocal( "config","syncprofilesrc" ) );
822 config.setGroup("SyncProfiles"); 822 config.setGroup("General");
823 QStringList prof = config.readListEntry("SyncProfileNames"); 823 QStringList prof = config.readListEntry("SyncProfileNames");
824 KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined"); 824 KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined");
825 if ( prof.count() < 3 ) { 825 if ( prof.count() < 3 ) {
826 prof.clear(); 826 prof.clear();
827 prof << i18n("Sharp-DTM"); 827 prof << i18n("Sharp_DTM");
828 prof << i18n("Local file"); 828 prof << i18n("Local_file");
829 prof << i18n("Last file"); 829 prof << i18n("Last_file");
830 KSyncProfile* temp = new KSyncProfile (); 830 KSyncProfile* temp = new KSyncProfile ();
831 temp->setName( prof[0] ); 831 temp->setName( prof[0] );
832 temp->writeConfig(&config); 832 temp->writeConfig(&config);
833 temp->setName( prof[1] ); 833 temp->setName( prof[1] );
834 temp->writeConfig(&config); 834 temp->writeConfig(&config);
835 temp->setName( prof[2] ); 835 temp->setName( prof[2] );
836 temp->writeConfig(&config); 836 temp->writeConfig(&config);
837 config.setGroup("SyncProfiles"); 837 config.setGroup("General");
838 config.writeEntry("SyncProfileNames",prof); 838 config.writeEntry("SyncProfileNames",prof);
839 config.sync(); 839 config.sync();
840 delete temp; 840 delete temp;
841 } 841 }
842 KOPrefs::instance()->mSyncProfileNames = prof; 842 KOPrefs::instance()->mSyncProfileNames = prof;
843 int i; 843 int i;
844 for ( i = 0; i < prof.count(); ++i ) { 844 for ( i = 0; i < prof.count(); ++i ) {
845 845
846 syncMenu->insertItem( prof[i], 1000+i ); 846 syncMenu->insertItem( prof[i], 1000+i );
847 if ( i == 2 ) 847 if ( i == 2 )
848 syncMenu->insertSeparator(); 848 syncMenu->insertSeparator();
849 } 849 }
850 QDir app_dir; 850 QDir app_dir;
851 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { 851 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
852 syncMenu->setItemEnabled( false , 1000 ); 852 syncMenu->setItemEnabled( false , 1000 );
853 } 853 }
854} 854}
855 855
856int MainWindow::ringSync() 856int MainWindow::ringSync()
857{ 857{
858 int syncedProfiles = 0; 858 int syncedProfiles = 0;
859 int i; 859 int i;
860 QTime timer; 860 QTime timer;
861 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 861 KConfig config ( locateLocal( "config","syncprofilesrc" ) );
862 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; 862 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
863 KSyncProfile* temp = new KSyncProfile (); 863 KSyncProfile* temp = new KSyncProfile ();
864 KOPrefs::instance()->mAskForPreferences = false; 864 KOPrefs::instance()->mAskForPreferences = false;
865 for ( i = 0; i < syncProfileNames.count(); ++i ) { 865 for ( i = 0; i < syncProfileNames.count(); ++i ) {
866 mCurrentSyncProfile = i; 866 mCurrentSyncProfile = i;
867 temp->setName(syncProfileNames[mCurrentSyncProfile]); 867 temp->setName(syncProfileNames[mCurrentSyncProfile]);
868 temp->readConfig(&config); 868 temp->readConfig(&config);
869 if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) { 869 if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) {
870 setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 870 setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
871 ++syncedProfiles; 871 ++syncedProfiles;
872 // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); 872 // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
873 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); 873 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
874 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); 874 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
875 KOPrefs::instance()->mShowSyncSummary = false; 875 KOPrefs::instance()->mShowSyncSummary = false;
876 mView->setSyncDevice(syncProfileNames[i] ); 876 mView->setSyncDevice(syncProfileNames[i] );
877 mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); 877 mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
878 if ( i == 0 ) { 878 if ( i == 0 ) {
879 syncSharp(); 879 syncSharp();
880 } else { 880 } else {
881 if ( temp->getIsLocalFileSync() ) { 881 if ( temp->getIsLocalFileSync() ) {
882 if ( syncWithFile( temp->getRemoteFileName( ), true ) ) 882 if ( syncWithFile( temp->getRemoteFileName( ), true ) )
883 KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); 883 KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
884 } else { 884 } else {
885 syncRemote( temp, false ); 885 syncRemote( temp, false );
886 886
887 } 887 }
888 } 888 }
889 timer.start(); 889 timer.start();
890 setCaption(i18n("Multiple sync in progress ... please wait!") ); 890 setCaption(i18n("Multiple sync in progress ... please wait!") );
891 while ( timer.elapsed () < 2000 ) { 891 while ( timer.elapsed () < 2000 ) {
892 qApp->processEvents(); 892 qApp->processEvents();
893#ifndef _WIN32_ 893#ifndef _WIN32_
894 sleep (1); 894 sleep (1);
895#endif 895#endif
896 } 896 }
897 897
898 } 898 }
899 899
900 } 900 }
901 delete temp; 901 delete temp;
902 return syncedProfiles; 902 return syncedProfiles;
903} 903}
904 904
905void MainWindow::multiSync( bool askforPrefs ) 905void MainWindow::multiSync( bool askforPrefs )
906{ 906{
907 if (mBlockSaveFlag) 907 if (mBlockSaveFlag)
908 return; 908 return;
909 mBlockSaveFlag = true; 909 mBlockSaveFlag = true;
910 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); 910 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
911 if ( QMessageBox::information( this, i18n("KO/Pi Sync"), 911 if ( QMessageBox::information( this, i18n("KO/Pi Sync"),
912 question, 912 question,
913 i18n("Yes"), i18n("No"), 913 i18n("Yes"), i18n("No"),
914 0, 0 ) != 0 ) { 914 0, 0 ) != 0 ) {
915 mBlockSaveFlag = false; 915 mBlockSaveFlag = false;
916 setCaption(i18n("Aborted! Nothing synced!")); 916 setCaption(i18n("Aborted! Nothing synced!"));
917 return; 917 return;
918 } 918 }
919 mView->setSyncDevice(i18n("Multiple profiles") ); 919 mView->setSyncDevice(i18n("Multiple profiles") );
920 KOPrefs::instance()->mSyncAlgoPrefs = KOPrefs::instance()->mRingSyncAlgoPrefs; 920 KOPrefs::instance()->mSyncAlgoPrefs = KOPrefs::instance()->mRingSyncAlgoPrefs;
921 if ( askforPrefs ) { 921 if ( askforPrefs ) {
922 mView->edit_sync_options(); 922 mView->edit_sync_options();
923 KOPrefs::instance()->mRingSyncAlgoPrefs = KOPrefs::instance()->mSyncAlgoPrefs; 923 KOPrefs::instance()->mRingSyncAlgoPrefs = KOPrefs::instance()->mSyncAlgoPrefs;
924 } 924 }
925 setCaption(i18n("Multiple sync started.") ); 925 setCaption(i18n("Multiple sync started.") );
926 qApp->processEvents(); 926 qApp->processEvents();
927 int num = ringSync() ; 927 int num = ringSync() ;
928 if ( num > 1 ) 928 if ( num > 1 )
929 ringSync(); 929 ringSync();
930 mBlockSaveFlag = false; 930 mBlockSaveFlag = false;
931 if ( num ) 931 if ( num )
932 save(); 932 save();
933 if ( num ) 933 if ( num )
934 setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) ); 934 setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) );
935 else 935 else
936 setCaption(i18n("Nothing synced! No profiles defined for multisync!")); 936 setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
937 return; 937 return;
938} 938}
939void MainWindow::slotSyncMenu( int action ) 939void MainWindow::slotSyncMenu( int action )
940{ 940{
941 //qDebug("syncaction %d ", action); 941 //qDebug("syncaction %d ", action);
942 if ( action == 0 ) { 942 if ( action == 0 ) {
943 943
944 confSync(); 944 confSync();
945 945
946 return; 946 return;
947 } 947 }
948 if ( action == 1 ) { 948 if ( action == 1 ) {
949 multiSync( true ); 949 multiSync( true );
950 return; 950 return;
951 } 951 }
952 952
953 if (mBlockSaveFlag) 953 if (mBlockSaveFlag)
954 return; 954 return;
955 mBlockSaveFlag = true; 955 mBlockSaveFlag = true;
956 mCurrentSyncProfile = action - 1000 ; 956 mCurrentSyncProfile = action - 1000 ;
957 mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] ); 957 mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] );
958 mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); 958 mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
959 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 959 KConfig config ( locateLocal( "config","syncprofilesrc" ) );
960 KSyncProfile* temp = new KSyncProfile (); 960 KSyncProfile* temp = new KSyncProfile ();
961 temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); 961 temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]);
962 temp->readConfig(&config); 962 temp->readConfig(&config);
963 KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); 963 KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
964 KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); 964 KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs();
965 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); 965 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
966 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); 966 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
967 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); 967 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync();
968 if ( action == 1000 ) { 968 if ( action == 1000 ) {
969 syncSharp(); 969 syncSharp();
970 970
971 } else if ( action == 1001 ) { 971 } else if ( action == 1001 ) {
972 syncLocalFile(); 972 syncLocalFile();
973 973
974 } else if ( action == 1002 ) { 974 } else if ( action == 1002 ) {
975 quickSyncLocalFile(); 975 quickSyncLocalFile();
976 976
977 } else if ( action >= 1003 ) { 977 } else if ( action >= 1003 ) {
978 if ( temp->getIsLocalFileSync() ) { 978 if ( temp->getIsLocalFileSync() ) {
979 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 979 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
980 KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); 980 KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
981 } else { 981 } else {
982 syncRemote( temp ); 982 syncRemote( temp );
983 983
984 } 984 }
985 } 985 }
986 delete temp; 986 delete temp;
987 mBlockSaveFlag = false; 987 mBlockSaveFlag = false;
988} 988}
989void MainWindow::setDefaultPreferences() 989void MainWindow::setDefaultPreferences()
990{ 990{
991 KOPrefs *p = KOPrefs::instance(); 991 KOPrefs *p = KOPrefs::instance();
992 992
993 p->mCompactDialogs = true; 993 p->mCompactDialogs = true;
994 p->mConfirm = true; 994 p->mConfirm = true;
995 // p->mEnableQuickTodo = false; 995 // p->mEnableQuickTodo = false;
996} 996}
997 997
998QString MainWindow::resourcePath() 998QString MainWindow::resourcePath()
999{ 999{
1000 return KGlobal::iconLoader()->iconPath(); 1000 return KGlobal::iconLoader()->iconPath();
1001} 1001}
1002 1002
1003void MainWindow::displayText( QString text ,QString cap ) 1003void MainWindow::displayText( QString text ,QString cap )
1004{ 1004{
1005 QDialog dia( this, "name", true ); ; 1005 QDialog dia( this, "name", true ); ;
1006 dia.setCaption( cap ); 1006 dia.setCaption( cap );
1007 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1007 QVBoxLayout* lay = new QVBoxLayout( &dia );
1008 lay->setSpacing( 3 ); 1008 lay->setSpacing( 3 );
1009 lay->setMargin( 3 ); 1009 lay->setMargin( 3 );
1010 QTextBrowser tb ( &dia ); 1010 QTextBrowser tb ( &dia );
1011 lay->addWidget( &tb ); 1011 lay->addWidget( &tb );
1012 tb.setText( text ); 1012 tb.setText( text );
1013#ifdef DESKTOP_VERSION 1013#ifdef DESKTOP_VERSION
1014 dia.resize( 640, 480); 1014 dia.resize( 640, 480);
1015#else 1015#else
1016 dia.showMaximized(); 1016 dia.showMaximized();
1017#endif 1017#endif
1018 dia.exec(); 1018 dia.exec();
1019} 1019}
1020void MainWindow::displayFile( QString fn, QString cap ) 1020void MainWindow::displayFile( QString fn, QString cap )
1021{ 1021{
1022 QString fileName = resourcePath() + fn; 1022 QString fileName = resourcePath() + fn;
1023 QString text; 1023 QString text;
1024 QFile file( fileName ); 1024 QFile file( fileName );
1025 if (!file.open( IO_ReadOnly ) ) { 1025 if (!file.open( IO_ReadOnly ) ) {
1026 return ; 1026 return ;
1027 1027
1028 } 1028 }
1029 QTextStream ts( &file ); 1029 QTextStream ts( &file );
1030 text = ts.read(); 1030 text = ts.read();
1031 file.close(); 1031 file.close();
1032 displayText( text, cap); 1032 displayText( text, cap);
1033} 1033}
1034void MainWindow::features() 1034void MainWindow::features()
1035{ 1035{
1036 1036
1037 displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); 1037 displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") );
1038} 1038}
1039 1039
1040void MainWindow::usertrans() 1040void MainWindow::usertrans()
1041{ 1041{
1042 1042
1043 displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); 1043 displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") );
1044} 1044}
1045void MainWindow::synchowto() 1045void MainWindow::synchowto()
1046{ 1046{
1047 1047
1048 displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") ); 1048 displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") );
1049} 1049}
1050void MainWindow::faq() 1050void MainWindow::faq()
1051{ 1051{
1052 displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") ); 1052 displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") );
1053 1053
1054} 1054}
1055void MainWindow::whatsNew() 1055void MainWindow::whatsNew()
1056{ 1056{
1057 displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") ); 1057 displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") );
1058 1058
1059} 1059}
1060void MainWindow::about() 1060void MainWindow::about()
1061{ 1061{
1062 QString version; 1062 QString version;
1063#include <../version> 1063#include <../version>
1064 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1064 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1065 i18n("KOrganizer/Platform-independent\n") + 1065 i18n("KOrganizer/Platform-independent\n") +
1066 "(KO/Pi) " + version + " - " + 1066 "(KO/Pi) " + version + " - " +
1067 1067
1068#ifdef DESKTOP_VERSION 1068#ifdef DESKTOP_VERSION
1069 i18n("Desktop Edition\n") + 1069 i18n("Desktop Edition\n") +
1070#else 1070#else
1071 i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + 1071 i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") +
1072#endif 1072#endif
1073 i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); 1073 i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") );
1074} 1074}
1075void MainWindow::keyBindings() 1075void MainWindow::keyBindings()
1076{ 1076{
1077 QString cap = i18n("Key bindings KOrganizer/Pi"); 1077 QString cap = i18n("Key bindings KOrganizer/Pi");
1078 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1078 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1079 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1079 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1080 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1080 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1081 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1081 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1082 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ 1082 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+
1083 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1083 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1084 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1084 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1085 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ 1085 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+
1086 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1086 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1087 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1087 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1088 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1088 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1089 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1089 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1090 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1090 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1091 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ 1091 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+
1092 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1092 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1093 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1093 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1094 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1094 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1095 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1095 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1096 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1096 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1097 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1097 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1098 i18n("<p><h3>In agenda view:</h3></p>\n") + 1098 i18n("<p><h3>In agenda view:</h3></p>\n") +
1099 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1099 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1100 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1100 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1101 i18n("<p><h3>In todo view:</h3></p>\n") + 1101 i18n("<p><h3>In todo view:</h3></p>\n") +
1102 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1102 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1103 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1103 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1104 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1104 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1105 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1105 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1106 i18n("<p><h3>In list view:</h3></p>\n") + 1106 i18n("<p><h3>In list view:</h3></p>\n") +
1107 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1107 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1108 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1108 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1109 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1109 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1110 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1110 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1111 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1111 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1112 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1112 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1113 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1113 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1114 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1114 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1115 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1115 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1116 i18n("<p><b>E</b>: Edit item</p>\n") + 1116 i18n("<p><b>E</b>: Edit item</p>\n") +
1117 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1117 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1118 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1118 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1119 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1119 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1120 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1120 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1121 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1121 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1122 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1122 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
1123 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ 1123 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
1124 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + 1124 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
1125 i18n("<p><b>White</b>: Item readonly</p>\n"); 1125 i18n("<p><b>White</b>: Item readonly</p>\n");
1126 displayText( text, cap); 1126 displayText( text, cap);
1127 1127
1128} 1128}
1129void MainWindow::aboutAutoSaving() 1129void MainWindow::aboutAutoSaving()
1130{ 1130{
1131 QMessageBox* msg; 1131 QMessageBox* msg;
1132 msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), 1132 msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"),
1133 i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, 1133 i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon,
1134 QMessageBox::Ok, 1134 QMessageBox::Ok,
1135 QMessageBox::NoButton, 1135 QMessageBox::NoButton,
1136 QMessageBox::NoButton); 1136 QMessageBox::NoButton);
1137 msg->exec(); 1137 msg->exec();
1138 delete msg; 1138 delete msg;
1139 1139
1140 1140
1141} 1141}
1142void MainWindow::aboutKnownBugs() 1142void MainWindow::aboutKnownBugs()
1143{ 1143{
1144 QMessageBox* msg; 1144 QMessageBox* msg;
1145 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1145 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
1146 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ 1146 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+
1147 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ 1147 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
1148 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + 1148 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") +
1149 i18n("\nor report them in the bugtracker on\n") + 1149 i18n("\nor report them in the bugtracker on\n") +
1150 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), 1150 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
1151 QMessageBox::NoIcon, 1151 QMessageBox::NoIcon,
1152 QMessageBox::Ok, 1152 QMessageBox::Ok,
1153 QMessageBox::NoButton, 1153 QMessageBox::NoButton,
1154 QMessageBox::NoButton); 1154 QMessageBox::NoButton);
1155 msg->exec(); 1155 msg->exec();
1156 delete msg; 1156 delete msg;
1157 1157
1158} 1158}
1159 1159
1160QString MainWindow::defaultFileName() 1160QString MainWindow::defaultFileName()
1161{ 1161{
1162 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1162 return locateLocal( "data", "korganizer/mycalendar.ics" );
1163} 1163}
1164 1164
1165void MainWindow::processIncidenceSelection( Incidence *incidence ) 1165void MainWindow::processIncidenceSelection( Incidence *incidence )
1166{ 1166{
1167 if ( !incidence ) { 1167 if ( !incidence ) {
1168 enableIncidenceActions( false ); 1168 enableIncidenceActions( false );
1169 1169
1170 mNewSubTodoAction->setEnabled( false ); 1170 mNewSubTodoAction->setEnabled( false );
1171 setCaptionToDates(); 1171 setCaptionToDates();
1172 return; 1172 return;
1173 1173
1174 } 1174 }
1175 1175
1176 //KGlobal::locale()->formatDateTime(nextA, true); 1176 //KGlobal::locale()->formatDateTime(nextA, true);
1177 QString startString = ""; 1177 QString startString = "";
1178 if ( incidence->type() != "Todo" ) { 1178 if ( incidence->type() != "Todo" ) {
1179 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1179 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1180 if ( incidence->doesFloat() ) { 1180 if ( incidence->doesFloat() ) {
1181 startString += ": "+incidence->dtStartDateStr( true ); 1181 startString += ": "+incidence->dtStartDateStr( true );
1182 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1182 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1183 1183
1184 } else { 1184 } else {
1185 startString = ": "+incidence->dtStartStr(true); 1185 startString = ": "+incidence->dtStartStr(true);
1186 startString += " --- "+((Event*)incidence)->dtEndStr(true); 1186 startString += " --- "+((Event*)incidence)->dtEndStr(true);
1187 1187
1188 } 1188 }
1189 1189
1190 } else { 1190 } else {
1191 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1191 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1192 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1192 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1193 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1193 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1194 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1194 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1195 } 1195 }
1196 1196
1197 } 1197 }
1198 else 1198 else
1199 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1199 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1200 if ( !incidence->location().isEmpty() ) 1200 if ( !incidence->location().isEmpty() )
1201 startString += " (" +incidence->location()+")"; 1201 startString += " (" +incidence->location()+")";
1202 setCaption( incidence->summary()+startString); 1202 setCaption( incidence->summary()+startString);
1203 1203
1204 enableIncidenceActions( true ); 1204 enableIncidenceActions( true );
1205 1205
1206 if ( incidence->type() == "Event" ) { 1206 if ( incidence->type() == "Event" ) {
1207 mShowAction->setText( i18n("Show Event...") ); 1207 mShowAction->setText( i18n("Show Event...") );
1208 mEditAction->setText( i18n("Edit Event...") ); 1208 mEditAction->setText( i18n("Edit Event...") );
1209 mDeleteAction->setText( i18n("Delete Event...") ); 1209 mDeleteAction->setText( i18n("Delete Event...") );
1210 1210
1211 mNewSubTodoAction->setEnabled( false ); 1211 mNewSubTodoAction->setEnabled( false );
1212 } else if ( incidence->type() == "Todo" ) { 1212 } else if ( incidence->type() == "Todo" ) {
1213 mShowAction->setText( i18n("Show Todo...") ); 1213 mShowAction->setText( i18n("Show Todo...") );
1214 mEditAction->setText( i18n("Edit Todo...") ); 1214 mEditAction->setText( i18n("Edit Todo...") );
1215 mDeleteAction->setText( i18n("Delete Todo...") ); 1215 mDeleteAction->setText( i18n("Delete Todo...") );
1216 1216
1217 mNewSubTodoAction->setEnabled( true ); 1217 mNewSubTodoAction->setEnabled( true );
1218 } else { 1218 } else {
1219 mShowAction->setText( i18n("Show...") ); 1219 mShowAction->setText( i18n("Show...") );
1220 mShowAction->setText( i18n("Edit...") ); 1220 mShowAction->setText( i18n("Edit...") );
1221 mShowAction->setText( i18n("Delete...") ); 1221 mShowAction->setText( i18n("Delete...") );