summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -140,50 +140,55 @@ ContentLine::operator = (const QCString & s)
bool
ContentLine::operator == (ContentLine & x)
{
x.parse();
QPtrListIterator<Param> it(x.paramList());
if (!paramList_.find(it.current()))
return false;
return true;
}
ContentLine::~ContentLine()
{
delete value_;
value_ = 0;
}
void
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(':');
if (split == -1) { // invalid content line
vDebug("No ':'");
return;
}
QCString firstPart(strRep_.left(split));
QCString valuePart(strRep_.mid(split + 1));
split = firstPart.find('.');
if (split != -1) {
group_ = firstPart.left(split);
firstPart = firstPart.mid(split + 1);
}
vDebug("Group == " + group_);
vDebug("firstPart == " + firstPart);
vDebug("valuePart == " + valuePart);
// Now we have the group, the name and param list together and the value.
@@ -264,48 +269,49 @@ ContentLine::_parse()
case ValueGeo: value_ = new GeoValue; break;
case ValueText:
case ValueUnknown:
default: value_ = new TextValue; break;
}
*value_ = valuePart;
}
void
ContentLine::_assemble()
{
//strRep_.truncate(0);
QString line;
if (!group_.isEmpty())
line = group_ + '.';
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 );
cut += "\r\n ";
++cursor;
}
cut += line.mid( cursor * maxLen );
strRep_ = cut.latin1();
//qDebug("ContentLine::_assemble()\n%s*****", strRep_.data());
#if 0
vDebug("Assemble (argl) - my name is \"" + name_ + "\"");
strRep_.truncate(0);
QCString line;
if (!group_.isEmpty())
line += group_ + '.';
line += name_;
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 01e84d0..b96d28a 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -34,49 +34,48 @@
#include <kconfig.h>
#include <klocale.h>
#include <kstaticdeleter.h>
#include <kglobalsettings.h>
//US#include <kdebug.h> // defines kdDebug()
#include "kabprefs.h"
#ifdef DESKTOP_VERSION
#include <qapplication.h>
#endif
KABPrefs *KABPrefs::sInstance = 0;
static KStaticDeleter<KABPrefs> staticDeleterAB;
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());
#endif //KAB_EMBEDDED
KPrefs::setCurrentGroup( "MainWindow" );
bool m_visible = false;
#ifdef DESKTOP_VERSION
m_visible = true;
#endif
addItemBool( "FullMenuBarVisible", &mFullMenuBarVisible, m_visible );
addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false );
addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true );
addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter );
addItemIntList( "DetailsSplitter", &mDetailsSplitter );
addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true );
KPrefs::setCurrentGroup( "Extensions_General" );
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index d9968f3..336e350 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -55,48 +55,49 @@ int main( int argc, char **argv )
printf(" no command: Start KA/E in usual way\n");
printf(" -help: This output\n");
printf(" KA/E is exiting now. Bye!\n");
exitHelp = true;
}
}
if ( ! exitHelp ) {
KGlobal::setAppName( "kaddressbook" );
#ifndef DESKTOP_VERSION
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
else
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
#else
QString fileName ;
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
a.showMainWidget( &m );
#else
a.setMainWidget( &m );
m.resize (640, 480 );
m.show();
#endif
a.exec();
dumpMissing();
KPimGlobalPrefs::instance()->writeConfig();
}
qDebug("KA: Bye! ");
}
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index 1789da0..fe4bc76 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -10,58 +10,60 @@
#include <qstring.h>
#include <qwindowsstyle.h>
#include <qplatinumstyle.h>
#include <qsgistyle.h>
#endif
#include "opiemail.h"
#include <qdir.h>
#include <kstandarddirs.h>
#include <kglobal.h>
#include <stdio.h>
#include "mainwindow.h"
#include "koprefs.h"
#include <libkdepim/kpimglobalprefs.h>
void dumpMissing();
//using namespace Opie::Core;
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 );
mw.show();
//m.resize( 800, 600 );
QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
#endif
int rv = a.exec();
dumpMissing();
KPimGlobalPrefs::instance()->writeConfig();
return rv;
}
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4b207d9..ee9589c 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -60,48 +60,50 @@ int main( int argc, char **argv )
printf(" -showDay: Day view\n");
printf(" -showWWeek: Work Week view\n");
printf(" -showWeek: Week view\n");
printf(" -showTodo: Todo view\n");
printf(" -showJournal: Journal view\n");
printf(" -showKO: Next Days view\n");
printf(" -showWNext: What's Next view\n");
printf(" -showNextXView: Next X View\n");
printf(" -new[Y] and -show[X] may be used togehther\n");
printf(" KO/Pi is exiting now. Bye!\n");
exitHelp = true;
}
}
if ( ! exitHelp ) {
KGlobal::setAppName( "korganizer" );
QString fileName ;
#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();
//m.resize( 800, 600 );
QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
#endif
if ( argc > 1 ) {
QCString command = argv[1];
if ( argc > 2 )
command += argv[2];
qApp->processEvents();
m.recieve(command, QByteArray() );
}
a.exec();
dumpMissing();
KPimGlobalPrefs::instance()->writeConfig();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 18a4b12..ab0e4d6 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -112,52 +112,48 @@ class KOex2phonePrefs : public QDialog
QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
lay->addWidget( ok );
QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
lay->addWidget( cancel );
connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
resize( 220, 240 );
qApp->processEvents();
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
move( (dw-width())/2, (dh - height() )/2 );
}
public:
QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
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;
setCaption("KOrganizer/Pi");
KOPrefs *p = KOPrefs::instance();
KPimGlobalPrefs::instance()->setGlobalConfig();
if ( p->mHourSize > 22 )
p->mHourSize = 22;
QMainWindow::ToolBarDock tbd;
if ( p->mToolBarHor ) {
if ( p->mToolBarUp )
tbd = Bottom;
else
tbd = Top;
}
else {
if ( p->mToolBarUp )
tbd = Right;
else
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
@@ -20,88 +20,90 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qlayout.h>
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#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>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qfile.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kdialog.h>
#include <klistview.h>
#include <klocale.h>
#include <kglobal.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#ifndef KAB_EMBEDDED
#include <ktrader.h>
#else // KAB_EMBEDDED
#include <mergewidget.h>
#include <distributionlistwidget.h>
#endif // KAB_EMBEDDED
#include "addresseewidget.h"
#include "extensionconfigdialog.h"
#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"));
mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
KDialog::spacingHint() );
tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
setupLocaleTab();
setupLocaleDateTab();
setupTimeZoneTab();
setupExternalAppTab();
@@ -327,50 +329,58 @@ void KDEPIMConfigWidget::setupLocaleTab()
iii = 0;
syncPrefsGroup =
addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame);
if ( QApplication::desktop()->width() > 300 )
syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
syncPrefsGroup->addRadio(i18n("24:00"));
syncPrefsGroup->addRadio(i18n("12:00am"));
syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical);
topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
++iii;
KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"),
&(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame);
topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
++iii;
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 );
if ( QApplication::desktop()->width() < 300 ) {
mTimeZoneCombo->setMaximumWidth(150);
}
QStringList list;
list = KGlobal::locale()->timeZoneList();
mTimeZoneCombo->insertStringList(list);
// find the currently set time zone and select it
QString sCurrentlySet = KPimGlobalPrefs::instance()->mTimeZoneId;
int nCurrentlySet = 11;
for (int i = 0; i < mTimeZoneCombo->count(); i++)
{
if (mTimeZoneCombo->text(i) == sCurrentlySet)
{
nCurrentlySet = i;
@@ -395,53 +405,66 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
topLayout->addMultiCellWidget(lab, iii,iii,0,1);
++iii;
lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
topLayout->addMultiCellWidget(lab, iii,iii,0,1);
++iii;
lab = new QLabel( i18n("Daylight start:"), topFrame );
topLayout->addWidget(lab, iii,0);
mStartDateSavingEdit = new KDateEdit(topFrame);
topLayout->addWidget(mStartDateSavingEdit, iii,1);
++iii;
lab = new QLabel( i18n("Daylight end:"), topFrame );
topLayout->addWidget(lab, iii,0);
mEndDateSavingEdit = new KDateEdit(topFrame);
topLayout->addWidget(mEndDateSavingEdit, iii,1);
++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
mCurrentApp = (ExternalAppHandler::Types)newApp;
// set mCurrentClient
switch(mCurrentApp)
{
case(ExternalAppHandler::EMAIL):
mCurrentClient = mEmailClient;
break;
case(ExternalAppHandler::PHONE):
mCurrentClient = mPhoneClient;
break;
case(ExternalAppHandler::SMS):
mCurrentClient = mSMSClient;
break;
case(ExternalAppHandler::FAX):
mCurrentClient = mFaxClient;
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 81e3cb1..ac7d205 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -11,65 +11,68 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
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"
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");
KPrefs::setCurrentGroup("Time & Date");
addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") );
addItemBool("UseDaylightsaving",&mUseDaylightsaving,true);
addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false);
addItemInt("DaylightsavingStart",&mDaylightsavingStart,90);
addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304);
KPrefs::setCurrentGroup( "ExternalApplications" );
addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC );
addItemString( "EmailChannel", &mEmailOtherChannel, "" );
addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" );
addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" );
addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" );
addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" );
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 5e27e85..bf17338 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -80,48 +80,49 @@ class KPimGlobalPrefs : public KPrefs
OTHER_SIC = 1,
KPPI_SIC = 2
};
private:
KPimGlobalPrefs( const QString &name = QString::null );
static KPimGlobalPrefs *sInstance;
QDict<QString> *mLocaleDict;
public:
//US I copied the following "locale" settings from KOPrefs
int mPreferredDate;
QString mUserDateFormatLong;
QString mUserDateFormatShort;
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;
int mPhoneClient;
QString mPhoneOtherChannel;
QString mPhoneOtherMessage;
QString mPhoneOtherMessageParameters;
int mFaxClient;
QString mFaxOtherChannel;
QString mFaxOtherMessage;
QString mFaxOtherMessageParameters;
int mSMSClient;
QString mSMSOtherChannel;
QString mSMSOtherMessage;
QString mSMSOtherMessageParameters;
int mPagerClient;
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index fbbf814..e57defe 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -1,38 +1,38 @@
#include "kglobalsettings.h"
#include "kconfig.h"
#include "kglobal.h"
#include "kconfigbase.h"
#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();
}
QColor KGlobalSettings::toolBarHighlightColor()
{
return QColor( "black" );
}
QRect KGlobalSettings::desktopGeometry( QWidget * )
{
return QApplication::desktop()->rect();
}
/**
* Returns whether KDE runs in single (default) or double click
* mode.
* see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
* @return true if single click mode, or false if double click mode.
**/
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
@@ -174,48 +174,49 @@ int main(int argc, char *argv[])
printf(" PWM/PI is exiting now. Bye!\n");
exitHelp = true;
}
}
if ( ! exitHelp ) {
PwMApplication a(argc, argv);
KGlobal::setAppName( "pwmanager" );
#ifndef DESKTOP_VERSION
//qDebug("width %d ",QApplication::desktop()->width() );
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/");
else
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/");
#else
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
a.showMainWidget( &m );
#else
a.setMainWidget( &m );
m.resize (640, 480 );
m.show();
#endif
*/
QObject::connect( &a, SIGNAL( lastWindowClosed()), &a, SLOT (quit()));
a.exec();
dumpMissing();
KPimGlobalPrefs::instance()->writeConfig();
}
qDebug("PWMPI: Bye! ");
#endif