Added notifications and canceling to xdxf download dialog
[mdictionary] / src / plugins / xdxf / xdxfplugin.cpp
index 05d1e91..6a79bb1 100644 (file)
@@ -31,6 +31,9 @@
 
 XdxfDictDownloader XdxfPlugin::dictDownloader;
 
+bool XdxfPlugin::dictDownloaderInitialized = false;
+
+
 XdxfPlugin::XdxfPlugin(QObject *parent) : CommonDictInterface(parent),
                     _langFrom(""), _langTo(""),_name(""), _infoNote("") {
 
@@ -45,6 +48,13 @@ XdxfPlugin::XdxfPlugin(QObject *parent) : CommonDictInterface(parent),
             this, SIGNAL(notify(Notify::NotifyType,QString)));
 
 
+    if(!dictDownloaderInitialized) {
+        connect(&dictDownloader, SIGNAL(notify(Notify::NotifyType,QString)),
+                this, SIGNAL(notify(Notify::NotifyType,QString)));
+        dictDownloaderInitialized = true;
+    }
+
+
     _settings->setValue("type","xdxf");
     _icon = QIcon("/usr/share/mdictionary/xdxf.png");
     _wordsCount = -1;