summaryrefslogtreecommitdiffabout
path: root/kmicromail/koprefs.cpp
authorzautrix <zautrix>2004-10-22 22:10:16 (UTC)
committer zautrix <zautrix>2004-10-22 22:10:16 (UTC)
commitb8da6435b8e5941eb1824873e68d8a6a728fae5e (patch) (unidiff)
treebc5ed11961e89bcd606f6fbca32185dbf8afab7a /kmicromail/koprefs.cpp
parenta5274f27dc71e1a0ffae73f32f84f4dd013b4b76 (diff)
downloadkdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.zip
kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.gz
kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.bz2
fixed an ugly timezone bug
Diffstat (limited to 'kmicromail/koprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefs.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp
index c0200ff..8143b6f 100644
--- a/kmicromail/koprefs.cpp
+++ b/kmicromail/koprefs.cpp
@@ -1,128 +1,122 @@
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 <kconfig.h> 39#include <kconfig.h>
40#include <klocale.h> 40#include <klocale.h>
41#include <kdebug.h> 41#include <kdebug.h>
42#include <kemailsettings.h> 42#include <kemailsettings.h>
43#include <kstaticdeleter.h> 43#include <kstaticdeleter.h>
44 44
45#include "koprefs.h" 45#include "koprefs.h"
46#include "mainwindow.h" 46#include "mainwindow.h"
47 47
48 48
49KOPrefs *KOPrefs::mInstance = 0; 49KOPrefs *KOPrefs::mInstance = 0;
50static KStaticDeleter<KOPrefs> insd; 50static KStaticDeleter<KOPrefs> insd;
51 51
52KOPrefs::KOPrefs() : 52KOPrefs::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
75KOPrefs::~KOPrefs() 75KOPrefs::~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
83KOPrefs *KOPrefs::instance() 83KOPrefs *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
93void KOPrefs::usrSetDefaults() 93void KOPrefs::usrSetDefaults()
94{ 94{
95 95
96} 96}
97 97
98void KOPrefs::fillMailDefaults() 98void 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
104void KOPrefs::setTimeZoneIdDefault()
105{
106 mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)");
107}
108
109
110void KOPrefs::usrReadConfig() 104void KOPrefs::usrReadConfig()
111{ 105{
112 106
113 KPimPrefs::usrReadConfig(); 107 KPimPrefs::usrReadConfig();
114} 108}
115 109
116 110
117void KOPrefs::usrWriteConfig() 111void KOPrefs::usrWriteConfig()
118{ 112{
119 113
120 KPimPrefs::usrWriteConfig(); 114 KPimPrefs::usrWriteConfig();
121} 115}
122 116
123 117
124 118
125KConfig* KOPrefs::getConfig() 119KConfig* KOPrefs::getConfig()
126{ 120{
127 return config(); 121 return config();
128} 122}