summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/koeventviewerdialog.cpp20
-rw-r--r--korganizer/koeventviewerdialog.h1
-rw-r--r--korganizer/koviewmanager.h2
5 files changed, 25 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 5be1d28..da33d12 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,103 +1,106 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 1.9.17 ************ 3********** VERSION 1.9.17 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed that tooltips were not updated after moving an item in agenda view. 6Fixed that tooltips were not updated after moving an item in agenda view.
7Fixed a bug in sorting start date for recurring events in list view. 7Fixed a bug in sorting start date for recurring events in list view.
8Changed the left button in todo viewer from "Agenda" to "Set completed".
9This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
10
8 11
9KA/Pi: 12KA/Pi:
10All fields search does now actually search all the (possible) fields, 13All fields search does now actually search all the (possible) fields,
11not only those listed in the contact list. 14not only those listed in the contact list.
12Made is possible to inline a picture in a vcard on the Z. 15Made is possible to inline a picture in a vcard on the Z.
13This was only possible on the desktop, now is it possible on the Z as well. 16This was only possible on the desktop, now is it possible on the Z as well.
14Fixed of missing save settings after filter configuration. 17Fixed of missing save settings after filter configuration.
15Made saving of addressbook much faster. 18Made saving of addressbook much faster.
16Fixed extension widget layout problem. 19Fixed extension widget layout problem.
17Fixed saving of default formatted name settings. 20Fixed saving of default formatted name settings.
18Fixed formatted name handling in edit dialog. 21Fixed formatted name handling in edit dialog.
19Added an option for changing formatted names of many contacts 22Added an option for changing formatted names of many contacts
20(menu: File - Change - Set formatted name). 23(menu: File - Change - Set formatted name).
21 24
22QWhatsThis was not working on the Z ( only black rectangle was shown). 25QWhatsThis was not working on the Z ( only black rectangle was shown).
23This is Fixed. 26This is Fixed.
24 27
25KDE-Sync: 28KDE-Sync:
26Now readonly KDE resources are synced as well. 29Now readonly KDE resources are synced as well.
27(They are not changed in KDE itself, of course). 30(They are not changed in KDE itself, of course).
28 31
29 32
30 33
31********** VERSION 1.9.16 ************ 34********** VERSION 1.9.16 ************
32 35
33KO/Pi: 36KO/Pi:
34Fixed search dialog size on Z 6000 (480x640 display). 37Fixed search dialog size on Z 6000 (480x640 display).
35Added setting to hide/show time in agenda items. 38Added setting to hide/show time in agenda items.
36Added setting to hide not running todos in todo view. 39Added setting to hide not running todos in todo view.
37Added columns for start date/time in todo view. 40Added columns for start date/time in todo view.
38Replaced the solid half-hour lines in agenda view by dot lines. 41Replaced the solid half-hour lines in agenda view by dot lines.
39Added possibility of printing the What's Next View on the desktop 42Added possibility of printing the What's Next View on the desktop
40(i.e. Windows and Linux). 43(i.e. Windows and Linux).
41Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 44Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
42Added tooltips in month view.(Tooltips only available on desktop) 45Added tooltips in month view.(Tooltips only available on desktop)
43 46
44Fixed a strange problem in KO/Pi alarm applet. 47Fixed a strange problem in KO/Pi alarm applet.
45Did not find the actual problem, 48Did not find the actual problem,
46such that now Qtopia reboots again if deinstalling the alarm applet. 49such that now Qtopia reboots again if deinstalling the alarm applet.
47But the alarm applet should work again. 50But the alarm applet should work again.
48 51
49KA/Pi: 52KA/Pi:
50Fixed the problem, that internal pictures were not saved. 53Fixed the problem, that internal pictures were not saved.
51 54
52Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 55Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
53 56
54Fixed some minor problems. (Like word wrap in help text windows). 57Fixed some minor problems. (Like word wrap in help text windows).
55 58
56Fixed a compiling problem in microkde/kresources. 59Fixed a compiling problem in microkde/kresources.
57 60
58KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 61KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
59This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 62This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
60such that now syncing KO/Pi with Sharp DTM should work on the 63such that now syncing KO/Pi with Sharp DTM should work on the
61Zaurus C 3000 model. 64Zaurus C 3000 model.
62 65
63********** VERSION 1.9.15 ************ 66********** VERSION 1.9.15 ************
64 67
65Usebilty enhancements in KO/Pi: 68Usebilty enhancements in KO/Pi:
66When clicking on the date in a month view cell, the day view is shown. 69When clicking on the date in a month view cell, the day view is shown.
67Old behaviour was, that the "new event" dialog popped up. 70Old behaviour was, that the "new event" dialog popped up.
68 71
69Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 72Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
70That means, you can restore the latest 73That means, you can restore the latest
71event/todo/journal you have deleted. 74event/todo/journal you have deleted.
72A journal is deleted, if you clear all the text of the journal. 75A journal is deleted, if you clear all the text of the journal.
73 76
74Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 77Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
75 78
76KA/Pi starting in 480x640 resolution: 79KA/Pi starting in 480x640 resolution:
77Hide the filter action in toolbar 80Hide the filter action in toolbar
78and added icons for undo/delete/redo in toolbar. 81and added icons for undo/delete/redo in toolbar.
79 82
80Change in OM/Pi ViewMail dialog: 83Change in OM/Pi ViewMail dialog:
81When clicking on the "delete" icon the mail is deleted after confirmation as usual. 84When clicking on the "delete" icon the mail is deleted after confirmation as usual.
82But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 85But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
83 86
84Fixed a crash when deleting mail-accounts in OM/Pi. 87Fixed a crash when deleting mail-accounts in OM/Pi.
85 88
86 89
87********** VERSION 1.9.14 ************ 90********** VERSION 1.9.14 ************
88 91
89Fixed some problems with the dialog sizes when switching 92Fixed some problems with the dialog sizes when switching
90portrait/landscape mode on 640x480 PDA display. 93portrait/landscape mode on 640x480 PDA display.
91 94
92Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 95Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
93 96
94Fixed an ugly bug in KOpieMail: 97Fixed an ugly bug in KOpieMail:
95KOpieMail was not able to write files (mails) to MSDOS file system, 98KOpieMail was not able to write files (mails) to MSDOS file system,
96like on an usual preformatted SD card. That should work now. 99like on an usual preformatted SD card. That should work now.
97To save your mail data on the Sd card do the following: 100To save your mail data on the Sd card do the following:
98Create a dir on the SD card: 101Create a dir on the SD card:
99mkdir /mnt/card/localmail 102mkdir /mnt/card/localmail
100Go to your home dir: 103Go to your home dir:
101cd 104cd
102Go to kopiemail data storage dir: 105Go to kopiemail data storage dir:
103cd kdepim/apps/kopiemail 106cd kdepim/apps/kopiemail
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 363dc32..378c7d4 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2633,192 +2633,194 @@ void CalendarView::todoChanged(Todo * t)
2633{ 2633{
2634 emit todoModified( t, 4 ); 2634 emit todoModified( t, 4 );
2635 // updateTodoViews(); 2635 // updateTodoViews();
2636} 2636}
2637void CalendarView::todoToBeDeleted(Todo *) 2637void CalendarView::todoToBeDeleted(Todo *)
2638{ 2638{
2639 //qDebug("todoToBeDeleted(Todo *) "); 2639 //qDebug("todoToBeDeleted(Todo *) ");
2640 updateTodoViews(); 2640 updateTodoViews();
2641} 2641}
2642void CalendarView::todoDeleted() 2642void CalendarView::todoDeleted()
2643{ 2643{
2644 //qDebug(" todoDeleted()"); 2644 //qDebug(" todoDeleted()");
2645 updateTodoViews(); 2645 updateTodoViews();
2646} 2646}
2647 2647
2648 2648
2649 2649
2650void CalendarView::newTodo() 2650void CalendarView::newTodo()
2651{ 2651{
2652 2652
2653 showTodoEditor(); 2653 showTodoEditor();
2654 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true); 2654 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true);
2655 if ( mFilterView->filtersEnabled() ) { 2655 if ( mFilterView->filtersEnabled() ) {
2656 CalFilter *filter = mFilterView->selectedFilter(); 2656 CalFilter *filter = mFilterView->selectedFilter();
2657 if (filter && filter->showCategories()) { 2657 if (filter && filter->showCategories()) {
2658 mTodoEditor->setCategories(filter->categoryList().join(",") ); 2658 mTodoEditor->setCategories(filter->categoryList().join(",") );
2659 } 2659 }
2660 if ( filter ) 2660 if ( filter )
2661 mTodoEditor->setSecrecy( filter->getSecrecy() ); 2661 mTodoEditor->setSecrecy( filter->getSecrecy() );
2662 } 2662 }
2663} 2663}
2664 2664
2665void CalendarView::newSubTodo() 2665void CalendarView::newSubTodo()
2666{ 2666{
2667 Todo *todo = selectedTodo(); 2667 Todo *todo = selectedTodo();
2668 if ( todo ) newSubTodo( todo ); 2668 if ( todo ) newSubTodo( todo );
2669} 2669}
2670 2670
2671void CalendarView::newSubTodo(Todo *parentEvent) 2671void CalendarView::newSubTodo(Todo *parentEvent)
2672{ 2672{
2673 2673
2674 showTodoEditor(); 2674 showTodoEditor();
2675 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true); 2675 mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
2676} 2676}
2677 2677
2678void CalendarView::newFloatingEvent() 2678void CalendarView::newFloatingEvent()
2679{ 2679{
2680 DateList tmpList = mNavigator->selectedDates(); 2680 DateList tmpList = mNavigator->selectedDates();
2681 QDate date = tmpList.first(); 2681 QDate date = tmpList.first();
2682 2682
2683 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), 2683 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
2684 QDateTime( date, QTime( 12, 0, 0 ) ), true ); 2684 QDateTime( date, QTime( 12, 0, 0 ) ), true );
2685} 2685}
2686 2686
2687 2687
2688void CalendarView::editEvent( Event *event ) 2688void CalendarView::editEvent( Event *event )
2689{ 2689{
2690 2690
2691 if ( !event ) return; 2691 if ( !event ) return;
2692 if ( event->isReadOnly() ) { 2692 if ( event->isReadOnly() ) {
2693 showEvent( event ); 2693 showEvent( event );
2694 return; 2694 return;
2695 } 2695 }
2696 showEventEditor(); 2696 showEventEditor();
2697 mEventEditor->editEvent( event , mFlagEditDescription); 2697 mEventEditor->editEvent( event , mFlagEditDescription);
2698} 2698}
2699void CalendarView::editJournal( Journal *jour ) 2699void CalendarView::editJournal( Journal *jour )
2700{ 2700{
2701 if ( !jour ) return; 2701 if ( !jour ) return;
2702 mDialogManager->hideSearchDialog(); 2702 mDialogManager->hideSearchDialog();
2703 mViewManager->showJournalView(); 2703 mViewManager->showJournalView();
2704 mNavigator->slotDaySelect( jour->dtStart().date() ); 2704 mNavigator->slotDaySelect( jour->dtStart().date() );
2705} 2705}
2706void CalendarView::editTodo( Todo *todo ) 2706void CalendarView::editTodo( Todo *todo )
2707{ 2707{
2708 if ( !todo ) return; 2708 if ( !todo ) return;
2709 2709
2710 if ( todo->isReadOnly() ) { 2710 if ( todo->isReadOnly() ) {
2711 showTodo( todo ); 2711 showTodo( todo );
2712 return; 2712 return;
2713 } 2713 }
2714 showTodoEditor(); 2714 showTodoEditor();
2715 mTodoEditor->editTodo( todo ,mFlagEditDescription); 2715 mTodoEditor->editTodo( todo ,mFlagEditDescription);
2716 2716
2717} 2717}
2718 2718
2719KOEventViewerDialog* CalendarView::getEventViewerDialog() 2719KOEventViewerDialog* CalendarView::getEventViewerDialog()
2720{ 2720{
2721 if ( !mEventViewerDialog ) { 2721 if ( !mEventViewerDialog ) {
2722 mEventViewerDialog = new KOEventViewerDialog(this); 2722 mEventViewerDialog = new KOEventViewerDialog(this);
2723 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 2723 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
2724 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 2724 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
2725 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 2725 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
2726 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 2726 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
2727 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 2727 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
2728 viewManager(), SLOT( showAgendaView( bool ) ) ); 2728 viewManager(), SLOT( showAgendaView( bool ) ) );
2729 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
2730 this, SLOT( todoChanged(Todo *) ) );
2729 mEventViewerDialog->resize( 640, 480 ); 2731 mEventViewerDialog->resize( 640, 480 );
2730 2732
2731 } 2733 }
2732 return mEventViewerDialog; 2734 return mEventViewerDialog;
2733} 2735}
2734void CalendarView::showEvent(Event *event) 2736void CalendarView::showEvent(Event *event)
2735{ 2737{
2736 getEventViewerDialog()->setEvent(event); 2738 getEventViewerDialog()->setEvent(event);
2737 getEventViewerDialog()->showMe(); 2739 getEventViewerDialog()->showMe();
2738} 2740}
2739 2741
2740void CalendarView::showTodo(Todo *event) 2742void CalendarView::showTodo(Todo *event)
2741{ 2743{
2742 getEventViewerDialog()->setTodo(event); 2744 getEventViewerDialog()->setTodo(event);
2743 getEventViewerDialog()->showMe(); 2745 getEventViewerDialog()->showMe();
2744} 2746}
2745void CalendarView::showJournal( Journal *jour ) 2747void CalendarView::showJournal( Journal *jour )
2746{ 2748{
2747 getEventViewerDialog()->setJournal(jour); 2749 getEventViewerDialog()->setJournal(jour);
2748 getEventViewerDialog()->showMe(); 2750 getEventViewerDialog()->showMe();
2749 2751
2750} 2752}
2751// void CalendarView::todoModified (Todo *event, int changed) 2753// void CalendarView::todoModified (Todo *event, int changed)
2752// { 2754// {
2753// // if (mDialogList.find (event) != mDialogList.end ()) { 2755// // if (mDialogList.find (event) != mDialogList.end ()) {
2754// // kdDebug() << "Todo modified and open" << endl; 2756// // kdDebug() << "Todo modified and open" << endl;
2755// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; 2757// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event];
2756// // temp->modified (changed); 2758// // temp->modified (changed);
2757 2759
2758// // } 2760// // }
2759 2761
2760// mViewManager->updateView(); 2762// mViewManager->updateView();
2761// } 2763// }
2762 2764
2763void CalendarView::appointment_show() 2765void CalendarView::appointment_show()
2764{ 2766{
2765 Event *anEvent = 0; 2767 Event *anEvent = 0;
2766 2768
2767 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2769 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2768 2770
2769 if (mViewManager->currentView()->isEventView()) { 2771 if (mViewManager->currentView()->isEventView()) {
2770 if ( incidence && incidence->type() == "Event" ) { 2772 if ( incidence && incidence->type() == "Event" ) {
2771 anEvent = static_cast<Event *>(incidence); 2773 anEvent = static_cast<Event *>(incidence);
2772 } 2774 }
2773 } 2775 }
2774 2776
2775 if (!anEvent) { 2777 if (!anEvent) {
2776 KNotifyClient::beep(); 2778 KNotifyClient::beep();
2777 return; 2779 return;
2778 } 2780 }
2779 2781
2780 showEvent(anEvent); 2782 showEvent(anEvent);
2781} 2783}
2782 2784
2783void CalendarView::appointment_edit() 2785void CalendarView::appointment_edit()
2784{ 2786{
2785 Event *anEvent = 0; 2787 Event *anEvent = 0;
2786 2788
2787 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2789 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2788 2790
2789 if (mViewManager->currentView()->isEventView()) { 2791 if (mViewManager->currentView()->isEventView()) {
2790 if ( incidence && incidence->type() == "Event" ) { 2792 if ( incidence && incidence->type() == "Event" ) {
2791 anEvent = static_cast<Event *>(incidence); 2793 anEvent = static_cast<Event *>(incidence);
2792 } 2794 }
2793 } 2795 }
2794 2796
2795 if (!anEvent) { 2797 if (!anEvent) {
2796 KNotifyClient::beep(); 2798 KNotifyClient::beep();
2797 return; 2799 return;
2798 } 2800 }
2799 2801
2800 editEvent(anEvent); 2802 editEvent(anEvent);
2801} 2803}
2802 2804
2803void CalendarView::appointment_delete() 2805void CalendarView::appointment_delete()
2804{ 2806{
2805 Event *anEvent = 0; 2807 Event *anEvent = 0;
2806 2808
2807 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2809 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2808 2810
2809 if (mViewManager->currentView()->isEventView()) { 2811 if (mViewManager->currentView()->isEventView()) {
2810 if ( incidence && incidence->type() == "Event" ) { 2812 if ( incidence && incidence->type() == "Event" ) {
2811 anEvent = static_cast<Event *>(incidence); 2813 anEvent = static_cast<Event *>(incidence);
2812 } 2814 }
2813 } 2815 }
2814 2816
2815 if (!anEvent) { 2817 if (!anEvent) {
2816 KNotifyClient::beep(); 2818 KNotifyClient::beep();
2817 return; 2819 return;
2818 } 2820 }
2819 2821
2820 deleteEvent(anEvent); 2822 deleteEvent(anEvent);
2821} 2823}
2822 2824
2823void CalendarView::todo_resub( Todo * parent, Todo * sub ) 2825void CalendarView::todo_resub( Todo * parent, Todo * sub )
2824{ 2826{
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 68c0e1a..772fd95 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -56,185 +56,201 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
56 // if ( KOPrefs::instance()->mCompactDialogs ) { 56 // if ( KOPrefs::instance()->mCompactDialogs ) {
57// setFixedSize( 240,284 ); 57// setFixedSize( 240,284 );
58// move( 0, 15 ); 58// move( 0, 15 );
59// } else { 59// } else {
60// setMinimumSize(300,200); 60// setMinimumSize(300,200);
61// resize(320,300); 61// resize(320,300);
62// } 62// }
63 mSyncMode = false; 63 mSyncMode = false;
64 mSyncResult = 0; 64 mSyncResult = 0;
65 65
66} 66}
67 67
68KOEventViewerDialog::~KOEventViewerDialog() 68KOEventViewerDialog::~KOEventViewerDialog()
69{ 69{
70 //qDebug("-------~KOEventViewerDialog() "); 70 //qDebug("-------~KOEventViewerDialog() ");
71} 71}
72void KOEventViewerDialog::showMe() 72void KOEventViewerDialog::showMe()
73{ 73{
74 74
75#ifdef DESKTOP_VERSION 75#ifdef DESKTOP_VERSION
76 show(); 76 show();
77#else 77#else
78 showMaximized(); 78 showMaximized();
79#endif 79#endif
80 setFocus(); 80 setFocus();
81 setActiveWindow(); 81 setActiveWindow();
82 82
83} 83}
84void KOEventViewerDialog::setSyncMode( bool b ) 84void KOEventViewerDialog::setSyncMode( bool b )
85{ 85{
86 mSyncMode = b; 86 mSyncMode = b;
87 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); 87 //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode );
88 if ( mSyncMode ) { 88 if ( mSyncMode ) {
89 findButton( Close )->setText( i18n("Cancel Sync")); 89 findButton( Close )->setText( i18n("Cancel Sync"));
90 findButton( Ok )->setText( i18n("Remote")); 90 findButton( Ok )->setText( i18n("Remote"));
91 findButton( User1 )->setText( i18n("Local")); 91 findButton( User1 )->setText( i18n("Local"));
92 } else { 92 } else {
93 findButton( Close )->setText( i18n("Close")); 93 findButton( Close )->setText( i18n("Close"));
94 findButton( Ok )->setText( i18n("Edit")); 94 findButton( Ok )->setText( i18n("Edit"));
95 findButton( User1 )->setText( i18n("Agenda")); 95 findButton( User1 )->setText( i18n("Agenda"));
96 } 96 }
97 mEventViewer->setSyncMode( b ); 97 mEventViewer->setSyncMode( b );
98} 98}
99void KOEventViewerDialog::setColorMode( int m ) 99void KOEventViewerDialog::setColorMode( int m )
100{ 100{
101 mEventViewer->setColorMode( m ); 101 mEventViewer->setColorMode( m );
102} 102}
103int KOEventViewerDialog::executeS( bool local ) 103int KOEventViewerDialog::executeS( bool local )
104{ 104{
105 mSyncResult = 3; 105 mSyncResult = 3;
106 if ( local ) 106 if ( local )
107 findButton( User1 )->setFocus(); 107 findButton( User1 )->setFocus();
108 else 108 else
109 findButton( Ok )->setFocus(); 109 findButton( Ok )->setFocus();
110 exec(); 110 exec();
111 return mSyncResult; 111 return mSyncResult;
112} 112}
113 113
114void KOEventViewerDialog::updateConfig() 114void KOEventViewerDialog::updateConfig()
115{ 115{
116 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); 116 mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
117 117
118} 118}
119void KOEventViewerDialog::setEvent(Event *event) 119void KOEventViewerDialog::setEvent(Event *event)
120{ 120{
121 mEventViewer->setEvent(event); 121 mEventViewer->setEvent(event);
122 mIncidence = event; 122 mIncidence = event;
123 findButton( Close )->setFocus(); 123 findButton( Close )->setFocus();
124} 124}
125void KOEventViewerDialog::setIncidence(Incidence *in ) 125void KOEventViewerDialog::setIncidence(Incidence *in )
126{ 126{
127 if ( in->type() == "Event" ) 127 if ( in->type() == "Event" )
128 setEvent( (Event*) in ); 128 setEvent( (Event*) in );
129 else if ( in->type() =="Todo" ) 129 else if ( in->type() =="Todo" )
130 setTodo( (Todo*) in ); 130 setTodo( (Todo*) in );
131 else if ( in->type() =="Journal" ) 131 else if ( in->type() =="Journal" )
132 setJournal( (Journal*) in ); 132 setJournal( (Journal*) in );
133} 133}
134void KOEventViewerDialog::addIncidence(Incidence *in) 134void KOEventViewerDialog::addIncidence(Incidence *in)
135{ 135{
136 if ( in->type() == "Event" ) 136 if ( in->type() == "Event" )
137 addEvent( (Event*) in ); 137 addEvent( (Event*) in );
138 else if ( in->type() =="Todo" ) 138 else if ( in->type() =="Todo" )
139 mEventViewer->setTodo( (Todo*) in, false ); 139 mEventViewer->setTodo( (Todo*) in, false );
140 else if ( in->type() =="Journal" ) 140 else if ( in->type() =="Journal" )
141 mEventViewer->setJournal( (Journal*) in, false ); 141 mEventViewer->setJournal( (Journal*) in, false );
142 if ( mSyncMode ) { 142 if ( mSyncMode ) {
143 findButton( User1 )->setFocus(); 143 findButton( User1 )->setFocus();
144 setCaption(i18n("Conflict! Please choose entry")); 144 setCaption(i18n("Conflict! Please choose entry"));
145 } 145 }
146} 146}
147 147
148void KOEventViewerDialog::addEvent(Event *event) 148void KOEventViewerDialog::addEvent(Event *event)
149{ 149{
150 mEventViewer->addEvent(event); 150 mEventViewer->addEvent(event);
151 mIncidence = event; 151 mIncidence = event;
152 findButton( Close )->setFocus(); 152 findButton( Close )->setFocus();
153 if ( !mSyncMode ) {
154 findButton( User1 )->setText( i18n("Agenda"));
155 }
153} 156}
154 157
155void KOEventViewerDialog::setTodo(Todo *event) 158void KOEventViewerDialog::setTodo(Todo *event)
156{ 159{
157 mEventViewer->setTodo(event); 160 mEventViewer->setTodo(event);
158 mIncidence = (Incidence*)event; 161 mIncidence = (Incidence*)event;
159 findButton( Close )->setFocus(); 162 findButton( Close )->setFocus();
163 if ( !mSyncMode ) {
164 findButton( User1 )->setText( i18n("Set complete"));
165 }
160} 166}
161void KOEventViewerDialog::setJournal(Journal *j) 167void KOEventViewerDialog::setJournal(Journal *j)
162{ 168{
163 mEventViewer->setJournal(j); 169 mEventViewer->setJournal(j);
164 mIncidence = (Incidence*)j; 170 mIncidence = (Incidence*)j;
165 findButton( Close )->setFocus(); 171 findButton( Close )->setFocus();
172 if ( !mSyncMode ) {
173 findButton( User1 )->setText( i18n("Agenda"));
174 }
166} 175}
167 176
168void KOEventViewerDialog::addText(QString text) 177void KOEventViewerDialog::addText(QString text)
169{ 178{
170 mEventViewer->addText(text); 179 mEventViewer->addText(text);
171 findButton( Close )->setFocus(); 180 findButton( Close )->setFocus();
172} 181}
173void KOEventViewerDialog::editIncidence() 182void KOEventViewerDialog::editIncidence()
174{ 183{
175 if ( mSyncMode ) { 184 if ( mSyncMode ) {
176 mSyncResult = 2; 185 mSyncResult = 2;
177 accept(); 186 accept();
178 return; 187 return;
179 } 188 }
180 if ( mIncidence ){ 189 if ( mIncidence ){
181#ifndef DESKTOP_VERSION 190#ifndef DESKTOP_VERSION
182 hide(); 191 hide();
183#endif 192#endif
184 emit editIncidence( mIncidence ); 193 emit editIncidence( mIncidence );
185 } 194 }
186} 195}
187void KOEventViewerDialog::showIncidence() 196void KOEventViewerDialog::showIncidence()
188{ 197{
189 198
190 if ( mSyncMode ) { 199 if ( mSyncMode ) {
191 mSyncResult = 1; 200 mSyncResult = 1;
192 accept(); 201 accept();
193 return; 202 return;
194 } 203 }
195 204
196 if ( mIncidence ){ 205 if ( mIncidence ){
197#ifndef DESKTOP_VERSION 206#ifndef DESKTOP_VERSION
198 hide(); 207 hide();
199#endif 208#endif
200 QDate date; 209 QDate date;
201 if ( mIncidence->type() == "Todo" ) { 210 if ( mIncidence->type() == "Todo" ) {
211 /*
202 if ( ((Todo*)mIncidence)->hasDueDate() ) 212 if ( ((Todo*)mIncidence)->hasDueDate() )
203 date = ((Todo*)mIncidence)->dtDue().date(); 213 date = ((Todo*)mIncidence)->dtDue().date();
204 else { 214 else {
205 globalFlagBlockAgenda = 2; 215 globalFlagBlockAgenda = 2;
206 emit showAgendaView( false ); 216 emit showAgendaView( false );
207 return; 217 return;
208 } 218 }
219 */
220 ((Todo*)mIncidence)->setCompleted( true );
221 hide();
222 emit todoCompleted(((Todo*)mIncidence));
223 return;
224
209 } else 225 } else
210 date = mIncidence->dtStart().date(); 226 date = mIncidence->dtStart().date();
211 globalFlagBlockAgenda = 1; 227 globalFlagBlockAgenda = 1;
212 emit showAgendaView( false ); 228 emit showAgendaView( false );
213 globalFlagBlockAgenda = 2; 229 globalFlagBlockAgenda = 2;
214 emit jumpToTime( date ); 230 emit jumpToTime( date );
215 } 231 }
216} 232}
217void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) 233void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
218{ 234{
219 switch ( e->key() ) { 235 switch ( e->key() ) {
220 236
221 case Qt::Key_A : 237 case Qt::Key_A :
222 case Qt::Key_L : 238 case Qt::Key_L :
223 showIncidence(); 239 showIncidence();
224 break; 240 break;
225 case Qt::Key_E : 241 case Qt::Key_E :
226 case Qt::Key_R : 242 case Qt::Key_R :
227 editIncidence(); 243 editIncidence();
228 break; 244 break;
229 case Qt::Key_C: 245 case Qt::Key_C:
230 case Qt::Key_Escape: 246 case Qt::Key_Escape:
231 close(); 247 close();
232 break; 248 break;
233 case Qt::Key_I: 249 case Qt::Key_I:
234 accept(); 250 accept();
235 break; 251 break;
236 default: 252 default:
237 break; 253 break;
238 } 254 }
239 255
240} 256}
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 21cb3ee..b6b4103 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -1,70 +1,71 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19#ifndef KOEVENTVIEWERDIALOG_H 19#ifndef KOEVENTVIEWERDIALOG_H
20#define KOEVENTVIEWERDIALOG_H 20#define KOEVENTVIEWERDIALOG_H
21// 21//
22// Viewer dialog for events. 22// Viewer dialog for events.
23// 23//
24 24
25#include <qtextview.h> 25#include <qtextview.h>
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28 28
29#include <libkcal/event.h> 29#include <libkcal/event.h>
30 30
31using namespace KCal; 31using namespace KCal;
32 32
33class KOEventViewer; 33class KOEventViewer;
34 34
35class KOEventViewerDialog : public KDialogBase { 35class KOEventViewerDialog : public KDialogBase {
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 KOEventViewerDialog(QWidget *parent=0,const char *name=0); 38 KOEventViewerDialog(QWidget *parent=0,const char *name=0);
39 virtual ~KOEventViewerDialog(); 39 virtual ~KOEventViewerDialog();
40 40
41 void setEvent(Event *event); 41 void setEvent(Event *event);
42 void addEvent(Event *event); 42 void addEvent(Event *event);
43 void setTodo(Todo *event); 43 void setTodo(Todo *event);
44 void setJournal(Journal *journal); 44 void setJournal(Journal *journal);
45 void setIncidence(Incidence *inc); 45 void setIncidence(Incidence *inc);
46 void addIncidence(Incidence *inc); 46 void addIncidence(Incidence *inc);
47 void addText(QString text); 47 void addText(QString text);
48 void showMe(); 48 void showMe();
49 void setSyncMode( bool ); 49 void setSyncMode( bool );
50 void setColorMode( int m ); 50 void setColorMode( int m );
51 int executeS( bool ); 51 int executeS( bool );
52 public slots: 52 public slots:
53 void updateConfig(); 53 void updateConfig();
54 signals: 54 signals:
55 void editIncidence( Incidence* ); 55 void editIncidence( Incidence* );
56 void jumpToTime( const QDate &); 56 void jumpToTime( const QDate &);
57 void showAgendaView( bool ); 57 void showAgendaView( bool );
58 void todoCompleted(Todo*);
58private slots: 59private slots:
59 void editIncidence(); 60 void editIncidence();
60 void showIncidence(); 61 void showIncidence();
61 62
62 private: 63 private:
63 bool mSyncMode; 64 bool mSyncMode;
64 int mSyncResult; 65 int mSyncResult;
65 KOEventViewer *mEventViewer; 66 KOEventViewer *mEventViewer;
66 Incidence* mIncidence; 67 Incidence* mIncidence;
67 void keyPressEvent ( QKeyEvent * e ); 68 void keyPressEvent ( QKeyEvent * e );
68}; 69};
69 70
70#endif 71#endif
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 6f76e2c..3c251fb 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -1,115 +1,115 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 3 Copyright (c) 2001
4 Cornelius Schumacher <schumacher@kde.org> 4 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24#ifndef KOVIEWMANAGER_H 24#ifndef KOVIEWMANAGER_H
25#define KOVIEWMANAGER_H 25#define KOVIEWMANAGER_H
26 26
27#include <qobject.h> 27#include <qobject.h>
28 28
29#include <korganizer/baseview.h> 29#include <korganizer/baseview.h>
30 30
31class CalendarView; 31class CalendarView;
32 32
33class KOListView; 33class KOListView;
34class KOAgendaView; 34class KOAgendaView;
35class KOMonthView; 35class KOMonthView;
36class KOTimeSpanView; 36class KOTimeSpanView;
37class KOTodoView; 37class KOTodoView;
38class KOWhatsNextView; 38class KOWhatsNextView;
39class KOJournalView; 39class KOJournalView;
40 40
41using namespace KCal; 41using namespace KCal;
42 42
43/** 43/**
44 This class manages the views of the calendar. It owns the objects and handles 44 This class manages the views of the calendar. It owns the objects and handles
45 creation and selection. 45 creation and selection.
46*/ 46*/
47class KOViewManager : public QObject 47class KOViewManager : public QObject
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 public: 50 public:
51 KOViewManager( CalendarView * ); 51 KOViewManager( CalendarView * );
52 virtual ~KOViewManager(); 52 virtual ~KOViewManager();
53 53
54 /** changes the view to be the currently selected view */ 54 /** changes the view to be the currently selected view */
55 void showView(KOrg::BaseView *, bool fullScreen = false ); 55 void showView(KOrg::BaseView *, bool fullScreen = false );
56 void updateWNview(); 56 void updateWNview();
57 void readSettings(KConfig *config); 57 void readSettings(KConfig *config);
58 void writeSettings(KConfig *config); 58 void writeSettings(KConfig *config);
59 bool showsNextDays(); 59 bool showsNextDays();
60 /** Read which view was shown last from config file */ 60 /** Read which view was shown last from config file */
61 void readCurrentView(KConfig *); 61 void readCurrentView(KConfig *);
62 /** Write which view is currently shown to config file */ 62 /** Write which view is currently shown to config file */
63 void writeCurrentView(KConfig *); 63 void writeCurrentView(KConfig *);
64 64
65 KOrg::BaseView *currentView(); 65 KOrg::BaseView *currentView();
66 66
67 void setDocumentId( const QString & ); 67 void setDocumentId( const QString & );
68 68
69 void updateView();
70 void updateView( const QDate &start, const QDate &end ); 69 void updateView( const QDate &start, const QDate &end );
71 70
72 void raiseCurrentView( bool fullScreen = false ); 71 void raiseCurrentView( bool fullScreen = false );
73 72
74 void addView(KOrg::BaseView *); 73 void addView(KOrg::BaseView *);
75 74
76 Incidence *currentSelection(); 75 Incidence *currentSelection();
77 QDate currentSelectionDate(); 76 QDate currentSelectionDate();
78 77
79 KOAgendaView *agendaView() const { return mAgendaView; } 78 KOAgendaView *agendaView() const { return mAgendaView; }
80 79
81 signals: 80 signals:
82 void printWNV(); 81 void printWNV();
83 public slots: 82 public slots:
83 void updateView();
84 void showWhatsNextView(); 84 void showWhatsNextView();
85 void showListView(); 85 void showListView();
86 void showAgendaView( bool fullScreen = false ); 86 void showAgendaView( bool fullScreen = false );
87 void showDayView(); 87 void showDayView();
88 void showWorkWeekView(); 88 void showWorkWeekView();
89 void showWeekView(); 89 void showWeekView();
90 void showNextXView(); 90 void showNextXView();
91 void showMonthView(); 91 void showMonthView();
92 void showTodoView(); 92 void showTodoView();
93 void showJournalView(); 93 void showJournalView();
94 void showTimeSpanView(); 94 void showTimeSpanView();
95 95
96 private: 96 private:
97 CalendarView *mMainView; 97 CalendarView *mMainView;
98 98
99 int mCurrentAgendaView; 99 int mCurrentAgendaView;
100 KOAgendaView *mAgendaView; 100 KOAgendaView *mAgendaView;
101 KOListView *mListView; 101 KOListView *mListView;
102 KOMonthView *mMonthView; 102 KOMonthView *mMonthView;
103 KOTodoView *mTodoView; 103 KOTodoView *mTodoView;
104 KOWhatsNextView *mWhatsNextView; 104 KOWhatsNextView *mWhatsNextView;
105 KOJournalView *mJournalView; 105 KOJournalView *mJournalView;
106 KOTimeSpanView *mTimeSpanView; 106 KOTimeSpanView *mTimeSpanView;
107 107
108 KOrg::BaseView *mCurrentView; // currently active event view 108 KOrg::BaseView *mCurrentView; // currently active event view
109 109
110 int mAgendaViewMode; 110 int mAgendaViewMode;
111 bool mFlagShowNextxDays; 111 bool mFlagShowNextxDays;
112 112
113}; 113};
114 114
115#endif 115#endif