summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp17
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/mainwindow.cpp4
3 files changed, 17 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index fecc7e2..687943e 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1525,7 +1525,16 @@ bool CalendarView::openCalendar(QString filename, bool merge)
1525 // have become partially populated. Clear it out. 1525 // have become partially populated. Clear it out.
1526 if ( !merge ) mCalendar->close(); 1526 if ( !merge ) {
1527 mCalendar->close();
1528 mViewManager->setDocumentId( filename );
1529 mDialogManager->setDocumentId( filename );
1530 mTodoList->setDocumentId( filename );
1531 }
1527 1532
1528 KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); 1533 //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename));
1529 1534
1535 QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) );
1530 globalFlagBlockAgenda = 2; 1536 globalFlagBlockAgenda = 2;
1537 mCalendar->reInitAlarmSettings();
1538 setSyncEventsReadOnly();
1539 updateUnmanagedViews();
1531 updateView(); 1540 updateView();
@@ -1534,2 +1543,6 @@ bool CalendarView::openCalendar(QString filename, bool merge)
1534} 1543}
1544void CalendarView::showOpenError()
1545{
1546 KMessageBox::error(this,i18n("Couldn't load calendar\n."));
1547}
1535void CalendarView::setLoadedFileVersion(QDateTime dt) 1548void CalendarView::setLoadedFileVersion(QDateTime dt)
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 355bb84..cd54685 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -174,2 +174,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
174 public slots: 174 public slots:
175 void showOpenError();
175 void watchSavedFile(); 176 void watchSavedFile();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 43ee2d7..7b666d1 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -146,3 +146,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
146 mView->readSettings(); 146 mView->readSettings();
147 bool oldOpened = false;
148 bool newFile = false; 147 bool newFile = false;
@@ -172,4 +171,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
172 QTime neededSaveTime = QDateTime::currentDateTime().time(); 171 QTime neededSaveTime = QDateTime::currentDateTime().time();
173 if ( ! oldOpened ) 172 mView->openCalendar( defaultFileName() );
174 mView->openCalendar( defaultFileName() );
175 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 173 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );