Port WelcomeScreenWidget to qml. add instalation rules for qml file
[mdictionary] / src / mdictionary / gui / DictManagerWidget.cpp
index 4353301..8519c93 100644 (file)
 
 *******************************************************************************/
 
-//! \file DictManagerWidget.cpp
-//! \brief Dictionaries management widget
-//! \author Mateusz Półrola <mateusz.polrola@comarch.pl>
+/*! \file DictManagerWidget.cpp
+    \brief Implements dictionaries management widget
+
+    \author Mateusz Półrola <mateusz.polrola@comarch.pl>
+*/
 
 #include "DictManagerWidget.h"
 #include "DictTypeSelectDialog.h"
@@ -125,8 +127,15 @@ void DictManagerWidget::refreshDictsList() {
     while(i.hasNext()) {
         i.next();
         QListWidgetItem* item = new QListWidgetItem();
-        QString name = i.key()->langFrom() + " - " + i.key()->langTo() + " (" +
-                       i.key()->type() + " " + i.key()->name() + ")";
+        QString name;
+        if (i.key()->type() == "stardict") {
+            name = i.key()->name() + " (" + i.key()->type() + ")";
+        }
+        else {
+            name = i.key()->langFrom() + " - " + i.key()->langTo() +
+                   " (" + i.key()->type() + " " +
+                   i.key()->name() + ")";
+        }
         item->setText(name);
         item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
         if(i.value()) {