summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-11 05:36:14 (UTC)
committer zautrix <zautrix>2005-02-11 05:36:14 (UTC)
commit0c1191e3253542b4858261241975c159ee7910c6 (patch) (unidiff)
treebe97b6665d130f0b72db82005726fbf7cc030abb
parent38c6a7b6ae1e98cba0fdf2d0fba59ad4b9060940 (diff)
downloadkdepimpi-0c1191e3253542b4858261241975c159ee7910c6.zip
kdepimpi-0c1191e3253542b4858261241975c159ee7910c6.tar.gz
kdepimpi-0c1191e3253542b4858261241975c159ee7910c6.tar.bz2
font fixes
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
@@ -152,26 +152,31 @@ ContentLine::operator == (ContentLine & x)
152 152
153ContentLine::~ContentLine() 153ContentLine::~ContentLine()
154{ 154{
155 delete value_; 155 delete value_;
156 value_ = 0; 156 value_ = 0;
157} 157}
158 158
159 void 159 void
160ContentLine::_parse() 160ContentLine::_parse()
161{ 161{
162 vDebug("parse"); 162 vDebug("parse");
163 163
164 // Unqote newlines 164 // Unfold folded lines
165 // NLR
166 strRep_ = strRep_.replace( QRegExp( "\\r" ), "" );
167 // Unqote newlines
165 strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" ); 168 strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" );
169 //NLR
170 strRep_ = strRep_.replace( QRegExp( "\\\\r" ), "\r" );
166 171
167 int split = strRep_.find(':'); 172 int split = strRep_.find(':');
168 173
169 if (split == -1) { // invalid content line 174 if (split == -1) { // invalid content line
170 vDebug("No ':'"); 175 vDebug("No ':'");
171 return; 176 return;
172 } 177 }
173 178
174 QCString firstPart(strRep_.left(split)); 179 QCString firstPart(strRep_.left(split));
175 QCString valuePart(strRep_.mid(split + 1)); 180 QCString valuePart(strRep_.mid(split + 1));
176 181
177 split = firstPart.find('.'); 182 split = firstPart.find('.');
@@ -276,24 +281,25 @@ ContentLine::_assemble()
276 //strRep_.truncate(0); 281 //strRep_.truncate(0);
277 QString line; 282 QString line;
278 if (!group_.isEmpty()) 283 if (!group_.isEmpty())
279 line = group_ + '.'; 284 line = group_ + '.';
280 line += name_; 285 line += name_;
281 ParamListIterator it(paramList_); 286 ParamListIterator it(paramList_);
282 for (; it.current(); ++it) 287 for (; it.current(); ++it)
283 line += ";" + it.current()->asString(); 288 line += ";" + it.current()->asString();
284 289
285 if (value_ != 0) 290 if (value_ != 0)
286 line += ":" + value_->asString(); 291 line += ":" + value_->asString();
287 292
293 line = line.replace( QRegExp( "\r" ), "\\r" );
288 line = line.replace( QRegExp( "\n" ), "\\n" ); 294 line = line.replace( QRegExp( "\n" ), "\\n" );
289 295
290 // Fold lines longer than 72 chars 296 // Fold lines longer than 72 chars
291 const int maxLen = 72; 297 const int maxLen = 72;
292 uint cursor = 0; 298 uint cursor = 0;
293 QString cut; 299 QString cut;
294 while( line.length() > ( cursor + 1 ) * maxLen ) { 300 while( line.length() > ( cursor + 1 ) * maxLen ) {
295 cut += line.mid( cursor * maxLen, maxLen ); 301 cut += line.mid( cursor * maxLen, maxLen );
296 cut += "\r\n "; 302 cut += "\r\n ";
297 ++cursor; 303 ++cursor;
298 } 304 }
299 cut += line.mid( cursor * maxLen ); 305 cut += line.mid( cursor * maxLen );
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 01e84d0..b96d28a 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -46,25 +46,24 @@
46KABPrefs *KABPrefs::sInstance = 0; 46KABPrefs *KABPrefs::sInstance = 0;
47static KStaticDeleter<KABPrefs> staticDeleterAB; 47static KStaticDeleter<KABPrefs> staticDeleterAB;
48 48
49KABPrefs::KABPrefs() 49KABPrefs::KABPrefs()
50 : KPimPrefs("kaddressbookrc") 50 : KPimPrefs("kaddressbookrc")
51{ 51{
52 KPrefs::setCurrentGroup( "Views" ); 52 KPrefs::setCurrentGroup( "Views" );
53 addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); 53 addItemBool( "HonorSingleClick", &mHonorSingleClick, false );
54 54
55 KPrefs::setCurrentGroup( "General" ); 55 KPrefs::setCurrentGroup( "General" );
56 addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true ); 56 addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true );
57 addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 ); 57 addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 );
58
59#ifdef KAB_EMBEDDED 58#ifdef KAB_EMBEDDED
60 addItemBool("AskForQuit",&mAskForQuit,true); 59 addItemBool("AskForQuit",&mAskForQuit,true);
61 addItemBool("ToolBarHor",&mToolBarHor, true ); 60 addItemBool("ToolBarHor",&mToolBarHor, true );
62 addItemBool("ToolBarUp",&mToolBarUp, false ); 61 addItemBool("ToolBarUp",&mToolBarUp, false );
63 addItemBool("SearchWithReturn",&mSearchWithReturn, false ); 62 addItemBool("SearchWithReturn",&mSearchWithReturn, false );
64 addItemFont("DetailsFont",&mDetailsFont,KGlobalSettings::generalFont()); 63 addItemFont("DetailsFont",&mDetailsFont,KGlobalSettings::generalFont());
65 64
66 65
67#endif //KAB_EMBEDDED 66#endif //KAB_EMBEDDED
68 67
69 KPrefs::setCurrentGroup( "MainWindow" ); 68 KPrefs::setCurrentGroup( "MainWindow" );
70 bool m_visible = false; 69 bool m_visible = false;
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index d9968f3..336e350 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -67,24 +67,25 @@ int main( int argc, char **argv )
67 else 67 else
68 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 68 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
69#else 69#else
70 QString fileName ; 70 QString fileName ;
71 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; 71 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
72 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 72 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
73 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 73 QApplication::addLibraryPath ( qApp->applicationDirPath () );
74 74
75#endif 75#endif
76 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 76 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
77 // init language 77 // init language
78 KPimGlobalPrefs::instance()->setGlobalConfig(); 78 KPimGlobalPrefs::instance()->setGlobalConfig();
79 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
79 KAddressBookMain m ; 80 KAddressBookMain m ;
80//US MainWindow m; 81//US MainWindow m;
81#ifndef DESKTOP_VERSION 82#ifndef DESKTOP_VERSION
82 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 83 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
83#endif 84#endif
84 85
85 86
86#ifndef DESKTOP_VERSION 87#ifndef DESKTOP_VERSION
87 a.showMainWidget( &m ); 88 a.showMainWidget( &m );
88 89
89#else 90#else
90 a.setMainWidget( &m ); 91 a.setMainWidget( &m );
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index 1789da0..fe4bc76 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -22,39 +22,41 @@
22#include <libkdepim/kpimglobalprefs.h> 22#include <libkdepim/kpimglobalprefs.h>
23void dumpMissing(); 23void dumpMissing();
24//using namespace Opie::Core; 24//using namespace Opie::Core;
25int main( int argc, char **argv ) { 25int main( int argc, char **argv ) {
26 26
27#ifndef DESKTOP_VERSION 27#ifndef DESKTOP_VERSION
28 QPEApplication a( argc, argv ); 28 QPEApplication a( argc, argv );
29 a.setKeepRunning (); 29 a.setKeepRunning ();
30#else 30#else
31 QApplication a( argc, argv ); 31 QApplication a( argc, argv );
32 QApplication::setStyle( new QPlatinumStyle ()); 32 QApplication::setStyle( new QPlatinumStyle ());
33#endif 33#endif
34 a.setFont( KOPrefs::instance()->mAppFont ); 34 //a.setFont( KOPrefs::instance()->mAppFont );
35 KGlobal::setAppName( "kopiemail" ); 35 KGlobal::setAppName( "kopiemail" );
36 QString fileName ; 36 QString fileName ;
37#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
38 fileName = getenv("QPEDIR"); 38 fileName = getenv("QPEDIR");
39 if ( QApplication::desktop()->width() > 320 ) 39 if ( QApplication::desktop()->width() > 320 )
40 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/"); 40 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/");
41 else 41 else
42 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/"); 42 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/");
43#else 43#else
44 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/"; 44 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/";
45 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 45 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
46#endif 46#endif
47 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail"))); 47 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail")));
48 KPimGlobalPrefs::instance()->setGlobalConfig(); 48 KPimGlobalPrefs::instance()->setGlobalConfig();
49 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
50 QApplication::setFont( KOPrefs::instance()->mAppFont );
49 OpieMail mw; 51 OpieMail mw;
50#ifndef DESKTOP_VERSION 52#ifndef DESKTOP_VERSION
51 //qDebug("CONNECT "); 53 //qDebug("CONNECT ");
52 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); 54 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& )));
53 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 55 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
54 a.showMainWidget(&mw ); 56 a.showMainWidget(&mw );
55#else 57#else
56 a.setMainWidget(&mw ); 58 a.setMainWidget(&mw );
57 mw.show(); 59 mw.show();
58 //m.resize( 800, 600 ); 60 //m.resize( 800, 600 );
59 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 61 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
60#endif 62#endif
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4b207d9..ee9589c 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -72,24 +72,26 @@ int main( int argc, char **argv )
72 } 72 }
73 if ( ! exitHelp ) { 73 if ( ! exitHelp ) {
74 KGlobal::setAppName( "korganizer" ); 74 KGlobal::setAppName( "korganizer" );
75 QString fileName ; 75 QString fileName ;
76#ifndef DESKTOP_VERSION 76#ifndef DESKTOP_VERSION
77 fileName = getenv("QPEDIR"); 77 fileName = getenv("QPEDIR");
78 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); 78 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/");
79#else 79#else
80 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; 80 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/";
81 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 81 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
82#endif 82#endif
83 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); 83 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
84
85 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
84 MainWindow m; 86 MainWindow m;
85#ifndef DESKTOP_VERSION 87#ifndef DESKTOP_VERSION
86 88
87 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 89 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
88 a.showMainWidget(&m ); 90 a.showMainWidget(&m );
89#else 91#else
90 a.setMainWidget(&m ); 92 a.setMainWidget(&m );
91 m.show(); 93 m.show();
92 //m.resize( 800, 600 ); 94 //m.resize( 800, 600 );
93 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 95 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
94#endif 96#endif
95 if ( argc > 1 ) { 97 if ( argc > 1 ) {
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 18a4b12..ab0e4d6 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -123,29 +123,25 @@ class KOex2phonePrefs : public QDialog
123 } 123 }
124 124
125public: 125public:
126 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 126 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
127 QCheckBox* mWriteBackFuture; 127 QCheckBox* mWriteBackFuture;
128 QSpinBox* mWriteBackFutureWeeks; 128 QSpinBox* mWriteBackFutureWeeks;
129}; 129};
130 130
131int globalFlagBlockStartup; 131int globalFlagBlockStartup;
132MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : 132MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
133 QMainWindow( parent, name ) 133 QMainWindow( parent, name )
134{ 134{
135 135
136
137#ifdef DESKTOP_VERSION
138 setFont( QFont("Arial"), 14 );
139#endif
140 mClosed = false; 136 mClosed = false;
141 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 137 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
142 QString confFile = locateLocal("config","korganizerrc"); 138 QString confFile = locateLocal("config","korganizerrc");
143 QFileInfo finf ( confFile ); 139 QFileInfo finf ( confFile );
144 bool showWarning = !finf.exists(); 140 bool showWarning = !finf.exists();
145 setIcon(SmallIcon( "ko24" ) ); 141 setIcon(SmallIcon( "ko24" ) );
146 mBlockAtStartup = true; 142 mBlockAtStartup = true;
147 mFlagKeyPressed = false; 143 mFlagKeyPressed = false;
148 setCaption("KOrganizer/Pi"); 144 setCaption("KOrganizer/Pi");
149 KOPrefs *p = KOPrefs::instance(); 145 KOPrefs *p = KOPrefs::instance();
150 KPimGlobalPrefs::instance()->setGlobalConfig(); 146 KPimGlobalPrefs::instance()->setGlobalConfig();
151 if ( p->mHourSize > 22 ) 147 if ( p->mHourSize > 22 )
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
@@ -32,24 +32,25 @@ $Id$
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qgroupbox.h> 34#include <qgroupbox.h>
35#include <qlabel.h> 35#include <qlabel.h>
36#include <qlineedit.h> 36#include <qlineedit.h>
37#include <qbuttongroup.h> 37#include <qbuttongroup.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qvbox.h> 39#include <qvbox.h>
40#include <qdir.h> 40#include <qdir.h>
41#include <qregexp.h> 41#include <qregexp.h>
42 42
43#include <kdialog.h> 43#include <kdialog.h>
44#include <kprefsdialog.h>
44#include <klocale.h> 45#include <klocale.h>
45#include <kdateedit.h> 46#include <kdateedit.h>
46#include <kglobal.h> 47#include <kglobal.h>
47#include <stdlib.h> 48#include <stdlib.h>
48 49
49/*US 50/*US
50#include <qcheckbox.h> 51#include <qcheckbox.h>
51#include <qframe.h> 52#include <qframe.h>
52#include <qpushbutton.h> 53#include <qpushbutton.h>
53#include <qcombobox.h> 54#include <qcombobox.h>
54#include <qlineedit.h> 55#include <qlineedit.h>
55#include <qlabel.h> 56#include <qlabel.h>
@@ -72,24 +73,25 @@ $Id$
72#endif // KAB_EMBEDDED 73#endif // KAB_EMBEDDED
73 74
74#include "addresseewidget.h" 75#include "addresseewidget.h"
75#include "extensionconfigdialog.h" 76#include "extensionconfigdialog.h"
76#include "extensionwidget.h" 77#include "extensionwidget.h"
77*/ 78*/
78 79
79#include "qapplication.h" 80#include "qapplication.h"
80 81
81#include "kpimglobalprefs.h" 82#include "kpimglobalprefs.h"
82 83
83#include "kdepimconfigwidget.h" 84#include "kdepimconfigwidget.h"
85#include <kprefs.h>
84 86
85 87
86KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) 88KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
87 : KPrefsWidget(prefs, parent, name ) 89 : KPrefsWidget(prefs, parent, name )
88{ 90{
89 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); 91 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
90 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); 92 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
91 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); 93 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
92 mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); 94 mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
93 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); 95 mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
94 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); 96 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
95 97
@@ -339,26 +341,34 @@ void KDEPIMConfigWidget::setupLocaleTab()
339 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); 341 &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame);
340 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); 342 topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
341 ++iii; 343 ++iii;
342 344
343 345
344 tabWidget->addTab( topFrame, i18n( "Time Format" ) ); 346 tabWidget->addTab( topFrame, i18n( "Time Format" ) );
345 347
346} 348}
347 349
348 350
349void KDEPIMConfigWidget::setupTimeZoneTab() 351void KDEPIMConfigWidget::setupTimeZoneTab()
350{ 352{
351 QWidget *topFrame = new QWidget( this ); 353 QWidget *topFrame;
352 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); 354 QGridLayout *topLayout ;
355
356
357
358
359
360
361 topFrame = new QWidget( this );
362 topLayout = new QGridLayout( topFrame, 5, 2);
353 topLayout->setSpacing(KDialog::spacingHintSmall()); 363 topLayout->setSpacing(KDialog::spacingHintSmall());
354 topLayout->setMargin(KDialog::marginHintSmall()); 364 topLayout->setMargin(KDialog::marginHintSmall());
355 365
356 QHBox *timeZoneBox = new QHBox( topFrame ); 366 QHBox *timeZoneBox = new QHBox( topFrame );
357 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 367 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
358 368
359 new QLabel( i18n("Timezone:"), timeZoneBox ); 369 new QLabel( i18n("Timezone:"), timeZoneBox );
360 mTimeZoneCombo = new QComboBox( timeZoneBox ); 370 mTimeZoneCombo = new QComboBox( timeZoneBox );
361 if ( QApplication::desktop()->width() < 300 ) { 371 if ( QApplication::desktop()->width() < 300 ) {
362 mTimeZoneCombo->setMaximumWidth(150); 372 mTimeZoneCombo->setMaximumWidth(150);
363 } 373 }
364 374
@@ -407,29 +417,42 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
407 lab = new QLabel( i18n("Daylight end:"), topFrame ); 417 lab = new QLabel( i18n("Daylight end:"), topFrame );
408 topLayout->addWidget(lab, iii,0); 418 topLayout->addWidget(lab, iii,0);
409 mEndDateSavingEdit = new KDateEdit(topFrame); 419 mEndDateSavingEdit = new KDateEdit(topFrame);
410 topLayout->addWidget(mEndDateSavingEdit, iii,1); 420 topLayout->addWidget(mEndDateSavingEdit, iii,1);
411 ++iii; 421 ++iii;
412 QDate current ( 2001, 1,1); 422 QDate current ( 2001, 1,1);
413 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); 423 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
414 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); 424 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
415 425
416 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 426 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
417 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 427 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
418 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); 428 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) );
419
420
421
422 tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); 429 tabWidget->addTab( topFrame, i18n( "Time Zone" ) );
423 430
431
432 topFrame = new QWidget( this );
433 topLayout = new QGridLayout( topFrame, 3, 2);
434 topLayout->setSpacing(KDialog::spacingHintSmall());
435 topLayout->setMargin(KDialog::marginHintSmall());
436 tabWidget->addTab( topFrame, i18n( "Fonts" ) );
437
438 QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame );
439 topLayout->addMultiCellWidget(labb,0,0,0,2);
440 int i = 1;
441 KPrefsWidFont *timeLabelsFont =
442 addWidFont(i18n("Kx/Pi"),i18n("Application Font"),
443 &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame);
444 topLayout->addWidget(timeLabelsFont->label(),i,0);
445 topLayout->addWidget(timeLabelsFont->preview(),i,1);
446 topLayout->addWidget(timeLabelsFont->button(),i,2);
424} 447}
425 448
426void KDEPIMConfigWidget::externalapp_changed( int newApp ) 449void KDEPIMConfigWidget::externalapp_changed( int newApp )
427{ 450{
428 // first store the current data 451 // first store the current data
429 saveEditFieldSettings(); 452 saveEditFieldSettings();
430 453
431 // set mCurrentApp 454 // set mCurrentApp
432 mCurrentApp = (ExternalAppHandler::Types)newApp; 455 mCurrentApp = (ExternalAppHandler::Types)newApp;
433 456
434 // set mCurrentClient 457 // set mCurrentClient
435 switch(mCurrentApp) 458 switch(mCurrentApp)
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 81e3cb1..ac7d205 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -23,41 +23,44 @@
23 23
24/* 24/*
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
28$Id$ 28$Id$
29*/ 29*/
30 30
31#include <kglobal.h> 31#include <kglobal.h>
32#include <kconfig.h> 32#include <kconfig.h>
33#include <klocale.h> 33#include <klocale.h>
34#include <kdebug.h> 34#include <kdebug.h>
35#include <kglobalsettings.h>
35#include <kstaticdeleter.h> 36#include <kstaticdeleter.h>
36 37
37#include <qregexp.h> 38#include <qregexp.h>
38#include <qfile.h> 39#include <qfile.h>
39#include <stdlib.h> 40#include <stdlib.h>
40#include <qtextstream.h> 41#include <qtextstream.h>
41#include <qapplication.h> 42#include <qapplication.h>
42#include "kpimglobalprefs.h" 43#include "kpimglobalprefs.h"
43 44
44KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0; 45KPimGlobalPrefs *KPimGlobalPrefs::sInstance = 0;
45static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP; 46static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP;
46 47
47 48
48KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) 49KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
49 : KPrefs("microkdeglobalrc") 50 : KPrefs("microkdeglobalrc")
50{ 51{
51 mLocaleDict = 0; 52 mLocaleDict = 0;
53 KPrefs::setCurrentGroup("Fonts");
54 addItemFont("ApplicationFont",&mApplicationFont,KGlobalSettings::generalFont() );
52 KPrefs::setCurrentGroup("Locale"); 55 KPrefs::setCurrentGroup("Locale");
53 addItemInt("PreferredLanguage",&mPreferredLanguage,0); 56 addItemInt("PreferredLanguage",&mPreferredLanguage,0);
54 addItemInt("PreferredTime",&mPreferredTime,0); 57 addItemInt("PreferredTime",&mPreferredTime,0);
55 addItemInt("PreferredDate",&mPreferredDate,0); 58 addItemInt("PreferredDate",&mPreferredDate,0);
56 addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); 59 addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false);
57 addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); 60 addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y");
58 addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); 61 addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y");
59 62
60 KPrefs::setCurrentGroup("Time & Date"); 63 KPrefs::setCurrentGroup("Time & Date");
61 64
62 addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); 65 addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") );
63 addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); 66 addItemBool("UseDaylightsaving",&mUseDaylightsaving,true);
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 5e27e85..bf17338 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -92,24 +92,25 @@ class KPimGlobalPrefs : public KPrefs
92 //US I copied the following "locale" settings from KOPrefs 92 //US I copied the following "locale" settings from KOPrefs
93 int mPreferredDate; 93 int mPreferredDate;
94 QString mUserDateFormatLong; 94 QString mUserDateFormatLong;
95 QString mUserDateFormatShort; 95 QString mUserDateFormatShort;
96 int mPreferredLanguage; 96 int mPreferredLanguage;
97 int mPreferredTime; 97 int mPreferredTime;
98 bool mWeekStartsOnSunday; 98 bool mWeekStartsOnSunday;
99 QString mTimeZoneId; 99 QString mTimeZoneId;
100 bool mUseDaylightsaving; 100 bool mUseDaylightsaving;
101 int mDaylightsavingStart; 101 int mDaylightsavingStart;
102 int mDaylightsavingEnd; 102 int mDaylightsavingEnd;
103 bool mTimeZoneAdd30min; 103 bool mTimeZoneAdd30min;
104 QFont mApplicationFont;
104 105
105 int mEmailClient; 106 int mEmailClient;
106 QString mEmailOtherChannel; 107 QString mEmailOtherChannel;
107 QString mEmailOtherMessage; 108 QString mEmailOtherMessage;
108 QString mEmailOtherMessageParameters; 109 QString mEmailOtherMessageParameters;
109 QString mEmailOtherMessage2; 110 QString mEmailOtherMessage2;
110 QString mEmailOtherMessageParameters2; 111 QString mEmailOtherMessageParameters2;
111 112
112 int mPhoneClient; 113 int mPhoneClient;
113 QString mPhoneOtherChannel; 114 QString mPhoneOtherChannel;
114 QString mPhoneOtherMessage; 115 QString mPhoneOtherMessage;
115 QString mPhoneOtherMessageParameters; 116 QString mPhoneOtherMessageParameters;
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index fbbf814..e57defe 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -2,25 +2,25 @@
2#include "kconfig.h" 2#include "kconfig.h"
3#include "kglobal.h" 3#include "kglobal.h"
4#include "kconfigbase.h" 4#include "kconfigbase.h"
5 5
6#include <qapplication.h> 6#include <qapplication.h>
7 7
8QFont KGlobalSettings::generalFont() 8QFont KGlobalSettings::generalFont()
9{ 9{
10 int size = 12; 10 int size = 12;
11 if (QApplication::desktop()->width() < 480 ) 11 if (QApplication::desktop()->width() < 480 )
12 size = 10; 12 size = 10;
13 QFont f = QApplication::font(); 13 QFont f = QApplication::font();
14 //qDebug("pointsize %d ", f.pointSize()); 14 //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1());
15 f.setPointSize( size ); 15 f.setPointSize( size );
16 return f; 16 return f;
17} 17}
18QFont KGlobalSettings::toolBarFont() 18QFont KGlobalSettings::toolBarFont()
19{ 19{
20 return QApplication::font(); 20 return QApplication::font();
21} 21}
22 22
23QColor KGlobalSettings::toolBarHighlightColor() 23QColor KGlobalSettings::toolBarHighlightColor()
24{ 24{
25 return QColor( "black" ); 25 return QColor( "black" );
26} 26}
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
@@ -186,24 +186,25 @@ int main(int argc, char *argv[])
186 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/"); 186 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/");
187 else 187 else
188 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/"); 188 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/");
189#else 189#else
190 QString fileName ; 190 QString fileName ;
191 fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; 191 fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/";
192 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 192 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
193 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 193 QApplication::addLibraryPath ( qApp->applicationDirPath () );
194 194
195#endif 195#endif
196 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); 196 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager")));
197 KPimGlobalPrefs::instance()->setGlobalConfig(); 197 KPimGlobalPrefs::instance()->setGlobalConfig();
198 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
198 199
199 a.newInstance(); 200 a.newInstance();
200 201
201 //US KAddressBookMain m ; 202 //US KAddressBookMain m ;
202 203
203 //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 204 //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
204 /*US 205 /*US
205#ifndef DESKTOP_VERSION 206#ifndef DESKTOP_VERSION
206 a.showMainWidget( &m ); 207 a.showMainWidget( &m );
207#else 208#else
208 a.setMainWidget( &m ); 209 a.setMainWidget( &m );
209 m.resize (640, 480 ); 210 m.resize (640, 480 );