Summary: | Export to HTML with every save - does not work | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Rob Fantini <rob> |
Component: | general | Assignee: | Cornelius Schumacher <schumacher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | matt, scott, techniq35 |
Priority: | NOR | ||
Version: | 3.2 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Rob Fantini
2004-02-05 01:48:45 UTC
I'm using SuSE 9.0 and the export to HTML after every save feature does not work for me either. I can export manually, though. Same here: Gentoo Base System version 1.4.3.13 (sorry :), it seems to be not gentoo-only so...) gcc (GCC) 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7) CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" Auto-export does not work, but manual does work. *** Bug 66886 has been marked as a duplicate of this bug. *** CVS commit by bram: Fix for bug #74180. Export to HTML on each save when this setting is enabled. Detached the HTML-export code to a new function. CCMAIL:74180-done@bugs.kde.org M +64 -58 actionmanager.cpp 1.92 --- kdepim/korganizer/actionmanager.cpp #1.91:1.92 @@ -730,4 +730,5 @@ void ActionManager::file_save() if (mURL.isEmpty()) { file_saveas(); + return; } else { saveURL(); @@ -736,4 +737,10 @@ void ActionManager::file_save() mCalendarView->calendar()->save(); } + + // export to HTML + if ( KOPrefs::instance()->mHtmlWithSave && + !KOPrefs::instance()->mHtmlExportFile.isNull() ) { + exportToHTML(); + } } @@ -882,9 +889,12 @@ bool ActionManager::saveURL() mMainWindow->showStatusMessage(i18n("Saved calendar '%1'.").arg(mURL.prettyURL())); - // export to HTML - if ( KOPrefs::instance()->mHtmlWithSave==true && - !KOPrefs::instance()->mHtmlExportFile.isNull() ) { + return true; +} + +void ActionManager::exportToHTML() +{ KURL dest( KOPrefs::instance()->mHtmlExportFile ); KCal::HtmlExport mExport( mCalendarView->calendar() ); + //@TODO: Make these items translatable after 3.3. mExport.setTitle( "KOrganizer Calendar" ); mExport.setTitleTodo( "KOrganizer To-Do List" ); @@ -919,6 +929,5 @@ bool ActionManager::saveURL() mExport.setDateRange( qd1, qd2 ); QDate cdate=qd1; - while (cdate<=qd2) - { + while (cdate<=qd2) { if ( !KOCore::self()->holiday(cdate).isEmpty() ) mExport.addHoliday( cdate, KOCore::self()->holiday(cdate) ); @@ -939,7 +948,4 @@ bool ActionManager::saveURL() tf.unlink(); } - } - - return true; } |