Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index b7b1da0..1358f1c 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -573,49 +573,49 @@ void TodoWindow::slotFind() | |||
573 | 573 | ||
574 | void TodoWindow::setDocument( const QString &filename ) | 574 | void TodoWindow::setDocument( const QString &filename ) |
575 | { | 575 | { |
576 | if ( filename.find(".vcs") != int(filename.length()) - 4 ) return; | 576 | if ( filename.find(".vcs") != int(filename.length()) - 4 ) return; |
577 | 577 | ||
578 | ToDoDB todoDB(filename, new ToDoVCalResource() ); | 578 | ToDoDB todoDB(filename, new ToDoVCalResource() ); |
579 | QValueList<ToDoEvent> tl = todoDB.rawToDos(); | 579 | QValueList<ToDoEvent> tl = todoDB.rawToDos(); |
580 | for( QValueList<ToDoEvent>::Iterator it = tl.begin(); it != tl.end(); ++it ) { | 580 | for( QValueList<ToDoEvent>::Iterator it = tl.begin(); it != tl.end(); ++it ) { |
581 | table->addEntry( *it ); | 581 | table->addEntry( *it ); |
582 | } | 582 | } |
583 | } | 583 | } |
584 | 584 | ||
585 | static const char * beamfile = "/tmp/obex/todo.vcs"; | 585 | static const char * beamfile = "/tmp/obex/todo.vcs"; |
586 | 586 | ||
587 | void TodoWindow::slotBeam() | 587 | void TodoWindow::slotBeam() |
588 | { | 588 | { |
589 | unlink( beamfile ); // delete if exists | 589 | unlink( beamfile ); // delete if exists |
590 | ToDoEvent c = table->currentEntry(); | 590 | ToDoEvent c = table->currentEntry(); |
591 | mkdir("/tmp/obex/", 0755); | 591 | mkdir("/tmp/obex/", 0755); |
592 | ToDoDB todoDB( beamfile, new ToDoVCalResource() ); | 592 | ToDoDB todoDB( beamfile, new ToDoVCalResource() ); |
593 | todoDB.addEvent( c ); | 593 | todoDB.addEvent( c ); |
594 | todoDB.save(); | 594 | todoDB.save(); |
595 | Ir *ir = new Ir( this ); | 595 | Ir *ir = new Ir( this ); |
596 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 596 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
597 | QString description = c.description(); | 597 | QString description = c.summary(); |
598 | ir->send( beamfile, description, "text/x-vCalendar" ); | 598 | ir->send( beamfile, description, "text/x-vCalendar" ); |
599 | } | 599 | } |
600 | 600 | ||
601 | void TodoWindow::beamDone( Ir *ir ) | 601 | void TodoWindow::beamDone( Ir *ir ) |
602 | { | 602 | { |
603 | delete ir; | 603 | delete ir; |
604 | unlink( beamfile ); | 604 | unlink( beamfile ); |
605 | } | 605 | } |
606 | 606 | ||
607 | void TodoWindow::showDeadline( bool s ) | 607 | void TodoWindow::showDeadline( bool s ) |
608 | { | 608 | { |
609 | table->setPaintingEnabled( false ); | 609 | table->setPaintingEnabled( false ); |
610 | table->setShowDeadline( s ); | 610 | table->setShowDeadline( s ); |
611 | table->setPaintingEnabled( true ); | 611 | table->setPaintingEnabled( true ); |
612 | } | 612 | } |
613 | void TodoWindow::slotShowDetails() | 613 | void TodoWindow::slotShowDetails() |
614 | { | 614 | { |
615 | ToDoEvent event = table->currentEntry(); | 615 | ToDoEvent event = table->currentEntry(); |
616 | slotShowDetails( event ); | 616 | slotShowDetails( event ); |
617 | } | 617 | } |
618 | void TodoWindow::slotShowDetails( const ToDoEvent &event ) | 618 | void TodoWindow::slotShowDetails( const ToDoEvent &event ) |
619 | { | 619 | { |
620 | if( mView == 0l ){ | 620 | if( mView == 0l ){ |
621 | mView = new TodoLabel(mStack); | 621 | mView = new TodoLabel(mStack); |