diff --git a/keditbookmarks/actionsimpl.cpp b/keditbookmarks/actionsimpl.cpp
index 628734688d..9afad1da55 100644
--- a/keditbookmarks/actionsimpl.cpp
+++ b/keditbookmarks/actionsimpl.cpp
@@ -119,12 +119,16 @@ void ActionsImpl::slotImport() {
CmdHistory::self()->addCommand(import);
}
+void ActionsImpl::slotExportIE() {
+ CurrentMgr::self()->doExport(CurrentMgr::IEExport);
+}
+
void ActionsImpl::slotExportNS() {
- CurrentMgr::self()->doExport(false);
+ CurrentMgr::self()->doExport(CurrentMgr::NetscapeExport);
}
void ActionsImpl::slotExportMoz() {
- CurrentMgr::self()->doExport(true);
+ CurrentMgr::self()->doExport(CurrentMgr::MozillaExport);
}
/* -------------------------------------- */
diff --git a/keditbookmarks/actionsimpl.h b/keditbookmarks/actionsimpl.h
index 6b3c683fe4..63c611d745 100644
--- a/keditbookmarks/actionsimpl.h
+++ b/keditbookmarks/actionsimpl.h
@@ -51,6 +51,7 @@ public slots:
void slotExpandAll();
void slotCollapseAll();
void slotImport();
+ void slotExportIE();
void slotExportNS();
void slotExportMoz();
diff --git a/keditbookmarks/keditbookmarksui.rc b/keditbookmarks/keditbookmarksui.rc
index 7e5a8a9ab0..0656eedc47 100644
--- a/keditbookmarks/keditbookmarksui.rc
+++ b/keditbookmarks/keditbookmarksui.rc
@@ -16,6 +16,7 @@
@@ -139,6 +140,7 @@
+
diff --git a/keditbookmarks/toplevel.cpp b/keditbookmarks/toplevel.cpp
index 406c7095d0..0e235be4bc 100644
--- a/keditbookmarks/toplevel.cpp
+++ b/keditbookmarks/toplevel.cpp
@@ -40,6 +40,7 @@
#include
#include
#include
+#include
#include
#include "listview.h"
@@ -144,7 +145,14 @@ void CurrentMgr::notifyManagers() {
DCOPRef("*", objId).send("notifyCompleteChange", QString::fromLatin1(kapp->dcopClient()->appId()));
}
-void CurrentMgr::doExport(bool moz) {
+void CurrentMgr::doExport(ExportType type) {
+ if (type == IEExport) {
+ QString path = KIEBookmarkImporterImpl().findDefaultLocation(true);
+ KIEBookmarkExporterImpl exporter(mgr(), path);
+ exporter.write(mgr()->root());
+ return;
+ }
+ bool moz = (type == MozillaExport);
QString path =
(moz)
? KNSBookmarkImporter::mozillaBookmarksFile(true)
@@ -314,6 +322,8 @@ void KEBApp::createActions() {
actn, SLOT( slotImport() ), actionCollection(), "importMoz");
(void) new KAction(i18n("&Export to Netscape Bookmarks"), "netscape", 0,
actn, SLOT( slotExportNS() ), actionCollection(), "exportNS");
+ (void) new KAction(i18n("&Export to IE Bookmarks"), "ie", 0,
+ actn, SLOT( slotExportIE() ), actionCollection(), "exportIE");
(void) new KAction(i18n("Export to &Mozilla Bookmarks..."), "mozilla", 0,
actn, SLOT( slotExportMoz() ), actionCollection(), "exportMoz");
}
diff --git a/keditbookmarks/toplevel.h b/keditbookmarks/toplevel.h
index 5127660372..97f8680b04 100644
--- a/keditbookmarks/toplevel.h
+++ b/keditbookmarks/toplevel.h
@@ -66,7 +66,8 @@ class CurrentMgr : public QObject {
public:
static CurrentMgr* self() { if (!s_mgr) { s_mgr = new CurrentMgr(); } return s_mgr; }
void createManager(const QString &filename);
- void doExport(bool moz);
+ typedef enum {IEExport, MozillaExport, NetscapeExport} ExportType;
+ void doExport(ExportType type);
void notifyManagers();
QString correctAddress(const QString &address);
KBookmarkManager* mgr() const { return m_mgr; }