diff -r 1b4d1ea6ea8c -r 54d44ecd6097 exports.cpp --- a/exports.cpp Fri Mar 06 15:02:58 2009 +0000 +++ b/exports.cpp Thu Mar 19 11:45:28 2009 +0000 @@ -262,11 +262,41 @@ } //////////////////////////////////////////////////////////////////////// -void ExportKDEBookmarks::doExport() +void ExportKDE3Bookmarks::doExport() { WarningDialog dia; dia.showCancelButton (true); dia.setText(QObject::tr("Exporting the %1 bookmarks will overwrite\nyour existing bookmarks file.").arg("KDE")); + dia.setCaption(QObject::tr("Warning: Overwriting %1 bookmarks").arg("KDE 3")); + dia.setShowAgainName("/exports/KDE/overwriteKDEBookmarks"); + if (dia.exec()==QDialog::Accepted) + { + model->exportXML(tmpDir.path(),false); + + XSLTProc p; + p.setInputFile (tmpDir.path()+"/"+model->getMapName()+".xml"); + p.setOutputFile (tmpDir.home().path()+"/.kde/share/apps/konqueror/bookmarks.xml"); + p.setXSLFile (vymBaseDir.path()+"/styles/vym2kdebookmarks.xsl"); + p.process(); + + QString ub=vymBaseDir.path()+"/scripts/update-bookmarks"; + QProcess *proc= new QProcess ; + proc->start( ub); + if (!proc->waitForStarted()) + { + QMessageBox::warning(0, + QObject::tr("Warning"), + QObject::tr("Couldn't find script %1\nto notifiy Browsers of changed bookmarks.").arg(ub)); + } + } +} + +//////////////////////////////////////////////////////////////////////// +void ExportKDE4Bookmarks::doExport() +{ + WarningDialog dia; + dia.showCancelButton (true); + dia.setText(QObject::tr("Exporting the %1 bookmarks will overwrite\nyour existing bookmarks file.").arg("KDE 4")); dia.setCaption(QObject::tr("Warning: Overwriting %1 bookmarks").arg("KDE")); dia.setShowAgainName("/exports/KDE/overwriteKDEBookmarks"); if (dia.exec()==QDialog::Accepted) @@ -275,7 +305,7 @@ XSLTProc p; p.setInputFile (tmpDir.path()+"/"+model->getMapName()+".xml"); - p.setOutputFile (tmpDir.home().path()+"/.kde/share/apps/konqueror/bookmarks.xml"); + p.setOutputFile (tmpDir.home().path()+"/.kde4/share/apps/konqueror/bookmarks.xml"); p.setXSLFile (vymBaseDir.path()+"/styles/vym2kdebookmarks.xsl"); p.process();