summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--korganizer/calendarview.cpp3
-rw-r--r--korganizer/mainwindow.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 322c0e6..0ebd853 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,139 +1,140 @@
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 3
4********** VERSION 2.1.8 ************ 4********** VERSION 2.1.8 ************
5 5
6KO/Pi: 6KO/Pi:
7Added info about the completion sate of a todo in the ListView/Searchdialog. 7Added info about the completion state of a todo in the ListView/Searchdialog.
8If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 8If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
9Fixed some updating problems when changing the filter.
9 10
10KA/Pi: 11KA/Pi:
11In the addressee selection dialog now the formatted name is shown, if not empty. 12In the addressee selection dialog now the formatted name is shown, if not empty.
12 13
13Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 14Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
14Fixed the sorting for size in the file selector on the Z. 15Fixed the sorting for size in the file selector on the Z.
15 16
16Changed the color selection dialog on the Zaurus to a more user friendly version. 17Changed the color selection dialog on the Zaurus to a more user friendly version.
17 18
18********** VERSION 2.1.7 ************ 19********** VERSION 2.1.7 ************
19 20
20KO/Pi: 21KO/Pi:
21Fixed several problems in the new Resource handling. 22Fixed several problems in the new Resource handling.
22Added more options to the search dialog. 23Added more options to the search dialog.
23Fixed a problem in the Month view. 24Fixed a problem in the Month view.
24Added more options to the dialog when setting a todo to stopped. 25Added more options to the dialog when setting a todo to stopped.
25 26
26Fixed two small problems in KO/PiAlarm applet. 27Fixed two small problems in KO/Pi Alarm applet.
27 28
28********** VERSION 2.1.6 ************ 29********** VERSION 2.1.6 ************
29 30
30This release is for testing only. 31This release is for testing only.
31 32
32KO/Pi: 33KO/Pi:
33Added to the list view (the list view is used in search dialog as well) the possibility to print it. 34Added to the list view (the list view is used in search dialog as well) the possibility to print it.
34Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 35Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
35Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 36Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
36Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 37Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
37Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 38Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
38Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 39Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
39 40
40Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 41Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
41In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 42In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
42Now on every sync the set of calendars is synced which are enabled in the resource view. 43Now on every sync the set of calendars is synced which are enabled in the resource view.
43 44
44A calendar is enabled in the resource view if the "eye" column is checked. 45A calendar is enabled in the resource view if the "eye" column is checked.
45You can set a calendar to be the default for new items( "+" column ). 46You can set a calendar to be the default for new items( "+" column ).
46You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 47You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
47To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 48To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
48 49
49 50
50********** VERSION 2.1.5 ************ 51********** VERSION 2.1.5 ************
51 52
52This is the new stable version. 53This is the new stable version.
53Bugfix: 54Bugfix:
54Fixed a problem with agenda popup on the desktop in KO/Pi. 55Fixed a problem with agenda popup on the desktop in KO/Pi.
55Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 56Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
56Added config option to not display completed todos in agenda view. 57Added config option to not display completed todos in agenda view.
57Addressee view is now using the formatted name, if defined. 58Addressee view is now using the formatted name, if defined.
58That makes it possible to display "lastname, firstname" in that view now. 59That makes it possible to display "lastname, firstname" in that view now.
59To set the formatted name for all contacts, please use menu: 60To set the formatted name for all contacts, please use menu:
60Edit->Change->Set formatted name. 61Edit->Change->Set formatted name.
61Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 62Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
62 63
63********** VERSION 2.1.4 ************ 64********** VERSION 2.1.4 ************
64 65
65Fixed two more bugs in the KA/Pi CSV import dialog: 66Fixed two more bugs in the KA/Pi CSV import dialog:
66Made it possible to read multi-line fields and import it to the "Note" field. 67Made it possible to read multi-line fields and import it to the "Note" field.
67Fixed a problem in mapping custom fields, whatever a custem field is... 68Fixed a problem in mapping custom fields, whatever a custem field is...
68 69
69********** VERSION 2.1.3 ************ 70********** VERSION 2.1.3 ************
70 71
71Changed the menu structure of the alarm applet: 72Changed the menu structure of the alarm applet:
72Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 73Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
73 74
74Fixed several problems in the KA/Pi CSV import dialog: 75Fixed several problems in the KA/Pi CSV import dialog:
75Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 76Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
76 77
77 78
78********** VERSION 2.1.2 ************ 79********** VERSION 2.1.2 ************
79 80
80Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 81Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
81 82
82Fixed a problem when importing data from Outlook with mutiple categories set. 83Fixed a problem when importing data from Outlook with mutiple categories set.
83 84
84Changed display of days in datenavigator: 85Changed display of days in datenavigator:
85Birthdays are now blue, not dark green. 86Birthdays are now blue, not dark green.
86When todo view is shown, no birtdays are shown and days with due todos are shown blue. 87When todo view is shown, no birtdays are shown and days with due todos are shown blue.
87When journal view is shown, only holidays are shown and days with journals are blue. 88When journal view is shown, only holidays are shown and days with journals are blue.
88 89
89Added Backup options to global config: 90Added Backup options to global config:
90You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). 91You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
91It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. 92It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
92The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. 93The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
93 94
94********** VERSION 2.1.1 ************ 95********** VERSION 2.1.1 ************
95 96
96Stable release 2.1.1! 97Stable release 2.1.1!
97 98
98KO/Pi: 99KO/Pi:
99Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 100Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
100 101
101********** VERSION 2.1.0 ************ 102********** VERSION 2.1.0 ************
102 103
103Stable release 2.1.0! 104Stable release 2.1.0!
104 105
105Summary of changes/fixes compared to version 2.0.6: 106Summary of changes/fixes compared to version 2.0.6:
106 107
107Many bugs of version 2.0.6 fixed. 108Many bugs of version 2.0.6 fixed.
108Most of them were small bugs, but some of them were important. 109Most of them were small bugs, but some of them were important.
109It is recommended to use version 2.1.0 and not version 2.0.6. 110It is recommended to use version 2.1.0 and not version 2.0.6.
110 111
111Important changes: 112Important changes:
112 113
113Added recurring todos to KO/Pi. 114Added recurring todos to KO/Pi.
114 115
115Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 116Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
116 117
117Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 118Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
118 119
119Datenavigator can now display many months. Very useful on the desktop. 120Datenavigator can now display many months. Very useful on the desktop.
120 121
121KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 122KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
122 123
123Made alarm sound working on Linux desktop. 124Made alarm sound working on Linux desktop.
124 125
125Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 126Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
126 127
127Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 128Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
128 129
129Many other usebility enhancements. 130Many other usebility enhancements.
130Special thanks to Ben for his suggestions! 131Special thanks to Ben for his suggestions!
131 132
132You can find the complete changelog 133You can find the complete changelog
133from version 1.7.7 to 2.1.0 134from version 1.7.7 to 2.1.0
134in the source package or on 135in the source package or on
135 136
136http://www.pi-sync.net/html/changelog.html 137http://www.pi-sync.net/html/changelog.html
137 138
138 139
139 140
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index d25f632..08909ed 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3892,319 +3892,320 @@ void CalendarView::processMainViewSelection( Incidence *incidence )
3892void CalendarView::processTodoListSelection( Incidence *incidence ) 3892void CalendarView::processTodoListSelection( Incidence *incidence )
3893{ 3893{
3894 if ( incidence && mViewManager->currentView() ) { 3894 if ( incidence && mViewManager->currentView() ) {
3895 mViewManager->currentView()->clearSelection(); 3895 mViewManager->currentView()->clearSelection();
3896 } 3896 }
3897 processIncidenceSelection( incidence ); 3897 processIncidenceSelection( incidence );
3898} 3898}
3899 3899
3900void CalendarView::processIncidenceSelection( Incidence *incidence ) 3900void CalendarView::processIncidenceSelection( Incidence *incidence )
3901{ 3901{
3902 if ( incidence == mSelectedIncidence ) return; 3902 if ( incidence == mSelectedIncidence ) return;
3903 3903
3904 mSelectedIncidence = incidence; 3904 mSelectedIncidence = incidence;
3905 3905
3906 emit incidenceSelected( mSelectedIncidence ); 3906 emit incidenceSelected( mSelectedIncidence );
3907 3907
3908 if ( incidence && incidence->typeID() == eventID ) { 3908 if ( incidence && incidence->typeID() == eventID ) {
3909 Event *event = static_cast<Event *>( incidence ); 3909 Event *event = static_cast<Event *>( incidence );
3910 if ( event->organizer() == KOPrefs::instance()->email() ) { 3910 if ( event->organizer() == KOPrefs::instance()->email() ) {
3911 emit organizerEventsSelected( true ); 3911 emit organizerEventsSelected( true );
3912 } else { 3912 } else {
3913 emit organizerEventsSelected(false); 3913 emit organizerEventsSelected(false);
3914 } 3914 }
3915 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 3915 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
3916 KOPrefs::instance()->email() ) ) { 3916 KOPrefs::instance()->email() ) ) {
3917 emit groupEventsSelected( true ); 3917 emit groupEventsSelected( true );
3918 } else { 3918 } else {
3919 emit groupEventsSelected(false); 3919 emit groupEventsSelected(false);
3920 } 3920 }
3921 return; 3921 return;
3922 } else { 3922 } else {
3923 if ( incidence && incidence->typeID() == todoID ) { 3923 if ( incidence && incidence->typeID() == todoID ) {
3924 emit todoSelected( true ); 3924 emit todoSelected( true );
3925 Todo *event = static_cast<Todo *>( incidence ); 3925 Todo *event = static_cast<Todo *>( incidence );
3926 if ( event->organizer() == KOPrefs::instance()->email() ) { 3926 if ( event->organizer() == KOPrefs::instance()->email() ) {
3927 emit organizerEventsSelected( true ); 3927 emit organizerEventsSelected( true );
3928 } else { 3928 } else {
3929 emit organizerEventsSelected(false); 3929 emit organizerEventsSelected(false);
3930 } 3930 }
3931 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 3931 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
3932 KOPrefs::instance()->email() ) ) { 3932 KOPrefs::instance()->email() ) ) {
3933 emit groupEventsSelected( true ); 3933 emit groupEventsSelected( true );
3934 } else { 3934 } else {
3935 emit groupEventsSelected(false); 3935 emit groupEventsSelected(false);
3936 } 3936 }
3937 return; 3937 return;
3938 } else { 3938 } else {
3939 emit todoSelected( false ); 3939 emit todoSelected( false );
3940 emit organizerEventsSelected(false); 3940 emit organizerEventsSelected(false);
3941 emit groupEventsSelected(false); 3941 emit groupEventsSelected(false);
3942 } 3942 }
3943 return; 3943 return;
3944 } 3944 }
3945 3945
3946 /* if ( incidence && incidence->typeID() == todoID ) { 3946 /* if ( incidence && incidence->typeID() == todoID ) {
3947 emit todoSelected( true ); 3947 emit todoSelected( true );
3948 } else { 3948 } else {
3949 emit todoSelected( false ); 3949 emit todoSelected( false );
3950 }*/ 3950 }*/
3951} 3951}
3952 3952
3953 3953
3954void CalendarView::checkClipboard() 3954void CalendarView::checkClipboard()
3955{ 3955{
3956#ifndef KORG_NODND 3956#ifndef KORG_NODND
3957 if (ICalDrag::canDecode(QApplication::clipboard()->data())) { 3957 if (ICalDrag::canDecode(QApplication::clipboard()->data())) {
3958 emit pasteEnabled(true); 3958 emit pasteEnabled(true);
3959 } else { 3959 } else {
3960 emit pasteEnabled(false); 3960 emit pasteEnabled(false);
3961 } 3961 }
3962#endif 3962#endif
3963} 3963}
3964 3964
3965void CalendarView::showDates(const DateList &selectedDates) 3965void CalendarView::showDates(const DateList &selectedDates)
3966{ 3966{
3967 // kdDebug() << "CalendarView::selectDates()" << endl; 3967 // kdDebug() << "CalendarView::selectDates()" << endl;
3968 3968
3969 3969
3970 if ( !mBlockShowDates ) { 3970 if ( !mBlockShowDates ) {
3971 if ( mViewManager->currentView() ) { 3971 if ( mViewManager->currentView() ) {
3972 updateView( selectedDates.first(), selectedDates.last() ); 3972 updateView( selectedDates.first(), selectedDates.last() );
3973 } else { 3973 } else {
3974 mViewManager->showAgendaView(); 3974 mViewManager->showAgendaView();
3975 } 3975 }
3976 } 3976 }
3977 3977
3978 QDate date = selectedDates.first(); 3978 QDate date = selectedDates.first();
3979 if ( ! date.isValid() ) { 3979 if ( ! date.isValid() ) {
3980 topLevelWidget()->setCaption(""); 3980 topLevelWidget()->setCaption("");
3981 return; 3981 return;
3982 } 3982 }
3983 3983
3984 QString selDates; 3984 QString selDates;
3985 selDates = KGlobal::locale()->formatDate( date, true); 3985 selDates = KGlobal::locale()->formatDate( date, true);
3986 if (selectedDates.first() < selectedDates.last() ) 3986 if (selectedDates.first() < selectedDates.last() )
3987 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); 3987 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true);
3988 else { 3988 else {
3989 QString addString; 3989 QString addString;
3990 if ( date == QDateTime::currentDateTime().date() ) 3990 if ( date == QDateTime::currentDateTime().date() )
3991 addString = i18n("Today"); 3991 addString = i18n("Today");
3992 else if ( date == QDateTime::currentDateTime().date().addDays(1) ) 3992 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
3993 addString = i18n("Tomorrow"); 3993 addString = i18n("Tomorrow");
3994 else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) 3994 else if ( date == QDateTime::currentDateTime().date().addDays(-1) )
3995 addString = i18n("Yesterday"); 3995 addString = i18n("Yesterday");
3996 else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) 3996 else if ( date == QDateTime::currentDateTime().date().addDays(-2) )
3997 addString = i18n("Day before yesterday"); 3997 addString = i18n("Day before yesterday");
3998 else if ( date == QDateTime::currentDateTime().date().addDays(2) ) 3998 else if ( date == QDateTime::currentDateTime().date().addDays(2) )
3999 addString = i18n("Day after tomorrow"); 3999 addString = i18n("Day after tomorrow");
4000 if ( !addString.isEmpty() ) { 4000 if ( !addString.isEmpty() ) {
4001 topLevelWidget()->setCaption( addString+", " + selDates ); 4001 topLevelWidget()->setCaption( addString+", " + selDates );
4002 return; 4002 return;
4003 } 4003 }
4004 } 4004 }
4005 topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); 4005 topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
4006 4006
4007} 4007}
4008 4008
4009QPtrList<CalFilter> CalendarView::filters() 4009QPtrList<CalFilter> CalendarView::filters()
4010{ 4010{
4011 return mFilters; 4011 return mFilters;
4012 4012
4013} 4013}
4014void CalendarView::editFilters() 4014void CalendarView::editFilters()
4015{ 4015{
4016 // kdDebug() << "CalendarView::editFilters()" << endl; 4016 // kdDebug() << "CalendarView::editFilters()" << endl;
4017 4017
4018 CalFilter *filter = mFilters.first(); 4018 CalFilter *filter = mFilters.first();
4019 while(filter) { 4019 while(filter) {
4020 kdDebug() << " Filter: " << filter->name() << endl;
4021 filter = mFilters.next(); 4020 filter = mFilters.next();
4022 } 4021 }
4023 4022
4024 mDialogManager->showFilterEditDialog(&mFilters); 4023 mDialogManager->showFilterEditDialog(&mFilters);
4025 updateFilter(); 4024 updateFilter();
4026} 4025}
4027void CalendarView::toggleFilter() 4026void CalendarView::toggleFilter()
4028{ 4027{
4029 if ( mLeftFrame->isHidden() ) { 4028 if ( mLeftFrame->isHidden() ) {
4030 toggleExpand(); 4029 toggleExpand();
4031 showFilter( true ); 4030 showFilter( true );
4032 } else 4031 } else
4033 showFilter(! mCalEditView->isVisible()); 4032 showFilter(! mCalEditView->isVisible());
4034} 4033}
4035 4034
4036KOFilterView *CalendarView::filterView() 4035KOFilterView *CalendarView::filterView()
4037{ 4036{
4038 return mFilterView; 4037 return mFilterView;
4039} 4038}
4040void CalendarView::selectFilter( int fil ) 4039void CalendarView::selectFilter( int fil )
4041{ 4040{
4042 mFilterView->setSelectedFilter( fil ); 4041 mFilterView->setSelectedFilter( fil );
4042 updateUnmanagedViews();
4043} 4043}
4044void CalendarView::showFilter(bool visible) 4044void CalendarView::showFilter(bool visible)
4045{ 4045{
4046#if 1 4046#if 1
4047 if (visible) { 4047 if (visible) {
4048 mCalEditView->readConfig(); 4048 mCalEditView->readConfig();
4049 mCalEditView->show(); 4049 mCalEditView->show();
4050 QValueList<int> sizes; 4050 QValueList<int> sizes;
4051 sizes = mLeftFrame->sizes(); 4051 sizes = mLeftFrame->sizes();
4052 if ( sizes.count() == 4 && sizes[3] < 20 ) { 4052 if ( sizes.count() == 4 && sizes[3] < 20 ) {
4053 sizes.clear(); 4053 sizes.clear();
4054 sizes << 100; 4054 sizes << 100;
4055 sizes << 0; 4055 sizes << 0;
4056 sizes << 0; 4056 sizes << 0;
4057 sizes << 100; 4057 sizes << 100;
4058 mLeftFrame->setSizes(sizes); 4058 mLeftFrame->setSizes(sizes);
4059 } 4059 }
4060#if 0 4060#if 0
4061 sizes = mLeftFrame->sizes(); 4061 sizes = mLeftFrame->sizes();
4062 int ccc = 0; 4062 int ccc = 0;
4063 while ( ccc < sizes.count()) { 4063 while ( ccc < sizes.count()) {
4064 qDebug("size %d %d ", ccc, sizes[ccc]); 4064 qDebug("size %d %d ", ccc, sizes[ccc]);
4065 ++ccc; 4065 ++ccc;
4066 } 4066 }
4067#endif 4067#endif
4068 4068
4069 } 4069 }
4070 else { 4070 else {
4071 mCalEditView->hide(); 4071 mCalEditView->hide();
4072 } 4072 }
4073#else 4073#else
4074 if (visible) mFilterView->show(); 4074 if (visible) mFilterView->show();
4075 else mFilterView->hide(); 4075 else mFilterView->hide();
4076#endif 4076#endif
4077} 4077}
4078void CalendarView::toggleFilerEnabled( ) 4078void CalendarView::toggleFilerEnabled( )
4079{ 4079{
4080 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); 4080 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() );
4081 if ( !mFilterView->filtersEnabled() ) 4081 if ( !mFilterView->filtersEnabled() )
4082 topLevelWidget()->setCaption( i18n("Filter disabled ") ); 4082 topLevelWidget()->setCaption( i18n("Filter disabled ") );
4083 updateUnmanagedViews();
4083 4084
4084} 4085}
4085void CalendarView::updateFilter() 4086void CalendarView::updateFilter()
4086{ 4087{
4087 CalFilter *filter = mFilterView->selectedFilter(); 4088 CalFilter *filter = mFilterView->selectedFilter();
4088 if (filter) { 4089 if (filter) {
4089 QString mess; 4090 QString mess;
4090 if (mFilterView->filtersEnabled()) { 4091 if (mFilterView->filtersEnabled()) {
4091 mess = i18n("Filter selected: ")+filter->name(); 4092 mess = i18n("Filter selected: ")+filter->name();
4092 filter->setEnabled(true); 4093 filter->setEnabled(true);
4093 } 4094 }
4094 else filter->setEnabled(false); 4095 else filter->setEnabled(false);
4095 mCalendar->setFilter(filter); 4096 mCalendar->setFilter(filter);
4096 updateView(); 4097 updateView();
4097 if ( !mess.isEmpty() ) 4098 if ( !mess.isEmpty() )
4098 topLevelWidget()->setCaption( mess ); 4099 topLevelWidget()->setCaption( mess );
4099 4100
4100 } 4101 }
4101 emit filtersUpdated(); 4102 emit filtersUpdated();
4102} 4103}
4103 4104
4104void CalendarView::filterEdited() 4105void CalendarView::filterEdited()
4105{ 4106{
4106 mFilterView->updateFilters(); 4107 mFilterView->updateFilters();
4107 updateFilter(); 4108 updateFilter();
4108 writeSettings(); 4109 writeSettings();
4109} 4110}
4110 4111
4111 4112
4112void CalendarView::takeOverEvent() 4113void CalendarView::takeOverEvent()
4113{ 4114{
4114 Incidence *incidence = currentSelection(); 4115 Incidence *incidence = currentSelection();
4115 4116
4116 if (!incidence) return; 4117 if (!incidence) return;
4117 4118
4118 incidence->setOrganizer(KOPrefs::instance()->email()); 4119 incidence->setOrganizer(KOPrefs::instance()->email());
4119 incidence->recreate(); 4120 incidence->recreate();
4120 incidence->setReadOnly(false); 4121 incidence->setReadOnly(false);
4121 4122
4122 updateView(); 4123 updateView();
4123} 4124}
4124 4125
4125void CalendarView::takeOverCalendar() 4126void CalendarView::takeOverCalendar()
4126{ 4127{
4127 // TODO: Create Calendar::allIncidences() function and use it here 4128 // TODO: Create Calendar::allIncidences() function and use it here
4128 4129
4129 clearAllViews(); 4130 clearAllViews();
4130 QPtrList<Event> events = mCalendar->events(); 4131 QPtrList<Event> events = mCalendar->events();
4131 for(uint i=0; i<events.count(); ++i) { 4132 for(uint i=0; i<events.count(); ++i) {
4132 events.at(i)->setOrganizer(KOPrefs::instance()->email()); 4133 events.at(i)->setOrganizer(KOPrefs::instance()->email());
4133 events.at(i)->recreate(); 4134 events.at(i)->recreate();
4134 events.at(i)->setReadOnly(false); 4135 events.at(i)->setReadOnly(false);
4135 } 4136 }
4136 4137
4137 QPtrList<Todo> todos = mCalendar->todos(); 4138 QPtrList<Todo> todos = mCalendar->todos();
4138 for(uint i=0; i<todos.count(); ++i) { 4139 for(uint i=0; i<todos.count(); ++i) {
4139 todos.at(i)->setOrganizer(KOPrefs::instance()->email()); 4140 todos.at(i)->setOrganizer(KOPrefs::instance()->email());
4140 todos.at(i)->recreate(); 4141 todos.at(i)->recreate();
4141 todos.at(i)->setReadOnly(false); 4142 todos.at(i)->setReadOnly(false);
4142 } 4143 }
4143 4144
4144 QPtrList<Journal> journals = mCalendar->journals(); 4145 QPtrList<Journal> journals = mCalendar->journals();
4145 for(uint i=0; i<journals.count(); ++i) { 4146 for(uint i=0; i<journals.count(); ++i) {
4146 journals.at(i)->setOrganizer(KOPrefs::instance()->email()); 4147 journals.at(i)->setOrganizer(KOPrefs::instance()->email());
4147 journals.at(i)->recreate(); 4148 journals.at(i)->recreate();
4148 journals.at(i)->setReadOnly(false); 4149 journals.at(i)->setReadOnly(false);
4149 } 4150 }
4150 4151
4151 updateView(); 4152 updateView();
4152} 4153}
4153 4154
4154void CalendarView::showIntro() 4155void CalendarView::showIntro()
4155{ 4156{
4156 kdDebug() << "To be implemented." << endl; 4157 kdDebug() << "To be implemented." << endl;
4157} 4158}
4158 4159
4159QWidgetStack *CalendarView::viewStack() 4160QWidgetStack *CalendarView::viewStack()
4160{ 4161{
4161 return mRightFrame; 4162 return mRightFrame;
4162} 4163}
4163 4164
4164QWidget *CalendarView::leftFrame() 4165QWidget *CalendarView::leftFrame()
4165{ 4166{
4166 return ( QWidget *)mLeftFrame; 4167 return ( QWidget *)mLeftFrame;
4167} 4168}
4168 4169
4169DateNavigator *CalendarView::dateNavigator() 4170DateNavigator *CalendarView::dateNavigator()
4170{ 4171{
4171 return mNavigator; 4172 return mNavigator;
4172} 4173}
4173 4174
4174KDateNavigator* CalendarView::dateNavigatorWidget() 4175KDateNavigator* CalendarView::dateNavigatorWidget()
4175{ 4176{
4176 return mDateNavigator->navigatorView(); 4177 return mDateNavigator->navigatorView();
4177} 4178}
4178void CalendarView::toggleDateNavigatorWidget() 4179void CalendarView::toggleDateNavigatorWidget()
4179{ 4180{
4180 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; 4181 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ;
4181 4182
4182 if (!KOPrefs::instance()->mShowDateNavigator ) 4183 if (!KOPrefs::instance()->mShowDateNavigator )
4183 mDateNavigator->hide(); 4184 mDateNavigator->hide();
4184 else 4185 else
4185 mDateNavigator->show(); 4186 mDateNavigator->show();
4186} 4187}
4187void CalendarView::addView(KOrg::BaseView *view) 4188void CalendarView::addView(KOrg::BaseView *view)
4188{ 4189{
4189 mViewManager->addView(view); 4190 mViewManager->addView(view);
4190} 4191}
4191 4192
4192void CalendarView::showView(KOrg::BaseView *view) 4193void CalendarView::showView(KOrg::BaseView *view)
4193{ 4194{
4194 mViewManager->showView(view, mLeftFrame->isVisible()); 4195 mViewManager->showView(view, mLeftFrame->isVisible());
4195} 4196}
4196 4197
4197Incidence *CalendarView::currentSelection() 4198Incidence *CalendarView::currentSelection()
4198{ 4199{
4199 return mViewManager->currentSelection(); 4200 return mViewManager->currentSelection();
4200} 4201}
4201void CalendarView::toggleAllDaySize() 4202void CalendarView::toggleAllDaySize()
4202{ 4203{
4203 /* 4204 /*
4204 if ( KOPrefs::instance()->mAllDaySize > 47 ) 4205 if ( KOPrefs::instance()->mAllDaySize > 47 )
4205 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; 4206 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2;
4206 else 4207 else
4207 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; 4208 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2;
4208 */ 4209 */
4209 viewManager()->agendaView()->toggleAllDay(); 4210 viewManager()->agendaView()->toggleAllDay();
4210} 4211}
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 0367bea..48320a5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1960,257 +1960,257 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
1960 mView->deleteIncidence(); 1960 mView->deleteIncidence();
1961 break; 1961 break;
1962 case Qt::Key_D: 1962 case Qt::Key_D:
1963 mView->viewManager()->showDayView(); 1963 mView->viewManager()->showDayView();
1964 showSelectedDates = true; 1964 showSelectedDates = true;
1965 break; 1965 break;
1966 case Qt::Key_O: 1966 case Qt::Key_O:
1967 mView->toggleFilerEnabled( ); 1967 mView->toggleFilerEnabled( );
1968 break; 1968 break;
1969 case Qt::Key_0: 1969 case Qt::Key_0:
1970 case Qt::Key_1: 1970 case Qt::Key_1:
1971 case Qt::Key_2: 1971 case Qt::Key_2:
1972 case Qt::Key_3: 1972 case Qt::Key_3:
1973 case Qt::Key_4: 1973 case Qt::Key_4:
1974 case Qt::Key_5: 1974 case Qt::Key_5:
1975 case Qt::Key_6: 1975 case Qt::Key_6:
1976 case Qt::Key_7: 1976 case Qt::Key_7:
1977 case Qt::Key_8: 1977 case Qt::Key_8:
1978 case Qt::Key_9: 1978 case Qt::Key_9:
1979 pro = e->key()-48; 1979 pro = e->key()-48;
1980 if ( pro == 0 ) 1980 if ( pro == 0 )
1981 pro = 10; 1981 pro = 10;
1982 if ( e->state() == Qt::ControlButton) 1982 if ( e->state() == Qt::ControlButton)
1983 pro += 10; 1983 pro += 10;
1984 break; 1984 break;
1985 case Qt::Key_M: 1985 case Qt::Key_M:
1986 mView->viewManager()->showMonthView(); 1986 mView->viewManager()->showMonthView();
1987 showSelectedDates = true; 1987 showSelectedDates = true;
1988 break; 1988 break;
1989 case Qt::Key_Insert: 1989 case Qt::Key_Insert:
1990 mView->newEvent(); 1990 mView->newEvent();
1991 break; 1991 break;
1992 case Qt::Key_S : 1992 case Qt::Key_S :
1993 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 1993 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
1994 mView->newSubTodo(); 1994 mView->newSubTodo();
1995 else 1995 else
1996 mView->dialogManager()->showSearchDialog(); 1996 mView->dialogManager()->showSearchDialog();
1997 break; 1997 break;
1998 case Qt::Key_Y : 1998 case Qt::Key_Y :
1999 case Qt::Key_Z : 1999 case Qt::Key_Z :
2000 mView->viewManager()->showWorkWeekView(); 2000 mView->viewManager()->showWorkWeekView();
2001 showSelectedDates = true; 2001 showSelectedDates = true;
2002 break; 2002 break;
2003 case Qt::Key_U : 2003 case Qt::Key_U :
2004 mView->viewManager()->showWeekView(); 2004 mView->viewManager()->showWeekView();
2005 showSelectedDates = true; 2005 showSelectedDates = true;
2006 break; 2006 break;
2007 case Qt::Key_H : 2007 case Qt::Key_H :
2008 keyBindings(); 2008 keyBindings();
2009 break; 2009 break;
2010 case Qt::Key_W: 2010 case Qt::Key_W:
2011 mView->viewManager()->showWhatsNextView(); 2011 mView->viewManager()->showWhatsNextView();
2012 break; 2012 break;
2013 case Qt::Key_L: 2013 case Qt::Key_L:
2014 mView->viewManager()->showListView(); 2014 mView->viewManager()->showListView();
2015 break; 2015 break;
2016 case Qt::Key_N: 2016 case Qt::Key_N:
2017 mView->viewManager()->showNextView(); 2017 mView->viewManager()->showNextView();
2018 break; 2018 break;
2019 case Qt::Key_V: 2019 case Qt::Key_V:
2020 mView->viewManager()->showTodoView(); 2020 mView->viewManager()->showTodoView();
2021 break; 2021 break;
2022 case Qt::Key_C: 2022 case Qt::Key_C:
2023 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); 2023 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
2024 break; 2024 break;
2025 case Qt::Key_P: 2025 case Qt::Key_P:
2026 mView->showDatePicker( ); 2026 mView->showDatePicker( );
2027 break; 2027 break;
2028 case Qt::Key_F: 2028 case Qt::Key_F:
2029 mView->editFilters(); 2029 mView->editFilters();
2030 break; 2030 break;
2031 case Qt::Key_R: 2031 case Qt::Key_R:
2032 mView->toggleFilter(); 2032 mView->toggleFilter();
2033 break; 2033 break;
2034 case Qt::Key_X: 2034 case Qt::Key_X:
2035 if ( e->state() == Qt::ControlButton ) 2035 if ( e->state() == Qt::ControlButton )
2036 mView->toggleDateNavigatorWidget(); 2036 mView->toggleDateNavigatorWidget();
2037 else { 2037 else {
2038 mView->viewManager()->showNextXView(); 2038 mView->viewManager()->showNextXView();
2039 showSelectedDates = true; 2039 showSelectedDates = true;
2040 } 2040 }
2041 break; 2041 break;
2042 case Qt::Key_Space: 2042 case Qt::Key_Space:
2043 mView->toggleExpand(); 2043 mView->toggleExpand();
2044 break; 2044 break;
2045 case Qt::Key_A: 2045 case Qt::Key_A:
2046 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) 2046 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
2047 mView->showNextAlarms(); 2047 mView->showNextAlarms();
2048 else 2048 else
2049 mView->toggleAllDaySize(); 2049 mView->toggleAllDaySize();
2050 break; 2050 break;
2051 case Qt::Key_T: 2051 case Qt::Key_T:
2052 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2052 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2053 mView->newTodo(); 2053 mView->newTodo();
2054 else { 2054 else {
2055 mView->goToday(); 2055 mView->goToday();
2056 showSelectedDates = true; 2056 showSelectedDates = true;
2057 } 2057 }
2058 break; 2058 break;
2059 case Qt::Key_J: 2059 case Qt::Key_J:
2060 mView->viewManager()->showJournalView(); 2060 mView->viewManager()->showJournalView();
2061 break; 2061 break;
2062 case Qt::Key_B: 2062 case Qt::Key_B:
2063 mView->editIncidenceDescription();; 2063 mView->editIncidenceDescription();;
2064 break; 2064 break;
2065 // case Qt::Key_Return: 2065 // case Qt::Key_Return:
2066 case Qt::Key_E: 2066 case Qt::Key_E:
2067 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2067 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2068 mView->newEvent(); 2068 mView->newEvent();
2069 else 2069 else
2070 mView->editIncidence(); 2070 mView->editIncidence();
2071 break; 2071 break;
2072 case Qt::Key_Plus: 2072 case Qt::Key_Plus:
2073 size = p->mHourSize +2; 2073 size = p->mHourSize +2;
2074 if ( size <= 22 ) 2074 if ( size <= 22 )
2075 configureAgenda( size ); 2075 configureAgenda( size );
2076 break; 2076 break;
2077 case Qt::Key_Minus: 2077 case Qt::Key_Minus:
2078 size = p->mHourSize - 2; 2078 size = p->mHourSize - 2;
2079 if ( size >= 4 ) 2079 if ( size >= 4 )
2080 configureAgenda( size ); 2080 configureAgenda( size );
2081 break; 2081 break;
2082 2082
2083 2083
2084 default: 2084 default:
2085 e->ignore(); 2085 e->ignore();
2086 } 2086 }
2087 if ( pro > 0 ) { 2087 if ( pro > 0 ) {
2088 mView->selectFilter( pro-1 ); 2088 selectFilter( pro+1 );
2089 } 2089 }
2090 if ( showSelectedDates ) { 2090 if ( showSelectedDates ) {
2091 ;// setCaptionToDates(); 2091 ;// setCaptionToDates();
2092 } 2092 }
2093 2093
2094} 2094}
2095void MainWindow::fillFilterMenuTB() 2095void MainWindow::fillFilterMenuTB()
2096{ 2096{
2097 selectFilterMenuTB->clear(); 2097 selectFilterMenuTB->clear();
2098 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); 2098 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 );
2099 selectFilterMenuTB->insertSeparator(); 2099 selectFilterMenuTB->insertSeparator();
2100 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); 2100 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
2101 2101
2102 selectFilterMenuTB->insertSeparator(); 2102 selectFilterMenuTB->insertSeparator();
2103 QPtrList<CalFilter> fili = mView->filters(); 2103 QPtrList<CalFilter> fili = mView->filters();
2104 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2104 CalFilter *curfilter = mView->filterView()->selectedFilter();
2105 CalFilter *filter = fili.first(); 2105 CalFilter *filter = fili.first();
2106 int iii = 2; 2106 int iii = 2;
2107 bool checkitem = mView->filterView()->filtersEnabled(); 2107 bool checkitem = mView->filterView()->filtersEnabled();
2108 while(filter) { 2108 while(filter) {
2109 selectFilterMenuTB->insertItem( filter->name(), iii ); 2109 selectFilterMenuTB->insertItem( filter->name(), iii );
2110 if ( filter == curfilter) 2110 if ( filter == curfilter)
2111 selectFilterMenuTB->setItemChecked( iii, checkitem ); 2111 selectFilterMenuTB->setItemChecked( iii, checkitem );
2112 filter = fili.next(); 2112 filter = fili.next();
2113 ++iii; 2113 ++iii;
2114 } 2114 }
2115 if ( !checkitem ) 2115 if ( !checkitem )
2116 selectFilterMenuTB->setItemChecked( 1, true ); 2116 selectFilterMenuTB->setItemChecked( 1, true );
2117 2117
2118 int x = 0; 2118 int x = 0;
2119 int y = iconToolBar->height(); 2119 int y = iconToolBar->height();
2120 int dX = 0; 2120 int dX = 0;
2121 int dY = 0; 2121 int dY = 0;
2122 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2122 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2123 if ( iconToolBar->y() > height()/2 ) { 2123 if ( iconToolBar->y() > height()/2 ) {
2124 dY = selectFilterMenuTB->sizeHint().height()+8; 2124 dY = selectFilterMenuTB->sizeHint().height()+8;
2125 y = 0; 2125 y = 0;
2126 } 2126 }
2127 } else { 2127 } else {
2128 if ( iconToolBar->x() > width()/2 ) { // right side 2128 if ( iconToolBar->x() > width()/2 ) { // right side
2129 x=0; 2129 x=0;
2130 dX= selectFilterMenuTB->sizeHint().width()+8; 2130 dX= selectFilterMenuTB->sizeHint().width()+8;
2131 y = 0; 2131 y = 0;
2132 } else { 2132 } else {
2133 x= iconToolBar->width(); 2133 x= iconToolBar->width();
2134 y = 0; 2134 y = 0;
2135 } 2135 }
2136 } 2136 }
2137 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2137 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2138 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); 2138 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)));
2139} 2139}
2140void MainWindow::fillFilterMenu() 2140void MainWindow::fillFilterMenu()
2141{ 2141{
2142 selectFilterMenu->clear(); 2142 selectFilterMenu->clear();
2143 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); 2143 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
2144 selectFilterMenu->insertSeparator(); 2144 selectFilterMenu->insertSeparator();
2145 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); 2145 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
2146 2146
2147 selectFilterMenu->insertSeparator(); 2147 selectFilterMenu->insertSeparator();
2148 QPtrList<CalFilter> fili = mView->filters(); 2148 QPtrList<CalFilter> fili = mView->filters();
2149 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2149 CalFilter *curfilter = mView->filterView()->selectedFilter();
2150 CalFilter *filter = fili.first(); 2150 CalFilter *filter = fili.first();
2151 int iii = 2; 2151 int iii = 2;
2152 bool checkitem = mView->filterView()->filtersEnabled(); 2152 bool checkitem = mView->filterView()->filtersEnabled();
2153 while(filter) { 2153 while(filter) {
2154 selectFilterMenu->insertItem( filter->name(), iii ); 2154 selectFilterMenu->insertItem( filter->name(), iii );
2155 if ( filter == curfilter) 2155 if ( filter == curfilter)
2156 selectFilterMenu->setItemChecked( iii, checkitem ); 2156 selectFilterMenu->setItemChecked( iii, checkitem );
2157 filter = fili.next(); 2157 filter = fili.next();
2158 ++iii; 2158 ++iii;
2159 } 2159 }
2160 if ( !checkitem ) 2160 if ( !checkitem )
2161 selectFilterMenu->setItemChecked( 1, true ); 2161 selectFilterMenu->setItemChecked( 1, true );
2162} 2162}
2163void MainWindow::fillFilterMenuPopup() 2163void MainWindow::fillFilterMenuPopup()
2164{ 2164{
2165 filterPopupMenu->clear(); 2165 filterPopupMenu->clear();
2166 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); 2166 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 );
2167 2167
2168 filterPopupMenu->insertSeparator(); 2168 filterPopupMenu->insertSeparator();
2169 QPtrList<CalFilter> fili = mView->filters(); 2169 QPtrList<CalFilter> fili = mView->filters();
2170 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2170 CalFilter *curfilter = mView->filterView()->selectedFilter();
2171 CalFilter *filter = fili.first(); 2171 CalFilter *filter = fili.first();
2172 int iii = 1; 2172 int iii = 1;
2173 bool checkitem = mView->filterView()->filtersEnabled(); 2173 bool checkitem = mView->filterView()->filtersEnabled();
2174 while(filter) { 2174 while(filter) {
2175 filterPopupMenu->insertItem( filter->name(), iii ); 2175 filterPopupMenu->insertItem( filter->name(), iii );
2176 if ( filter == curfilter) 2176 if ( filter == curfilter)
2177 filterPopupMenu->setItemChecked( iii, checkitem ); 2177 filterPopupMenu->setItemChecked( iii, checkitem );
2178 filter = fili.next(); 2178 filter = fili.next();
2179 ++iii; 2179 ++iii;
2180 } 2180 }
2181 if ( !checkitem ) 2181 if ( !checkitem )
2182 filterPopupMenu->setItemChecked( 0, true ); 2182 filterPopupMenu->setItemChecked( 0, true );
2183} 2183}
2184void MainWindow::selectFilter( int fil ) 2184void MainWindow::selectFilter( int fil )
2185{ 2185{
2186 2186
2187 if ( fil == 0 ) { 2187 if ( fil == 0 ) {
2188 mView->editFilters( ); 2188 mView->editFilters( );
2189 } else if ( fil == 1 ){ 2189 } else if ( fil == 1 ){
2190 if ( mView->filterView()->filtersEnabled() ) 2190 if ( mView->filterView()->filtersEnabled() )
2191 mView->toggleFilerEnabled( ); 2191 mView->toggleFilerEnabled( );
2192 } else { 2192 } else {
2193 if ( !mView->filterView()->filtersEnabled() ) { 2193 if ( !mView->filterView()->filtersEnabled() ) {
2194 mView->filterView()->blockSignals( true ); 2194 mView->filterView()->blockSignals( true );
2195 mView->toggleFilerEnabled( ); 2195 mView->toggleFilerEnabled( );
2196 mView->filterView()->blockSignals( false ); 2196 mView->filterView()->blockSignals( false );
2197 } 2197 }
2198 mView->selectFilter( fil-2 ); 2198 mView->selectFilter( fil-2 );
2199 } 2199 }
2200} 2200}
2201void MainWindow::updateFilterToolbar() 2201void MainWindow::updateFilterToolbar()
2202{ 2202{
2203 if ( filterMenubar ) { 2203 if ( filterMenubar ) {
2204 if ( !mView->filterView()->filtersEnabled() ) { 2204 if ( !mView->filterView()->filtersEnabled() ) {
2205 filterMenubar->changeItem( 0, i18n("No Filter") ); 2205 filterMenubar->changeItem( 0, i18n("No Filter") );
2206 } else { 2206 } else {
2207 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2207 CalFilter *curfilter = mView->filterView()->selectedFilter();
2208 if ( curfilter ) { 2208 if ( curfilter ) {
2209 filterMenubar->changeItem( 0, curfilter->name() ); 2209 filterMenubar->changeItem( 0, curfilter->name() );
2210 } 2210 }
2211 } 2211 }
2212 } 2212 }
2213} 2213}
2214void MainWindow::selectFilterPopup( int fil ) 2214void MainWindow::selectFilterPopup( int fil )
2215{ 2215{
2216 selectFilter( fil + 1 ); 2216 selectFilter( fil + 1 );