summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-02-08 18:29:59 (UTC)
committer zautrix <zautrix>2005-02-08 18:29:59 (UTC)
commit2124ce7f8c6edbd0e3ec32b1d1e6a625ef9450d6 (patch) (unidiff)
tree733f50ad5513065fe407fa341948172aae893b52 /kmicromail
parent126b79abd88bb13ab41c4d987ee759eb9ba7d483 (diff)
downloadkdepimpi-2124ce7f8c6edbd0e3ec32b1d1e6a625ef9450d6.zip
kdepimpi-2124ce7f8c6edbd0e3ec32b1d1e6a625ef9450d6.tar.gz
kdepimpi-2124ce7f8c6edbd0e3ec32b1d1e6a625ef9450d6.tar.bz2
font fix
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefs.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp
index 7b1e169..e4b61dc 100644
--- a/kmicromail/koprefs.cpp
+++ b/kmicromail/koprefs.cpp
@@ -20,80 +20,77 @@
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#include <kglobalsettings.h>
44 45
45#include "koprefs.h" 46#include "koprefs.h"
46#include "mainwindow.h" 47#include "mainwindow.h"
47 48
48 49
49KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
50static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
51 52
52KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
53 KPimPrefs("kopiemailrc") 54 KPimPrefs("kopiemailrc")
54{ 55{
55 mAppFont = QFont("helvetica",12);
56 mComposeFont = QFont("helvetica",12);
57 mReadFont = QFont("helvetica",12);
58
59 KPrefs::setCurrentGroup("General"); 56 KPrefs::setCurrentGroup("General");
60 addItemString("SendCodec",&mSendCodec,i18n ("userdefined") ); 57 addItemString("SendCodec",&mSendCodec,i18n ("userdefined") );
61 addItemString("SenderName",&mName,i18n ("Please set at") ); 58 addItemString("SenderName",&mName,i18n ("Please set at") );
62 addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") ); 59 addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") );
63 addItemBool("ViewMailAsHtml",&mViewAsHtml,false); 60 addItemBool("ViewMailAsHtml",&mViewAsHtml,false);
64 addItemBool("SendMailLater",&mSendLater,true); 61 addItemBool("SendMailLater",&mSendLater,true);
65 addItemBool("ShowToField",&mShowToField,false); 62 addItemBool("ShowToField",&mShowToField,false);
66 addItemBool("UseKapi",&mUseKapi,false); 63 addItemBool("UseKapi",&mUseKapi,false);
67 addItemInt("CurrentCodec",&mCurrentCodec,0); 64 addItemInt("CurrentCodec",&mCurrentCodec,0);
68 addItemBool("ShowInfoSub",&mShowInfoSub,true); 65 addItemBool("ShowInfoSub",&mShowInfoSub,true);
69 addItemBool("ShowInfoFrom",&mShowInfoFrom,true); 66 addItemBool("ShowInfoFrom",&mShowInfoFrom,true);
70 addItemBool("ShowInfoTo",&mShowInfoTo,true); 67 addItemBool("ShowInfoTo",&mShowInfoTo,true);
71 addItemBool("ShowInfoStart",&mShowInfoStart,true); 68 addItemBool("ShowInfoStart",&mShowInfoStart,true);
72 KPrefs::setCurrentGroup("Fonts"); 69 KPrefs::setCurrentGroup("Fonts");
73 addItemFont("Application Font",&mAppFont); 70 addItemFont("Application Font",&mAppFont,KGlobalSettings::generalFont());
74 addItemFont("Compose Font",&mComposeFont); 71 addItemFont("Compose Font",&mComposeFont,KGlobalSettings::generalFont());
75 addItemFont("Read Font",&mReadFont); 72 addItemFont("Read Font",&mReadFont,KGlobalSettings::generalFont());
76 fillMailDefaults(); 73 fillMailDefaults();
77 isDirty = false; 74 isDirty = false;
78} 75}
79 76
80 77
81KOPrefs::~KOPrefs() 78KOPrefs::~KOPrefs()
82{ 79{
83 if ( isDirty ) 80 if ( isDirty )
84 writeConfig(); 81 writeConfig();
85 if (mInstance == this) 82 if (mInstance == this)
86 mInstance = insd.setObject(0); 83 mInstance = insd.setObject(0);
87 84
88} 85}
89 86
90 87
91KOPrefs *KOPrefs::instance() 88KOPrefs *KOPrefs::instance()
92{ 89{
93 if (!mInstance) { 90 if (!mInstance) {
94 mInstance = insd.setObject(new KOPrefs()); 91 mInstance = insd.setObject(new KOPrefs());
95 mInstance->readConfig(); 92 mInstance->readConfig();
96 } 93 }
97 94
98 return mInstance; 95 return mInstance;
99} 96}