summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-03 00:01:07 (UTC)
committer zautrix <zautrix>2005-02-03 00:01:07 (UTC)
commitca3c58c09b1b7d2733eeacc9e8ca568134926e93 (patch) (unidiff)
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 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.2 ************ 3********** VERSION 2.0.2 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed the layout problem of the day label buttons 6Fixed the layout problem of the day label buttons
7of the agenda view introduced in version 2.0.1. 7of the agenda view introduced in version 2.0.1.
8 8
9Added WhatsThis support for the todo view and the list view. 9Added WhatsThis support for the todo view and the list view.
10 10
11Added a quite useful feature to the montview. 11Added a quite useful feature to the montview.
12Just click on the week numbers on the left. 12Just click on the week numbers on the left.
13And on top of the week numbers there is now a "week view quick selector". 13And in the top right corner of month view/agenda view
14there is now a "week number quick selector".
14(Click on the black triangle). 15(Click on the black triangle).
15 16
17Made the quite difficult timezone change in KO/Pi easy.
18
16 19
17********** VERSION 2.0.1 ************ 20********** VERSION 2.0.1 ************
18 21
19Oooops ... I forgot to test on the Zaurus 5500 ... 22Oooops ... I forgot to test on the Zaurus 5500 ...
20 23
21Fixed many problems of new (english) strings (and german translations) 24Fixed many problems of new (english) strings (and german translations)
22introduced in the latest versions, where the text was not fitting on the 25introduced in the latest versions, where the text was not fitting on the
23240x320 display of the Zaurus 5500. 26240x320 display of the Zaurus 5500.
24 27
25KO/Pi: 28KO/Pi:
26Added a popup menu ( press pen and hold to get popup ) to the agenda view 29Added a popup menu ( press pen and hold to get popup ) to the agenda view
27with many useful items (add event/todo, show next week, two weeks, month, journal). 30with 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()
2242void CalendarView::edit_paste() 2242void CalendarView::edit_paste()
2243{ 2243{
2244 QDate date = mNavigator->selectedDates().first(); 2244 QDate date = mNavigator->selectedDates().first();
2245 2245
2246 DndFactory factory( mCalendar ); 2246 DndFactory factory( mCalendar );
2247 Event *pastedEvent = (Event *)factory.pasteIncidence( date ); 2247 Event *pastedEvent = (Event *)factory.pasteIncidence( date );
2248 2248
2249 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2249 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2250} 2250}
2251 2251
2252void CalendarView::edit_options() 2252void CalendarView::edit_options()
2253{ 2253{
2254 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
2255 emit save();
2256 emit saveStopTimer();
2254 mDialogManager->showOptionsDialog(); 2257 mDialogManager->showOptionsDialog();
2255 //writeSettings(); 2258 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
2259 emit saveStopTimer();
2260 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!"),
2261 i18n("Timezone settings"),i18n("Reload"))) {
2262 qDebug("KO: TZ reload cancelled ");
2263 return;
2264 }
2265 qDebug("KO: Timezone change ");
2266 openCalendar( MainWindow::defaultFileName() );
2267 setModified(true);
2268 }
2269 else
2270 qDebug("KO: No tz change ");
2271
2256} 2272}
2257 2273
2258 2274
2259void CalendarView::slotSelectPickerDate( QDate d) 2275void CalendarView::slotSelectPickerDate( QDate d)
2260{ 2276{
2261 mDateFrame->hide(); 2277 mDateFrame->hide();
2262 if ( mDatePickerMode == 1 ) { 2278 if ( mDatePickerMode == 1 ) {
2263 mNavigator->slotDaySelect( d ); 2279 mNavigator->slotDaySelect( d );
2264 } else if ( mDatePickerMode == 2 ) { 2280 } else if ( mDatePickerMode == 2 ) {
2265 if ( mMoveIncidence->type() == "Todo" ) { 2281 if ( mMoveIncidence->type() == "Todo" ) {
2266 Todo * to = (Todo *) mMoveIncidence; 2282 Todo * to = (Todo *) mMoveIncidence;
2267 QTime tim; 2283 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
108 QWidget *leftFrame(); 108 QWidget *leftFrame();
109 NavigatorBar *navigatorBar(); 109 NavigatorBar *navigatorBar();
110 110
111 DateNavigator *dateNavigator(); 111 DateNavigator *dateNavigator();
112 KDateNavigator *dateNavigatorWidget(); 112 KDateNavigator *dateNavigatorWidget();
113 113
114 void addView(KOrg::BaseView *); 114 void addView(KOrg::BaseView *);
115 void showView(KOrg::BaseView *); 115 void showView(KOrg::BaseView *);
116 KOEventViewerDialog* getEventViewerDialog(); 116 KOEventViewerDialog* getEventViewerDialog();
117 Incidence *currentSelection(); 117 Incidence *currentSelection();
118 118
119 signals: 119 signals:
120 void save ();
121 void saveStopTimer ();
120 void tempDisableBR(bool); 122 void tempDisableBR(bool);
121 /** This todo has been modified */ 123 /** This todo has been modified */
122 void todoModified(Todo *, int); 124 void todoModified(Todo *, int);
123 125
124 /** when change is made to options dialog, the topwidget will catch this 126 /** when change is made to options dialog, the topwidget will catch this
125 * and emit this signal which notifies all widgets which have registered 127 * and emit this signal which notifies all widgets which have registered
126 * for notification to update their settings. */ 128 * for notification to update their settings. */
127 void configChanged(); 129 void configChanged();
128 /** emitted when the topwidget is closing down, so that any attached 130 /** emitted when the topwidget is closing down, so that any attached
129 child windows can also close. */ 131 child windows can also close. */
130 void closingDown(); 132 void closingDown();
131 /** emitted right before we die */ 133 /** 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) :
250 setCentralWidget( mView ); 250 setCentralWidget( mView );
251 globalFlagBlockStartup = 0; 251 globalFlagBlockStartup = 0;
252 mView->show(); 252 mView->show();
253 delete splash; 253 delete splash;
254 if ( newFile ) 254 if ( newFile )
255 mView->updateConfig(); 255 mView->updateConfig();
256 // qApp->processEvents(); 256 // qApp->processEvents();
257 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 257 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
258 //fillSyncMenu(); 258 //fillSyncMenu();
259 259
260 260
261 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 261 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
262 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
263 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
262 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 264 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
263 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 265 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
264 mSyncManager->setDefaultFileName( defaultFileName()); 266 mSyncManager->setDefaultFileName( defaultFileName());
265 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 267 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
266 mSyncManager->fillSyncMenu(); 268 mSyncManager->fillSyncMenu();
267 269
268 270
269 271
270 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 272 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
271 if ( showWarning ) { 273 if ( showWarning ) {
272 KMessageBox::information( this, 274 KMessageBox::information( this,
273 "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"); 275 "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()
1438 KOPrefs *p = KOPrefs::instance(); 1440 KOPrefs *p = KOPrefs::instance();
1439 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); 1441 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal );
1440 p->mToolBarUp = iconToolBar->x() > width()/2 || 1442 p->mToolBarUp = iconToolBar->x() > width()/2 ||
1441 iconToolBar->y() > height()/2; 1443 iconToolBar->y() > height()/2;
1442 mView->writeSettings(); 1444 mView->writeSettings();
1443 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) 1445 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
1444 save(); 1446 save();
1445} 1447}
1446void MainWindow::slotModifiedChanged( bool changed ) 1448void MainWindow::slotModifiedChanged( bool changed )
1447{ 1449{
1448 if ( mBlockAtStartup ) 1450 if ( mBlockAtStartup )
1449 return; 1451 return;
1452
1450 int msec; 1453 int msec;
1451 // we store the changes after 1 minute, 1454 // we store the changes after 1 minute,
1452 // and for safety reasons after 10 minutes again 1455 // and for safety reasons after 10 minutes again
1453 if ( !mSyncManager->blockSave() ) 1456 if ( !mSyncManager->blockSave() )
1454 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1457 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1455 else 1458 else
1456 msec = 1000 * 600; 1459 msec = 1000 * 600;
1457 mSaveTimer.start( msec, true ); // 1 minute 1460 mSaveTimer.start( msec, true ); // 1 minute
1458 qDebug("KO: Saving File in %d secs!", msec/1000); 1461 qDebug("KO: Saving File in %d secs!", msec/1000);
1459 mCalendarModifiedFlag = true; 1462 mCalendarModifiedFlag = true;
1460} 1463}
1464void MainWindow::saveStopTimer()
1465{
1466 mSaveTimer.stop();
1467 if (mSaveTimer.isActive() )
1468 qDebug("ti active ");
1469 else
1470 qDebug("KO: Save timer stopped");
1471}
1461void MainWindow::save() 1472void MainWindow::save()
1462{ 1473{
1474 if ( !mCalendarModifiedFlag ) {
1475 qDebug("KO: Calendar not modified. Nothing saved.");
1476 return;
1477 }
1463 if ( mSyncManager->blockSave() ) 1478 if ( mSyncManager->blockSave() )
1464 return; 1479 return;
1465 mSyncManager->setBlockSave(true); 1480 mSyncManager->setBlockSave(true);
1466 if ( mView->checkFileVersion( defaultFileName()) ) { 1481 if ( mView->checkFileVersion( defaultFileName()) ) {
1467
1468 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1482 QTime neededSaveTime = QDateTime::currentDateTime().time();
1469 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 1483 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
1470 qDebug("KO: Start saving data to file!"); 1484 qDebug("KO: Start saving data to file!");
1471 mView->saveCalendar( defaultFileName() ); 1485 mView->saveCalendar( defaultFileName() );
1472 1486 mCalendarModifiedFlag = false;
1473 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1487 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
1474 qDebug("KO: Needed %d ms for saving.",msNeeded ); 1488 qDebug("KO: Needed %d ms for saving.",msNeeded );
1475 QString savemes; 1489 QString savemes;
1476 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 1490 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
1477 setCaption(savemes); 1491 setCaption(savemes);
1478 } else 1492 } else
1479 setCaption(i18n("Saving cancelled!")); 1493 setCaption(i18n("Saving cancelled!"));
1480 mCalendarModifiedFlag = false;
1481 mSyncManager->setBlockSave( false ); 1494 mSyncManager->setBlockSave( false );
1482} 1495}
1483 1496
1484void MainWindow::keyReleaseEvent ( QKeyEvent * e) 1497void MainWindow::keyReleaseEvent ( QKeyEvent * e)
1485{ 1498{
1486 if ( !e->isAutoRepeat() ) { 1499 if ( !e->isAutoRepeat() ) {
1487 mFlagKeyPressed = false; 1500 mFlagKeyPressed = false;
1488 } 1501 }
1489} 1502}
1490void MainWindow::keyPressEvent ( QKeyEvent * e ) 1503void MainWindow::keyPressEvent ( QKeyEvent * e )
1491{ 1504{
1492 qApp->processEvents(); 1505 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
63 void processIncidenceSelection( Incidence * ); 63 void processIncidenceSelection( Incidence * );
64 64
65 void importQtopia(); 65 void importQtopia();
66 void importBday(); 66 void importBday();
67 void importOL(); 67 void importOL();
68 void importIcal(); 68 void importIcal();
69 void importFile( QString, bool ); 69 void importFile( QString, bool );
70 void quickImportIcal(); 70 void quickImportIcal();
71 71
72 void slotModifiedChanged( bool ); 72 void slotModifiedChanged( bool );
73 73
74 void save(); 74 void save();
75 void saveStopTimer();
75 void configureToolBar( int ); 76 void configureToolBar( int );
76 void printSel(); 77 void printSel();
77 void printCal(); 78 void printCal();
78 void saveCalendar(); 79 void saveCalendar();
79 void loadCalendar(); 80 void loadCalendar();
80 void exportVCalendar(); 81 void exportVCalendar();
81 void fillFilterMenu(); 82 void fillFilterMenu();
82 void selectFilter( int ); 83 void selectFilter( int );
83 void exportToPhone( int ); 84 void exportToPhone( int );
84 void toggleBeamReceive(); 85 void toggleBeamReceive();
85 void disableBR(bool); 86 void disableBR(bool);
86 87