-rw-r--r-- | korganizer/calendarview.cpp | 6 | ||||
-rw-r--r-- | korganizer/korganizer.pro | 10 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 5 |
4 files changed, 17 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 904bbe2..a8ad467 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1613,98 +1613,100 @@ bool CalendarView::importQtopia( const QString &categories, getEventViewerDialog()->setSyncMode( false ); qApp->processEvents(); if ( syncOK ) { if ( mSyncManager->mWriteBackFile ) { // write back XML file } setModified( true ); } } else { QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), question, i18n("Ok")) ; } delete calendar; updateView(); return syncOK; #endif } void CalendarView::setSyncEventsReadOnly() { Event * ev; QPtrList<Event> eL = mCalendar->rawEvents(); ev = eL.first(); while ( ev ) { if ( ev->uid().left(15) == QString("last-syncEvent-") ) ev->setReadOnly( true ); ev = eL.next(); } } bool CalendarView::openCalendar(QString filename, bool merge) { if (filename.isEmpty()) { return false; } if (!QFile::exists(filename)) { KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); return false; } globalFlagBlockAgenda = 1; - if (!merge) mCalendar->close(); - + if (!merge) { + mCalendar->close(); + mTodoList->clearList(); + } mStorage->setFileName( filename ); if ( mStorage->load() ) { if ( merge ) ;//setModified( true ); else { //setModified( true ); mViewManager->setDocumentId( filename ); mDialogManager->setDocumentId( filename ); mTodoList->setDocumentId( filename ); } globalFlagBlockAgenda = 2; // if ( getLastSyncEvent() ) // getLastSyncEvent()->setReadOnly( true ); mCalendar->reInitAlarmSettings(); setSyncEventsReadOnly(); updateUnmanagedViews(); updateView(); if ( filename != MainWindow::defaultFileName() ) { saveCalendar( MainWindow::defaultFileName() ); } else { QFileInfo finf ( MainWindow::defaultFileName()); if ( finf.exists() ) { setLoadedFileVersion( finf.lastModified () ); } } return true; } else { // while failing to load, the calendar object could // have become partially populated. Clear it out. if ( !merge ) { mCalendar->close(); mViewManager->setDocumentId( filename ); mDialogManager->setDocumentId( filename ); mTodoList->setDocumentId( filename ); } //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); globalFlagBlockAgenda = 2; mCalendar->reInitAlarmSettings(); setSyncEventsReadOnly(); updateUnmanagedViews(); updateView(); } return false; } void CalendarView::showOpenError() diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro index d88c300..32ad10a 100644 --- a/korganizer/korganizer.pro +++ b/korganizer/korganizer.pro @@ -11,107 +11,113 @@ INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui #../qtcompat DEFINES += KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER #KORG_NOPRINTER KORG_NOKABC KORG_NODND DEFINES += KORG_NOLVALTERNATION DEFINES += DESKTOP_VERSION unix : { staticlib: { LIBS += ../bin/libmicrokabc_qtopia.a LIBS += ../bin/libmicrokabc_file.a LIBS += ../bin/libmicrokabc_dir.a LIBS += ../bin/libmicrokdepim.a LIBS += ../bin/libmicrokcal.a LIBS += ../bin/libmicrokabc.a LIBS += ../bin/libmicrokde.a LIBS += ../bin/libmicrokabc_qtopia.a LIBS += ../bin/libmicrokabc_file.a LIBS += ../bin/libmicrokabc_dir.a LIBS += ../bin/libmicrokdepim.a LIBS += ../bin/libmicrokcal.a LIBS += ../bin/libmicrokabc.a LIBS += ../bin/libmicrokde.a LIBS += ../libical/lib/libical.a LIBS += ../libical/lib/libicalss.a } else { LIBS += ../bin/libmicrokdepim.so LIBS += ../bin/libmicrokcal.so LIBS += ../bin/libmicrokde.so LIBS += ../bin/libmicrokabc.so #LIBS += -lbluetooth #LIBS += -lsdp #LIBS += -lldap } OBJECTS_DIR = obj/unix MOC_DIR = moc/unix } win32: { RC_FILE = winicons.rc DEFINES += _WIN32_ LIBS += ../bin/microkdepim.lib LIBS += ../bin/microkcal.lib LIBS += ../bin/microkde.lib LIBS += ../bin/microkabc.lib LIBS += ../libical/lib/ical.lib LIBS += ../libical/lib/icalss.lib #LIBS += atls.lib QMAKE_LINK += /NODEFAULTLIB:LIBC -#QMAKE_LINK += /NODEFAULTLIB:MSVCRT -#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib +QMAKE_LINK += /NODEFAULTLIB:MSVCRT +QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib OBJECTS_DIR = obj/win MOC_DIR = moc/win #olimport section #blabla: { +debug: { +LIBS += mfc71ud.lib +} +release: { LIBS += mfc71u.lib +} DEFINES += _OL_IMPORT_ HEADERS += ../outport/msoutl9.h \ koimportoldialog.h + SOURCES += ../outport/msoutl9.cpp \ koimportoldialog.cpp #} #olimport section end } INTERFACES = kofilterview_base.ui #filteredit_base.ui # kdateedit.h \ HEADERS += datenavigatorcontainer.h \ filteredit_base.h \ alarmclient.h \ calendarview.h \ customlistviewitem.h \ datenavigator.h \ docprefs.h \ filtereditdialog.h \ incomingdialog.h \ incomingdialog_base.h \ interfaces/korganizer/baseview.h \ interfaces/korganizer/calendarviewbase.h \ journalentry.h \ kdatenavigator.h \ koagenda.h \ koagendaitem.h \ koagendaview.h \ kocounterdialog.h \ kodaymatrix.h \ kodialogmanager.h \ koeditordetails.h \ koeditorgeneral.h \ koeditorgeneralevent.h \ koeditorgeneraltodo.h \ koeditorrecurrence.h \ koeventeditor.h \ koeventpopupmenu.h \ koeventview.h \ koeventviewer.h \ koeventviewerdialog.h \ kofilterview.h \ koglobals.h \ koincidenceeditor.h \ kojournalview.h \ kolistview.h \ diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index d368513..1ffc34a 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -94,96 +94,97 @@ class KOTodoListView : public KListView /** This is the line-edit on top of the todoview for fast addition of new todos */ class KOQuickTodo : public QLineEdit { public: KOQuickTodo(QWidget *parent=0); protected: void focusInEvent(QFocusEvent *ev); void focusOutEvent(QFocusEvent *ev); }; /** This class provides a multi-column list view of todo events. @short multi-column list view of todo events. @author Cornelius Schumacher <schumacher@kde.org> */ class KOTodoView : public KOrg::BaseView { Q_OBJECT public: KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); ~KOTodoView(); QPtrList<Incidence> selectedIncidences(); QPtrList<Todo> selectedTodos(); DateList selectedDates() {DateList q; return q;} /** Return number of shown dates. TodoView does not show dates, */ int currentDateCount() { return 0; } void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); void setDocumentId( const QString & ); void saveLayout(KConfig *config, const QString &group) const; void restoreLayout(KConfig *config, const QString &group); /** Create a popup menu to set categories */ QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); void setNavigator( DateNavigator* nav ) {mNavigator = nav;} QString getWhatsThisText(QPoint p); + void clearList() {mTodoListView->clear(); } public slots: void updateView(); void updateConfig(); void changeEventDisplay(Event *, int); void showDates(const QDate &start, const QDate &end); void showEvents(QPtrList<Event> eventList); void clearSelection(); void jumpToDate (); void editItem(QListViewItem *item); void showItem(QListViewItem *item,const QPoint &,int); void popupMenu(QListViewItem *item,const QPoint &,int); void newTodo(); void newSubTodo(); void unparentTodo(); void reparentTodo(); void showTodo(); void editTodo(); void cloneTodo(); void cancelTodo(); void moveTodo(); void beamTodo(); void deleteTodo(); void setNewPriority(int); void setNewPercentage(int); void changedCategories(int); void setAllOpen(); void setAllClose(); void setAllFlat(); void displayAllFlat(); void purgeCompleted(); void toggleCompleted(); void toggleRunning(); void toggleQuickTodo(); void updateTodo( Todo *, int ); void itemClicked(QListViewItem *); void itemStateChanged(QListViewItem *); void modified(bool); void itemDoubleClicked(QListViewItem *item); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 2e5a943..fb4de37 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -786,50 +786,53 @@ void KOViewManager::showJournalView() KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; } void KOViewManager::showTimeSpanView() { //mFlagShowNextxDays = false; if (!mTimeSpanView) { mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), "KOViewManager::TimeSpanView"); addView(mTimeSpanView); mTimeSpanView->readSettings(); } showView(mTimeSpanView); } Incidence *KOViewManager::currentSelection() { if (!mCurrentView) return 0; if ( mCurrentView == mListView ) { if ( mListView->currentItem() ) return mListView->currentItem(); } return mCurrentView->selectedIncidences().first(); } QDate KOViewManager::currentSelectionDate() { QDate qd; if (mCurrentView) { DateList qvl = mCurrentView->selectedDates(); if (!qvl.isEmpty()) qd = qvl.first(); } return qd; } void KOViewManager::addView(KOrg::BaseView *view) { #if QT_VERSION >= 0x030000 mMainView->viewStack()->addWidget( view ); #else mMainView->viewStack()->addWidget( view, 1 ); #endif } void KOViewManager::setDocumentId( const QString &id ) { - if (mTodoView) mTodoView->setDocumentId( id ); + if (mTodoView) { + mTodoView->clearList(); + mTodoView->setDocumentId( id ); + } } |