summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-11 05:36:14 (UTC)
committer zautrix <zautrix>2005-02-11 05:36:14 (UTC)
commit0c1191e3253542b4858261241975c159ee7910c6 (patch) (side-by-side diff)
treebe97b6665d130f0b72db82005726fbf7cc030abb
parent38c6a7b6ae1e98cba0fdf2d0fba59ad4b9060940 (diff)
downloadkdepimpi-0c1191e3253542b4858261241975c159ee7910c6.zip
kdepimpi-0c1191e3253542b4858261241975c159ee7910c6.tar.gz
kdepimpi-0c1191e3253542b4858261241975c159ee7910c6.tar.bz2
font fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/vcard/ContentLine.cpp6
-rw-r--r--kaddressbook/kabprefs.cpp1
-rw-r--r--kaddressbook/mainembedded.cpp1
-rw-r--r--kmicromail/main.cpp4
-rw-r--r--korganizer/main.cpp2
-rw-r--r--korganizer/mainwindow.cpp4
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp33
-rw-r--r--libkdepim/kpimglobalprefs.cpp3
-rw-r--r--libkdepim/kpimglobalprefs.h1
-rw-r--r--microkde/kglobalsettings.cpp2
-rw-r--r--pwmanager/pwmanager/main.cpp1
11 files changed, 46 insertions, 12 deletions
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index 2f88cde..0a2f97d 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -161,8 +161,13 @@ ContentLine::_parse()
{
vDebug("parse");
+ // Unfold folded lines
+ // NLR
+ strRep_ = strRep_.replace( QRegExp( "\\r" ), "" );
// Unqote newlines
strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" );
+ //NLR
+ strRep_ = strRep_.replace( QRegExp( "\\\\r" ), "\r" );
int split = strRep_.find(':');
@@ -285,6 +290,7 @@ ContentLine::_assemble()
if (value_ != 0)
line += ":" + value_->asString();
+ line = line.replace( QRegExp( "\r" ), "\\r" );
line = line.replace( QRegExp( "\n" ), "\\n" );
// Fold lines longer than 72 chars
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 01e84d0..b96d28a 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -55,7 +55,6 @@ KABPrefs::KABPrefs()
KPrefs::setCurrentGroup( "General" );
addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true );
addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 );
-
#ifdef KAB_EMBEDDED
addItemBool("AskForQuit",&mAskForQuit,true);
addItemBool("ToolBarHor",&mToolBarHor, true );
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index d9968f3..336e350 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -76,6 +76,7 @@ int main( int argc, char **argv )
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
// init language
KPimGlobalPrefs::instance()->setGlobalConfig();
+ QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
KAddressBookMain m ;
//US MainWindow m;
#ifndef DESKTOP_VERSION
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index 1789da0..fe4bc76 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -31,7 +31,7 @@ int main( int argc, char **argv ) {
QApplication a( argc, argv );
QApplication::setStyle( new QPlatinumStyle ());
#endif
- a.setFont( KOPrefs::instance()->mAppFont );
+ //a.setFont( KOPrefs::instance()->mAppFont );
KGlobal::setAppName( "kopiemail" );
QString fileName ;
#ifndef DESKTOP_VERSION
@@ -46,6 +46,8 @@ int main( int argc, char **argv ) {
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail")));
KPimGlobalPrefs::instance()->setGlobalConfig();
+ QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
+ QApplication::setFont( KOPrefs::instance()->mAppFont );
OpieMail mw;
#ifndef DESKTOP_VERSION
//qDebug("CONNECT ");
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4b207d9..ee9589c 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -81,6 +81,8 @@ int main( int argc, char **argv )
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
+
+ QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
MainWindow m;
#ifndef DESKTOP_VERSION
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 18a4b12..ab0e4d6 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -133,10 +133,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
QMainWindow( parent, name )
{
-
-#ifdef DESKTOP_VERSION
- setFont( QFont("Arial"), 14 );
-#endif
mClosed = false;
//QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
QString confFile = locateLocal("config","korganizerrc");
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 6eaf2f2..bbed38d 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -41,6 +41,7 @@ $Id$
#include <qregexp.h>
#include <kdialog.h>
+#include <kprefsdialog.h>
#include <klocale.h>
#include <kdateedit.h>
#include <kglobal.h>
@@ -81,6 +82,7 @@ $Id$
#include "kpimglobalprefs.h"
#include "kdepimconfigwidget.h"
+#include <kprefs.h>
KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
@@ -348,8 +350,16 @@ void KDEPIMConfigWidget::setupLocaleTab()
void KDEPIMConfigWidget::setupTimeZoneTab()
{
- QWidget *topFrame = new QWidget( this );
- QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2);
+ QWidget *topFrame;
+ QGridLayout *topLayout ;
+
+
+
+
+
+
+ topFrame = new QWidget( this );
+ topLayout = new QGridLayout( topFrame, 5, 2);
topLayout->setSpacing(KDialog::spacingHintSmall());
topLayout->setMargin(KDialog::marginHintSmall());
@@ -416,11 +426,24 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) );
-
-
-
tabWidget->addTab( topFrame, i18n( "Time Zone" ) );
+
+ topFrame = new QWidget( this );
+ topLayout = new QGridLayout( topFrame, 3, 2);
+ topLayout->setSpacing(KDialog::spacingHintSmall());
+ topLayout->setMargin(KDialog::marginHintSmall());
+ tabWidget->addTab( topFrame, i18n( "Fonts" ) );
+
+ QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame );
+ topLayout->addMultiCellWidget(labb,0,0,0,2);
+ int i = 1;
+ KPrefsWidFont *timeLabelsFont =
+ addWidFont(i18n("Kx/Pi"),i18n("Application Font"),
+ &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame);
+ topLayout->addWidget(timeLabelsFont->label(),i,0);
+ topLayout->addWidget(timeLabelsFont->preview(),i,1);
+ topLayout->addWidget(timeLabelsFont->button(),i,2);
}
void KDEPIMConfigWidget::externalapp_changed( int newApp )
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 81e3cb1..ac7d205 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -32,6 +32,7 @@ $Id$
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
+#include <kglobalsettings.h>
#include <kstaticdeleter.h>
#include <qregexp.h>
@@ -49,6 +50,8 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
: KPrefs("microkdeglobalrc")
{
mLocaleDict = 0;
+ KPrefs::setCurrentGroup("Fonts");
+ addItemFont("ApplicationFont",&mApplicationFont,KGlobalSettings::generalFont() );
KPrefs::setCurrentGroup("Locale");
addItemInt("PreferredLanguage",&mPreferredLanguage,0);
addItemInt("PreferredTime",&mPreferredTime,0);
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 5e27e85..bf17338 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -101,6 +101,7 @@ class KPimGlobalPrefs : public KPrefs
int mDaylightsavingStart;
int mDaylightsavingEnd;
bool mTimeZoneAdd30min;
+ QFont mApplicationFont;
int mEmailClient;
QString mEmailOtherChannel;
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index fbbf814..e57defe 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -11,7 +11,7 @@ QFont KGlobalSettings::generalFont()
if (QApplication::desktop()->width() < 480 )
size = 10;
QFont f = QApplication::font();
- //qDebug("pointsize %d ", f.pointSize());
+ //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1());
f.setPointSize( size );
return f;
}
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index 6e449c6..ee26082 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -195,6 +195,7 @@ int main(int argc, char *argv[])
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager")));
KPimGlobalPrefs::instance()->setGlobalConfig();
+ QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
a.newInstance();