summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp12
-rw-r--r--korganizer/kolistview.cpp5
-rw-r--r--korganizer/koprefs.cpp13
-rw-r--r--korganizer/koprefs.h9
4 files changed, 10 insertions, 29 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 0306e07..e64d83a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1196,13 +1196,13 @@ void CalendarView::setSyncName( QString s )
}
bool CalendarView::syncCalendar(QString filename, int mode)
{
//qDebug("syncCalendar %s ", filename.latin1());
mGlobalSyncMode = SYNC_MODE_NORMAL;
CalendarLocal* calendar = new CalendarLocal();
- calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
+ calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
FileStorage* storage = new FileStorage( calendar );
bool syncOK = false;
storage->setFileName( filename );
// qDebug("loading ... ");
if ( storage->load() ) {
getEventViewerDialog()->setSyncMode( true );
@@ -1227,13 +1227,13 @@ bool CalendarView::syncCalendar(QString filename, int mode)
void CalendarView::syncExternal( int mode )
{
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
qApp->processEvents();
CalendarLocal* calendar = new CalendarLocal();
- calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
+ calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
bool syncOK = false;
bool loadSuccess = false;
PhoneFormat* phoneFormat = 0;
emit tempDisableBR(true);
#ifndef DESKTOP_VERSION
SharpFormat* sharpFormat = 0;
@@ -1495,13 +1495,13 @@ bool CalendarView::importQtopia( const QString &categories,
mGlobalSyncMode = SYNC_MODE_QTOPIA;
mCurrentSyncDevice = "qtopia-XML";
if ( mSyncManager->mAskForPreferences )
edit_sync_options();
qApp->processEvents();
CalendarLocal* calendar = new CalendarLocal();
- calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
+ calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
bool syncOK = false;
QtopiaFormat qtopiaFormat;
qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories));
bool loadOk = true;
if ( !categories.isEmpty() )
loadOk = qtopiaFormat.load( calendar, categories );
@@ -1998,24 +1998,24 @@ void CalendarView::writeLocale()
KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
dummy = KOPrefs::instance()->mUserDateFormatShort;
KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
KOPrefs::instance()->mDaylightsavingStart,
KOPrefs::instance()->mDaylightsavingEnd );
- KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId );
+ KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId );
#endif
}
void CalendarView::updateConfig()
{
writeLocale();
if ( KOPrefs::instance()->mUseAppColors )
QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
emit configChanged();
mTodoList->updateConfig();
// mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
- mCalendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
+ mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
// To make the "fill window" configurations work
//mViewManager->raiseCurrentView();
}
void CalendarView::eventChanged(Event *event)
@@ -2317,13 +2317,13 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
if ( createbup ) {
QString description = "\n";
CalendarLocal* cal = new CalendarLocal();
if ( beamDialog->beamLocal() )
cal->setLocalTime();
else
- cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
+ cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
Incidence *incidence = delSel.first();
bool addText = false;
if ( delSel.count() < 10 )
addText = true;
else {
description.sprintf(i18n(" %d items?"),delSel.count() );
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index bafd349..d3aa650 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -36,12 +36,13 @@
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <kglobal.h>
+#include <libkdepim/kpimglobalprefs.h>
#include <libkcal/calendar.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/icalformat.h>
#include <libkcal/vcalformat.h>
#include <libkcal/recurrence.h>
#include <libkcal/filestorage.h>
@@ -374,13 +375,13 @@ void KOListView::beamSelected()
fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs";
QString mes;
bool createbup = true;
if ( createbup ) {
QString description = "\n";
CalendarLocal* cal = new CalendarLocal();
- cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
+ cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
Incidence *incidence = delSel.first();
while ( incidence ) {
Incidence *in = incidence->clone();
description += in->summary() + "\n";
cal->addIncidence( in );
incidence = delSel.next();
@@ -525,13 +526,13 @@ void KOListView::saveToFile()
if ( result != 0 ) {
createbup = false;
}
}
if ( createbup ) {
CalendarLocal cal;
- cal.setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
+ cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
Incidence *incidence = delSel.first();
while ( incidence ) {
cal.addIncidence( incidence->clone() );
incidence = delSel.next();
}
ICalFormat format;
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 258f738..ba1c6d1 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -140,24 +140,16 @@ KOPrefs::KOPrefs() :
addItemInt("Mail Client",&mMailClient,MailClientKMail);
addItemBool("Use Control Center Email",&mEmailControlCenter,false);
addItemBool("Bcc",&mBcc,false);
KPrefs::setCurrentGroup("Time & Date");
- // addItemString("Time Zone",&mTimeZone,"+0100");
- addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") );
- // addItemInt("TimeZoneOffset",&mTimeZoneOffset,60);
- addItemBool("UseDaylightsaving",&mUseDaylightsaving,true);
- addItemInt("DaylightsavingStart",&mDaylightsavingStart,90);
- addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304);
-
addItemInt("Default Start Time",&mStartTime,10);
addItemInt("Default Duration",&mDefaultDuration,2);
addItemInt("Default Alarm Time",&mAlarmTime,3);
- addItemInt("Daylight Savings",&mDaylightSavings,0);
KPrefs::setCurrentGroup("AlarmSettings");
addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
@@ -351,13 +343,13 @@ void KOPrefs::fillMailDefaults()
if (mName.isEmpty()) mName = i18n("Anonymous");
if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere");
}
void KOPrefs::setTimeZoneIdDefault()
{
- mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)");
+ ;
}
void KOPrefs::setCategoryDefaults()
{
mCustomCategories.clear();
mCustomCategories = getDefaultList();
@@ -485,15 +477,12 @@ void KOPrefs::usrReadConfig()
QStringList::Iterator it;
for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor));
}
- if (mTimeZoneId.isEmpty()) {
- setTimeZoneIdDefault();
- }
KPimPrefs::usrReadConfig();
}
void KOPrefs::usrWriteConfig()
{
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 03df59b..c74b0ef 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -92,19 +92,15 @@ class KOPrefs : public KPimPrefs
bool mEnableGroupScheduling;
bool mEnableProjectView;
int mDefaultFormat;
int mMailClient;
- QString mTimeZone;
- //QString mTimeZoneName; // e.g. +00:04:00 Indian/Mauritius
- //int mTimeZoneOffset; // e.g. -240 min
int mStartTime;
int mDefaultDuration;
int mAlarmTime;
- int mDaylightSavings;
int mWorkingHoursStart;
int mWorkingHoursEnd;
bool mExcludeHolidays;
bool mExcludeSaturdays;
bool mMarcusBainsShowSeconds;
@@ -268,17 +264,12 @@ class KOPrefs : public KPimPrefs
int mPreferredDate;
QString mUserDateFormatLong;
QString mUserDateFormatShort;
int mPreferredLanguage;
int mPreferredTime;
bool mWeekStartsOnSunday;
- QString mTimeZoneId;
- bool mUseDaylightsaving;
- int mDaylightsavingStart;
- int mDaylightsavingEnd;
-
private:
QDict<QColor> mCategoryColors;
QColor mDefaultCategoryColor;
QFont mDefaultTimeBarFont;