summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2004-10-22 22:10:16 (UTC)
committer zautrix <zautrix>2004-10-22 22:10:16 (UTC)
commitb8da6435b8e5941eb1824873e68d8a6a728fae5e (patch) (unidiff)
treebc5ed11961e89bcd606f6fbca32185dbf8afab7a /korganizer/calendarview.cpp
parenta5274f27dc71e1a0ffae73f32f84f4dd013b4b76 (diff)
downloadkdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.zip
kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.gz
kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.bz2
fixed an ugly timezone bug
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp12
1 files changed, 6 insertions, 6 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 )
1196} 1196}
1197bool CalendarView::syncCalendar(QString filename, int mode) 1197bool CalendarView::syncCalendar(QString filename, int mode)
1198{ 1198{
1199 //qDebug("syncCalendar %s ", filename.latin1()); 1199 //qDebug("syncCalendar %s ", filename.latin1());
1200 mGlobalSyncMode = SYNC_MODE_NORMAL; 1200 mGlobalSyncMode = SYNC_MODE_NORMAL;
1201 CalendarLocal* calendar = new CalendarLocal(); 1201 CalendarLocal* calendar = new CalendarLocal();
1202 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 1202 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1203 FileStorage* storage = new FileStorage( calendar ); 1203 FileStorage* storage = new FileStorage( calendar );
1204 bool syncOK = false; 1204 bool syncOK = false;
1205 storage->setFileName( filename ); 1205 storage->setFileName( filename );
1206 // qDebug("loading ... "); 1206 // qDebug("loading ... ");
1207 if ( storage->load() ) { 1207 if ( storage->load() ) {
1208 getEventViewerDialog()->setSyncMode( true ); 1208 getEventViewerDialog()->setSyncMode( true );
@@ -1227,13 +1227,13 @@ bool CalendarView::syncCalendar(QString filename, int mode)
1227void CalendarView::syncExternal( int mode ) 1227void CalendarView::syncExternal( int mode )
1228{ 1228{
1229 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 1229 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
1230 1230
1231 qApp->processEvents(); 1231 qApp->processEvents();
1232 CalendarLocal* calendar = new CalendarLocal(); 1232 CalendarLocal* calendar = new CalendarLocal();
1233 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 1233 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1234 bool syncOK = false; 1234 bool syncOK = false;
1235 bool loadSuccess = false; 1235 bool loadSuccess = false;
1236 PhoneFormat* phoneFormat = 0; 1236 PhoneFormat* phoneFormat = 0;
1237 emit tempDisableBR(true); 1237 emit tempDisableBR(true);
1238#ifndef DESKTOP_VERSION 1238#ifndef DESKTOP_VERSION
1239 SharpFormat* sharpFormat = 0; 1239 SharpFormat* sharpFormat = 0;
@@ -1495,13 +1495,13 @@ bool CalendarView::importQtopia( const QString &categories,
1495 mGlobalSyncMode = SYNC_MODE_QTOPIA; 1495 mGlobalSyncMode = SYNC_MODE_QTOPIA;
1496 mCurrentSyncDevice = "qtopia-XML"; 1496 mCurrentSyncDevice = "qtopia-XML";
1497 if ( mSyncManager->mAskForPreferences ) 1497 if ( mSyncManager->mAskForPreferences )
1498 edit_sync_options(); 1498 edit_sync_options();
1499 qApp->processEvents(); 1499 qApp->processEvents();
1500 CalendarLocal* calendar = new CalendarLocal(); 1500 CalendarLocal* calendar = new CalendarLocal();
1501 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 1501 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1502 bool syncOK = false; 1502 bool syncOK = false;
1503 QtopiaFormat qtopiaFormat; 1503 QtopiaFormat qtopiaFormat;
1504 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); 1504 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories));
1505 bool loadOk = true; 1505 bool loadOk = true;
1506 if ( !categories.isEmpty() ) 1506 if ( !categories.isEmpty() )
1507 loadOk = qtopiaFormat.load( calendar, categories ); 1507 loadOk = qtopiaFormat.load( calendar, categories );
@@ -1998,24 +1998,24 @@ void CalendarView::writeLocale()
1998 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 1998 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
1999 dummy = KOPrefs::instance()->mUserDateFormatShort; 1999 dummy = KOPrefs::instance()->mUserDateFormatShort;
2000 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 2000 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
2001 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, 2001 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
2002 KOPrefs::instance()->mDaylightsavingStart, 2002 KOPrefs::instance()->mDaylightsavingStart,
2003 KOPrefs::instance()->mDaylightsavingEnd ); 2003 KOPrefs::instance()->mDaylightsavingEnd );
2004 KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); 2004 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId );
2005#endif 2005#endif
2006} 2006}
2007void CalendarView::updateConfig() 2007void CalendarView::updateConfig()
2008{ 2008{
2009 writeLocale(); 2009 writeLocale();
2010 if ( KOPrefs::instance()->mUseAppColors ) 2010 if ( KOPrefs::instance()->mUseAppColors )
2011 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 2011 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
2012 emit configChanged(); 2012 emit configChanged();
2013 mTodoList->updateConfig(); 2013 mTodoList->updateConfig();
2014 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); 2014 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
2015 mCalendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 2015 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2016 // To make the "fill window" configurations work 2016 // To make the "fill window" configurations work
2017 //mViewManager->raiseCurrentView(); 2017 //mViewManager->raiseCurrentView();
2018} 2018}
2019 2019
2020 2020
2021void CalendarView::eventChanged(Event *event) 2021void CalendarView::eventChanged(Event *event)
@@ -2317,13 +2317,13 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2317 if ( createbup ) { 2317 if ( createbup ) {
2318 QString description = "\n"; 2318 QString description = "\n";
2319 CalendarLocal* cal = new CalendarLocal(); 2319 CalendarLocal* cal = new CalendarLocal();
2320 if ( beamDialog->beamLocal() ) 2320 if ( beamDialog->beamLocal() )
2321 cal->setLocalTime(); 2321 cal->setLocalTime();
2322 else 2322 else
2323 cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 2323 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2324 Incidence *incidence = delSel.first(); 2324 Incidence *incidence = delSel.first();
2325 bool addText = false; 2325 bool addText = false;
2326 if ( delSel.count() < 10 ) 2326 if ( delSel.count() < 10 )
2327 addText = true; 2327 addText = true;
2328 else { 2328 else {
2329 description.sprintf(i18n(" %d items?"),delSel.count() ); 2329 description.sprintf(i18n(" %d items?"),delSel.count() );