projects
/
mdictionary
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added notifications and canceling to xdxf download dialog
[mdictionary]
/
src
/
plugins
/
xdxf
/
xdxfplugin.cpp
diff --git
a/src/plugins/xdxf/xdxfplugin.cpp
b/src/plugins/xdxf/xdxfplugin.cpp
index
05d1e91
..
6a79bb1
100644
(file)
--- a/
src/plugins/xdxf/xdxfplugin.cpp
+++ b/
src/plugins/xdxf/xdxfplugin.cpp
@@
-31,6
+31,9
@@
XdxfDictDownloader XdxfPlugin::dictDownloader;
XdxfDictDownloader XdxfPlugin::dictDownloader;
+bool XdxfPlugin::dictDownloaderInitialized = false;
+
+
XdxfPlugin::XdxfPlugin(QObject *parent) : CommonDictInterface(parent),
_langFrom(""), _langTo(""),_name(""), _infoNote("") {
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)));
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;
_settings->setValue("type","xdxf");
_icon = QIcon("/usr/share/mdictionary/xdxf.png");
_wordsCount = -1;