summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/ContentLine.cpp8
-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.cpp6
-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, 48 insertions, 14 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
@@ -156,18 +156,23 @@ ContentLine::~ContentLine()
value_ = 0;
}
void
ContentLine::_parse()
{
vDebug("parse");
- // Unqote newlines
+ // 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(':');
if (split == -1) { // invalid content line
vDebug("No ':'");
return;
}
@@ -280,16 +285,17 @@ ContentLine::_assemble()
line += name_;
ParamListIterator it(paramList_);
for (; it.current(); ++it)
line += ";" + it.current()->asString();
if (value_ != 0)
line += ":" + value_->asString();
+ line = line.replace( QRegExp( "\r" ), "\\r" );
line = line.replace( QRegExp( "\n" ), "\\n" );
// Fold lines longer than 72 chars
const int maxLen = 72;
uint cursor = 0;
QString cut;
while( line.length() > ( cursor + 1 ) * maxLen ) {
cut += line.mid( cursor * maxLen, maxLen );
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 01e84d0..b96d28a 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -50,17 +50,16 @@ KABPrefs::KABPrefs()
: KPimPrefs("kaddressbookrc")
{
KPrefs::setCurrentGroup( "Views" );
addItemBool( "HonorSingleClick", &mHonorSingleClick, false );
KPrefs::setCurrentGroup( "General" );
addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true );
addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 );
-
#ifdef KAB_EMBEDDED
addItemBool("AskForQuit",&mAskForQuit,true);
addItemBool("ToolBarHor",&mToolBarHor, true );
addItemBool("ToolBarUp",&mToolBarUp, false );
addItemBool("SearchWithReturn",&mSearchWithReturn, false );
addItemFont("DetailsFont",&mDetailsFont,KGlobalSettings::generalFont());
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index d9968f3..336e350 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -71,16 +71,17 @@ int main( int argc, char **argv )
fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
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
QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
#endif
#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
@@ -26,31 +26,33 @@ int main( int argc, char **argv ) {
#ifndef DESKTOP_VERSION
QPEApplication a( argc, argv );
a.setKeepRunning ();
#else
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
fileName = getenv("QPEDIR");
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/");
else
KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/");
#else
fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
#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 ");
QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& )));
// QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
a.showMainWidget(&mw );
#else
a.setMainWidget(&mw );
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4b207d9..ee9589c 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -76,16 +76,18 @@ int main( int argc, char **argv )
#ifndef DESKTOP_VERSION
fileName = getenv("QPEDIR");
KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/");
#else
fileName = qApp->applicationDirPath () + "/kdepim/korganizer/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
+
+ QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
MainWindow m;
#ifndef DESKTOP_VERSION
QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
a.showMainWidget(&m );
#else
a.setMainWidget(&m );
m.show();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 18a4b12..ab0e4d6 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -127,21 +127,17 @@ public:
QCheckBox* mWriteBackFuture;
QSpinBox* mWriteBackFutureWeeks;
};
int globalFlagBlockStartup;
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");
QFileInfo finf ( confFile );
bool showWarning = !finf.exists();
setIcon(SmallIcon( "ko24" ) );
mBlockAtStartup = true;
mFlagKeyPressed = false;
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
@@ -36,16 +36,17 @@ $Id$
#include <qlineedit.h>
#include <qbuttongroup.h>
#include <qfile.h>
#include <qvbox.h>
#include <qdir.h>
#include <qregexp.h>
#include <kdialog.h>
+#include <kprefsdialog.h>
#include <klocale.h>
#include <kdateedit.h>
#include <kglobal.h>
#include <stdlib.h>
/*US
#include <qcheckbox.h>
#include <qframe.h>
@@ -76,16 +77,17 @@ $Id$
#include "extensionwidget.h"
*/
#include "qapplication.h"
#include "kpimglobalprefs.h"
#include "kdepimconfigwidget.h"
+#include <kprefs.h>
KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
: KPrefsWidget(prefs, parent, name )
{
mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
@@ -343,18 +345,26 @@ void KDEPIMConfigWidget::setupLocaleTab()
tabWidget->addTab( topFrame, i18n( "Time Format" ) );
}
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());
QHBox *timeZoneBox = new QHBox( topFrame );
topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
new QLabel( i18n("Timezone:"), timeZoneBox );
mTimeZoneCombo = new QComboBox( timeZoneBox );
@@ -411,21 +421,34 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
++iii;
QDate current ( 2001, 1,1);
mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
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 )
{
// first store the current data
saveEditFieldSettings();
// set mCurrentApp
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 81e3cb1..ac7d205 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -27,16 +27,17 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <kglobal.h>
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
+#include <kglobalsettings.h>
#include <kstaticdeleter.h>
#include <qregexp.h>
#include <qfile.h>
#include <stdlib.h>
#include <qtextstream.h>
#include <qapplication.h>
#include "kpimglobalprefs.h"
@@ -44,16 +45,18 @@ $Id$
KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0;
static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP;
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);
addItemInt("PreferredDate",&mPreferredDate,0);
addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false);
addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y");
addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y");
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 5e27e85..bf17338 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -96,16 +96,17 @@ class KPimGlobalPrefs : public KPrefs
int mPreferredLanguage;
int mPreferredTime;
bool mWeekStartsOnSunday;
QString mTimeZoneId;
bool mUseDaylightsaving;
int mDaylightsavingStart;
int mDaylightsavingEnd;
bool mTimeZoneAdd30min;
+ QFont mApplicationFont;
int mEmailClient;
QString mEmailOtherChannel;
QString mEmailOtherMessage;
QString mEmailOtherMessageParameters;
QString mEmailOtherMessage2;
QString mEmailOtherMessageParameters2;
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index fbbf814..e57defe 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -6,17 +6,17 @@
#include <qapplication.h>
QFont KGlobalSettings::generalFont()
{
int size = 12;
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;
}
QFont KGlobalSettings::toolBarFont()
{
return QApplication::font();
}
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
@@ -190,16 +190,17 @@ int main(int argc, char *argv[])
QString fileName ;
fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager")));
KPimGlobalPrefs::instance()->setGlobalConfig();
+ QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
a.newInstance();
//US KAddressBookMain m ;
//US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
/*US
#ifndef DESKTOP_VERSION