Bug 74180 - Export to HTML with every save - does not work
Summary: Export to HTML with every save - does not work
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: 3.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-05 01:48 UTC by Rob Fantini
Modified: 2004-07-25 21:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Fantini 2004-02-05 01:48:45 UTC
Version:           3.2 (using KDE KDE 3.2.0)
Installed from:    Compiled From Sources
Compiler:          gcc gcc-3.2.3 CFLAGS="-Os -march=athlon-xp -pipe"   CHOST="i686-pc-linux-gnu"
OS:          Linux

This bug was reported before, but not for 3.2 and i may be supplying more info to help solve it - hopefully.  Sorry if this is only a duplicate.

 File , Export, Export Web Page works.

 Settings, Configure KOrganizer, Selecting 'Export to HTML with every save' does not work.

 I've tried changing the setting. Then closing and restarting Korg. 

 Export to HTML with every save works on my other systems which use Mandrake  9.2, and Mandrakes' kdebase-progs-3.1.3-79.1.92mdk.

 If there is anything I can do to help debug this or test let me know.
Comment 1 matt lemieux 2004-04-02 02:27:58 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.
Comment 2 blashyrkh 2004-04-27 00:16:06 UTC
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.
Comment 3 Stephan Binner 2004-04-30 21:12:03 UTC
*** Bug 66886 has been marked as a duplicate of this bug. ***
Comment 4 Bram Schoenmakers 2004-07-25 21:41:39 UTC
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;
 }