diff -r bd98be838da9 -r 85683324f94a mainwindow.cpp --- a/mainwindow.cpp Mon Mar 16 15:40:49 2009 +0000 +++ b/mainwindow.cpp Thu Mar 19 11:48:33 2009 +0000 @@ -342,10 +342,15 @@ fileImportMenu = fileMenu->addMenu (tr("Import","File menu")); - a = new QAction(tr("KDE Bookmarks"), this); - a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE bookmarks"))); + a = new QAction(tr("KDE 3 Bookmarks"), this); + a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 3 bookmarks"))); a->addTo (fileImportMenu); - connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDEBookmarks() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE3Bookmarks() ) ); + + a = new QAction(tr("KDE 4 Bookmarks"), this); + a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 4 bookmarks"))); + a->addTo (fileImportMenu); + connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE4Bookmarks() ) ); if (settings.value( "/mainwindow/showTestMenu",false).toBool()) { @@ -398,9 +403,14 @@ connect( a, SIGNAL( triggered() ), this, SLOT( fileExportCSV() ) ); fileExportMenu->addAction (a); - a = new QAction( tr("KDE Bookmarks","File menu"), this); - a->setStatusTip( tr( "Export as %1").arg(tr("KDE Bookmarks" ))); - connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDEBookmarks() ) ); + a = new QAction( tr("KDE 3 Bookmarks","File menu"), this); + a->setStatusTip( tr( "Export as %1").arg(tr("KDE 3 Bookmarks" ))); + connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE3Bookmarks() ) ); + fileExportMenu->addAction (a); + + a = new QAction( tr("KDE 4 Bookmarks","File menu"), this); + a->setStatusTip( tr( "Export as %1").arg(tr("KDE 4 Bookmarks" ))); + connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE4Bookmarks() ) ); fileExportMenu->addAction (a); a = new QAction( "Taskjuggler...", this ); @@ -2066,11 +2076,19 @@ fileSaveAs (CompleteMap); } -void Main::fileImportKDEBookmarks() +void Main::fileImportKDE3Bookmarks() { - ImportKDEBookmarks im; + ImportKDE3Bookmarks im; im.transform(); - if (success==fileLoad (im.getTransformedFile(),NewMap) && currentMapEditor() ) + if (aborted!=fileLoad (im.getTransformedFile(),NewMap) && currentMapEditor() ) + currentMapEditor()->setFilePath (""); +} + +void Main::fileImportKDE4Bookmarks() +{ + ImportKDE4Bookmarks im; + im.transform(); + if (aborted!=fileLoad (im.getTransformedFile(),NewMap) && currentMapEditor() ) currentMapEditor()->setFilePath (""); } @@ -2092,7 +2110,7 @@ { im.setFile (*it); if (im.transform() && - success==fileLoad (im.getTransformedFile(),NewMap,FreemindMap) && + aborted!=fileLoad (im.getTransformedFile(),NewMap,FreemindMap) && currentMapEditor() ) currentMapEditor()->setFilePath (""); ++it; @@ -2232,9 +2250,20 @@ } } -void Main::fileExportKDEBookmarks() //FIXME not scriptable yet +void Main::fileExportKDE3Bookmarks() //FIXME not scriptable yet { - ExportKDEBookmarks ex; + ExportKDE3Bookmarks ex; + MapEditor *me=currentMapEditor(); + if (me) + { + ex.setModel (me->getModel()); + ex.doExport(); + } +} + +void Main::fileExportKDE4Bookmarks() //FIXME not scriptable yet +{ + ExportKDE4Bookmarks ex; MapEditor *me=currentMapEditor(); if (me) {