author | zautrix <zautrix> | 2004-10-22 22:10:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-22 22:10:16 (UTC) |
commit | b8da6435b8e5941eb1824873e68d8a6a728fae5e (patch) (unidiff) | |
tree | bc5ed11961e89bcd606f6fbca32185dbf8afab7a | |
parent | a5274f27dc71e1a0ffae73f32f84f4dd013b4b76 (diff) | |
download | kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.zip kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.gz kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.bz2 |
fixed an ugly timezone bug
-rw-r--r-- | kaddressbook/views/contactlistview.cpp | 4 | ||||
-rw-r--r-- | kmicromail/koprefs.cpp | 12 | ||||
-rw-r--r-- | kmicromail/koprefs.h | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 12 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 5 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 15 | ||||
-rw-r--r-- | korganizer/koprefs.h | 9 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 2 | ||||
-rw-r--r-- | microkde/kdecore/klocale.cpp | 50 |
9 files changed, 42 insertions, 69 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp index 5fb4163..ad43970 100644 --- a/kaddressbook/views/contactlistview.cpp +++ b/kaddressbook/views/contactlistview.cpp | |||
@@ -151,66 +151,66 @@ void DynamicTip::maybeTip( const QPoint &pos ) | |||
151 | hide(); | 151 | hide(); |
152 | ishidden = !ishidden; | 152 | ishidden = !ishidden; |
153 | 153 | ||
154 | } | 154 | } |
155 | 155 | ||
156 | /////////////////////////// | 156 | /////////////////////////// |
157 | // ContactListViewItem Methods | 157 | // ContactListViewItem Methods |
158 | 158 | ||
159 | ContactListViewItem::ContactListViewItem(const KABC::Addressee &a, | 159 | ContactListViewItem::ContactListViewItem(const KABC::Addressee &a, |
160 | ContactListView *parent, | 160 | ContactListView *parent, |
161 | KABC::AddressBook *doc, | 161 | KABC::AddressBook *doc, |
162 | const KABC::Field::List &fields ) | 162 | const KABC::Field::List &fields ) |
163 | : KListViewItem(parent), mAddressee(a), mFields( fields ), | 163 | : KListViewItem(parent), mAddressee(a), mFields( fields ), |
164 | parentListView( parent ), mDocument(doc) | 164 | parentListView( parent ), mDocument(doc) |
165 | { | 165 | { |
166 | refresh(); | 166 | refresh(); |
167 | } | 167 | } |
168 | 168 | ||
169 | QString ContactListViewItem::key(int column, bool ascending) const | 169 | QString ContactListViewItem::key(int column, bool ascending) const |
170 | { | 170 | { |
171 | #ifndef DESKTOP_VERSION | 171 | #ifndef DESKTOP_VERSION |
172 | int lan = KGlobal::locale()->language(); | 172 | int lan = KGlobal::locale()->language(); |
173 | //qDebug("language %d ", lan); | 173 | //qDebug("language %d ", lan); |
174 | if ( lan == 1 ) { //GERMAN | 174 | if ( lan == 1 ) { //GERMAN |
175 | QString ret = QListViewItem::key(column, ascending).utf8(); | 175 | QString ret = QListViewItem::key(column, ascending).lower().utf8(); |
176 | int start = -1; | 176 | int start = -1; |
177 | while ( (start = ret.find( 'ä', start+1)) > 0 ) { | 177 | while ( (start = ret.find( 'ä', start+1)) > 0 ) { |
178 | ret.at(start-1) = 'a'; | 178 | ret.at(start-1) = 'a'; |
179 | } | 179 | } |
180 | start = -1; | 180 | start = -1; |
181 | while ( (start = ret.find( 'ö', start+1)) > 0 ) { | 181 | while ( (start = ret.find( 'ö', start+1)) > 0 ) { |
182 | ret.at(start-1) = 'o'; | 182 | ret.at(start-1) = 'o'; |
183 | } | 183 | } |
184 | start = -1; | 184 | start = -1; |
185 | while ( (start = ret.find( 'ü', start+1)) > 0 ) { | 185 | while ( (start = ret.find( 'ü', start+1)) > 0 ) { |
186 | ret.at(start-1) = 'o'; | 186 | ret.at(start-1) = 'o'; |
187 | } | 187 | } |
188 | start = -1; | 188 | start = -1; |
189 | while ( (start = ret.find( 'ß', start+1)) > 0 ) { | 189 | while ( (start = ret.find( 'ß', start+1)) > 0 ) { |
190 | ret.at(start-1) = 's'; | 190 | ret.at(start-1) = 's'; |
191 | } | 191 | } |
192 | //qDebug("conv string %s ", ret.latin1()); | 192 | qDebug("conv string %s ", ret.latin1()); |
193 | 193 | ||
194 | return ret; | 194 | return ret; |
195 | 195 | ||
196 | } | 196 | } |
197 | else | 197 | else |
198 | #endif | 198 | #endif |
199 | return QListViewItem::key(column, ascending).lower(); | 199 | return QListViewItem::key(column, ascending).lower(); |
200 | } | 200 | } |
201 | 201 | ||
202 | void ContactListViewItem::paintCell(QPainter * p, | 202 | void ContactListViewItem::paintCell(QPainter * p, |
203 | const QColorGroup & cg, | 203 | const QColorGroup & cg, |
204 | int column, | 204 | int column, |
205 | int width, | 205 | int width, |
206 | int align) | 206 | int align) |
207 | { | 207 | { |
208 | KListViewItem::paintCell(p, cg, column, width, align); | 208 | KListViewItem::paintCell(p, cg, column, width, align); |
209 | 209 | ||
210 | if ( !p ) | 210 | if ( !p ) |
211 | return; | 211 | return; |
212 | 212 | ||
213 | if (parentListView->singleLine()) { | 213 | if (parentListView->singleLine()) { |
214 | p->setPen( parentListView->alternateColor() ); | 214 | p->setPen( parentListView->alternateColor() ); |
215 | p->drawLine( 0, height() - 1, width, height() - 1 ); | 215 | p->drawLine( 0, height() - 1, width, height() - 1 ); |
216 | } | 216 | } |
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp index c0200ff..8143b6f 100644 --- a/kmicromail/koprefs.cpp +++ b/kmicromail/koprefs.cpp | |||
@@ -46,83 +46,77 @@ | |||
46 | #include "mainwindow.h" | 46 | #include "mainwindow.h" |
47 | 47 | ||
48 | 48 | ||
49 | KOPrefs *KOPrefs::mInstance = 0; | 49 | KOPrefs *KOPrefs::mInstance = 0; |
50 | static KStaticDeleter<KOPrefs> insd; | 50 | static KStaticDeleter<KOPrefs> insd; |
51 | 51 | ||
52 | KOPrefs::KOPrefs() : | 52 | KOPrefs::KOPrefs() : |
53 | KPimPrefs("kopiemailrc") | 53 | KPimPrefs("kopiemailrc") |
54 | { | 54 | { |
55 | mAppFont = QFont("helvetica",12); | 55 | mAppFont = QFont("helvetica",12); |
56 | mComposeFont = QFont("helvetica",12); | 56 | mComposeFont = QFont("helvetica",12); |
57 | mReadFont = QFont("helvetica",12); | 57 | mReadFont = QFont("helvetica",12); |
58 | 58 | ||
59 | KPrefs::setCurrentGroup("General"); | 59 | KPrefs::setCurrentGroup("General"); |
60 | addItemString("SenderName",&mName,i18n ("Please set at") ); | 60 | addItemString("SenderName",&mName,i18n ("Please set at") ); |
61 | addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") ); | 61 | addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") ); |
62 | addItemBool("ViewMailAsHtml",&mViewAsHtml,false); | 62 | addItemBool("ViewMailAsHtml",&mViewAsHtml,false); |
63 | addItemBool("SendMailLater",&mSendLater,true); | 63 | addItemBool("SendMailLater",&mSendLater,true); |
64 | addItemBool("UseKapi",&mUseKapi,false); | 64 | addItemBool("UseKapi",&mUseKapi,false); |
65 | 65 | ||
66 | KPrefs::setCurrentGroup("Fonts"); | 66 | KPrefs::setCurrentGroup("Fonts"); |
67 | addItemFont("Application Font",&mAppFont); | 67 | addItemFont("Application Font",&mAppFont); |
68 | addItemFont("Compose Font",&mComposeFont); | 68 | addItemFont("Compose Font",&mComposeFont); |
69 | addItemFont("Read Font",&mReadFont); | 69 | addItemFont("Read Font",&mReadFont); |
70 | 70 | fillMailDefaults(); | |
71 | 71 | ||
72 | } | 72 | } |
73 | 73 | ||
74 | 74 | ||
75 | KOPrefs::~KOPrefs() | 75 | KOPrefs::~KOPrefs() |
76 | { | 76 | { |
77 | if (mInstance == this) | 77 | if (mInstance == this) |
78 | mInstance = insd.setObject(0); | 78 | mInstance = insd.setObject(0); |
79 | 79 | ||
80 | } | 80 | } |
81 | 81 | ||
82 | 82 | ||
83 | KOPrefs *KOPrefs::instance() | 83 | KOPrefs *KOPrefs::instance() |
84 | { | 84 | { |
85 | if (!mInstance) { | 85 | if (!mInstance) { |
86 | mInstance = insd.setObject(new KOPrefs()); | 86 | mInstance = insd.setObject(new KOPrefs()); |
87 | mInstance->readConfig(); | 87 | mInstance->readConfig(); |
88 | } | 88 | } |
89 | 89 | ||
90 | return mInstance; | 90 | return mInstance; |
91 | } | 91 | } |
92 | 92 | ||
93 | void KOPrefs::usrSetDefaults() | 93 | void KOPrefs::usrSetDefaults() |
94 | { | 94 | { |
95 | 95 | ||
96 | } | 96 | } |
97 | 97 | ||
98 | void KOPrefs::fillMailDefaults() | 98 | void KOPrefs::fillMailDefaults() |
99 | { | 99 | { |
100 | if (mName.isEmpty()) mName = i18n("Anonymous"); | 100 | if (mName.isEmpty()) mName = i18n ("Please set at"); |
101 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); | 101 | if (mEmail.isEmpty()) mEmail = i18n ("Settings@General TAB"); |
102 | } | 102 | } |
103 | 103 | ||
104 | void KOPrefs::setTimeZoneIdDefault() | ||
105 | { | ||
106 | mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)"); | ||
107 | } | ||
108 | |||
109 | |||
110 | void KOPrefs::usrReadConfig() | 104 | void KOPrefs::usrReadConfig() |
111 | { | 105 | { |
112 | 106 | ||
113 | KPimPrefs::usrReadConfig(); | 107 | KPimPrefs::usrReadConfig(); |
114 | } | 108 | } |
115 | 109 | ||
116 | 110 | ||
117 | void KOPrefs::usrWriteConfig() | 111 | void KOPrefs::usrWriteConfig() |
118 | { | 112 | { |
119 | 113 | ||
120 | KPimPrefs::usrWriteConfig(); | 114 | KPimPrefs::usrWriteConfig(); |
121 | } | 115 | } |
122 | 116 | ||
123 | 117 | ||
124 | 118 | ||
125 | KConfig* KOPrefs::getConfig() | 119 | KConfig* KOPrefs::getConfig() |
126 | { | 120 | { |
127 | return config(); | 121 | return config(); |
128 | } | 122 | } |
diff --git a/kmicromail/koprefs.h b/kmicromail/koprefs.h index c42d787..a47642b 100644 --- a/kmicromail/koprefs.h +++ b/kmicromail/koprefs.h | |||
@@ -31,51 +31,49 @@ class KConfig; | |||
31 | class QFont; | 31 | class QFont; |
32 | class QColor; | 32 | class QColor; |
33 | class QStringList; | 33 | class QStringList; |
34 | 34 | ||
35 | class KOPrefs : public KPimPrefs | 35 | class KOPrefs : public KPimPrefs |
36 | { | 36 | { |
37 | public: | 37 | public: |
38 | virtual ~KOPrefs(); | 38 | virtual ~KOPrefs(); |
39 | 39 | ||
40 | /** Get instance of KOPrefs. It is made sure that there is only one | 40 | /** Get instance of KOPrefs. It is made sure that there is only one |
41 | instance. */ | 41 | instance. */ |
42 | static KOPrefs *instance(); | 42 | static KOPrefs *instance(); |
43 | 43 | ||
44 | /** Set preferences to default values */ | 44 | /** Set preferences to default values */ |
45 | void usrSetDefaults(); | 45 | void usrSetDefaults(); |
46 | 46 | ||
47 | /** Read preferences from config file */ | 47 | /** Read preferences from config file */ |
48 | void usrReadConfig(); | 48 | void usrReadConfig(); |
49 | 49 | ||
50 | /** Write preferences to config file */ | 50 | /** Write preferences to config file */ |
51 | void usrWriteConfig(); | 51 | void usrWriteConfig(); |
52 | void setCategoryDefaults(){;}; | 52 | void setCategoryDefaults(){;}; |
53 | 53 | ||
54 | protected: | 54 | protected: |
55 | void setTimeZoneIdDefault(); | ||
56 | 55 | ||
57 | /** Fill empty mail fields with default values. */ | 56 | /** Fill empty mail fields with default values. */ |
58 | void fillMailDefaults(); | 57 | void fillMailDefaults(); |
59 | 58 | ||
60 | private: | 59 | private: |
61 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 60 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
62 | object. */ | 61 | object. */ |
63 | KOPrefs(); | 62 | KOPrefs(); |
64 | 63 | ||
65 | static KOPrefs *mInstance; | 64 | static KOPrefs *mInstance; |
66 | QDict<QString> *mLocaleDict; | 65 | QDict<QString> *mLocaleDict; |
67 | public: | 66 | public: |
68 | // preferences data | 67 | // preferences data |
69 | KConfig* getConfig(); | 68 | KConfig* getConfig(); |
70 | QFont mAppFont; | 69 | QFont mAppFont; |
71 | QFont mComposeFont; | 70 | QFont mComposeFont; |
72 | QFont mReadFont; | 71 | QFont mReadFont; |
73 | QFont mTimeZoneId; | ||
74 | QString mName; | 72 | QString mName; |
75 | QString mEmail; | 73 | QString mEmail; |
76 | bool mSendLater, mViewAsHtml, mUseKapi; | 74 | bool mSendLater, mViewAsHtml, mUseKapi; |
77 | private: | 75 | private: |
78 | 76 | ||
79 | }; | 77 | }; |
80 | 78 | ||
81 | #endif | 79 | #endif |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 0306e07..e64d83a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1178,80 +1178,80 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1178 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInFuture, remRem-delFut); | 1178 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInFuture, remRem-delFut); |
1179 | mes += delmess; | 1179 | mes += delmess; |
1180 | } | 1180 | } |
1181 | if ( mSyncManager->mShowSyncSummary ) { | 1181 | if ( mSyncManager->mShowSyncSummary ) { |
1182 | KMessageBox::information(this, mes, i18n("KO/Pi Synchronization") ); | 1182 | KMessageBox::information(this, mes, i18n("KO/Pi Synchronization") ); |
1183 | } | 1183 | } |
1184 | qDebug( mes ); | 1184 | qDebug( mes ); |
1185 | mCalendar->checkAlarmForIncidence( 0, true ); | 1185 | mCalendar->checkAlarmForIncidence( 0, true ); |
1186 | return syncOK; | 1186 | return syncOK; |
1187 | } | 1187 | } |
1188 | 1188 | ||
1189 | void CalendarView::setSyncDevice( QString s ) | 1189 | void CalendarView::setSyncDevice( QString s ) |
1190 | { | 1190 | { |
1191 | mCurrentSyncDevice= s; | 1191 | mCurrentSyncDevice= s; |
1192 | } | 1192 | } |
1193 | void CalendarView::setSyncName( QString s ) | 1193 | void CalendarView::setSyncName( QString s ) |
1194 | { | 1194 | { |
1195 | mCurrentSyncName= s; | 1195 | mCurrentSyncName= s; |
1196 | } | 1196 | } |
1197 | bool CalendarView::syncCalendar(QString filename, int mode) | 1197 | bool CalendarView::syncCalendar(QString filename, int mode) |
1198 | { | 1198 | { |
1199 | //qDebug("syncCalendar %s ", filename.latin1()); | 1199 | //qDebug("syncCalendar %s ", filename.latin1()); |
1200 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 1200 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
1201 | CalendarLocal* calendar = new CalendarLocal(); | 1201 | CalendarLocal* calendar = new CalendarLocal(); |
1202 | calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 1202 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1203 | FileStorage* storage = new FileStorage( calendar ); | 1203 | FileStorage* storage = new FileStorage( calendar ); |
1204 | bool syncOK = false; | 1204 | bool syncOK = false; |
1205 | storage->setFileName( filename ); | 1205 | storage->setFileName( filename ); |
1206 | // qDebug("loading ... "); | 1206 | // qDebug("loading ... "); |
1207 | if ( storage->load() ) { | 1207 | if ( storage->load() ) { |
1208 | getEventViewerDialog()->setSyncMode( true ); | 1208 | getEventViewerDialog()->setSyncMode( true ); |
1209 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 1209 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
1210 | getEventViewerDialog()->setSyncMode( false ); | 1210 | getEventViewerDialog()->setSyncMode( false ); |
1211 | if ( syncOK ) { | 1211 | if ( syncOK ) { |
1212 | if ( mSyncManager->mWriteBackFile ) | 1212 | if ( mSyncManager->mWriteBackFile ) |
1213 | { | 1213 | { |
1214 | storage->setSaveFormat( new ICalFormat() ); | 1214 | storage->setSaveFormat( new ICalFormat() ); |
1215 | storage->save(); | 1215 | storage->save(); |
1216 | } | 1216 | } |
1217 | } | 1217 | } |
1218 | setModified( true ); | 1218 | setModified( true ); |
1219 | } | 1219 | } |
1220 | delete storage; | 1220 | delete storage; |
1221 | delete calendar; | 1221 | delete calendar; |
1222 | if ( syncOK ) | 1222 | if ( syncOK ) |
1223 | updateView(); | 1223 | updateView(); |
1224 | return syncOK; | 1224 | return syncOK; |
1225 | } | 1225 | } |
1226 | 1226 | ||
1227 | void CalendarView::syncExternal( int mode ) | 1227 | void CalendarView::syncExternal( int mode ) |
1228 | { | 1228 | { |
1229 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 1229 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
1230 | 1230 | ||
1231 | qApp->processEvents(); | 1231 | qApp->processEvents(); |
1232 | CalendarLocal* calendar = new CalendarLocal(); | 1232 | CalendarLocal* calendar = new CalendarLocal(); |
1233 | calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 1233 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1234 | bool syncOK = false; | 1234 | bool syncOK = false; |
1235 | bool loadSuccess = false; | 1235 | bool loadSuccess = false; |
1236 | PhoneFormat* phoneFormat = 0; | 1236 | PhoneFormat* phoneFormat = 0; |
1237 | emit tempDisableBR(true); | 1237 | emit tempDisableBR(true); |
1238 | #ifndef DESKTOP_VERSION | 1238 | #ifndef DESKTOP_VERSION |
1239 | SharpFormat* sharpFormat = 0; | 1239 | SharpFormat* sharpFormat = 0; |
1240 | if ( mode == 0 ) { // sharp | 1240 | if ( mode == 0 ) { // sharp |
1241 | sharpFormat = new SharpFormat () ; | 1241 | sharpFormat = new SharpFormat () ; |
1242 | loadSuccess = sharpFormat->load( calendar, mCalendar ); | 1242 | loadSuccess = sharpFormat->load( calendar, mCalendar ); |
1243 | 1243 | ||
1244 | } else | 1244 | } else |
1245 | #endif | 1245 | #endif |
1246 | if ( mode == 1 ) { // phone | 1246 | if ( mode == 1 ) { // phone |
1247 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, | 1247 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, |
1248 | mSyncManager->mPhoneDevice, | 1248 | mSyncManager->mPhoneDevice, |
1249 | mSyncManager->mPhoneConnection, | 1249 | mSyncManager->mPhoneConnection, |
1250 | mSyncManager->mPhoneModel); | 1250 | mSyncManager->mPhoneModel); |
1251 | loadSuccess = phoneFormat->load( calendar,mCalendar); | 1251 | loadSuccess = phoneFormat->load( calendar,mCalendar); |
1252 | 1252 | ||
1253 | } else { | 1253 | } else { |
1254 | emit tempDisableBR(false); | 1254 | emit tempDisableBR(false); |
1255 | return; | 1255 | return; |
1256 | } | 1256 | } |
1257 | if ( loadSuccess ) { | 1257 | if ( loadSuccess ) { |
@@ -1477,49 +1477,49 @@ bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a | |||
1477 | return true; | 1477 | return true; |
1478 | 1478 | ||
1479 | } | 1479 | } |
1480 | bool CalendarView::importQtopia( const QString &categories, | 1480 | bool CalendarView::importQtopia( const QString &categories, |
1481 | const QString &datebook, | 1481 | const QString &datebook, |
1482 | const QString &todolist ) | 1482 | const QString &todolist ) |
1483 | { | 1483 | { |
1484 | 1484 | ||
1485 | QtopiaFormat qtopiaFormat; | 1485 | QtopiaFormat qtopiaFormat; |
1486 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1486 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1487 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 1487 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
1488 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 1488 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
1489 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 1489 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |
1490 | 1490 | ||
1491 | updateView(); | 1491 | updateView(); |
1492 | return true; | 1492 | return true; |
1493 | 1493 | ||
1494 | #if 0 | 1494 | #if 0 |
1495 | mGlobalSyncMode = SYNC_MODE_QTOPIA; | 1495 | mGlobalSyncMode = SYNC_MODE_QTOPIA; |
1496 | mCurrentSyncDevice = "qtopia-XML"; | 1496 | mCurrentSyncDevice = "qtopia-XML"; |
1497 | if ( mSyncManager->mAskForPreferences ) | 1497 | if ( mSyncManager->mAskForPreferences ) |
1498 | edit_sync_options(); | 1498 | edit_sync_options(); |
1499 | qApp->processEvents(); | 1499 | qApp->processEvents(); |
1500 | CalendarLocal* calendar = new CalendarLocal(); | 1500 | CalendarLocal* calendar = new CalendarLocal(); |
1501 | calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 1501 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1502 | bool syncOK = false; | 1502 | bool syncOK = false; |
1503 | QtopiaFormat qtopiaFormat; | 1503 | QtopiaFormat qtopiaFormat; |
1504 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1504 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1505 | bool loadOk = true; | 1505 | bool loadOk = true; |
1506 | if ( !categories.isEmpty() ) | 1506 | if ( !categories.isEmpty() ) |
1507 | loadOk = qtopiaFormat.load( calendar, categories ); | 1507 | loadOk = qtopiaFormat.load( calendar, categories ); |
1508 | if ( loadOk && !datebook.isEmpty() ) | 1508 | if ( loadOk && !datebook.isEmpty() ) |
1509 | loadOk = qtopiaFormat.load( calendar, datebook ); | 1509 | loadOk = qtopiaFormat.load( calendar, datebook ); |
1510 | if ( loadOk && !todolist.isEmpty() ) | 1510 | if ( loadOk && !todolist.isEmpty() ) |
1511 | loadOk = qtopiaFormat.load( calendar, todolist ); | 1511 | loadOk = qtopiaFormat.load( calendar, todolist ); |
1512 | 1512 | ||
1513 | if ( loadOk ) { | 1513 | if ( loadOk ) { |
1514 | getEventViewerDialog()->setSyncMode( true ); | 1514 | getEventViewerDialog()->setSyncMode( true ); |
1515 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 1515 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
1516 | getEventViewerDialog()->setSyncMode( false ); | 1516 | getEventViewerDialog()->setSyncMode( false ); |
1517 | qApp->processEvents(); | 1517 | qApp->processEvents(); |
1518 | if ( syncOK ) { | 1518 | if ( syncOK ) { |
1519 | if ( mSyncManager->mWriteBackFile ) | 1519 | if ( mSyncManager->mWriteBackFile ) |
1520 | { | 1520 | { |
1521 | // write back XML file | 1521 | // write back XML file |
1522 | 1522 | ||
1523 | } | 1523 | } |
1524 | setModified( true ); | 1524 | setModified( true ); |
1525 | } | 1525 | } |
@@ -1980,60 +1980,60 @@ void CalendarView::goPrevious() | |||
1980 | void CalendarView::goNextMonth() | 1980 | void CalendarView::goNextMonth() |
1981 | { | 1981 | { |
1982 | mNavigator->selectNextMonth(); | 1982 | mNavigator->selectNextMonth(); |
1983 | } | 1983 | } |
1984 | 1984 | ||
1985 | void CalendarView::goPreviousMonth() | 1985 | void CalendarView::goPreviousMonth() |
1986 | { | 1986 | { |
1987 | mNavigator->selectPreviousMonth(); | 1987 | mNavigator->selectPreviousMonth(); |
1988 | } | 1988 | } |
1989 | void CalendarView::writeLocale() | 1989 | void CalendarView::writeLocale() |
1990 | { | 1990 | { |
1991 | //KPimGlobalPrefs::instance()->setGlobalConfig(); | 1991 | //KPimGlobalPrefs::instance()->setGlobalConfig(); |
1992 | #if 0 | 1992 | #if 0 |
1993 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); | 1993 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); |
1994 | KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); | 1994 | KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); |
1995 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); | 1995 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); |
1996 | KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); | 1996 | KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); |
1997 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 1997 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
1998 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 1998 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
1999 | dummy = KOPrefs::instance()->mUserDateFormatShort; | 1999 | dummy = KOPrefs::instance()->mUserDateFormatShort; |
2000 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 2000 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
2001 | KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, | 2001 | KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, |
2002 | KOPrefs::instance()->mDaylightsavingStart, | 2002 | KOPrefs::instance()->mDaylightsavingStart, |
2003 | KOPrefs::instance()->mDaylightsavingEnd ); | 2003 | KOPrefs::instance()->mDaylightsavingEnd ); |
2004 | KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); | 2004 | KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId ); |
2005 | #endif | 2005 | #endif |
2006 | } | 2006 | } |
2007 | void CalendarView::updateConfig() | 2007 | void CalendarView::updateConfig() |
2008 | { | 2008 | { |
2009 | writeLocale(); | 2009 | writeLocale(); |
2010 | if ( KOPrefs::instance()->mUseAppColors ) | 2010 | if ( KOPrefs::instance()->mUseAppColors ) |
2011 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 2011 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
2012 | emit configChanged(); | 2012 | emit configChanged(); |
2013 | mTodoList->updateConfig(); | 2013 | mTodoList->updateConfig(); |
2014 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); | 2014 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); |
2015 | mCalendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 2015 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2016 | // To make the "fill window" configurations work | 2016 | // To make the "fill window" configurations work |
2017 | //mViewManager->raiseCurrentView(); | 2017 | //mViewManager->raiseCurrentView(); |
2018 | } | 2018 | } |
2019 | 2019 | ||
2020 | 2020 | ||
2021 | void CalendarView::eventChanged(Event *event) | 2021 | void CalendarView::eventChanged(Event *event) |
2022 | { | 2022 | { |
2023 | changeEventDisplay(event,KOGlobals::EVENTEDITED); | 2023 | changeEventDisplay(event,KOGlobals::EVENTEDITED); |
2024 | //updateUnmanagedViews(); | 2024 | //updateUnmanagedViews(); |
2025 | } | 2025 | } |
2026 | 2026 | ||
2027 | void CalendarView::eventAdded(Event *event) | 2027 | void CalendarView::eventAdded(Event *event) |
2028 | { | 2028 | { |
2029 | changeEventDisplay(event,KOGlobals::EVENTADDED); | 2029 | changeEventDisplay(event,KOGlobals::EVENTADDED); |
2030 | } | 2030 | } |
2031 | 2031 | ||
2032 | void CalendarView::eventToBeDeleted(Event *) | 2032 | void CalendarView::eventToBeDeleted(Event *) |
2033 | { | 2033 | { |
2034 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; | 2034 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; |
2035 | } | 2035 | } |
2036 | 2036 | ||
2037 | void CalendarView::eventDeleted() | 2037 | void CalendarView::eventDeleted() |
2038 | { | 2038 | { |
2039 | changeEventDisplay(0,KOGlobals::EVENTDELETED); | 2039 | changeEventDisplay(0,KOGlobals::EVENTDELETED); |
@@ -2299,49 +2299,49 @@ void CalendarView::beamCalendar() | |||
2299 | } | 2299 | } |
2300 | void CalendarView::beamFilteredCalendar() | 2300 | void CalendarView::beamFilteredCalendar() |
2301 | { | 2301 | { |
2302 | QPtrList<Incidence> delSel = mCalendar->incidences(); | 2302 | QPtrList<Incidence> delSel = mCalendar->incidences(); |
2303 | //qDebug("beamFilteredCalendar() "); | 2303 | //qDebug("beamFilteredCalendar() "); |
2304 | beamIncidenceList( delSel ); | 2304 | beamIncidenceList( delSel ); |
2305 | } | 2305 | } |
2306 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) | 2306 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) |
2307 | { | 2307 | { |
2308 | if ( beamDialog->exec () == QDialog::Rejected ) | 2308 | if ( beamDialog->exec () == QDialog::Rejected ) |
2309 | return; | 2309 | return; |
2310 | #ifdef DESKTOP_VERSION | 2310 | #ifdef DESKTOP_VERSION |
2311 | QString fn = locateLocal( "tmp", "kopibeamfile" ); | 2311 | QString fn = locateLocal( "tmp", "kopibeamfile" ); |
2312 | #else | 2312 | #else |
2313 | QString fn = "/tmp/kopibeamfile"; | 2313 | QString fn = "/tmp/kopibeamfile"; |
2314 | #endif | 2314 | #endif |
2315 | QString mes; | 2315 | QString mes; |
2316 | bool createbup = true; | 2316 | bool createbup = true; |
2317 | if ( createbup ) { | 2317 | if ( createbup ) { |
2318 | QString description = "\n"; | 2318 | QString description = "\n"; |
2319 | CalendarLocal* cal = new CalendarLocal(); | 2319 | CalendarLocal* cal = new CalendarLocal(); |
2320 | if ( beamDialog->beamLocal() ) | 2320 | if ( beamDialog->beamLocal() ) |
2321 | cal->setLocalTime(); | 2321 | cal->setLocalTime(); |
2322 | else | 2322 | else |
2323 | cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 2323 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2324 | Incidence *incidence = delSel.first(); | 2324 | Incidence *incidence = delSel.first(); |
2325 | bool addText = false; | 2325 | bool addText = false; |
2326 | if ( delSel.count() < 10 ) | 2326 | if ( delSel.count() < 10 ) |
2327 | addText = true; | 2327 | addText = true; |
2328 | else { | 2328 | else { |
2329 | description.sprintf(i18n(" %d items?"),delSel.count() ); | 2329 | description.sprintf(i18n(" %d items?"),delSel.count() ); |
2330 | } | 2330 | } |
2331 | while ( incidence ) { | 2331 | while ( incidence ) { |
2332 | Incidence *in = incidence->clone(); | 2332 | Incidence *in = incidence->clone(); |
2333 | if ( ! in->summary().isEmpty() ) { | 2333 | if ( ! in->summary().isEmpty() ) { |
2334 | in->setDescription(""); | 2334 | in->setDescription(""); |
2335 | } else { | 2335 | } else { |
2336 | in->setSummary( in->description().left(20)); | 2336 | in->setSummary( in->description().left(20)); |
2337 | in->setDescription(""); | 2337 | in->setDescription(""); |
2338 | } | 2338 | } |
2339 | if ( addText ) | 2339 | if ( addText ) |
2340 | description += in->summary() + "\n"; | 2340 | description += in->summary() + "\n"; |
2341 | cal->addIncidence( in ); | 2341 | cal->addIncidence( in ); |
2342 | incidence = delSel.next(); | 2342 | incidence = delSel.next(); |
2343 | } | 2343 | } |
2344 | if ( beamDialog->beamVcal() ) { | 2344 | if ( beamDialog->beamVcal() ) { |
2345 | fn += ".vcs"; | 2345 | fn += ".vcs"; |
2346 | FileStorage storage( cal, fn, new VCalFormat ); | 2346 | FileStorage storage( cal, fn, new VCalFormat ); |
2347 | storage.save(); | 2347 | storage.save(); |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index bafd349..d3aa650 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -18,48 +18,49 @@ | |||
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlistview.h> | 25 | #include <qlistview.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qfileinfo.h> | 30 | #include <qfileinfo.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qregexp.h> | 35 | #include <qregexp.h> |
36 | 36 | ||
37 | #include <klocale.h> | 37 | #include <klocale.h> |
38 | #include <kdebug.h> | 38 | #include <kdebug.h> |
39 | #include <kiconloader.h> | 39 | #include <kiconloader.h> |
40 | #include <kglobal.h> | 40 | #include <kglobal.h> |
41 | 41 | ||
42 | #include <libkdepim/kpimglobalprefs.h> | ||
42 | #include <libkcal/calendar.h> | 43 | #include <libkcal/calendar.h> |
43 | #include <libkcal/calendarlocal.h> | 44 | #include <libkcal/calendarlocal.h> |
44 | #include <libkcal/icalformat.h> | 45 | #include <libkcal/icalformat.h> |
45 | #include <libkcal/vcalformat.h> | 46 | #include <libkcal/vcalformat.h> |
46 | #include <libkcal/recurrence.h> | 47 | #include <libkcal/recurrence.h> |
47 | #include <libkcal/filestorage.h> | 48 | #include <libkcal/filestorage.h> |
48 | #include <libkdepim/categoryselectdialog.h> | 49 | #include <libkdepim/categoryselectdialog.h> |
49 | #ifndef DESKTOP_VERSION | 50 | #ifndef DESKTOP_VERSION |
50 | #include <qpe/qpeapplication.h> | 51 | #include <qpe/qpeapplication.h> |
51 | #else | 52 | #else |
52 | #include <qapplication.h> | 53 | #include <qapplication.h> |
53 | #endif | 54 | #endif |
54 | 55 | ||
55 | #ifndef KORG_NOPRINTER | 56 | #ifndef KORG_NOPRINTER |
56 | #include "calprinter.h" | 57 | #include "calprinter.h" |
57 | #endif | 58 | #endif |
58 | #include "koglobals.h" | 59 | #include "koglobals.h" |
59 | #include "koprefs.h" | 60 | #include "koprefs.h" |
60 | #include "kfiledialog.h" | 61 | #include "kfiledialog.h" |
61 | 62 | ||
62 | #include "kolistview.h" | 63 | #include "kolistview.h" |
63 | 64 | ||
64 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 65 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
65 | { | 66 | { |
@@ -356,49 +357,49 @@ void KOListView::setCategories( bool removeOld ) | |||
356 | 357 | ||
357 | void KOListView::beamSelected() | 358 | void KOListView::beamSelected() |
358 | { | 359 | { |
359 | int icount = 0; | 360 | int icount = 0; |
360 | QPtrList<Incidence> delSel ; | 361 | QPtrList<Incidence> delSel ; |
361 | QListViewItem *item = mListView->firstChild (); | 362 | QListViewItem *item = mListView->firstChild (); |
362 | while ( item ) { | 363 | while ( item ) { |
363 | if ( item->isSelected() ) { | 364 | if ( item->isSelected() ) { |
364 | delSel.append(((KOListViewItem *)item)->data()); | 365 | delSel.append(((KOListViewItem *)item)->data()); |
365 | ++icount; | 366 | ++icount; |
366 | } | 367 | } |
367 | 368 | ||
368 | item = item->nextSibling(); | 369 | item = item->nextSibling(); |
369 | } | 370 | } |
370 | if ( icount ) { | 371 | if ( icount ) { |
371 | emit beamIncidenceList( delSel ); | 372 | emit beamIncidenceList( delSel ); |
372 | return; | 373 | return; |
373 | QString fn ; | 374 | QString fn ; |
374 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; | 375 | fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; |
375 | QString mes; | 376 | QString mes; |
376 | bool createbup = true; | 377 | bool createbup = true; |
377 | if ( createbup ) { | 378 | if ( createbup ) { |
378 | QString description = "\n"; | 379 | QString description = "\n"; |
379 | CalendarLocal* cal = new CalendarLocal(); | 380 | CalendarLocal* cal = new CalendarLocal(); |
380 | cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 381 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
381 | Incidence *incidence = delSel.first(); | 382 | Incidence *incidence = delSel.first(); |
382 | while ( incidence ) { | 383 | while ( incidence ) { |
383 | Incidence *in = incidence->clone(); | 384 | Incidence *in = incidence->clone(); |
384 | description += in->summary() + "\n"; | 385 | description += in->summary() + "\n"; |
385 | cal->addIncidence( in ); | 386 | cal->addIncidence( in ); |
386 | incidence = delSel.next(); | 387 | incidence = delSel.next(); |
387 | } | 388 | } |
388 | FileStorage storage( cal, fn, new VCalFormat ); | 389 | FileStorage storage( cal, fn, new VCalFormat ); |
389 | storage.save(); | 390 | storage.save(); |
390 | delete cal; | 391 | delete cal; |
391 | mes = i18n("KO/Pi: Ready for beaming"); | 392 | mes = i18n("KO/Pi: Ready for beaming"); |
392 | topLevelWidget()->setCaption(mes); | 393 | topLevelWidget()->setCaption(mes); |
393 | 394 | ||
394 | #ifndef DESKTOP_VERSION | 395 | #ifndef DESKTOP_VERSION |
395 | Ir *ir = new Ir( this ); | 396 | Ir *ir = new Ir( this ); |
396 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 397 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
397 | ir->send( fn, description, "text/x-vCalendar" ); | 398 | ir->send( fn, description, "text/x-vCalendar" ); |
398 | #endif | 399 | #endif |
399 | } | 400 | } |
400 | } | 401 | } |
401 | } | 402 | } |
402 | void KOListView::beamDone( Ir *ir ) | 403 | void KOListView::beamDone( Ir *ir ) |
403 | { | 404 | { |
404 | #ifndef DESKTOP_VERSION | 405 | #ifndef DESKTOP_VERSION |
@@ -507,49 +508,49 @@ void KOListView::saveToFile() | |||
507 | 508 | ||
508 | item = item->nextSibling(); | 509 | item = item->nextSibling(); |
509 | } | 510 | } |
510 | if ( icount ) { | 511 | if ( icount ) { |
511 | QString fn = KOPrefs::instance()->mLastSaveFile; | 512 | QString fn = KOPrefs::instance()->mLastSaveFile; |
512 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); | 513 | fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); |
513 | 514 | ||
514 | if ( fn == "" ) | 515 | if ( fn == "" ) |
515 | return; | 516 | return; |
516 | QFileInfo info; | 517 | QFileInfo info; |
517 | info.setFile( fn ); | 518 | info.setFile( fn ); |
518 | QString mes; | 519 | QString mes; |
519 | bool createbup = true; | 520 | bool createbup = true; |
520 | if ( info. exists() ) { | 521 | if ( info. exists() ) { |
521 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 522 | mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
522 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 523 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
523 | i18n("Overwrite!"), i18n("Cancel"), 0, | 524 | i18n("Overwrite!"), i18n("Cancel"), 0, |
524 | 0, 1 ); | 525 | 0, 1 ); |
525 | if ( result != 0 ) { | 526 | if ( result != 0 ) { |
526 | createbup = false; | 527 | createbup = false; |
527 | } | 528 | } |
528 | } | 529 | } |
529 | if ( createbup ) { | 530 | if ( createbup ) { |
530 | CalendarLocal cal; | 531 | CalendarLocal cal; |
531 | cal.setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 532 | cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
532 | Incidence *incidence = delSel.first(); | 533 | Incidence *incidence = delSel.first(); |
533 | while ( incidence ) { | 534 | while ( incidence ) { |
534 | cal.addIncidence( incidence->clone() ); | 535 | cal.addIncidence( incidence->clone() ); |
535 | incidence = delSel.next(); | 536 | incidence = delSel.next(); |
536 | } | 537 | } |
537 | ICalFormat format; | 538 | ICalFormat format; |
538 | format.save( &cal, fn ); | 539 | format.save( &cal, fn ); |
539 | mes = i18n("KO/Pi:Saved %1").arg(fn ); | 540 | mes = i18n("KO/Pi:Saved %1").arg(fn ); |
540 | KOPrefs::instance()->mLastSaveFile = fn; | 541 | KOPrefs::instance()->mLastSaveFile = fn; |
541 | topLevelWidget()->setCaption(mes); | 542 | topLevelWidget()->setCaption(mes); |
542 | } | 543 | } |
543 | } | 544 | } |
544 | } | 545 | } |
545 | void KOListView::deleteAll() | 546 | void KOListView::deleteAll() |
546 | { | 547 | { |
547 | int icount = 0; | 548 | int icount = 0; |
548 | QPtrList<Incidence> delSel ; | 549 | QPtrList<Incidence> delSel ; |
549 | QListViewItem *item = mListView->firstChild (); | 550 | QListViewItem *item = mListView->firstChild (); |
550 | while ( item ) { | 551 | while ( item ) { |
551 | if ( item->isSelected() ) { | 552 | if ( item->isSelected() ) { |
552 | delSel.append(((KOListViewItem *)item)->data()); | 553 | delSel.append(((KOListViewItem *)item)->data()); |
553 | ++icount; | 554 | ++icount; |
554 | } | 555 | } |
555 | 556 | ||
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 258f738..ba1c6d1 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -122,60 +122,52 @@ KOPrefs::KOPrefs() : | |||
122 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); | 122 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); |
123 | 123 | ||
124 | addItemStringList("LocationDefaults",&mLocationDefaults ); | 124 | addItemStringList("LocationDefaults",&mLocationDefaults ); |
125 | addItemStringList("EventSummary User",&mEventSummaryUser); | 125 | addItemStringList("EventSummary User",&mEventSummaryUser); |
126 | addItemStringList("TodoSummary User",&mTodoSummaryUser); | 126 | addItemStringList("TodoSummary User",&mTodoSummaryUser); |
127 | 127 | ||
128 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 128 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
129 | addItemBool("Enable Project View",&mEnableProjectView,false); | 129 | addItemBool("Enable Project View",&mEnableProjectView,false); |
130 | addItemBool("Auto Save",&mAutoSave,false); | 130 | addItemBool("Auto Save",&mAutoSave,false); |
131 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); | 131 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); |
132 | addItemBool("Confirm Deletes",&mConfirm,true); | 132 | addItemBool("Confirm Deletes",&mConfirm,true); |
133 | addItemString("Archive File",&mArchiveFile); | 133 | addItemString("Archive File",&mArchiveFile); |
134 | addItemString("Html Export File",&mHtmlExportFile, | 134 | addItemString("Html Export File",&mHtmlExportFile, |
135 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 135 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
136 | addItemBool("Html With Save",&mHtmlWithSave,false); | 136 | addItemBool("Html With Save",&mHtmlWithSave,false); |
137 | 137 | ||
138 | KPrefs::setCurrentGroup("Personal Settings"); | 138 | KPrefs::setCurrentGroup("Personal Settings"); |
139 | 139 | ||
140 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 140 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
141 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 141 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
142 | addItemBool("Bcc",&mBcc,false); | 142 | addItemBool("Bcc",&mBcc,false); |
143 | 143 | ||
144 | KPrefs::setCurrentGroup("Time & Date"); | 144 | KPrefs::setCurrentGroup("Time & Date"); |
145 | 145 | ||
146 | // addItemString("Time Zone",&mTimeZone,"+0100"); | ||
147 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); | ||
148 | // addItemInt("TimeZoneOffset",&mTimeZoneOffset,60); | ||
149 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | ||
150 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | ||
151 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | ||
152 | |||
153 | 146 | ||
154 | addItemInt("Default Start Time",&mStartTime,10); | 147 | addItemInt("Default Start Time",&mStartTime,10); |
155 | addItemInt("Default Duration",&mDefaultDuration,2); | 148 | addItemInt("Default Duration",&mDefaultDuration,2); |
156 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 149 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
157 | addItemInt("Daylight Savings",&mDaylightSavings,0); | ||
158 | KPrefs::setCurrentGroup("AlarmSettings"); | 150 | KPrefs::setCurrentGroup("AlarmSettings"); |
159 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 151 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
160 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 152 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
161 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 153 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
162 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 154 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
163 | 155 | ||
164 | 156 | ||
165 | KPrefs::setCurrentGroup("Calendar"); | 157 | KPrefs::setCurrentGroup("Calendar"); |
166 | 158 | ||
167 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 159 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
168 | 160 | ||
169 | KPrefs::setCurrentGroup("Fonts"); | 161 | KPrefs::setCurrentGroup("Fonts"); |
170 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 162 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
171 | addItemFont("TimeBar Font",&mTimeBarFont); | 163 | addItemFont("TimeBar Font",&mTimeBarFont); |
172 | addItemFont("MonthView Font",&mMonthViewFont); | 164 | addItemFont("MonthView Font",&mMonthViewFont); |
173 | addItemFont("AgendaView Font",&mAgendaViewFont); | 165 | addItemFont("AgendaView Font",&mAgendaViewFont); |
174 | addItemFont("MarcusBains Font",&mMarcusBainsFont); | 166 | addItemFont("MarcusBains Font",&mMarcusBainsFont); |
175 | addItemFont("TimeLabels Font",&mTimeLabelsFont); | 167 | addItemFont("TimeLabels Font",&mTimeLabelsFont); |
176 | addItemFont("TodoView Font",&mTodoViewFont); | 168 | addItemFont("TodoView Font",&mTodoViewFont); |
177 | addItemFont("ListView Font",&mListViewFont); | 169 | addItemFont("ListView Font",&mListViewFont); |
178 | addItemFont("DateNavigator Font",&mDateNavigatorFont); | 170 | addItemFont("DateNavigator Font",&mDateNavigatorFont); |
179 | addItemFont("EditBox Font",&mEditBoxFont); | 171 | addItemFont("EditBox Font",&mEditBoxFont); |
180 | addItemFont("JournalView Font",&mJornalViewFont); | 172 | addItemFont("JournalView Font",&mJornalViewFont); |
181 | addItemFont("WhatsNextView Font",&mWhatsNextFont); | 173 | addItemFont("WhatsNextView Font",&mWhatsNextFont); |
@@ -333,49 +325,49 @@ KOPrefs::~KOPrefs() | |||
333 | 325 | ||
334 | KOPrefs *KOPrefs::instance() | 326 | KOPrefs *KOPrefs::instance() |
335 | { | 327 | { |
336 | if (!mInstance) { | 328 | if (!mInstance) { |
337 | mInstance = insd.setObject(new KOPrefs()); | 329 | mInstance = insd.setObject(new KOPrefs()); |
338 | mInstance->readConfig(); | 330 | mInstance->readConfig(); |
339 | } | 331 | } |
340 | 332 | ||
341 | return mInstance; | 333 | return mInstance; |
342 | } | 334 | } |
343 | 335 | ||
344 | void KOPrefs::usrSetDefaults() | 336 | void KOPrefs::usrSetDefaults() |
345 | { | 337 | { |
346 | 338 | ||
347 | } | 339 | } |
348 | 340 | ||
349 | void KOPrefs::fillMailDefaults() | 341 | void KOPrefs::fillMailDefaults() |
350 | { | 342 | { |
351 | if (mName.isEmpty()) mName = i18n("Anonymous"); | 343 | if (mName.isEmpty()) mName = i18n("Anonymous"); |
352 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); | 344 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); |
353 | } | 345 | } |
354 | 346 | ||
355 | void KOPrefs::setTimeZoneIdDefault() | 347 | void KOPrefs::setTimeZoneIdDefault() |
356 | { | 348 | { |
357 | mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)"); | 349 | ; |
358 | } | 350 | } |
359 | 351 | ||
360 | void KOPrefs::setCategoryDefaults() | 352 | void KOPrefs::setCategoryDefaults() |
361 | { | 353 | { |
362 | mCustomCategories.clear(); | 354 | mCustomCategories.clear(); |
363 | mCustomCategories = getDefaultList(); | 355 | mCustomCategories = getDefaultList(); |
364 | 356 | ||
365 | QStringList::Iterator it; | 357 | QStringList::Iterator it; |
366 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 358 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
367 | setCategoryColor(*it,mDefaultCategoryColor); | 359 | setCategoryColor(*it,mDefaultCategoryColor); |
368 | } | 360 | } |
369 | } | 361 | } |
370 | 362 | ||
371 | QStringList KOPrefs::getDefaultList() | 363 | QStringList KOPrefs::getDefaultList() |
372 | { | 364 | { |
373 | QStringList retval ; | 365 | QStringList retval ; |
374 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") | 366 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") |
375 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") | 367 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") |
376 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") | 368 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") |
377 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") | 369 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") |
378 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") | 370 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") |
379 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") | 371 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") |
380 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") | 372 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") |
381 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; | 373 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; |
@@ -466,52 +458,49 @@ void KOPrefs::usrReadConfig() | |||
466 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 458 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
467 | mLocationDefaults.sort(); | 459 | mLocationDefaults.sort(); |
468 | } | 460 | } |
469 | 461 | ||
470 | if (mEventSummaryUser.isEmpty()) { | 462 | if (mEventSummaryUser.isEmpty()) { |
471 | mEventSummaryUser = getDefaultList() ; | 463 | mEventSummaryUser = getDefaultList() ; |
472 | } | 464 | } |
473 | if (mTodoSummaryUser.isEmpty()) { | 465 | if (mTodoSummaryUser.isEmpty()) { |
474 | mTodoSummaryUser = getDefaultList() ; | 466 | mTodoSummaryUser = getDefaultList() ; |
475 | } | 467 | } |
476 | 468 | ||
477 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 469 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
478 | 470 | ||
479 | config()->setGroup("Personal Settings"); | 471 | config()->setGroup("Personal Settings"); |
480 | mName = config()->readEntry("user_name",""); | 472 | mName = config()->readEntry("user_name",""); |
481 | mEmail = config()->readEntry("user_email",""); | 473 | mEmail = config()->readEntry("user_email",""); |
482 | fillMailDefaults(); | 474 | fillMailDefaults(); |
483 | 475 | ||
484 | config()->setGroup("Category Colors"); | 476 | config()->setGroup("Category Colors"); |
485 | QStringList::Iterator it; | 477 | QStringList::Iterator it; |
486 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 478 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
487 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 479 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
488 | 480 | ||
489 | } | 481 | } |
490 | 482 | ||
491 | if (mTimeZoneId.isEmpty()) { | ||
492 | setTimeZoneIdDefault(); | ||
493 | } | ||
494 | KPimPrefs::usrReadConfig(); | 483 | KPimPrefs::usrReadConfig(); |
495 | } | 484 | } |
496 | 485 | ||
497 | 486 | ||
498 | void KOPrefs::usrWriteConfig() | 487 | void KOPrefs::usrWriteConfig() |
499 | { | 488 | { |
500 | config()->setGroup("General"); | 489 | config()->setGroup("General"); |
501 | config()->writeEntry("Custom Categories",mCustomCategories); | 490 | config()->writeEntry("Custom Categories",mCustomCategories); |
502 | 491 | ||
503 | config()->setGroup("Personal Settings"); | 492 | config()->setGroup("Personal Settings"); |
504 | config()->writeEntry("user_name",mName); | 493 | config()->writeEntry("user_name",mName); |
505 | config()->writeEntry("user_email",mEmail); | 494 | config()->writeEntry("user_email",mEmail); |
506 | 495 | ||
507 | config()->setGroup("Category Colors"); | 496 | config()->setGroup("Category Colors"); |
508 | QDictIterator<QColor> it(mCategoryColors); | 497 | QDictIterator<QColor> it(mCategoryColors); |
509 | while (it.current()) { | 498 | while (it.current()) { |
510 | config()->writeEntry(it.currentKey(),*(it.current())); | 499 | config()->writeEntry(it.currentKey(),*(it.current())); |
511 | ++it; | 500 | ++it; |
512 | } | 501 | } |
513 | 502 | ||
514 | 503 | ||
515 | KPimPrefs::usrWriteConfig(); | 504 | KPimPrefs::usrWriteConfig(); |
516 | } | 505 | } |
517 | 506 | ||
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 03df59b..c74b0ef 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -74,55 +74,51 @@ class KOPrefs : public KPimPrefs | |||
74 | QStringList getDefaultList(); | 74 | QStringList getDefaultList(); |
75 | public: | 75 | public: |
76 | // preferences data | 76 | // preferences data |
77 | KConfig* getConfig(); | 77 | KConfig* getConfig(); |
78 | void setFullName(const QString &); | 78 | void setFullName(const QString &); |
79 | QString fullName(); | 79 | QString fullName(); |
80 | void setEmail(const QString &); | 80 | void setEmail(const QString &); |
81 | QString email(); | 81 | QString email(); |
82 | 82 | ||
83 | QString mAdditional; | 83 | QString mAdditional; |
84 | 84 | ||
85 | bool mEmailControlCenter; | 85 | bool mEmailControlCenter; |
86 | 86 | ||
87 | bool mBcc; | 87 | bool mBcc; |
88 | bool mAutoSave; | 88 | bool mAutoSave; |
89 | int mAutoSaveInterval; | 89 | int mAutoSaveInterval; |
90 | bool mConfirm; | 90 | bool mConfirm; |
91 | 91 | ||
92 | bool mEnableGroupScheduling; | 92 | bool mEnableGroupScheduling; |
93 | bool mEnableProjectView; | 93 | bool mEnableProjectView; |
94 | 94 | ||
95 | int mDefaultFormat; | 95 | int mDefaultFormat; |
96 | int mMailClient; | 96 | int mMailClient; |
97 | 97 | ||
98 | QString mTimeZone; | ||
99 | //QString mTimeZoneName; // e.g. +00:04:00 Indian/Mauritius | ||
100 | //int mTimeZoneOffset; // e.g. -240 min | ||
101 | int mStartTime; | 98 | int mStartTime; |
102 | int mDefaultDuration; | 99 | int mDefaultDuration; |
103 | int mAlarmTime; | 100 | int mAlarmTime; |
104 | int mDaylightSavings; | ||
105 | 101 | ||
106 | int mWorkingHoursStart; | 102 | int mWorkingHoursStart; |
107 | int mWorkingHoursEnd; | 103 | int mWorkingHoursEnd; |
108 | bool mExcludeHolidays; | 104 | bool mExcludeHolidays; |
109 | bool mExcludeSaturdays; | 105 | bool mExcludeSaturdays; |
110 | bool mMarcusBainsShowSeconds; | 106 | bool mMarcusBainsShowSeconds; |
111 | 107 | ||
112 | QFont mTimeBarFont; | 108 | QFont mTimeBarFont; |
113 | QFont mMonthViewFont; | 109 | QFont mMonthViewFont; |
114 | QFont mAgendaViewFont; | 110 | QFont mAgendaViewFont; |
115 | QFont mMarcusBainsFont; | 111 | QFont mMarcusBainsFont; |
116 | QFont mTimeLabelsFont; | 112 | QFont mTimeLabelsFont; |
117 | QFont mTodoViewFont; | 113 | QFont mTodoViewFont; |
118 | QFont mListViewFont; | 114 | QFont mListViewFont; |
119 | QFont mDateNavigatorFont; | 115 | QFont mDateNavigatorFont; |
120 | QFont mEditBoxFont; | 116 | QFont mEditBoxFont; |
121 | QFont mJornalViewFont; | 117 | QFont mJornalViewFont; |
122 | QFont mWhatsNextFont; | 118 | QFont mWhatsNextFont; |
123 | QFont mEventViewFont; | 119 | QFont mEventViewFont; |
124 | 120 | ||
125 | 121 | ||
126 | 122 | ||
127 | 123 | ||
128 | QColor mHolidayColor; | 124 | QColor mHolidayColor; |
@@ -250,43 +246,38 @@ class KOPrefs : public KPimPrefs | |||
250 | 246 | ||
251 | QStringList mLocationDefaults; | 247 | QStringList mLocationDefaults; |
252 | QStringList mEventSummaryUser; | 248 | QStringList mEventSummaryUser; |
253 | QStringList mTodoSummaryUser; | 249 | QStringList mTodoSummaryUser; |
254 | 250 | ||
255 | bool mUseInternalAlarmNotification; | 251 | bool mUseInternalAlarmNotification; |
256 | int mAlarmPlayBeeps; | 252 | int mAlarmPlayBeeps; |
257 | int mAlarmSuspendTime; | 253 | int mAlarmSuspendTime; |
258 | int mAlarmSuspendCount; | 254 | int mAlarmSuspendCount; |
259 | int mAlarmBeepInterval; | 255 | int mAlarmBeepInterval; |
260 | 256 | ||
261 | 257 | ||
262 | QString mActiveSyncPort; | 258 | QString mActiveSyncPort; |
263 | QString mActiveSyncIP; | 259 | QString mActiveSyncIP; |
264 | 260 | ||
265 | 261 | ||
266 | //US I copied the following settings into KPimGlobalPrefs | 262 | //US I copied the following settings into KPimGlobalPrefs |
267 | // that allows us later to easily remove the settings from here. | 263 | // that allows us later to easily remove the settings from here. |
268 | int mPreferredDate; | 264 | int mPreferredDate; |
269 | QString mUserDateFormatLong; | 265 | QString mUserDateFormatLong; |
270 | QString mUserDateFormatShort; | 266 | QString mUserDateFormatShort; |
271 | int mPreferredLanguage; | 267 | int mPreferredLanguage; |
272 | int mPreferredTime; | 268 | int mPreferredTime; |
273 | bool mWeekStartsOnSunday; | 269 | bool mWeekStartsOnSunday; |
274 | QString mTimeZoneId; | ||
275 | bool mUseDaylightsaving; | ||
276 | int mDaylightsavingStart; | ||
277 | int mDaylightsavingEnd; | ||
278 | |||
279 | 270 | ||
280 | private: | 271 | private: |
281 | QDict<QColor> mCategoryColors; | 272 | QDict<QColor> mCategoryColors; |
282 | QColor mDefaultCategoryColor; | 273 | QColor mDefaultCategoryColor; |
283 | 274 | ||
284 | QFont mDefaultTimeBarFont; | 275 | QFont mDefaultTimeBarFont; |
285 | QFont mDefaultViewFont; | 276 | QFont mDefaultViewFont; |
286 | QFont mDefaultMonthViewFont; | 277 | QFont mDefaultMonthViewFont; |
287 | 278 | ||
288 | QString mName; | 279 | QString mName; |
289 | QString mEmail; | 280 | QString mEmail; |
290 | }; | 281 | }; |
291 | 282 | ||
292 | #endif | 283 | #endif |
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 7cd6038..0a580ca 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -36,49 +36,49 @@ $Id$ | |||
36 | 36 | ||
37 | #include <qregexp.h> | 37 | #include <qregexp.h> |
38 | #include "kpimglobalprefs.h" | 38 | #include "kpimglobalprefs.h" |
39 | 39 | ||
40 | KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; | 40 | KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; |
41 | static KStaticDeleter<KPimGlobalPrefs> staticDeleter; | 41 | static KStaticDeleter<KPimGlobalPrefs> staticDeleter; |
42 | 42 | ||
43 | 43 | ||
44 | KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | 44 | KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) |
45 | : KPrefs("microkdeglobalrc") | 45 | : KPrefs("microkdeglobalrc") |
46 | { | 46 | { |
47 | 47 | ||
48 | KPrefs::setCurrentGroup("Locale"); | 48 | KPrefs::setCurrentGroup("Locale"); |
49 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); | 49 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); |
50 | addItemInt("PreferredTime",&mPreferredTime,0); | 50 | addItemInt("PreferredTime",&mPreferredTime,0); |
51 | addItemInt("PreferredDate",&mPreferredDate,0); | 51 | addItemInt("PreferredDate",&mPreferredDate,0); |
52 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); | 52 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); |
53 | //addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false); | 53 | //addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false); |
54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); | 55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); |
56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); | 56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); |
57 | 57 | ||
58 | KPrefs::setCurrentGroup("Time & Date"); | 58 | KPrefs::setCurrentGroup("Time & Date"); |
59 | 59 | ||
60 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); | 60 | addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); |
61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | 61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); |
62 | addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); | 62 | addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); |
63 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | 63 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); |
64 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | 64 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); |
65 | 65 | ||
66 | KPrefs::setCurrentGroup( "ExternalApplications" ); | 66 | KPrefs::setCurrentGroup( "ExternalApplications" ); |
67 | 67 | ||
68 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); | 68 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); |
69 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); | 69 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); |
70 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); | 70 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); |
71 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); | 71 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); |
72 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); | 72 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); |
73 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); | 73 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); |
74 | 74 | ||
75 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); | 75 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); |
76 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); | 76 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); |
77 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); | 77 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); |
78 | addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); | 78 | addItemString( "PhoneChannelParameters", &mPhoneOtherMessageParameters, "" ); |
79 | 79 | ||
80 | addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); | 80 | addItemInt( "FaxChannelType", &mFaxClient, NONE_FAC ); |
81 | addItemString( "FaxChannel", &mFaxOtherChannel, "" ); | 81 | addItemString( "FaxChannel", &mFaxOtherChannel, "" ); |
82 | addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); | 82 | addItemString( "FaxChannelMessage", &mFaxOtherMessage, "" ); |
83 | addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); | 83 | addItemString( "FaxChannelParameters", &mFaxOtherMessageParameters, "" ); |
84 | 84 | ||
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 21e6937..d3b04dc 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp | |||
@@ -110,73 +110,73 @@ static int readInt(const QString &str, uint &pos) | |||
110 | result += str.at(pos).digitValue(); | 110 | result += str.at(pos).digitValue(); |
111 | } | 111 | } |
112 | 112 | ||
113 | return result; | 113 | return result; |
114 | } | 114 | } |
115 | 115 | ||
116 | KLocale::KLocale() : mCalendarSystem( 0 ) | 116 | KLocale::KLocale() : mCalendarSystem( 0 ) |
117 | { | 117 | { |
118 | 118 | ||
119 | m_decimalSymbol = "."; | 119 | m_decimalSymbol = "."; |
120 | m_positiveSign = ""; | 120 | m_positiveSign = ""; |
121 | m_negativeSign = "-"; | 121 | m_negativeSign = "-"; |
122 | m_thousandsSeparator = ","; | 122 | m_thousandsSeparator = ","; |
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | ||
127 | mWeekStartsMonday = true; | 127 | mWeekStartsMonday = true; |
128 | mHourF24Format = true; | 128 | mHourF24Format = true; |
129 | mIntDateFormat = Default; | 129 | mIntDateFormat = Default; |
130 | mIntTimeFormat = Default; | 130 | mIntTimeFormat = Default; |
131 | mLanguage = 0; | 131 | mLanguage = 0; |
132 | mDateFormat = "%a %Y %b %d"; | 132 | mDateFormat = "%a %Y %b %d"; |
133 | mDateFormatShort = "%Y-%m-%d"; | 133 | mDateFormatShort = "%Y-%m-%d"; |
134 | mTimeZoneList << i18n ("-11:00 US/Samoa") | 134 | mTimeZoneList << ("-11:00 US/Samoa") |
135 | << i18n ("-10:00 US/Hawaii") | 135 | << ("-10:00 US/Hawaii") |
136 | << i18n ("-09:00 US/Alaska") | 136 | << ("-09:00 US/Alaska") |
137 | << i18n ("-08:00 US/Pacific") | 137 | << ("-08:00 US/Pacific") |
138 | << i18n ("-07:00 US/Mountain") | 138 | << ("-07:00 US/Mountain") |
139 | << i18n ("-06:00 US/Central") | 139 | << ("-06:00 US/Central") |
140 | << i18n ("-05:00 US/Eastern") | 140 | << ("-05:00 US/Eastern") |
141 | << i18n ("-04:00 Brazil/West") | 141 | << ("-04:00 Brazil/West") |
142 | << i18n ("-03:00 Brazil/East") | 142 | << ("-03:00 Brazil/East") |
143 | << i18n ("-02:00 Brazil/DeNoronha") | 143 | << ("-02:00 Brazil/DeNoronha") |
144 | << i18n ("-01:00 Atlantic/Azores") | 144 | << ("-01:00 Atlantic/Azores") |
145 | << i18n (" 00:00 Europe/London(UTC)") | 145 | << (" 00:00 Europe/London(UTC)") |
146 | << i18n ("+01:00 Europe/Oslo(CET)") | 146 | << ("+01:00 Europe/Oslo(CET)") |
147 | << i18n ("+02:00 Europe/Helsinki") | 147 | << ("+02:00 Europe/Helsinki") |
148 | << i18n ("+03:00 Europe/Moscow") | 148 | << ("+03:00 Europe/Moscow") |
149 | << i18n ("+04:00 Indian/Mauritius") | 149 | << ("+04:00 Indian/Mauritius") |
150 | << i18n ("+05:00 Indian/Maldives") | 150 | << ("+05:00 Indian/Maldives") |
151 | << i18n ("+06:00 Indian/Chagos") | 151 | << ("+06:00 Indian/Chagos") |
152 | << i18n ("+07:00 Asia/Bangkok") | 152 | << ("+07:00 Asia/Bangkok") |
153 | << i18n ("+08:00 Asia/Hongkong") | 153 | << ("+08:00 Asia/Hongkong") |
154 | << i18n ("+09:00 Asia/Tokyo") | 154 | << ("+09:00 Asia/Tokyo") |
155 | << i18n ("+10:00 Asia/Vladivostok") | 155 | << ("+10:00 Asia/Vladivostok") |
156 | << i18n ("+11:00 Asia/Magadan") | 156 | << ("+11:00 Asia/Magadan") |
157 | << i18n ("+12:00 Asia/Kamchatka") | 157 | << ("+12:00 Asia/Kamchatka") |
158 | // << i18n (" xx:xx User defined offset") | 158 | // << (" xx:xx User defined offset") |
159 | << i18n (" Local Time"); | 159 | << i18n (" Local Time"); |
160 | mSouthDaylight = false; | 160 | mSouthDaylight = false; |
161 | mTimeZoneOffset = 0; | 161 | mTimeZoneOffset = 0; |
162 | daylightEnabled = false; | 162 | daylightEnabled = false; |
163 | } | 163 | } |
164 | 164 | ||
165 | void KLocale::setDateFormat( QString s ) | 165 | void KLocale::setDateFormat( QString s ) |
166 | { | 166 | { |
167 | mDateFormat = s; | 167 | mDateFormat = s; |
168 | } | 168 | } |
169 | 169 | ||
170 | void KLocale::setDateFormatShort( QString s ) | 170 | void KLocale::setDateFormatShort( QString s ) |
171 | { | 171 | { |
172 | mDateFormatShort = s; | 172 | mDateFormatShort = s; |
173 | } | 173 | } |
174 | 174 | ||
175 | void KLocale::setHore24Format ( bool b ) | 175 | void KLocale::setHore24Format ( bool b ) |
176 | { | 176 | { |
177 | mHourF24Format = b; | 177 | mHourF24Format = b; |
178 | } | 178 | } |
179 | void KLocale::setWeekStartMonday( bool b ) | 179 | void KLocale::setWeekStartMonday( bool b ) |
180 | { | 180 | { |
181 | mWeekStartsMonday = b; | 181 | mWeekStartsMonday = b; |
182 | } | 182 | } |