summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp15
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp18
-rw-r--r--kmicromail/opiemail.cpp2
-rw-r--r--korganizer/calendarview.cpp6
-rw-r--r--korganizer/koprefs.cpp2
-rw-r--r--korganizer/koprefsdialog.cpp106
-rw-r--r--korganizer/mainwindow.cpp2
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp2
-rw-r--r--libkdepim/kpimglobalprefs.cpp17
-rw-r--r--libkdepim/kpimglobalprefs.h4
10 files changed, 93 insertions, 81 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 10b1013..965fb06 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -12,12 +12,13 @@
12#include <qregexp.h> 12#include <qregexp.h>
13#include <kglobal.h> 13#include <kglobal.h>
14#include <stdio.h> 14#include <stdio.h>
15#include <qdir.h> 15#include <qdir.h>
16#include "kaddressbookmain.h" 16#include "kaddressbookmain.h"
17#include "externalapphandler.h" 17#include "externalapphandler.h"
18#include <libkdepim/kpimglobalprefs.h>
18 19
19int main( int argc, char **argv ) 20int main( int argc, char **argv )
20{ 21{
21#ifndef DESKTOP_VERSION 22#ifndef DESKTOP_VERSION
22 QPEApplication a( argc, argv ); 23 QPEApplication a( argc, argv );
23 a.setKeepRunning (); 24 a.setKeepRunning ();
@@ -70,25 +71,13 @@ int main( int argc, char **argv )
70 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 71 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
71 KAddressBookMain m ; 72 KAddressBookMain m ;
72//US MainWindow m; 73//US MainWindow m;
73 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 74 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
74 75
75 { 76 {
76 KConfig kon ( locateLocal( "config", "korganizerrc" ) ); 77 KPimGlobalPrefs::instance()->setGlobalConfig();
77 kon.setGroup("Locale");
78 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) );
79 QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( "");
80 KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) );
81 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
82 dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" );
83 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
84 kon.setGroup("Time & Date");
85 KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ),
86 kon.readNumEntry( "DaylightsavingStart", 90),
87 kon.readNumEntry( "DaylightsavingEnd",304) );
88 KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") );
89 } 78 }
90#ifndef DESKTOP_VERSION 79#ifndef DESKTOP_VERSION
91 a.showMainWidget( &m ); 80 a.showMainWidget( &m );
92#else 81#else
93 a.setMainWidget( &m ); 82 a.setMainWidget( &m );
94 m.resize (640, 480 ); 83 m.resize (640, 480 );
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index 09a6447..e691082 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -26,31 +26,13 @@ Genericwrapper::~Genericwrapper()
26 mailstorage_free(m_storage); 26 mailstorage_free(m_storage);
27 } 27 }
28 cleanMimeCache(); 28 cleanMimeCache();
29} 29}
30const QDateTime Genericwrapper::parseDateTime( mailimf_date_time *date ) 30const QDateTime Genericwrapper::parseDateTime( mailimf_date_time *date )
31{ 31{
32 static bool init = false ;
33 if ( ! init ) {
34 KConfig kon ( locateLocal( "config", "korganizerrc" ) );
35 kon.setGroup("Locale");
36 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)kon.readNumEntry( "PreferredDate",0) );
37 QString dummy = kon.readEntry( "UserDateFormatShort","%aK %d.%m.%y" );// kon.readEntry( "");
38 KGlobal::locale()->setHore24Format( !kon.readNumEntry( "PreferredTime",0 ) );
39 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
40 dummy = kon.readEntry( "UserDateFormatLong","%A %d %b %y" );
41 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
42 kon.setGroup("Time & Date");
43 KGlobal::locale()->setDaylightSaving( kon.readBoolEntry( "UseDaylightsaving", true ),
44 kon.readNumEntry( "DaylightsavingStart", 90),
45 kon.readNumEntry( "DaylightsavingEnd",304) );
46 KGlobal::locale()->setTimezone( kon.readEntry( "TimeZoneName" ," 00:00 Europe/London(UTC)") );
47
48 init = true;
49 32
50 }
51 QDate da (date->dt_year,date->dt_month, date->dt_day ); 33 QDate da (date->dt_year,date->dt_month, date->dt_day );
52 QTime ti ( date->dt_hour, date->dt_min, date->dt_sec ); 34 QTime ti ( date->dt_hour, date->dt_min, date->dt_sec );
53 QDateTime dt ( da ,ti ); 35 QDateTime dt ( da ,ti );
54 int addsec = -date->dt_zone*36; 36 int addsec = -date->dt_zone*36;
55 //qDebug("adsec1 %d ",addsec ); 37 //qDebug("adsec1 %d ",addsec );
56 dt = dt.addSecs( addsec ); 38 dt = dt.addSecs( addsec );
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 9a1a750..164988c 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -12,12 +12,13 @@
12#include "accountitem.h" 12#include "accountitem.h"
13#include "koprefsdialog.h" 13#include "koprefsdialog.h"
14 14
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16#include <qtimer.h> 16#include <qtimer.h>
17#include <libkdepim/externalapphandler.h> 17#include <libkdepim/externalapphandler.h>
18#include <libkdepim/kpimglobalprefs.h>
18 19
19#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
20#include <libmailwrapper/smtpwrapper.h> 21#include <libmailwrapper/smtpwrapper.h>
21#include <libmailwrapper/mailtypes.h> 22#include <libmailwrapper/mailtypes.h>
22#include <libmailwrapper/abstractmail.h> 23#include <libmailwrapper/abstractmail.h>
23/* OPIE */ 24/* OPIE */
@@ -29,12 +30,13 @@
29//using namespace Opie::Core; 30//using namespace Opie::Core;
30 31
31OpieMail::OpieMail( QWidget *parent, const char *name ) 32OpieMail::OpieMail( QWidget *parent, const char *name )
32 : MainWindow( parent, name) //, WStyle_ContextHelp ) 33 : MainWindow( parent, name) //, WStyle_ContextHelp )
33{ 34{
34 settings = new Settings(); 35 settings = new Settings();
36 KPimGlobalPrefs::instance()->setGlobalConfig();
35 37
36 folderView->populate( settings->getAccounts() ); 38 folderView->populate( settings->getAccounts() );
37 39
38} 40}
39 41
40OpieMail::~OpieMail() 42OpieMail::~OpieMail()
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index bc8625d..3635cfa 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -60,12 +60,13 @@
60 60
61#include <libkdepim/ksyncprefsdialog.h> 61#include <libkdepim/ksyncprefsdialog.h>
62#include <krun.h> 62#include <krun.h>
63#include <kdirwatch.h> 63#include <kdirwatch.h>
64#include <libkdepim/kdatepicker.h> 64#include <libkdepim/kdatepicker.h>
65#include <libkdepim/ksyncprofile.h> 65#include <libkdepim/ksyncprofile.h>
66#include <libkdepim/kpimglobalprefs.h>
66 67
67#include <libkcal/vcaldrag.h> 68#include <libkcal/vcaldrag.h>
68#include <libkcal/icaldrag.h> 69#include <libkcal/icaldrag.h>
69#include <libkcal/icalformat.h> 70#include <libkcal/icalformat.h>
70#include <libkcal/vcalformat.h> 71#include <libkcal/vcalformat.h>
71#include <libkcal/scheduler.h> 72#include <libkcal/scheduler.h>
@@ -1881,26 +1882,29 @@ void CalendarView::goNextMonth()
1881} 1882}
1882 1883
1883void CalendarView::goPreviousMonth() 1884void CalendarView::goPreviousMonth()
1884{ 1885{
1885 mNavigator->selectPreviousMonth(); 1886 mNavigator->selectPreviousMonth();
1886} 1887}
1887void CalendarView::writeLocale() 1888void CalendarView::writeLocale()
1888{ 1889{
1890 //KPimGlobalPrefs::instance()->setGlobalConfig();
1891#if 0
1889 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); 1892 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime );
1890 KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); 1893 KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday );
1891 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); 1894 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate );
1892 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); 1895 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage );
1893 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1896 QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1894 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 1897 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
1895 dummy = KOPrefs::instance()->mUserDateFormatShort; 1898 dummy = KOPrefs::instance()->mUserDateFormatShort;
1896 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 1899 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
1897 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, 1900 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
1898 KOPrefs::instance()->mDaylightsavingStart, 1901 KOPrefs::instance()->mDaylightsavingStart,
1899 KOPrefs::instance()->mDaylightsavingEnd ); 1902 KOPrefs::instance()->mDaylightsavingEnd );
1900 KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); 1903 KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId );
1904#endif
1901} 1905}
1902void CalendarView::updateConfig() 1906void CalendarView::updateConfig()
1903{ 1907{
1904 writeLocale(); 1908 writeLocale();
1905 if ( KOPrefs::instance()->mUseAppColors ) 1909 if ( KOPrefs::instance()->mUseAppColors )
1906 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 1910 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index dd978bf..5d7db4f 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -38,12 +38,13 @@
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 <libkdepim/kpimglobalprefs.h>
44 45
45#include "koprefs.h" 46#include "koprefs.h"
46#include "mainwindow.h" 47#include "mainwindow.h"
47 48
48const char *germanwords[][2] = { 49const char *germanwords[][2] = {
49#include "wordsgerman.h" 50#include "wordsgerman.h"
@@ -387,12 +388,13 @@ QStringList KOPrefs::getDefaultList()
387 retval.sort(); 388 retval.sort();
388 return retval; 389 return retval;
389} 390}
390 391
391void KOPrefs::usrReadConfig() 392void KOPrefs::usrReadConfig()
392{ 393{
394 mPreferredLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage;
393 mLocaleDict = 0; 395 mLocaleDict = 0;
394 // pending LR fix translation 396 // pending LR fix translation
395 // qDebug("KOPrefs::usrReadConfig() fix translation "); 397 // qDebug("KOPrefs::usrReadConfig() fix translation ");
396 if ( mPreferredLanguage > 0 && mPreferredLanguage < 4 ) { 398 if ( mPreferredLanguage > 0 && mPreferredLanguage < 4 ) {
397 if ( mPreferredLanguage == 1 ) { 399 if ( mPreferredLanguage == 1 ) {
398 mLocaleDict = new QDict<QString>; 400 mLocaleDict = new QDict<QString>;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 7dafcd8..b4b3b27 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -78,16 +78,16 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
78 mCategoryDict.setAutoDelete(true); 78 mCategoryDict.setAutoDelete(true);
79 79
80 KGlobal::locale()->insertCatalogue("timezones"); 80 KGlobal::locale()->insertCatalogue("timezones");
81 81
82 setupGlobalTab(); 82 setupGlobalTab();
83 setupMainTab(); 83 setupMainTab();
84 setupLocaleTab(); 84 // setupLocaleTab();
85 setupTimeZoneTab(); 85 //setupTimeZoneTab();
86 setupTimeTab(); 86 setupTimeTab();
87 setupLocaleDateTab(); 87 //setupLocaleDateTab();
88 setupFontsTab(); 88 setupFontsTab();
89 setupColorsTab(); 89 setupColorsTab();
90 setupViewsTab(); 90 setupViewsTab();
91 //setupSyncTab(); 91 //setupSyncTab();
92 //setupSyncAlgTab(); 92 //setupSyncAlgTab();
93 //setupPrinterTab(); 93 //setupPrinterTab();
@@ -107,12 +107,13 @@ void KOPrefsDialog::setupGlobalTab()
107 topLayout->addWidget( kdelibcfg ); 107 topLayout->addWidget( kdelibcfg );
108 108
109 109
110} 110}
111void KOPrefsDialog::setupLocaleDateTab() 111void KOPrefsDialog::setupLocaleDateTab()
112{ 112{
113#if 0
113QFrame *topFrame = addPage(i18n("Date Format"),0,0); 114QFrame *topFrame = addPage(i18n("Date Format"),0,0);
114 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 115 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
115 topLayout->setSpacing(spacingHint()); 116 topLayout->setSpacing(spacingHint());
116 topLayout->setMargin(marginHint()); 117 topLayout->setMargin(marginHint());
117 int iii = 0; 118 int iii = 0;
118 119
@@ -156,17 +157,19 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
156 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 157 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
157 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 158 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
158 ++iii; 159 ++iii;
159 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 160 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
160 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 161 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
161 ++iii; 162 ++iii;
163#endif
162 164
163} 165}
164 166
165void KOPrefsDialog::setupLocaleTab() 167void KOPrefsDialog::setupLocaleTab()
166{ 168{
169#if 0
167 QFrame *topFrame = addPage(i18n("Locale"),0,0); 170 QFrame *topFrame = addPage(i18n("Locale"),0,0);
168 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 171 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
169 topLayout->setSpacing(spacingHint()); 172 topLayout->setSpacing(spacingHint());
170 topLayout->setMargin(marginHint()); 173 topLayout->setMargin(marginHint());
171 int iii = 0; 174 int iii = 0;
172 KPrefsDialogWidRadios *syncPrefsGroup = 175 KPrefsDialogWidRadios *syncPrefsGroup =
@@ -220,12 +223,13 @@ void KOPrefsDialog::setupLocaleTab()
220 ++iii; 223 ++iii;
221 sb = 224 sb =
222 addWidBool(i18n("Quick load/save (w/o Unicode)"), 225 addWidBool(i18n("Quick load/save (w/o Unicode)"),
223 &(KOPrefs::instance()->mUseQuicksave),topFrame); 226 &(KOPrefs::instance()->mUseQuicksave),topFrame);
224 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 227 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
225#endif 228#endif
229#endif
226} 230}
227void KOPrefsDialog::showSyncPage() 231void KOPrefsDialog::showSyncPage()
228{ 232{
229 showPage ( 2 ) ; 233 showPage ( 2 ) ;
230 234
231} 235}
@@ -620,28 +624,13 @@ void KOPrefsDialog::setupViewsTab()
620 KPrefsDialogWidBool *enableToolTips = 624 KPrefsDialogWidBool *enableToolTips =
621 addWidBool(i18n("Enable tooltips displaying summary of ev."), 625 addWidBool(i18n("Enable tooltips displaying summary of ev."),
622 &(KOPrefs::instance()->mEnableToolTips),topFrame); 626 &(KOPrefs::instance()->mEnableToolTips),topFrame);
623 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 627 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
624 628
625 } 629 }
626 KPrefsDialogWidBool *passwdk = 630
627 addWidBool(i18n("Show parent To-Do's in What's Next view"),
628 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
629 topLayout->addWidget(passwdk->checkBox(), ii++,0);
630
631 passwdk =
632 addWidBool(i18n("Show location in What's Next view"),
633 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
634 topLayout->addWidget(passwdk->checkBox(), ii++,0);
635
636 passwdk =
637 addWidBool(i18n("Show Sync Events in WN/Agenda view"),
638 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
639 topLayout->addWidget(passwdk->checkBox(), ii++,0);
640
641
642 KPrefsDialogWidBool *marcusBainsEnabled = 631 KPrefsDialogWidBool *marcusBainsEnabled =
643 addWidBool(i18n("Show Marcus Bains line"), 632 addWidBool(i18n("Show Marcus Bains line"),
644 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 633 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
645 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); 634 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
646 635
647 636
@@ -796,13 +785,39 @@ void KOPrefsDialog::setupViewsTab()
796 785
797 holidayColor = 786 holidayColor =
798 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 787 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
799 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 788 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
800 topLayout->addWidget(holidayColor->label(),ii,0); 789 topLayout->addWidget(holidayColor->label(),ii,0);
801 topLayout->addWidget(holidayColor->button(),ii++,1); 790 topLayout->addWidget(holidayColor->button(),ii++,1);
802 791 // *********************** What'sNext View
792 topFrame = addPage(i18n("What's Next View"),0,0);
793 // DesktopIcon("viewmag",KIcon::SizeMedium));
794
795 topLayout = new QGridLayout(topFrame,4,1);
796 topLayout->setSpacing(spacingHint());
797 topLayout->setMargin(marginHint());
798 ii = 0;
799 KPrefsDialogWidBool *passwdk =
800 addWidBool(i18n("Show parent To-Do's in What's Next view"),
801 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
802 topLayout->addWidget(passwdk->checkBox(), ii++,0);
803
804 passwdk =
805 addWidBool(i18n("Show location in What's Next view"),
806 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
807 topLayout->addWidget(passwdk->checkBox(), ii++,0);
808
809 passwdk =
810 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"),
811 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
812 topLayout->addWidget(passwdk->checkBox(), ii++,0);
813 passwdk =
814 addWidBool(i18n("Use short date in \nWhat's Next/Event view"),
815 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
816 topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1);
817
803 // *********************** Todo View 818 // *********************** Todo View
804 819
805 topFrame = addPage(i18n("Todo View"),0,0); 820 topFrame = addPage(i18n("Todo View"),0,0);
806 // DesktopIcon("viewmag",KIcon::SizeMedium)); 821 // DesktopIcon("viewmag",KIcon::SizeMedium));
807 822
808 topLayout = new QGridLayout(topFrame,4,1); 823 topLayout = new QGridLayout(topFrame,4,1);
@@ -1333,16 +1348,16 @@ void KOPrefsDialog::usrReadConfig()
1333{ 1348{
1334 kdelibcfg->readConfig(); 1349 kdelibcfg->readConfig();
1335 mNameEdit->setText(KOPrefs::instance()->fullName()); 1350 mNameEdit->setText(KOPrefs::instance()->fullName());
1336 mEmailEdit->setText(KOPrefs::instance()->email()); 1351 mEmailEdit->setText(KOPrefs::instance()->email());
1337 1352
1338 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1353 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1339 QDate current ( 2001, 1,1); 1354 // QDate current ( 2001, 1,1);
1340 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1355 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1341 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1356 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1342 setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); 1357 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1343 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1358 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1344 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1359 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
1345 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); 1360 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
1346 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); 1361 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
1347 // if (KOPrefs::instance()->mAllDaySize > 47 ) 1362 // if (KOPrefs::instance()->mAllDaySize > 47 )
1348 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; 1363 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
@@ -1363,16 +1378,16 @@ void KOPrefsDialog::usrReadConfig()
1363 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); 1378 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
1364 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); 1379 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
1365 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); 1380 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
1366 1381
1367 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1382 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1368 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1383 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1369 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1384 //QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1370 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 1385 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1371 dummy = KOPrefs::instance()->mUserDateFormatShort; 1386 //dummy = KOPrefs::instance()->mUserDateFormatShort;
1372 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 1387 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1373 updateCategories(); 1388 updateCategories();
1374 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1389 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
1375 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1390 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
1376 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1391 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1377 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1392 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1378} 1393}
@@ -1386,33 +1401,33 @@ void KOPrefsDialog::usrWriteConfig()
1386 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); 1401 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
1387 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); 1402 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
1388 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); 1403 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
1389 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); 1404 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1390 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1405 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1391 1406
1392 KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 1407 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1393 KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 1408 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1394 KOPrefs::instance()->setFullName(mNameEdit->text()); 1409 KOPrefs::instance()->setFullName(mNameEdit->text());
1395 KOPrefs::instance()->setEmail(mEmailEdit->text()); 1410 KOPrefs::instance()->setEmail(mEmailEdit->text());
1396 1411
1397 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1412 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1398 1413
1399 KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); 1414 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1400 QDate date; 1415 //QDate date;
1401 date = mStartDateSavingEdit->date(); 1416 //date = mStartDateSavingEdit->date();
1402 int sub = 0; 1417 //int sub = 0;
1403 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1418 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1404 sub = 1; 1419 // sub = 1;
1405 KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; 1420// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1406 date = mEndDateSavingEdit->date(); 1421// date = mEndDateSavingEdit->date();
1407 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1422// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1408 sub = 1; 1423// sub = 1;
1409 else 1424// else
1410 sub = 0; 1425// sub = 0;
1411 KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; 1426// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
1412 // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); 1427// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
1413 1428
1414 KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); 1429 KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
1415 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); 1430 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value();
1416 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); 1431 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
1417 1432
1418 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); 1433 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
@@ -1554,12 +1569,13 @@ void KOPrefsDialog::updateTimezoneOffset( int index )
1554 } 1569 }
1555 */ 1570 */
1556} 1571}
1557 1572
1558void KOPrefsDialog::setupTimeZoneTab() 1573void KOPrefsDialog::setupTimeZoneTab()
1559{ 1574{
1575#if 0
1560 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1576 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1561 // DesktopIcon("clock",KIcon::SizeMedium)); 1577 // DesktopIcon("clock",KIcon::SizeMedium));
1562 1578
1563 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1579 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1564 topLayout->setSpacing(spacingHint()); 1580 topLayout->setSpacing(spacingHint());
1565 topLayout->setMargin(marginHint()); 1581 topLayout->setMargin(marginHint());
@@ -1612,10 +1628,10 @@ void KOPrefsDialog::setupTimeZoneTab()
1612 mEndDateSavingEdit = new KDateEdit(topFrame); 1628 mEndDateSavingEdit = new KDateEdit(topFrame);
1613 topLayout->addWidget(mEndDateSavingEdit, iii,1); 1629 topLayout->addWidget(mEndDateSavingEdit, iii,1);
1614 ++iii; 1630 ++iii;
1615 QDate current ( 2001, 1,1); 1631 QDate current ( 2001, 1,1);
1616 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1632 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1617 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1633 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1618 1634#endif
1619 1635
1620} 1636}
1621 1637
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index b597a6a..1c4a186 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -31,12 +31,13 @@
31 31
32#endif 32#endif
33#include <libkcal/calendarlocal.h> 33#include <libkcal/calendarlocal.h>
34#include <libkcal/todo.h> 34#include <libkcal/todo.h>
35#include <libkdepim/ksyncprofile.h> 35#include <libkdepim/ksyncprofile.h>
36#include <libkcal/kincidenceformatter.h> 36#include <libkcal/kincidenceformatter.h>
37#include <libkdepim/kpimglobalprefs.h>
37 38
38#include "calendarview.h" 39#include "calendarview.h"
39#include "koviewmanager.h" 40#include "koviewmanager.h"
40#include "datenavigator.h" 41#include "datenavigator.h"
41#include "koagendaview.h" 42#include "koagendaview.h"
42#include "koagenda.h" 43#include "koagenda.h"
@@ -78,12 +79,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
78 bool showWarning = !finf.exists(); 79 bool showWarning = !finf.exists();
79 setIcon(SmallIcon( "ko24" ) ); 80 setIcon(SmallIcon( "ko24" ) );
80 mBlockAtStartup = true; 81 mBlockAtStartup = true;
81 mFlagKeyPressed = false; 82 mFlagKeyPressed = false;
82 setCaption("KOrganizer/Pi"); 83 setCaption("KOrganizer/Pi");
83 KOPrefs *p = KOPrefs::instance(); 84 KOPrefs *p = KOPrefs::instance();
85 KPimGlobalPrefs::instance()->setGlobalConfig();
84 // if ( QApplication::desktop()->height() > 480 ) { 86 // if ( QApplication::desktop()->height() > 480 ) {
85// if ( p->mHourSize == 4 ) 87// if ( p->mHourSize == 4 )
86// p->mHourSize = 6; 88// p->mHourSize = 6;
87// } 89// }
88 if ( p->mHourSize > 18 ) 90 if ( p->mHourSize > 18 )
89 p->mHourSize = 18; 91 p->mHourSize = 18;
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 00a07d9..2819ab1 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -741,13 +741,13 @@ void KDEPIMConfigWidget::usrWriteConfig()
741 prefs->mSipOtherChannel = mSipOtherChannel; 741 prefs->mSipOtherChannel = mSipOtherChannel;
742 prefs->mSipOtherMessage = mSipOtherMessage; 742 prefs->mSipOtherMessage = mSipOtherMessage;
743 prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; 743 prefs->mSipOtherMessageParameters = mSipOtherMessageParameters;
744 744
745 //release the cache that other views can access the changed values instantanious 745 //release the cache that other views can access the changed values instantanious
746 ExternalAppHandler::instance()->loadConfig(); 746 ExternalAppHandler::instance()->loadConfig();
747 747 KPimGlobalPrefs::instance()->setGlobalConfig();
748} 748}
749 749
750 750
751void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, 751void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text,
752 const QStringList *tags) 752 const QStringList *tags)
753{ 753{
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 12a503d..a896a0f 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -97,12 +97,29 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
97 addItemString( "SIPChannel", &mSipOtherChannel, "" ); 97 addItemString( "SIPChannel", &mSipOtherChannel, "" );
98 addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); 98 addItemString( "SIPChannelMessage", &mSipOtherMessage, "" );
99 addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); 99 addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" );
100 100
101} 101}
102 102
103void KPimGlobalPrefs::setGlobalConfig()
104{
105
106 KGlobal::locale()->setHore24Format( !mPreferredTime );
107 KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday );
108 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate );
109 KGlobal::locale()->setLanguage( mPreferredLanguage );
110 QString dummy = mUserDateFormatLong;
111 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
112 dummy = mUserDateFormatShort;
113 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
114 KGlobal::locale()->setDaylightSaving( mUseDaylightsaving,
115 mDaylightsavingStart,
116 mDaylightsavingEnd );
117 KGlobal::locale()->setTimezone( mTimeZoneId );
118
119}
103KPimGlobalPrefs::~KPimGlobalPrefs() 120KPimGlobalPrefs::~KPimGlobalPrefs()
104{ 121{
105} 122}
106 123
107KPimGlobalPrefs *KPimGlobalPrefs::instance() 124KPimGlobalPrefs *KPimGlobalPrefs::instance()
108{ 125{
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index dad78e6..84ba689 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -34,12 +34,13 @@ $Id$
34#include "kprefs.h" 34#include "kprefs.h"
35 35
36class KPimGlobalPrefs : public KPrefs 36class KPimGlobalPrefs : public KPrefs
37{ 37{
38 public: 38 public:
39 39
40 void setGlobalConfig();
40 static KPimGlobalPrefs *instance(); 41 static KPimGlobalPrefs *instance();
41 42
42 43
43 virtual ~KPimGlobalPrefs(); 44 virtual ~KPimGlobalPrefs();
44 45
45 46
@@ -93,15 +94,12 @@ class KPimGlobalPrefs : public KPrefs
93 bool mWeekStartsOnSunday; 94 bool mWeekStartsOnSunday;
94 QString mTimeZoneId; 95 QString mTimeZoneId;
95 bool mUseDaylightsaving; 96 bool mUseDaylightsaving;
96 int mDaylightsavingStart; 97 int mDaylightsavingStart;
97 int mDaylightsavingEnd; 98 int mDaylightsavingEnd;
98 99
99
100
101
102 int mEmailClient; 100 int mEmailClient;
103 QString mEmailOtherChannel; 101 QString mEmailOtherChannel;
104 QString mEmailOtherMessage; 102 QString mEmailOtherMessage;
105 QString mEmailOtherMessageParameters; 103 QString mEmailOtherMessageParameters;
106 QString mEmailOtherMessage2; 104 QString mEmailOtherMessage2;
107 QString mEmailOtherMessageParameters2; 105 QString mEmailOtherMessageParameters2;