Work on the dictionary selection dialog.
[mdictionary] / src / mdictionary / gui / DictManagerWidget.cpp
index 4353301..04aad2f 100644 (file)
@@ -125,8 +125,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()) {