summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-29 10:41:27 (UTC)
committer zautrix <zautrix>2005-03-29 10:41:27 (UTC)
commit4af444fb7071d37c966f002f4971d209971679c9 (patch) (unidiff)
treef451274ed211bc85503a83acecd377368734c828
parenta5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46 (diff)
downloadkdepimpi-4af444fb7071d37c966f002f4971d209971679c9.zip
kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.gz
kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.bz2
toolbar setup options added
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/allday.pngbin279 -> 657 bytes
-rw-r--r--bin/kdepim/korganizer/navi.pngbin518 -> 667 bytes
-rw-r--r--korganizer/koprefs.cpp10
-rw-r--r--korganizer/koprefs.h4
-rw-r--r--korganizer/mainwindow.cpp30
5 files changed, 44 insertions, 0 deletions
diff --git a/bin/kdepim/korganizer/allday.png b/bin/kdepim/korganizer/allday.png
index 735eae2..41cefd5 100644
--- a/bin/kdepim/korganizer/allday.png
+++ b/bin/kdepim/korganizer/allday.png
Binary files differ
diff --git a/bin/kdepim/korganizer/navi.png b/bin/kdepim/korganizer/navi.png
index 9cb0fab..93c6aaa 100644
--- a/bin/kdepim/korganizer/navi.png
+++ b/bin/kdepim/korganizer/navi.png
Binary files differ
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 1e68a44..97ab4e8 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -1,190 +1,200 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 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 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <time.h> 24#include <time.h>
25#ifndef _WIN32_ 25#ifndef _WIN32_
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <qtextstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kglobalsettings.h> 39#include <kglobalsettings.h>
40#include <kconfig.h> 40#include <kconfig.h>
41#include <klocale.h> 41#include <klocale.h>
42#include <kdebug.h> 42#include <kdebug.h>
43#include <kemailsettings.h> 43#include <kemailsettings.h>
44#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
45#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
46 46
47#include "koprefs.h" 47#include "koprefs.h"
48#include "mainwindow.h" 48#include "mainwindow.h"
49 49
50KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
51static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
52 52
53KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
54 KPimPrefs("korganizerrc") 54 KPimPrefs("korganizerrc")
55{ 55{
56 mCategoryColors.setAutoDelete(true); 56 mCategoryColors.setAutoDelete(true);
57 fillMailDefaults(); 57 fillMailDefaults();
58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
59 QColor defaultHolidayColor = QColor(255,0,0); 59 QColor defaultHolidayColor = QColor(255,0,0);
60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
63 QColor defaultTodoDueTodayColor = QColor(255,220,100); 63 QColor defaultTodoDueTodayColor = QColor(255,220,100);
64 QColor defaultTodoOverdueColor = QColor(255,153,125); 64 QColor defaultTodoOverdueColor = QColor(255,153,125);
65 65
66 66
67 KPrefs::setCurrentGroup("General"); 67 KPrefs::setCurrentGroup("General");
68 68
69 69
70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
71 71
72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
74 addItemBool("ShowIconSearch",&mShowIconSearch,true); 74 addItemBool("ShowIconSearch",&mShowIconSearch,true);
75 addItemBool("ShowIconList",&mShowIconList,true); 75 addItemBool("ShowIconList",&mShowIconList,true);
76 addItemBool("ShowIconDay1",&mShowIconDay1,true); 76 addItemBool("ShowIconDay1",&mShowIconDay1,true);
77 addItemBool("ShowIconDay5",&mShowIconDay5,true); 77 addItemBool("ShowIconDay5",&mShowIconDay5,true);
78 addItemBool("ShowIconDay6",&mShowIconDay6,true); 78 addItemBool("ShowIconDay6",&mShowIconDay6,true);
79 addItemBool("ShowIconDay7",&mShowIconDay7,true); 79 addItemBool("ShowIconDay7",&mShowIconDay7,true);
80 addItemBool("ShowIconMonth",&mShowIconMonth,true); 80 addItemBool("ShowIconMonth",&mShowIconMonth,true);
81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
83 addItemBool("ShowIconBack",&mShowIconBack,true); 83 addItemBool("ShowIconBack",&mShowIconBack,true);
84 addItemBool("ShowIconToday",&mShowIconToday,true); 84 addItemBool("ShowIconToday",&mShowIconToday,true);
85 addItemBool("ShowIconForward",&mShowIconForward,true); 85 addItemBool("ShowIconForward",&mShowIconForward,true);
86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
88 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); 88 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true);
89 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 89 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
90 addItemBool("ShowIconNext",&mShowIconNext,true); 90 addItemBool("ShowIconNext",&mShowIconNext,true);
91 addItemBool("ShowIconJournal",&mShowIconJournal,true); 91 addItemBool("ShowIconJournal",&mShowIconJournal,true);
92 addItemBool("ShowIconStretch",&mShowIconStretch,true); 92 addItemBool("ShowIconStretch",&mShowIconStretch,true);
93 addItemBool("ShowIconFilter",&mShowIconFilter,false); 93 addItemBool("ShowIconFilter",&mShowIconFilter,false);
94 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); 94 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true);
95
96 bool addIcons = false;
97#ifdef DESKTOP_VERSION
98 addIcons = true;
99#endif
100 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons);
101 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons);
102 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons);
103 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons);
104
95 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 105 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
96 106
97 addItemBool("AskForQuit",&mAskForQuit,false); 107 addItemBool("AskForQuit",&mAskForQuit,false);
98 108
99#ifndef DESKTOP_VERSION 109#ifndef DESKTOP_VERSION
100 addItemBool("ShowFullMenu",&mShowFullMenu,false); 110 addItemBool("ShowFullMenu",&mShowFullMenu,false);
101#else 111#else
102 addItemBool("ShowFullMenu",&mShowFullMenu,true); 112 addItemBool("ShowFullMenu",&mShowFullMenu,true);
103#endif 113#endif
104 addItemBool("ToolBarHor",&mToolBarHor, true ); 114 addItemBool("ToolBarHor",&mToolBarHor, true );
105 addItemBool("ToolBarUp",&mToolBarUp, false ); 115 addItemBool("ToolBarUp",&mToolBarUp, false );
106 addItemBool("ToolBarHorV",&mToolBarHorV, true ); 116 addItemBool("ToolBarHorV",&mToolBarHorV, true );
107 addItemBool("ToolBarUpV",&mToolBarUpV, false ); 117 addItemBool("ToolBarUpV",&mToolBarUpV, false );
108 addItemBool("ToolBarHorN",&mToolBarHorN, true ); 118 addItemBool("ToolBarHorN",&mToolBarHorN, true );
109 addItemBool("ToolBarUpN",&mToolBarUpN, false ); 119 addItemBool("ToolBarUpN",&mToolBarUpN, false );
110 addItemBool("ToolBarHorF",&mToolBarHorF, true ); 120 addItemBool("ToolBarHorF",&mToolBarHorF, true );
111 addItemBool("ToolBarUpF",&mToolBarUpF, false ); 121 addItemBool("ToolBarUpF",&mToolBarUpF, false );
112 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 122 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
113 addItemInt("Whats Next Days",&mWhatsNextDays,3); 123 addItemInt("Whats Next Days",&mWhatsNextDays,3);
114 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 124 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
115 125
116 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 126 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
117 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); 127 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true);
118 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); 128 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false);
119 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 129 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
120 addItemInt("AllDay Size",&mAllDaySize,28); 130 addItemInt("AllDay Size",&mAllDaySize,28);
121 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 131 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
122 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 132 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
123 133
124 addItemStringList("LocationDefaults",&mLocationDefaults ); 134 addItemStringList("LocationDefaults",&mLocationDefaults );
125 addItemStringList("EventSummary User",&mEventSummaryUser); 135 addItemStringList("EventSummary User",&mEventSummaryUser);
126 addItemStringList("TodoSummary User",&mTodoSummaryUser); 136 addItemStringList("TodoSummary User",&mTodoSummaryUser);
127 137
128 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 138 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
129 addItemBool("Enable Project View",&mEnableProjectView,false); 139 addItemBool("Enable Project View",&mEnableProjectView,false);
130 addItemBool("Auto Save",&mAutoSave,false); 140 addItemBool("Auto Save",&mAutoSave,false);
131 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 141 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
132 addItemBool("Confirm Deletes",&mConfirm,true); 142 addItemBool("Confirm Deletes",&mConfirm,true);
133 addItemString("Archive File",&mArchiveFile); 143 addItemString("Archive File",&mArchiveFile);
134 addItemString("Html Export File",&mHtmlExportFile, 144 addItemString("Html Export File",&mHtmlExportFile,
135 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 145 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
136 addItemBool("Html With Save",&mHtmlWithSave,false); 146 addItemBool("Html With Save",&mHtmlWithSave,false);
137 147
138 KPrefs::setCurrentGroup("Personal Settings"); 148 KPrefs::setCurrentGroup("Personal Settings");
139 149
140 addItemInt("Mail Client",&mMailClient,MailClientKMail); 150 addItemInt("Mail Client",&mMailClient,MailClientKMail);
141 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 151 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
142 addItemBool("Bcc",&mBcc,false); 152 addItemBool("Bcc",&mBcc,false);
143 153
144 KPrefs::setCurrentGroup("Time & Date"); 154 KPrefs::setCurrentGroup("Time & Date");
145 155
146 156
147 addItemInt("Default Start Time",&mStartTime,10); 157 addItemInt("Default Start Time",&mStartTime,10);
148 addItemInt("Default Duration",&mDefaultDuration,2); 158 addItemInt("Default Duration",&mDefaultDuration,2);
149 addItemInt("Default Alarm Time",&mAlarmTime,3); 159 addItemInt("Default Alarm Time",&mAlarmTime,3);
150 KPrefs::setCurrentGroup("AlarmSettings"); 160 KPrefs::setCurrentGroup("AlarmSettings");
151 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 161 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
152 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 162 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
153 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 163 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
154 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 164 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
155 165
156 166
157 KPrefs::setCurrentGroup("Calendar"); 167 KPrefs::setCurrentGroup("Calendar");
158 168
159 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 169 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
160 170
161 KPrefs::setCurrentGroup("Fonts"); 171 KPrefs::setCurrentGroup("Fonts");
162 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 172 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
163 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() ); 173 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() );
164 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont()); 174 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont());
165 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont()); 175 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont());
166 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont()); 176 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont());
167 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont()); 177 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont());
168 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont()); 178 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont());
169 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont()); 179 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont());
170 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont()); 180 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont());
171 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont()); 181 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont());
172 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont()); 182 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont());
173 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont()); 183 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont());
174 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont()); 184 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont());
175 185
176 KPrefs::setCurrentGroup("RemoteSyncing"); 186 KPrefs::setCurrentGroup("RemoteSyncing");
177 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 187 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
178 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 188 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
179 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 189 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
180 addItemInt("LastSyncTime",&mLastSyncTime,0); 190 addItemInt("LastSyncTime",&mLastSyncTime,0);
181 191
182#ifdef _WIN32_ 192#ifdef _WIN32_
183 QString hdp= locateLocal("data","korganizer")+"\\\\"; 193 QString hdp= locateLocal("data","korganizer")+"\\\\";
184#else 194#else
185 QString hdp= locateLocal("data","korganizer")+"/"; 195 QString hdp= locateLocal("data","korganizer")+"/";
186#endif 196#endif
187 197
188 KPrefs::setCurrentGroup("LoadSaveFileNames"); 198 KPrefs::setCurrentGroup("LoadSaveFileNames");
189 199
190 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 200 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index fbce6ea..3a07348 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -94,192 +94,196 @@ class KOPrefs : public KPimPrefs
94 bool mEnableProjectView; 94 bool mEnableProjectView;
95 95
96 int mDefaultFormat; 96 int mDefaultFormat;
97 int mMailClient; 97 int mMailClient;
98 98
99 int mStartTime; 99 int mStartTime;
100 int mDefaultDuration; 100 int mDefaultDuration;
101 int mAlarmTime; 101 int mAlarmTime;
102 102
103 int mWorkingHoursStart; 103 int mWorkingHoursStart;
104 int mWorkingHoursEnd; 104 int mWorkingHoursEnd;
105 bool mExcludeHolidays; 105 bool mExcludeHolidays;
106 bool mExcludeSaturdays; 106 bool mExcludeSaturdays;
107 bool mMarcusBainsShowSeconds; 107 bool mMarcusBainsShowSeconds;
108 108
109 QFont mTimeBarFont; 109 QFont mTimeBarFont;
110 QFont mMonthViewFont; 110 QFont mMonthViewFont;
111 QFont mAgendaViewFont; 111 QFont mAgendaViewFont;
112 QFont mMarcusBainsFont; 112 QFont mMarcusBainsFont;
113 QFont mTimeLabelsFont; 113 QFont mTimeLabelsFont;
114 QFont mTodoViewFont; 114 QFont mTodoViewFont;
115 QFont mListViewFont; 115 QFont mListViewFont;
116 QFont mDateNavigatorFont; 116 QFont mDateNavigatorFont;
117 QFont mEditBoxFont; 117 QFont mEditBoxFont;
118 QFont mJornalViewFont; 118 QFont mJornalViewFont;
119 QFont mWhatsNextFont; 119 QFont mWhatsNextFont;
120 QFont mEventViewFont; 120 QFont mEventViewFont;
121 121
122 122
123 123
124 124
125 QColor mHolidayColor; 125 QColor mHolidayColor;
126 QColor mHighlightColor; 126 QColor mHighlightColor;
127 QColor mEventColor; 127 QColor mEventColor;
128 QColor mTodoDoneColor; 128 QColor mTodoDoneColor;
129 QColor mAgendaBgColor; 129 QColor mAgendaBgColor;
130 QColor mWorkingHoursColor; 130 QColor mWorkingHoursColor;
131 QColor mTodoDueTodayColor; 131 QColor mTodoDueTodayColor;
132 QColor mTodoOverdueColor; 132 QColor mTodoOverdueColor;
133 QColor mMonthViewEvenColor; 133 QColor mMonthViewEvenColor;
134 QColor mMonthViewOddColor; 134 QColor mMonthViewOddColor;
135 QColor mMonthViewHolidayColor; 135 QColor mMonthViewHolidayColor;
136 bool mMonthViewUsesDayColors; 136 bool mMonthViewUsesDayColors;
137 bool mMonthViewSatSunTog; 137 bool mMonthViewSatSunTog;
138 bool mMonthViewWeek; 138 bool mMonthViewWeek;
139 QColor mAppColor1; 139 QColor mAppColor1;
140 QColor mAppColor2; 140 QColor mAppColor2;
141 bool mUseAppColors; 141 bool mUseAppColors;
142 142
143 int mDayBegins; 143 int mDayBegins;
144 int mHourSize; 144 int mHourSize;
145 int mAllDaySize; 145 int mAllDaySize;
146 bool mShowFullMenu; 146 bool mShowFullMenu;
147 bool mDailyRecur; 147 bool mDailyRecur;
148 bool mWeeklyRecur; 148 bool mWeeklyRecur;
149 bool mMonthDailyRecur; 149 bool mMonthDailyRecur;
150 bool mMonthWeeklyRecur; 150 bool mMonthWeeklyRecur;
151 bool mMonthShowIcons; 151 bool mMonthShowIcons;
152 bool mMonthShowShort; 152 bool mMonthShowShort;
153 bool mEnableToolTips; 153 bool mEnableToolTips;
154 bool mEnableMonthScroll; 154 bool mEnableMonthScroll;
155 bool mFullViewMonth; 155 bool mFullViewMonth;
156 bool mMonthViewUsesCategoryColor; 156 bool mMonthViewUsesCategoryColor;
157 bool mFullViewTodo; 157 bool mFullViewTodo;
158 bool mShowCompletedTodo; 158 bool mShowCompletedTodo;
159 bool mMarcusBainsEnabled; 159 bool mMarcusBainsEnabled;
160 int mNextXDays; 160 int mNextXDays;
161 int mWhatsNextDays; 161 int mWhatsNextDays;
162 int mWhatsNextPrios; 162 int mWhatsNextPrios;
163 bool mEnableQuickTodo; 163 bool mEnableQuickTodo;
164 164
165 bool mCompactDialogs; 165 bool mCompactDialogs;
166 bool mVerticalScreen; 166 bool mVerticalScreen;
167 167
168 bool mShowIconNewTodo; 168 bool mShowIconNewTodo;
169 bool mShowIconNewEvent; 169 bool mShowIconNewEvent;
170 bool mShowIconSearch; 170 bool mShowIconSearch;
171 bool mShowIconList; 171 bool mShowIconList;
172 bool mShowIconDay1; 172 bool mShowIconDay1;
173 bool mShowIconDay5; 173 bool mShowIconDay5;
174 bool mShowIconDay6; 174 bool mShowIconDay6;
175 bool mShowIconDay7; 175 bool mShowIconDay7;
176 bool mShowIconMonth; 176 bool mShowIconMonth;
177 bool mShowIconTodoview; 177 bool mShowIconTodoview;
178 bool mShowIconBackFast; 178 bool mShowIconBackFast;
179 bool mShowIconBack; 179 bool mShowIconBack;
180 bool mShowIconToday; 180 bool mShowIconToday;
181 bool mShowIconForward; 181 bool mShowIconForward;
182 bool mShowIconForwardFast; 182 bool mShowIconForwardFast;
183 bool mShowIconWhatsThis; 183 bool mShowIconWhatsThis;
184 bool mShowIconWeekNum; 184 bool mShowIconWeekNum;
185 bool mShowIconNextDays; 185 bool mShowIconNextDays;
186 bool mShowIconNext; 186 bool mShowIconNext;
187 bool mShowIconJournal; 187 bool mShowIconJournal;
188 bool mShowIconFilter; 188 bool mShowIconFilter;
189 bool mShowIconOnetoolbar; 189 bool mShowIconOnetoolbar;
190 bool mShowIconNavigator;
191 bool mShowIconAllday;
192 bool mShowIconFilterview;
193 bool mShowIconToggleFull;
190 194
191 bool mShowIconStretch; 195 bool mShowIconStretch;
192 196
193 bool mToolBarHor; 197 bool mToolBarHor;
194 bool mToolBarUp; 198 bool mToolBarUp;
195 bool mToolBarHorV; 199 bool mToolBarHorV;
196 bool mToolBarUpV; 200 bool mToolBarUpV;
197 bool mToolBarHorN; 201 bool mToolBarHorN;
198 bool mToolBarUpN; 202 bool mToolBarUpN;
199 bool mToolBarHorF; 203 bool mToolBarHorF;
200 bool mToolBarUpF; 204 bool mToolBarUpF;
201 bool mToolBarMiniIcons; 205 bool mToolBarMiniIcons;
202 206
203 bool mAskForQuit; 207 bool mAskForQuit;
204 bool mUsePassWd; 208 bool mUsePassWd;
205 bool mShowSyncEvents; 209 bool mShowSyncEvents;
206 bool mShowTodoInAgenda; 210 bool mShowTodoInAgenda;
207 bool mShowTimeInAgenda; 211 bool mShowTimeInAgenda;
208 bool mHideNonStartedTodos; 212 bool mHideNonStartedTodos;
209 213
210 int mLastSyncTime; 214 int mLastSyncTime;
211 void setCategoryColor(QString cat,const QColor & color); 215 void setCategoryColor(QString cat,const QColor & color);
212 QColor *categoryColor(QString cat); 216 QColor *categoryColor(QString cat);
213 217
214 QString mArchiveFile; 218 QString mArchiveFile;
215 QString mHtmlExportFile; 219 QString mHtmlExportFile;
216 bool mHtmlWithSave; 220 bool mHtmlWithSave;
217 221
218 QStringList mSelectedPlugins; 222 QStringList mSelectedPlugins;
219 223
220 QString mLastImportFile; 224 QString mLastImportFile;
221 QString mLastVcalFile; 225 QString mLastVcalFile;
222 QString mLastSaveFile; 226 QString mLastSaveFile;
223 QString mLastLoadFile; 227 QString mLastLoadFile;
224 228
225 229
226 QString mDefaultAlarmFile; 230 QString mDefaultAlarmFile;
227 int mIMIPScheduler; 231 int mIMIPScheduler;
228 int mIMIPSend; 232 int mIMIPSend;
229 QStringList mAdditionalMails; 233 QStringList mAdditionalMails;
230 int mIMIPAutoRefresh; 234 int mIMIPAutoRefresh;
231 int mIMIPAutoInsertReply; 235 int mIMIPAutoInsertReply;
232 int mIMIPAutoInsertRequest; 236 int mIMIPAutoInsertRequest;
233 int mIMIPAutoFreeBusy; 237 int mIMIPAutoFreeBusy;
234 int mIMIPAutoFreeBusyReply; 238 int mIMIPAutoFreeBusyReply;
235 239
236 QStringList mTodoTemplates; 240 QStringList mTodoTemplates;
237 QStringList mEventTemplates; 241 QStringList mEventTemplates;
238 242
239 int mDestination; 243 int mDestination;
240 244
241 245
242 bool mEditOnDoubleClick; 246 bool mEditOnDoubleClick;
243 bool mViewChangeHoldFullscreen; 247 bool mViewChangeHoldFullscreen;
244 bool mViewChangeHoldNonFullscreen; 248 bool mViewChangeHoldNonFullscreen;
245 bool mCenterOnCurrentTime; 249 bool mCenterOnCurrentTime;
246 bool mSetTimeToDayStartAt; 250 bool mSetTimeToDayStartAt;
247 bool mHighlightCurrentDay; 251 bool mHighlightCurrentDay;
248 bool mUseHighlightLightColor; 252 bool mUseHighlightLightColor;
249 bool mListViewMonthTimespan; 253 bool mListViewMonthTimespan;
250 bool mWNViewShowsParents; 254 bool mWNViewShowsParents;
251 bool mWNViewShowsPast; 255 bool mWNViewShowsPast;
252 bool mWNViewShowLocation; 256 bool mWNViewShowLocation;
253 bool mTodoViewShowsPercentage; 257 bool mTodoViewShowsPercentage;
254 bool mTodoViewUsesCatColors; 258 bool mTodoViewUsesCatColors;
255 bool mMonthViewUsesBigFont; 259 bool mMonthViewUsesBigFont;
256 bool mTodoViewUsesSmallFont; 260 bool mTodoViewUsesSmallFont;
257 bool mTodoViewUsesForegroundColor; 261 bool mTodoViewUsesForegroundColor;
258 bool mMonthViewUsesForegroundColor; 262 bool mMonthViewUsesForegroundColor;
259 263
260 bool mHightlightDateTimeEdit; 264 bool mHightlightDateTimeEdit;
261 bool mShortDateInViewer; 265 bool mShortDateInViewer;
262 266
263 bool mShowDateNavigator; 267 bool mShowDateNavigator;
264 268
265 QStringList mLocationDefaults; 269 QStringList mLocationDefaults;
266 QStringList mEventSummaryUser; 270 QStringList mEventSummaryUser;
267 QStringList mTodoSummaryUser; 271 QStringList mTodoSummaryUser;
268 272
269 bool mUseInternalAlarmNotification; 273 bool mUseInternalAlarmNotification;
270 int mAlarmPlayBeeps; 274 int mAlarmPlayBeeps;
271 int mAlarmSuspendTime; 275 int mAlarmSuspendTime;
272 int mAlarmSuspendCount; 276 int mAlarmSuspendCount;
273 int mAlarmBeepInterval; 277 int mAlarmBeepInterval;
274 int mOldLanguage; 278 int mOldLanguage;
275 int mOldLoadedLanguage; 279 int mOldLoadedLanguage;
276 280
277 281
278 QString mActiveSyncPort; 282 QString mActiveSyncPort;
279 QString mActiveSyncIP; 283 QString mActiveSyncIP;
280 284
281 // settings for eventviewer 285 // settings for eventviewer
282 bool mEVshowDetails; 286 bool mEVshowDetails;
283 bool mEVshowCreated; 287 bool mEVshowCreated;
284 bool mEVshowChanged; 288 bool mEVshowChanged;
285 bool mWTshowDetails; 289 bool mWTshowDetails;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8e52968..8a4c7eb 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -632,228 +632,248 @@ void MainWindow::initActions()
632 menuBar1->insertItem( icon.pixmap(), menuBar); 632 menuBar1->insertItem( icon.pixmap(), menuBar);
633 //menuBar1->insertItem( i18n("ME"), menuBar); 633 //menuBar1->insertItem( i18n("ME"), menuBar);
634 menuBar->insertItem( i18n("File"), importMenu ); 634 menuBar->insertItem( i18n("File"), importMenu );
635 menuBar->insertItem( i18n("View"), viewMenu ); 635 menuBar->insertItem( i18n("View"), viewMenu );
636 menuBar->insertItem( i18n("Actions"), actionMenu ); 636 menuBar->insertItem( i18n("Actions"), actionMenu );
637 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 637 menuBar->insertItem( i18n("Synchronize"), syncMenu );
638 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 638 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
639 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 639 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
640 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 640 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
641 menuBar->insertItem( i18n("Help"), helpMenu ); 641 menuBar->insertItem( i18n("Help"), helpMenu );
642 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 642 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
643 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 643 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
644 } 644 }
645 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 645 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
646 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 646 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
647 mWeekBgColor = iconToolBar->backgroundColor(); 647 mWeekBgColor = iconToolBar->backgroundColor();
648 mWeekPixmap.resize( pixWid , pixHei ); 648 mWeekPixmap.resize( pixWid , pixHei );
649 mWeekPixmap.fill( mWeekBgColor ); 649 mWeekPixmap.fill( mWeekBgColor );
650 icon = mWeekPixmap; 650 icon = mWeekPixmap;
651 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 651 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
652 if ( p-> mShowIconWeekNum ) 652 if ( p-> mShowIconWeekNum )
653 mWeekAction->addTo( iconToolBar ); 653 mWeekAction->addTo( iconToolBar );
654 mWeekFont = font(); 654 mWeekFont = font();
655 655
656 int fontPoint = mWeekFont.pointSize(); 656 int fontPoint = mWeekFont.pointSize();
657 QFontMetrics f( mWeekFont ); 657 QFontMetrics f( mWeekFont );
658 int fontWid = f.width( "30" ); 658 int fontWid = f.width( "30" );
659 while ( fontWid > pixWid ) { 659 while ( fontWid > pixWid ) {
660 --fontPoint; 660 --fontPoint;
661 mWeekFont.setPointSize( fontPoint ); 661 mWeekFont.setPointSize( fontPoint );
662 QFontMetrics f( mWeekFont ); 662 QFontMetrics f( mWeekFont );
663 fontWid = f.width( "30" ); 663 fontWid = f.width( "30" );
664 //qDebug("dec-- "); 664 //qDebug("dec-- ");
665 } 665 }
666 666
667 connect( mWeekAction, SIGNAL( activated() ), 667 connect( mWeekAction, SIGNAL( activated() ),
668 this, SLOT( weekAction() ) ); 668 this, SLOT( weekAction() ) );
669 669
670 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 670 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
671 671
672 //#endif 672 //#endif
673 // ****************** 673 // ******************
674 QAction *action; 674 QAction *action;
675 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 675 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
676 configureToolBarMenu->setCheckable( true ); 676 configureToolBarMenu->setCheckable( true );
677 677
678 678
679 configureAgendaMenu->setCheckable( true ); 679 configureAgendaMenu->setCheckable( true );
680 int iii ; 680 int iii ;
681 for ( iii = 1;iii<= 10 ;++iii ){ 681 for ( iii = 1;iii<= 10 ;++iii ){
682 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 682 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
683 } 683 }
684 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 684 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
685 685
686 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 686 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
687 this, SLOT( showConfigureAgenda( ) ) ); 687 this, SLOT( showConfigureAgenda( ) ) );
688 688
689 icon = loadPixmap( pathString + "configure" ); 689 icon = loadPixmap( pathString + "configure" );
690 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); 690 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
691 action->addTo( actionMenu ); 691 action->addTo( actionMenu );
692 connect( action, SIGNAL( activated() ), 692 connect( action, SIGNAL( activated() ),
693 mView, SLOT( edit_options() ) ); 693 mView, SLOT( edit_options() ) );
694 actionMenu->insertSeparator(); 694 actionMenu->insertSeparator();
695 695
696 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 696 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
697 action->addTo( actionMenu ); 697 action->addTo( actionMenu );
698 connect( action, SIGNAL( activated() ), 698 connect( action, SIGNAL( activated() ),
699 mView, SLOT( undo_delete() ) ); 699 mView, SLOT( undo_delete() ) );
700 actionMenu->insertSeparator(); 700 actionMenu->insertSeparator();
701 701
702 icon = loadPixmap( pathString + "newevent" ); 702 icon = loadPixmap( pathString + "newevent" );
703 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 703 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
704 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 704 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
705 configureToolBarMenu->insertSeparator(); 705 configureToolBarMenu->insertSeparator();
706 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 706 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
707 configureToolBarMenu->insertSeparator(); 707 configureToolBarMenu->insertSeparator();
708 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 708 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
709 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 709 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
710 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 710 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
711 ne_action->addTo( actionMenu ); 711 ne_action->addTo( actionMenu );
712 connect( ne_action, SIGNAL( activated() ), 712 connect( ne_action, SIGNAL( activated() ),
713 mView, SLOT( newEvent() ) ); 713 mView, SLOT( newEvent() ) );
714 icon = loadPixmap( pathString + "newtodo" ); 714 icon = loadPixmap( pathString + "newtodo" );
715 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 715 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
716 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 716 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
717 nt_action->addTo( actionMenu ); 717 nt_action->addTo( actionMenu );
718 connect( nt_action, SIGNAL( activated() ), 718 connect( nt_action, SIGNAL( activated() ),
719 mView, SLOT( newTodo() ) ); 719 mView, SLOT( newTodo() ) );
720 720
721 icon = loadPixmap( pathString + "today" ); 721 icon = loadPixmap( pathString + "today" );
722 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 722 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
723 today_action->addTo( viewMenu ); 723 today_action->addTo( viewMenu );
724 connect( today_action, SIGNAL( activated() ), 724 connect( today_action, SIGNAL( activated() ),
725 mView, SLOT( goToday() ) ); 725 mView, SLOT( goToday() ) );
726 viewMenu->insertSeparator(); 726 viewMenu->insertSeparator();
727 727
728 // ***********************
729 if ( KOPrefs::instance()->mVerticalScreen ) {
730 icon = SmallIcon( "1updownarrow" );
731 } else {
732 icon = SmallIcon("1leftrightarrow" );
733 }
734 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
735 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
736 FSaction->addTo( viewMenu );
737 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
738
728 icon = loadPixmap( pathString + "navi" ); 739 icon = loadPixmap( pathString + "navi" );
740 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
729 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 741 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
730 action->addTo( viewMenu ); 742 action->addTo( viewMenu );
731 connect( action, SIGNAL( activated() ), 743 connect( action, SIGNAL( activated() ),
732 mView, SLOT( toggleDateNavigatorWidget() ) ); 744 mView, SLOT( toggleDateNavigatorWidget() ) );
733 mToggleNav = action ; 745 mToggleNav = action ;
734 icon = loadPixmap( pathString + "filter" ); 746 icon = loadPixmap( pathString + "filter" );
747 configureToolBarMenu->insertItem(icon, i18n("Toggle FilterView"), 26 );
735 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); 748 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
736 action->addTo( viewMenu ); 749 action->addTo( viewMenu );
737 connect( action, SIGNAL( activated() ), 750 connect( action, SIGNAL( activated() ),
738 mView, SLOT( toggleFilter() ) ); 751 mView, SLOT( toggleFilter() ) );
739 mToggleFilter = action; 752 mToggleFilter = action;
740 icon = loadPixmap( pathString + "allday" ); 753 icon = loadPixmap( pathString + "allday" );
754 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
741 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 755 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
742 action->addTo( viewMenu ); 756 action->addTo( viewMenu );
743 connect( action, SIGNAL( activated() ), 757 connect( action, SIGNAL( activated() ),
744 mView, SLOT( toggleAllDaySize() ) ); 758 mView, SLOT( toggleAllDaySize() ) );
745 mToggleAllday = action; 759 mToggleAllday = action;
746 760
747 761
748 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 762 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
749 mToggleNav, SLOT( setEnabled ( bool ) ) ); 763 mToggleNav, SLOT( setEnabled ( bool ) ) );
750 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 764 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
751 mToggleFilter, SLOT( setEnabled ( bool ) ) ); 765 mToggleFilter, SLOT( setEnabled ( bool ) ) );
752 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 766 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
753 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 767 mToggleAllday, SLOT( setEnabled ( bool ) ) );
754 768
755 viewMenu->insertSeparator(); 769 viewMenu->insertSeparator();
756 icon = loadPixmap( pathString + "picker" ); 770 icon = loadPixmap( pathString + "picker" );
757 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 771 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
758 action->addTo( viewMenu ); 772 action->addTo( viewMenu );
759 connect( action, SIGNAL( activated() ), 773 connect( action, SIGNAL( activated() ),
760 mView, SLOT( showDatePicker() ) ); 774 mView, SLOT( showDatePicker() ) );
761 action->addTo( iconToolBar ); 775 action->addTo( iconToolBar );
762 viewMenu->insertSeparator(); 776 viewMenu->insertSeparator();
763 777
778 if ( p-> mShowIconToggleFull )
779 FSaction->addTo( iconToolBar );
780 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
781 if ( p->mShowIconFilterview ) mToggleFilter->addTo( iconToolBar );
782 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
783
764 784
765 icon = loadPixmap( pathString + "whatsnext" ); 785 icon = loadPixmap( pathString + "whatsnext" );
766 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 786 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
767 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 787 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
768 whatsnext_action->addTo( viewMenu ); 788 whatsnext_action->addTo( viewMenu );
769 connect( whatsnext_action, SIGNAL( activated() ), 789 connect( whatsnext_action, SIGNAL( activated() ),
770 mView->viewManager(), SLOT( showWhatsNextView() ) ); 790 mView->viewManager(), SLOT( showWhatsNextView() ) );
771 791
772 icon = loadPixmap( pathString + "xdays" ); 792 icon = loadPixmap( pathString + "xdays" );
773 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 793 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
774 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 794 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
775 xdays_action->addTo( viewMenu ); 795 xdays_action->addTo( viewMenu );
776 connect( xdays_action, SIGNAL( activated() ), 796 connect( xdays_action, SIGNAL( activated() ),
777 mView->viewManager(), SLOT( showNextXView() ) ); 797 mView->viewManager(), SLOT( showNextXView() ) );
778 798
779 799
780 icon = loadPixmap( pathString + "journal" ); 800 icon = loadPixmap( pathString + "journal" );
781 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 801 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
782 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 802 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
783 viewjournal_action->addTo( viewMenu ); 803 viewjournal_action->addTo( viewMenu );
784 connect( viewjournal_action, SIGNAL( activated() ), 804 connect( viewjournal_action, SIGNAL( activated() ),
785 mView->viewManager(), SLOT( showJournalView() ) ); 805 mView->viewManager(), SLOT( showJournalView() ) );
786 806
787 807
788 icon = loadPixmap( pathString + "day" ); 808 icon = loadPixmap( pathString + "day" );
789 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 809 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
790 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 810 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
791 day1_action->addTo( viewMenu ); 811 day1_action->addTo( viewMenu );
792 // action->addTo( toolBar ); 812 // action->addTo( toolBar );
793 connect( day1_action, SIGNAL( activated() ), 813 connect( day1_action, SIGNAL( activated() ),
794 mView->viewManager(), SLOT( showDayView() ) ); 814 mView->viewManager(), SLOT( showDayView() ) );
795 815
796 icon = loadPixmap( pathString + "workweek" ); 816 icon = loadPixmap( pathString + "workweek" );
797 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 817 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
798 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 818 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
799 day5_action->addTo( viewMenu ); 819 day5_action->addTo( viewMenu );
800 connect( day5_action, SIGNAL( activated() ), 820 connect( day5_action, SIGNAL( activated() ),
801 mView->viewManager(), SLOT( showWorkWeekView() ) ); 821 mView->viewManager(), SLOT( showWorkWeekView() ) );
802 822
803 icon = loadPixmap( pathString + "week" ); 823 icon = loadPixmap( pathString + "week" );
804 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 824 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
805 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 825 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
806 day7_action->addTo( viewMenu ); 826 day7_action->addTo( viewMenu );
807 connect( day7_action, SIGNAL( activated() ), 827 connect( day7_action, SIGNAL( activated() ),
808 mView->viewManager(), SLOT( showWeekView() ) ); 828 mView->viewManager(), SLOT( showWeekView() ) );
809 829
810 icon = loadPixmap( pathString + "workweek2" ); 830 icon = loadPixmap( pathString + "workweek2" );
811 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 831 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
812 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 832 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
813 day6_action->addTo( viewMenu ); 833 day6_action->addTo( viewMenu );
814 connect( day6_action, SIGNAL( activated() ), 834 connect( day6_action, SIGNAL( activated() ),
815 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 835 mView->viewManager(), SLOT( showMonthViewWeek() ) );
816 836
817 icon = loadPixmap( pathString + "month" ); 837 icon = loadPixmap( pathString + "month" );
818 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 838 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
819 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 839 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
820 month_action->addTo( viewMenu ); 840 month_action->addTo( viewMenu );
821 connect( month_action, SIGNAL( activated() ), 841 connect( month_action, SIGNAL( activated() ),
822 mView->viewManager(), SLOT( showMonthView() ) ); 842 mView->viewManager(), SLOT( showMonthView() ) );
823 843
824 icon = loadPixmap( pathString + "list" ); 844 icon = loadPixmap( pathString + "list" );
825 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 845 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
826 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 846 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
827 showlist_action->addTo( viewMenu ); 847 showlist_action->addTo( viewMenu );
828 connect( showlist_action, SIGNAL( activated() ), 848 connect( showlist_action, SIGNAL( activated() ),
829 mView->viewManager(), SLOT( showListView() ) ); 849 mView->viewManager(), SLOT( showListView() ) );
830 850
831 icon = loadPixmap( pathString + "todo" ); 851 icon = loadPixmap( pathString + "todo" );
832 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 852 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
833 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 853 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
834 todoview_action->addTo( viewMenu ); 854 todoview_action->addTo( viewMenu );
835 connect( todoview_action, SIGNAL( activated() ), 855 connect( todoview_action, SIGNAL( activated() ),
836 mView->viewManager(), SLOT( showTodoView() ) ); 856 mView->viewManager(), SLOT( showTodoView() ) );
837 857
838 858
839 859
840#if 0 860#if 0
841 action = new QAction( "view_timespan", "Time Span", 0, this ); 861 action = new QAction( "view_timespan", "Time Span", 0, this );
842 action->addTo( viewMenu ); 862 action->addTo( viewMenu );
843 connect( action, SIGNAL( activated() ), 863 connect( action, SIGNAL( activated() ),
844 mView->viewManager(), SLOT( showTimeSpanView() ) ); 864 mView->viewManager(), SLOT( showTimeSpanView() ) );
845#endif 865#endif
846 866
847 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 867 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
848 this ); 868 this );
849 mNewSubTodoAction->addTo( actionMenu ); 869 mNewSubTodoAction->addTo( actionMenu );
850 connect( mNewSubTodoAction, SIGNAL( activated() ), 870 connect( mNewSubTodoAction, SIGNAL( activated() ),
851 mView, SLOT( newSubTodo() ) ); 871 mView, SLOT( newSubTodo() ) );
852 872
853 actionMenu->insertSeparator(); 873 actionMenu->insertSeparator();
854 874
855 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 875 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
856 mShowAction->addTo( actionMenu ); 876 mShowAction->addTo( actionMenu );
857 connect( mShowAction, SIGNAL( activated() ), 877 connect( mShowAction, SIGNAL( activated() ),
858 mView, SLOT( showIncidence() ) ); 878 mView, SLOT( showIncidence() ) );
859 879
@@ -1059,192 +1079,198 @@ void MainWindow::initActions()
1059 connect( action, SIGNAL( activated() ), 1079 connect( action, SIGNAL( activated() ),
1060 SLOT( aboutKnownBugs() ) ); 1080 SLOT( aboutKnownBugs() ) );
1061 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1081 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1062 action->addTo( helpMenu ); 1082 action->addTo( helpMenu );
1063 connect( action, SIGNAL( activated() ), 1083 connect( action, SIGNAL( activated() ),
1064 SLOT( usertrans() ) ); 1084 SLOT( usertrans() ) );
1065 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1085 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1066 action->addTo( helpMenu ); 1086 action->addTo( helpMenu );
1067 connect( action, SIGNAL( activated() ), 1087 connect( action, SIGNAL( activated() ),
1068 SLOT( faq() ) ); 1088 SLOT( faq() ) );
1069 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1089 action = new QAction( "licence", i18n("Licence..."), 0, this );
1070 action->addTo( helpMenu ); 1090 action->addTo( helpMenu );
1071 connect( action, SIGNAL( activated() ), 1091 connect( action, SIGNAL( activated() ),
1072 SLOT( licence() ) ); 1092 SLOT( licence() ) );
1073 action = new QAction( "about", i18n("About..."), 0, this ); 1093 action = new QAction( "about", i18n("About..."), 0, this );
1074 action->addTo( helpMenu ); 1094 action->addTo( helpMenu );
1075 connect( action, SIGNAL( activated() ), 1095 connect( action, SIGNAL( activated() ),
1076 SLOT( about() ) ); 1096 SLOT( about() ) );
1077 //menuBar->insertSeparator(); 1097 //menuBar->insertSeparator();
1078 1098
1079 // ****************************************************** 1099 // ******************************************************
1080 // menubar icons 1100 // menubar icons
1081 1101
1082 1102
1083 1103
1084 //menuBar->insertItem( iconToolBar ); 1104 //menuBar->insertItem( iconToolBar );
1085 //xdays_action 1105 //xdays_action
1086 if (p-> mShowIconNewEvent) 1106 if (p-> mShowIconNewEvent)
1087 ne_action->addTo( iconToolBar ); 1107 ne_action->addTo( iconToolBar );
1088 if (p->mShowIconNewTodo ) 1108 if (p->mShowIconNewTodo )
1089 nt_action->addTo( iconToolBar ); 1109 nt_action->addTo( iconToolBar );
1090 if (p-> mShowIconSearch) 1110 if (p-> mShowIconSearch)
1091 search_action->addTo( iconToolBar ); 1111 search_action->addTo( iconToolBar );
1092 if (p-> mShowIconWhatsThis) 1112 if (p-> mShowIconWhatsThis)
1093 QWhatsThis::whatsThisButton ( iconToolBar ); 1113 QWhatsThis::whatsThisButton ( iconToolBar );
1094 if (p-> mShowIconNext) 1114 if (p-> mShowIconNext)
1095 whatsnext_action->addTo( viewToolBar ); 1115 whatsnext_action->addTo( viewToolBar );
1096 if (p-> mShowIconNextDays) 1116 if (p-> mShowIconNextDays)
1097 xdays_action->addTo( viewToolBar ); 1117 xdays_action->addTo( viewToolBar );
1098 if (p-> mShowIconJournal) 1118 if (p-> mShowIconJournal)
1099 viewjournal_action->addTo( viewToolBar ); 1119 viewjournal_action->addTo( viewToolBar );
1100 if (p-> mShowIconDay1) 1120 if (p-> mShowIconDay1)
1101 day1_action->addTo( viewToolBar ); 1121 day1_action->addTo( viewToolBar );
1102 if (p-> mShowIconDay5) 1122 if (p-> mShowIconDay5)
1103 day5_action->addTo( viewToolBar ); 1123 day5_action->addTo( viewToolBar );
1104 if (p-> mShowIconDay7) 1124 if (p-> mShowIconDay7)
1105 day7_action->addTo( viewToolBar ); 1125 day7_action->addTo( viewToolBar );
1106 if (p-> mShowIconDay6) 1126 if (p-> mShowIconDay6)
1107 day6_action->addTo( viewToolBar ); 1127 day6_action->addTo( viewToolBar );
1108 if (p-> mShowIconMonth) 1128 if (p-> mShowIconMonth)
1109 month_action->addTo( viewToolBar ); 1129 month_action->addTo( viewToolBar );
1110 if (p-> mShowIconList) 1130 if (p-> mShowIconList)
1111 showlist_action->addTo( viewToolBar ); 1131 showlist_action->addTo( viewToolBar );
1112 if (p-> mShowIconTodoview) 1132 if (p-> mShowIconTodoview)
1113 todoview_action->addTo( viewToolBar ); 1133 todoview_action->addTo( viewToolBar );
1114 1134
1115 icon = loadPixmap( pathString + "2leftarrowB" ); 1135 icon = loadPixmap( pathString + "2leftarrowB" );
1116 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1136 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1117 if (p-> mShowIconBackFast) { 1137 if (p-> mShowIconBackFast) {
1118 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1138 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1119 connect( action, SIGNAL( activated() ), 1139 connect( action, SIGNAL( activated() ),
1120 mView, SLOT( goPreviousMonth() ) ); 1140 mView, SLOT( goPreviousMonth() ) );
1121 action->addTo( navigatorToolBar ); 1141 action->addTo( navigatorToolBar );
1122 } 1142 }
1123 icon = loadPixmap( pathString + "1leftarrowB" ); 1143 icon = loadPixmap( pathString + "1leftarrowB" );
1124 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1144 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1125 if (p-> mShowIconBack) { 1145 if (p-> mShowIconBack) {
1126 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1146 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1127 connect( action, SIGNAL( activated() ), 1147 connect( action, SIGNAL( activated() ),
1128 mView, SLOT( goPrevious() ) ); 1148 mView, SLOT( goPrevious() ) );
1129 action->addTo( navigatorToolBar ); 1149 action->addTo( navigatorToolBar );
1130 } 1150 }
1131 icon = loadPixmap( pathString + "today" ); 1151 icon = loadPixmap( pathString + "today" );
1132 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1152 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1133 if (p-> mShowIconToday) 1153 if (p-> mShowIconToday)
1134 today_action->addTo( navigatorToolBar ); 1154 today_action->addTo( navigatorToolBar );
1135 icon = loadPixmap( pathString + "1rightarrowB" ); 1155 icon = loadPixmap( pathString + "1rightarrowB" );
1136 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1156 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1137 if (p-> mShowIconForward) { 1157 if (p-> mShowIconForward) {
1138 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1158 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1139 connect( action, SIGNAL( activated() ), 1159 connect( action, SIGNAL( activated() ),
1140 mView, SLOT( goNext() ) ); 1160 mView, SLOT( goNext() ) );
1141 action->addTo( navigatorToolBar ); 1161 action->addTo( navigatorToolBar );
1142 } 1162 }
1143 icon = loadPixmap( pathString + "2rightarrowB" ); 1163 icon = loadPixmap( pathString + "2rightarrowB" );
1144 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1164 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1145 if (p-> mShowIconForwardFast) { 1165 if (p-> mShowIconForwardFast) {
1146 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1166 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1147 connect( action, SIGNAL( activated() ), 1167 connect( action, SIGNAL( activated() ),
1148 mView, SLOT( goNextMonth() ) ); 1168 mView, SLOT( goNextMonth() ) );
1149 action->addTo( navigatorToolBar ); 1169 action->addTo( navigatorToolBar );
1150 } 1170 }
1151 1171
1152 1172
1153 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1173 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1154 1174
1175
1176 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1177 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1178 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1179 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1180
1155 if (p-> mShowIconNewEvent) 1181 if (p-> mShowIconNewEvent)
1156 configureToolBarMenu->setItemChecked( 10, true ); 1182 configureToolBarMenu->setItemChecked( 10, true );
1157 if (p->mShowIconNewTodo ) 1183 if (p->mShowIconNewTodo )
1158 configureToolBarMenu->setItemChecked( 20, true ); 1184 configureToolBarMenu->setItemChecked( 20, true );
1159 if (p-> mShowIconSearch) 1185 if (p-> mShowIconSearch)
1160 configureToolBarMenu->setItemChecked( 120, true ); 1186 configureToolBarMenu->setItemChecked( 120, true );
1161 if (p-> mShowIconList) 1187 if (p-> mShowIconList)
1162 configureToolBarMenu->setItemChecked( 30, true ); 1188 configureToolBarMenu->setItemChecked( 30, true );
1163 if (p-> mShowIconDay1) 1189 if (p-> mShowIconDay1)
1164 configureToolBarMenu->setItemChecked( 40, true ); 1190 configureToolBarMenu->setItemChecked( 40, true );
1165 if (p-> mShowIconDay5) 1191 if (p-> mShowIconDay5)
1166 configureToolBarMenu->setItemChecked( 50, true ); 1192 configureToolBarMenu->setItemChecked( 50, true );
1167 if (p-> mShowIconDay6) 1193 if (p-> mShowIconDay6)
1168 configureToolBarMenu->setItemChecked( 75, true ); 1194 configureToolBarMenu->setItemChecked( 75, true );
1169 if (p-> mShowIconDay7) 1195 if (p-> mShowIconDay7)
1170 configureToolBarMenu->setItemChecked( 60, true ); 1196 configureToolBarMenu->setItemChecked( 60, true );
1171 if (p-> mShowIconMonth) 1197 if (p-> mShowIconMonth)
1172 configureToolBarMenu->setItemChecked( 70, true ); 1198 configureToolBarMenu->setItemChecked( 70, true );
1173 if (p-> mShowIconTodoview) 1199 if (p-> mShowIconTodoview)
1174 configureToolBarMenu->setItemChecked( 80, true ); 1200 configureToolBarMenu->setItemChecked( 80, true );
1175 if (p-> mShowIconBackFast) 1201 if (p-> mShowIconBackFast)
1176 configureToolBarMenu->setItemChecked( 200, true ); 1202 configureToolBarMenu->setItemChecked( 200, true );
1177 if (p-> mShowIconBack) 1203 if (p-> mShowIconBack)
1178 configureToolBarMenu->setItemChecked( 210, true ); 1204 configureToolBarMenu->setItemChecked( 210, true );
1179 if (p-> mShowIconToday) 1205 if (p-> mShowIconToday)
1180 configureToolBarMenu->setItemChecked( 130, true ); 1206 configureToolBarMenu->setItemChecked( 130, true );
1181 if (p-> mShowIconForward) 1207 if (p-> mShowIconForward)
1182 configureToolBarMenu->setItemChecked( 220, true ); 1208 configureToolBarMenu->setItemChecked( 220, true );
1183 if (p-> mShowIconForwardFast) 1209 if (p-> mShowIconForwardFast)
1184 configureToolBarMenu->setItemChecked( 230, true ); 1210 configureToolBarMenu->setItemChecked( 230, true );
1185 if (p-> mShowIconNextDays) 1211 if (p-> mShowIconNextDays)
1186 configureToolBarMenu->setItemChecked( 100, true ); 1212 configureToolBarMenu->setItemChecked( 100, true );
1187 if (p-> mShowIconNext) 1213 if (p-> mShowIconNext)
1188 configureToolBarMenu->setItemChecked( 110, true ); 1214 configureToolBarMenu->setItemChecked( 110, true );
1189 if (p-> mShowIconJournal) 1215 if (p-> mShowIconJournal)
1190 configureToolBarMenu->setItemChecked( 90, true ); 1216 configureToolBarMenu->setItemChecked( 90, true );
1191 if (p-> mShowIconWhatsThis) 1217 if (p-> mShowIconWhatsThis)
1192 configureToolBarMenu->setItemChecked( 300, true ); 1218 configureToolBarMenu->setItemChecked( 300, true );
1193 if (p-> mShowIconWeekNum) 1219 if (p-> mShowIconWeekNum)
1194 configureToolBarMenu->setItemChecked( 400, true ); 1220 configureToolBarMenu->setItemChecked( 400, true );
1195 if (!p-> mShowIconStretch) { 1221 if (!p-> mShowIconStretch) {
1196 QLabel* dummy = new QLabel( iconToolBar ); 1222 QLabel* dummy = new QLabel( iconToolBar );
1197 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1223 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1198 dummy->setMinimumWidth( 0 ); 1224 dummy->setMinimumWidth( 0 );
1199 iconToolBar->setStretchableWidget ( dummy ) ; 1225 iconToolBar->setStretchableWidget ( dummy ) ;
1200 } 1226 }
1201 else { 1227 else {
1202 iconToolBar->setHorizontalStretchable (true ); 1228 iconToolBar->setHorizontalStretchable (true );
1203 viewToolBar->setHorizontalStretchable (true ); 1229 viewToolBar->setHorizontalStretchable (true );
1204 navigatorToolBar->setHorizontalStretchable (true ); 1230 navigatorToolBar->setHorizontalStretchable (true );
1205 iconToolBar->setVerticalStretchable (true ); 1231 iconToolBar->setVerticalStretchable (true );
1206 viewToolBar->setVerticalStretchable (true ); 1232 viewToolBar->setVerticalStretchable (true );
1207 navigatorToolBar->setVerticalStretchable (true ); 1233 navigatorToolBar->setVerticalStretchable (true );
1208 configureToolBarMenu->setItemChecked( 5, true ); 1234 configureToolBarMenu->setItemChecked( 5, true );
1209 } 1235 }
1210 if (p-> mShowIconFilter) 1236 if (p-> mShowIconFilter)
1211 configureToolBarMenu->setItemChecked( 7, true ); 1237 configureToolBarMenu->setItemChecked( 7, true );
1212 if (p-> mShowIconOnetoolbar) 1238 if (p-> mShowIconOnetoolbar)
1213 configureToolBarMenu->setItemChecked( 6, true ); 1239 configureToolBarMenu->setItemChecked( 6, true );
1214 1240
1215 1241
1216 if ( filterMenubar ) 1242 if ( filterMenubar )
1217 connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); 1243 connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) );
1218 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1244 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1219 configureAgenda( p->mHourSize ); 1245 configureAgenda( p->mHourSize );
1220 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1246 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1221} 1247}
1222 1248
1223void MainWindow::exportToPhone( int mode ) 1249void MainWindow::exportToPhone( int mode )
1224{ 1250{
1225 1251
1226 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1252 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1227 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1253 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1228 KOex2phonePrefs ex2phone; 1254 KOex2phonePrefs ex2phone;
1229 1255
1230 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1256 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1231 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1257 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1232 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1258 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1233 if ( mode == 1 ) 1259 if ( mode == 1 )
1234 ex2phone.setCaption(i18n("Export complete calendar")); 1260 ex2phone.setCaption(i18n("Export complete calendar"));
1235 if ( mode == 2 ) 1261 if ( mode == 2 )
1236 ex2phone.setCaption(i18n("Export filtered calendar")); 1262 ex2phone.setCaption(i18n("Export filtered calendar"));
1237 1263
1238 if ( !ex2phone.exec() ) { 1264 if ( !ex2phone.exec() ) {
1239 return; 1265 return;
1240 } 1266 }
1241 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1267 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1242 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1268 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1243 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1269 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1244 1270
1245 int inFuture = 0; 1271 int inFuture = 0;
1246 if ( ex2phone.mWriteBackFuture->isChecked() ) 1272 if ( ex2phone.mWriteBackFuture->isChecked() )
1247 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1273 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1248 QPtrList<Incidence> delSel; 1274 QPtrList<Incidence> delSel;
1249 if ( mode == 1 ) 1275 if ( mode == 1 )
1250 delSel = mCalendar->rawIncidences(); 1276 delSel = mCalendar->rawIncidences();
@@ -1925,192 +1951,196 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
1925 } 1951 }
1926 if ( showSelectedDates ) { 1952 if ( showSelectedDates ) {
1927 ;// setCaptionToDates(); 1953 ;// setCaptionToDates();
1928 } 1954 }
1929 1955
1930} 1956}
1931 1957
1932void MainWindow::fillFilterMenu() 1958void MainWindow::fillFilterMenu()
1933{ 1959{
1934 selectFilterMenu->clear(); 1960 selectFilterMenu->clear();
1935 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); 1961 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
1936 selectFilterMenu->insertSeparator(); 1962 selectFilterMenu->insertSeparator();
1937 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); 1963 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
1938 1964
1939 selectFilterMenu->insertSeparator(); 1965 selectFilterMenu->insertSeparator();
1940 QPtrList<CalFilter> fili = mView->filters(); 1966 QPtrList<CalFilter> fili = mView->filters();
1941 CalFilter *curfilter = mView->filterView()->selectedFilter(); 1967 CalFilter *curfilter = mView->filterView()->selectedFilter();
1942 CalFilter *filter = fili.first(); 1968 CalFilter *filter = fili.first();
1943 int iii = 2; 1969 int iii = 2;
1944 bool checkitem = mView->filterView()->filtersEnabled(); 1970 bool checkitem = mView->filterView()->filtersEnabled();
1945 while(filter) { 1971 while(filter) {
1946 selectFilterMenu->insertItem( filter->name(), iii ); 1972 selectFilterMenu->insertItem( filter->name(), iii );
1947 if ( filter == curfilter) 1973 if ( filter == curfilter)
1948 selectFilterMenu->setItemChecked( iii, checkitem ); 1974 selectFilterMenu->setItemChecked( iii, checkitem );
1949 filter = fili.next(); 1975 filter = fili.next();
1950 ++iii; 1976 ++iii;
1951 } 1977 }
1952 if ( !checkitem ) 1978 if ( !checkitem )
1953 selectFilterMenu->setItemChecked( 1, true ); 1979 selectFilterMenu->setItemChecked( 1, true );
1954} 1980}
1955void MainWindow::fillFilterMenuPopup() 1981void MainWindow::fillFilterMenuPopup()
1956{ 1982{
1957 filterPopupMenu->clear(); 1983 filterPopupMenu->clear();
1958 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); 1984 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 );
1959 1985
1960 filterPopupMenu->insertSeparator(); 1986 filterPopupMenu->insertSeparator();
1961 QPtrList<CalFilter> fili = mView->filters(); 1987 QPtrList<CalFilter> fili = mView->filters();
1962 CalFilter *curfilter = mView->filterView()->selectedFilter(); 1988 CalFilter *curfilter = mView->filterView()->selectedFilter();
1963 CalFilter *filter = fili.first(); 1989 CalFilter *filter = fili.first();
1964 int iii = 1; 1990 int iii = 1;
1965 bool checkitem = mView->filterView()->filtersEnabled(); 1991 bool checkitem = mView->filterView()->filtersEnabled();
1966 while(filter) { 1992 while(filter) {
1967 filterPopupMenu->insertItem( filter->name(), iii ); 1993 filterPopupMenu->insertItem( filter->name(), iii );
1968 if ( filter == curfilter) 1994 if ( filter == curfilter)
1969 filterPopupMenu->setItemChecked( iii, checkitem ); 1995 filterPopupMenu->setItemChecked( iii, checkitem );
1970 filter = fili.next(); 1996 filter = fili.next();
1971 ++iii; 1997 ++iii;
1972 } 1998 }
1973 if ( !checkitem ) 1999 if ( !checkitem )
1974 filterPopupMenu->setItemChecked( 0, true ); 2000 filterPopupMenu->setItemChecked( 0, true );
1975} 2001}
1976void MainWindow::selectFilter( int fil ) 2002void MainWindow::selectFilter( int fil )
1977{ 2003{
1978 2004
1979 if ( fil == 0 ) { 2005 if ( fil == 0 ) {
1980 mView->editFilters( ); 2006 mView->editFilters( );
1981 } else if ( fil == 1 ){ 2007 } else if ( fil == 1 ){
1982 if ( mView->filterView()->filtersEnabled() ) 2008 if ( mView->filterView()->filtersEnabled() )
1983 mView->toggleFilerEnabled( ); 2009 mView->toggleFilerEnabled( );
1984 } else { 2010 } else {
1985 if ( !mView->filterView()->filtersEnabled() ) { 2011 if ( !mView->filterView()->filtersEnabled() ) {
1986 mView->filterView()->blockSignals( true ); 2012 mView->filterView()->blockSignals( true );
1987 mView->toggleFilerEnabled( ); 2013 mView->toggleFilerEnabled( );
1988 mView->filterView()->blockSignals( false ); 2014 mView->filterView()->blockSignals( false );
1989 } 2015 }
1990 mView->selectFilter( fil-2 ); 2016 mView->selectFilter( fil-2 );
1991 } 2017 }
1992} 2018}
1993void MainWindow::updateFilterToolbar() 2019void MainWindow::updateFilterToolbar()
1994{ 2020{
1995 if ( filterMenubar ) { 2021 if ( filterMenubar ) {
1996 if ( !mView->filterView()->filtersEnabled() ) { 2022 if ( !mView->filterView()->filtersEnabled() ) {
1997 filterMenubar->changeItem( 0, i18n("No Filter") ); 2023 filterMenubar->changeItem( 0, i18n("No Filter") );
1998 } else { 2024 } else {
1999 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2025 CalFilter *curfilter = mView->filterView()->selectedFilter();
2000 if ( curfilter ) { 2026 if ( curfilter ) {
2001 filterMenubar->changeItem( 0, curfilter->name() ); 2027 filterMenubar->changeItem( 0, curfilter->name() );
2002 } 2028 }
2003 } 2029 }
2004 } 2030 }
2005} 2031}
2006void MainWindow::selectFilterPopup( int fil ) 2032void MainWindow::selectFilterPopup( int fil )
2007{ 2033{
2008 selectFilter( fil + 1 ); 2034 selectFilter( fil + 1 );
2009 2035
2010} 2036}
2011void MainWindow::configureToolBar( int item ) 2037void MainWindow::configureToolBar( int item )
2012{ 2038{
2013 2039
2014 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); 2040 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
2015 KOPrefs *p = KOPrefs::instance(); 2041 KOPrefs *p = KOPrefs::instance();
2016 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); 2042 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
2017 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); 2043 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 );
2018 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); 2044 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 );
2019 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 2045 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
2020 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 2046 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
2047 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 );
2048 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 );
2049 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 );
2050 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 );
2021 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 2051 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
2022 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 2052 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
2023 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 2053 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
2024 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 2054 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
2025 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); 2055 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
2026 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 2056 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
2027 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 2057 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
2028 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 2058 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
2029 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 2059 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
2030 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 2060 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
2031 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 2061 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
2032 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 2062 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
2033 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 2063 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
2034 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 2064 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
2035 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 2065 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
2036 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 2066 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
2037 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 2067 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
2038 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); 2068 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 );
2039 // initActions(); 2069 // initActions();
2040} 2070}
2041void MainWindow::setCaption ( const QString & c ) 2071void MainWindow::setCaption ( const QString & c )
2042{ 2072{
2043 QString cap = c; 2073 QString cap = c;
2044 cap.replace( QRegExp("\n"), " " ); 2074 cap.replace( QRegExp("\n"), " " );
2045 cap = cap.stripWhiteSpace(); 2075 cap = cap.stripWhiteSpace();
2046 if ( cap.isEmpty() ) 2076 if ( cap.isEmpty() )
2047 cap = "KO/Pi"; 2077 cap = "KO/Pi";
2048 QWidget::setCaption( cap ); 2078 QWidget::setCaption( cap );
2049} 2079}
2050void MainWindow::setCaptionToDates() 2080void MainWindow::setCaptionToDates()
2051{ 2081{
2052 QString selDates; 2082 QString selDates;
2053 QDate date = mView->startDate(); 2083 QDate date = mView->startDate();
2054 if ( ! date.isValid() ) { 2084 if ( ! date.isValid() ) {
2055 setCaption(""); 2085 setCaption("");
2056 return; 2086 return;
2057 } 2087 }
2058 selDates = KGlobal::locale()->formatDate( date, true); 2088 selDates = KGlobal::locale()->formatDate( date, true);
2059 if (mView->startDate() < mView->endDate() ) 2089 if (mView->startDate() < mView->endDate() )
2060 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 2090 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
2061 else { 2091 else {
2062 QString addString; 2092 QString addString;
2063 if ( date == QDateTime::currentDateTime().date() ) 2093 if ( date == QDateTime::currentDateTime().date() )
2064 addString = i18n("Today"); 2094 addString = i18n("Today");
2065 else if ( date == QDateTime::currentDateTime().date().addDays(1) ) 2095 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
2066 addString = i18n("Tomorrow"); 2096 addString = i18n("Tomorrow");
2067 if ( !addString.isEmpty() ) 2097 if ( !addString.isEmpty() )
2068 selDates = addString+", "+selDates ; 2098 selDates = addString+", "+selDates ;
2069 } 2099 }
2070 setCaption( i18n("Dates: ") + selDates ); 2100 setCaption( i18n("Dates: ") + selDates );
2071 2101
2072} 2102}
2073void MainWindow::showConfigureAgenda( ) 2103void MainWindow::showConfigureAgenda( )
2074{ 2104{
2075 int iii; 2105 int iii;
2076 for ( iii = 1;iii<= 10 ;++iii ){ 2106 for ( iii = 1;iii<= 10 ;++iii ){
2077 configureAgendaMenu->setItemChecked( (iii+1)*2, false ); 2107 configureAgendaMenu->setItemChecked( (iii+1)*2, false );
2078 } 2108 }
2079 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); 2109 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
2080} 2110}
2081void MainWindow::configureAgenda( int item ) 2111void MainWindow::configureAgenda( int item )
2082{ 2112{
2083 if ( KOPrefs::instance()->mHourSize == item ) 2113 if ( KOPrefs::instance()->mHourSize == item )
2084 return; 2114 return;
2085 KOPrefs::instance()->mHourSize=item; 2115 KOPrefs::instance()->mHourSize=item;
2086 mView->viewManager()->agendaView()->updateConfig(); 2116 mView->viewManager()->agendaView()->updateConfig();
2087} 2117}
2088 2118
2089void MainWindow::saveCalendar() 2119void MainWindow::saveCalendar()
2090{ 2120{
2091 QString fn = KOPrefs::instance()->mLastSaveFile; 2121 QString fn = KOPrefs::instance()->mLastSaveFile;
2092 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); 2122 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this );
2093 2123
2094 if ( fn == "" ) 2124 if ( fn == "" )
2095 return; 2125 return;
2096 QFileInfo info; 2126 QFileInfo info;
2097 info.setFile( fn ); 2127 info.setFile( fn );
2098 QString mes; 2128 QString mes;
2099 bool createbup = true; 2129 bool createbup = true;
2100 if ( info. exists() ) { 2130 if ( info. exists() ) {
2101 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; 2131 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
2102 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2132 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2103 i18n("Overwrite!"), i18n("Cancel"), 0, 2133 i18n("Overwrite!"), i18n("Cancel"), 0,
2104 0, 1 ); 2134 0, 1 );
2105 if ( result != 0 ) { 2135 if ( result != 0 ) {
2106 createbup = false; 2136 createbup = false;
2107 } 2137 }
2108 } 2138 }
2109 if ( createbup ) { 2139 if ( createbup ) {
2110 mView->saveCalendar( fn ); 2140 mView->saveCalendar( fn );
2111 mes = i18n("KO/Pi:Saved %1").arg(fn); 2141 mes = i18n("KO/Pi:Saved %1").arg(fn);
2112 KOPrefs::instance()->mLastSaveFile = fn; 2142 KOPrefs::instance()->mLastSaveFile = fn;
2113 setCaption(mes); 2143 setCaption(mes);
2114 } 2144 }
2115} 2145}
2116void MainWindow::loadCalendar() 2146void MainWindow::loadCalendar()