-rw-r--r-- | korganizer/calendarview.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 377a66f..2012e92 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1812,56 +1812,49 @@ bool CalendarView::importQtopia( const QString &categories, | |||
1812 | if ( syncOK ) { | 1812 | if ( syncOK ) { |
1813 | if ( mSyncManager->mWriteBackFile ) | 1813 | if ( mSyncManager->mWriteBackFile ) |
1814 | { | 1814 | { |
1815 | // write back XML file | 1815 | // write back XML file |
1816 | 1816 | ||
1817 | } | 1817 | } |
1818 | setModified( true ); | 1818 | setModified( true ); |
1819 | } | 1819 | } |
1820 | } else { | 1820 | } else { |
1821 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; | 1821 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; |
1822 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), | 1822 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), |
1823 | question, i18n("Ok")) ; | 1823 | question, i18n("Ok")) ; |
1824 | } | 1824 | } |
1825 | delete calendar; | 1825 | delete calendar; |
1826 | updateView(); | 1826 | updateView(); |
1827 | return syncOK; | 1827 | return syncOK; |
1828 | 1828 | ||
1829 | 1829 | ||
1830 | #endif | 1830 | #endif |
1831 | 1831 | ||
1832 | } | 1832 | } |
1833 | 1833 | ||
1834 | void CalendarView::setSyncEventsReadOnly() | 1834 | void CalendarView::setSyncEventsReadOnly() |
1835 | { | 1835 | { |
1836 | Event * ev; | 1836 | mCalendar->setSyncEventsReadOnly(); |
1837 | QPtrList<Event> eL = mCalendar->rawEvents(); | ||
1838 | ev = eL.first(); | ||
1839 | while ( ev ) { | ||
1840 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) | ||
1841 | ev->setReadOnly( true ); | ||
1842 | ev = eL.next(); | ||
1843 | } | ||
1844 | } | 1837 | } |
1845 | 1838 | ||
1846 | bool CalendarView::loadCalendars() | 1839 | bool CalendarView::loadCalendars() |
1847 | { | 1840 | { |
1848 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 1841 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
1849 | KopiCalendarFile * cal = calendars.first(); | 1842 | KopiCalendarFile * cal = calendars.first(); |
1850 | mCalendar->setDefaultCalendar( 1 ); | 1843 | mCalendar->setDefaultCalendar( 1 ); |
1851 | openCalendar( MainWindow::defaultFileName(), false ); | 1844 | openCalendar( MainWindow::defaultFileName(), false ); |
1852 | cal = calendars.next(); | 1845 | cal = calendars.next(); |
1853 | while ( cal ) { | 1846 | while ( cal ) { |
1854 | addCalendar( cal ); | 1847 | addCalendar( cal ); |
1855 | cal = calendars.next(); | 1848 | cal = calendars.next(); |
1856 | } | 1849 | } |
1857 | restoreCalendarSettings(); | 1850 | restoreCalendarSettings(); |
1858 | return true; | 1851 | return true; |
1859 | } | 1852 | } |
1860 | bool CalendarView::restoreCalendarSettings() | 1853 | bool CalendarView::restoreCalendarSettings() |
1861 | { | 1854 | { |
1862 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 1855 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
1863 | KopiCalendarFile * cal = calendars.first(); | 1856 | KopiCalendarFile * cal = calendars.first(); |
1864 | while ( cal ) { | 1857 | while ( cal ) { |
1865 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); | 1858 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); |
1866 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); | 1859 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); |
1867 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); | 1860 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); |