summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-03 00:01:07 (UTC)
committer zautrix <zautrix>2005-02-03 00:01:07 (UTC)
commitca3c58c09b1b7d2733eeacc9e8ca568134926e93 (patch) (side-by-side diff)
treedbee3bfe638d1ae44288ae6c209e014e40206c0d
parent279354f19275e5e654636acb87c465edf652eeae (diff)
downloadkdepimpi-ca3c58c09b1b7d2733eeacc9e8ca568134926e93.zip
kdepimpi-ca3c58c09b1b7d2733eeacc9e8ca568134926e93.tar.gz
kdepimpi-ca3c58c09b1b7d2733eeacc9e8ca568134926e93.tar.bz2
tz fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--korganizer/calendarview.cpp18
-rw-r--r--korganizer/calendarview.h2
-rw-r--r--korganizer/mainwindow.cpp19
-rw-r--r--korganizer/mainwindow.h1
5 files changed, 40 insertions, 5 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index ac70a55..3dbbbb6 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,27 +1,30 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.0.2 ************
KO/Pi:
Fixed the layout problem of the day label buttons
of the agenda view introduced in version 2.0.1.
Added WhatsThis support for the todo view and the list view.
Added a quite useful feature to the montview.
Just click on the week numbers on the left.
-And on top of the week numbers there is now a "week view quick selector".
+And in the top right corner of month view/agenda view
+there is now a "week number quick selector".
(Click on the black triangle).
+Made the quite difficult timezone change in KO/Pi easy.
+
********** VERSION 2.0.1 ************
Oooops ... I forgot to test on the Zaurus 5500 ...
Fixed many problems of new (english) strings (and german translations)
introduced in the latest versions, where the text was not fitting on the
240x320 display of the Zaurus 5500.
KO/Pi:
Added a popup menu ( press pen and hold to get popup ) to the agenda view
with many useful items (add event/todo, show next week, two weeks, month, journal).
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e0380fa..77de94f 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2242,26 +2242,42 @@ void CalendarView::edit_copy()
void CalendarView::edit_paste()
{
QDate date = mNavigator->selectedDates().first();
DndFactory factory( mCalendar );
Event *pastedEvent = (Event *)factory.pasteIncidence( date );
changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
}
void CalendarView::edit_options()
{
+ QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
+ emit save();
+ emit saveStopTimer();
mDialogManager->showOptionsDialog();
- //writeSettings();
+ if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
+ emit saveStopTimer();
+ if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"),
+ i18n("Timezone settings"),i18n("Reload"))) {
+ qDebug("KO: TZ reload cancelled ");
+ return;
+ }
+ qDebug("KO: Timezone change ");
+ openCalendar( MainWindow::defaultFileName() );
+ setModified(true);
+ }
+ else
+ qDebug("KO: No tz change ");
+
}
void CalendarView::slotSelectPickerDate( QDate d)
{
mDateFrame->hide();
if ( mDatePickerMode == 1 ) {
mNavigator->slotDaySelect( d );
} else if ( mDatePickerMode == 2 ) {
if ( mMoveIncidence->type() == "Todo" ) {
Todo * to = (Todo *) mMoveIncidence;
QTime tim;
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 6ea8287..8d7ff36 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -108,24 +108,26 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
QWidget *leftFrame();
NavigatorBar *navigatorBar();
DateNavigator *dateNavigator();
KDateNavigator *dateNavigatorWidget();
void addView(KOrg::BaseView *);
void showView(KOrg::BaseView *);
KOEventViewerDialog* getEventViewerDialog();
Incidence *currentSelection();
signals:
+ void save ();
+ void saveStopTimer ();
void tempDisableBR(bool);
/** This todo has been modified */
void todoModified(Todo *, int);
/** when change is made to options dialog, the topwidget will catch this
* and emit this signal which notifies all widgets which have registered
* for notification to update their settings. */
void configChanged();
/** emitted when the topwidget is closing down, so that any attached
child windows can also close. */
void closingDown();
/** emitted right before we die */
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 3feb4ab..a2c20a8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -250,24 +250,26 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
setCentralWidget( mView );
globalFlagBlockStartup = 0;
mView->show();
delete splash;
if ( newFile )
mView->updateConfig();
// qApp->processEvents();
//qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
//fillSyncMenu();
connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
+ connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
+ connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
mSyncManager->setDefaultFileName( defaultFileName());
connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
mSyncManager->fillSyncMenu();
mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
if ( showWarning ) {
KMessageBox::information( this,
"You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
@@ -1438,55 +1440,66 @@ void MainWindow::saveOnClose()
KOPrefs *p = KOPrefs::instance();
p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal );
p->mToolBarUp = iconToolBar->x() > width()/2 ||
iconToolBar->y() > height()/2;
mView->writeSettings();
if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
save();
}
void MainWindow::slotModifiedChanged( bool changed )
{
if ( mBlockAtStartup )
return;
+
int msec;
// we store the changes after 1 minute,
// and for safety reasons after 10 minutes again
if ( !mSyncManager->blockSave() )
msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
else
msec = 1000 * 600;
mSaveTimer.start( msec, true ); // 1 minute
qDebug("KO: Saving File in %d secs!", msec/1000);
mCalendarModifiedFlag = true;
}
+void MainWindow::saveStopTimer()
+{
+ mSaveTimer.stop();
+ if (mSaveTimer.isActive() )
+ qDebug("ti active ");
+ else
+ qDebug("KO: Save timer stopped");
+}
void MainWindow::save()
{
+ if ( !mCalendarModifiedFlag ) {
+ qDebug("KO: Calendar not modified. Nothing saved.");
+ return;
+ }
if ( mSyncManager->blockSave() )
return;
mSyncManager->setBlockSave(true);
if ( mView->checkFileVersion( defaultFileName()) ) {
-
QTime neededSaveTime = QDateTime::currentDateTime().time();
setCaption(i18n("KO/Pi:Saving Data to File ..." ));
qDebug("KO: Start saving data to file!");
mView->saveCalendar( defaultFileName() );
-
+ mCalendarModifiedFlag = false;
int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
qDebug("KO: Needed %d ms for saving.",msNeeded );
QString savemes;
savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
setCaption(savemes);
} else
setCaption(i18n("Saving cancelled!"));
- mCalendarModifiedFlag = false;
mSyncManager->setBlockSave( false );
}
void MainWindow::keyReleaseEvent ( QKeyEvent * e)
{
if ( !e->isAutoRepeat() ) {
mFlagKeyPressed = false;
}
}
void MainWindow::keyPressEvent ( QKeyEvent * e )
{
qApp->processEvents();
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 6de0543..8dd55ac 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -63,24 +63,25 @@ class MainWindow : public QMainWindow
void processIncidenceSelection( Incidence * );
void importQtopia();
void importBday();
void importOL();
void importIcal();
void importFile( QString, bool );
void quickImportIcal();
void slotModifiedChanged( bool );
void save();
+ void saveStopTimer();
void configureToolBar( int );
void printSel();
void printCal();
void saveCalendar();
void loadCalendar();
void exportVCalendar();
void fillFilterMenu();
void selectFilter( int );
void exportToPhone( int );
void toggleBeamReceive();
void disableBR(bool);