summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Starecki <krzysztof.starecki@gmail.com>2018-12-30 14:54:28 +0100
committerKrzysztof Starecki <krzysztof.starecki@gmail.com>2018-12-30 14:57:05 +0100
commitec8dbcbf280bf6b542e9087d562e51757d205299 (patch)
tree079eb2df3c639d969a836eaf7b63c61d846f67f7
parent5920dc2cd14ef5dc6e3802939cbe6256ea13848b (diff)
Port context menus to new downloadlist
-rw-r--r--src/downloadlist.cpp2
-rw-r--r--src/downloadlistwidget.cpp357
-rw-r--r--src/downloadlistwidget.h58
-rw-r--r--src/downloadmanager.cpp2
-rw-r--r--src/mainwindow.cpp41
-rw-r--r--src/mainwindow.ui2
-rw-r--r--src/organizer_en.ts417
7 files changed, 290 insertions, 589 deletions
diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp
index 503274e6..a44850cb 100644
--- a/src/downloadlist.cpp
+++ b/src/downloadlist.cpp
@@ -82,8 +82,10 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const
DownloadManager::DownloadState state = m_Manager->getState(index.row());
switch (state) {
case DownloadManager::STATE_INSTALLED : return tr("Installed");
+ case DownloadManager::STATE_UNINSTALLED : return tr("Uninstalled");
case DownloadManager::STATE_READY : return tr("Downloaded");
case DownloadManager::STATE_DOWNLOADING : return m_Manager->getProgress(index.row()).second;
+ case DownloadManager::STATE_PAUSED : return tr("Paused");
default : return state;
}
} else {
diff --git a/src/downloadlistwidget.cpp b/src/downloadlistwidget.cpp
index b3d9b083..915ddda5 100644
--- a/src/downloadlistwidget.cpp
+++ b/src/downloadlistwidget.cpp
@@ -30,224 +30,101 @@ DownloadListWidget::DownloadListWidget(QWidget *parent)
: QTreeView(parent)
{
connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onDoubleClick(QModelIndex)));
+ connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onCustomContextMenu(QPoint)));
}
-
DownloadListWidget::~DownloadListWidget()
{
}
-void DownloadListWidget::onDoubleClick(const QModelIndex &index)
+void DownloadListWidget::setManager(DownloadManager *manager)
{
- emit(resumeDownload(dynamic_cast<QSortFilterProxyModel*>(model())->mapToSource(index).row()));
+ m_Manager = manager;
}
-
-DownloadListWidgetDelegate::DownloadListWidgetDelegate(DownloadManager *manager, bool metaDisplay, QTreeView *view, QObject *parent)
- : QItemDelegate(parent)
- , m_Manager(manager)
- , m_MetaDisplay(metaDisplay)
- , m_ItemWidget(new DownloadListWidget)
- , m_ContextRow(0)
- , m_View(view)
-{
- m_NameLabel = m_ItemWidget->findChild<QLabel*>("nameLabel");
- m_SizeLabel = m_ItemWidget->findChild<QLabel*>("sizeLabel");
- m_Progress = m_ItemWidget->findChild<QProgressBar*>("downloadProgress");
- m_InstallLabel = m_ItemWidget->findChild<QLabel*>("installLabel");
-
- m_InstallLabel->setVisible(false);
- m_Progress->setTextVisible(true);
-
- connect(manager, SIGNAL(stateChanged(int,DownloadManager::DownloadState)), this, SLOT(stateChanged(int,DownloadManager::DownloadState)));
- connect(manager, SIGNAL(downloadRemoved(int)), this, SLOT(resetCache(int)));
-}
-
-
-DownloadListWidgetDelegate::~DownloadListWidgetDelegate()
-{
- delete m_ItemWidget;
-}
-
-
-void DownloadListWidgetDelegate::stateChanged(int row,DownloadManager::DownloadState)
-{
- m_Cache.remove(row);
-}
-
-
-void DownloadListWidgetDelegate::resetCache(int)
-{
- m_Cache.clear();
-}
-
-
-void DownloadListWidgetDelegate::drawCache(QPainter *painter, const QStyleOptionViewItem &option, const QPixmap &cache) const
+void DownloadListWidget::onDoubleClick(const QModelIndex &index)
{
- QRect rect = option.rect;
- rect.setLeft(0);
- rect.setWidth(m_View->columnWidth(0) + m_View->columnWidth(1) + m_View->columnWidth(2) + m_View->columnWidth(3));
- painter->drawPixmap(rect, cache);
+ QModelIndex sourceIndex = qobject_cast<QSortFilterProxyModel*>(model())->mapToSource(index);
+ if (m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_READY) {
+ emit installDownload(sourceIndex.row());
+ } else if ((m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_PAUSED) || (m_Manager->getState(sourceIndex.row()) == DownloadManager::STATE_PAUSING)) {
+ emit resumeDownload(sourceIndex.row());
+ }
}
-
-QString DownloadListWidgetDelegate::sizeFormat(quint64 size) const
+void DownloadListWidget::onCustomContextMenu(const QPoint &point)
{
- qreal calc = size;
- QStringList list;
- list << "KB" << "MB" << "GB" << "TB";
-
- QStringListIterator i(list);
- QString unit("byte(s)");
-
- while (calc >= 1024.0 && i.hasNext())
- {
- unit = i.next();
- calc /= 1024.0;
- }
-
- return QString().setNum(calc, 'f', 2) + " " + unit;
-}
+ QMenu menu(this);
+ QModelIndex index = indexAt(point);
+ bool hidden = false;
+ if (index.row() >= 0) {
+ m_ContextRow = qobject_cast<QSortFilterProxyModel*>(model())->mapToSource(index).row();
+ DownloadManager::DownloadState state = m_Manager->getState(m_ContextRow);
+ hidden = m_Manager->isHidden(m_ContextRow);
+ if (state >= DownloadManager::STATE_READY) {
+ menu.addAction(tr("Install"), this, SLOT(issueInstall()));
+ if (m_Manager->isInfoIncomplete(m_ContextRow)) {
+ menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfo()));
+ }
+ else {
+ menu.addAction(tr("Visit on Nexus"), this, SLOT(issueVisitOnNexus()));
+ }
+ menu.addAction(tr("Open File"), this, SLOT(issueOpenFile()));
+ menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
-void DownloadListWidgetDelegate::paintPendingDownload(int downloadIndex) const
-{
- std::tuple<QString, int, int> nexusids = m_Manager->getPendingDownload(downloadIndex);
- m_NameLabel->setText(tr("< game %1 mod %2 file %3 >").arg(std::get<0>(nexusids)).arg(std::get<1>(nexusids)).arg(std::get<2>(nexusids)));
- m_SizeLabel->setText("???");
- m_InstallLabel->setVisible(true);
- m_InstallLabel->setText(tr("Pending"));
- m_Progress->setVisible(false);
-}
+ menu.addSeparator();
-
-void DownloadListWidgetDelegate::paintRegularDownload(int downloadIndex) const
-{
- QString name = m_MetaDisplay ? m_Manager->getDisplayName(downloadIndex) : m_Manager->getFileName(downloadIndex);
- if (name.length() > 120) {
- name.truncate(120);
- name.append("...");
- }
- m_NameLabel->setText(name);
- m_SizeLabel->setText(sizeFormat(m_Manager->getFileSize(downloadIndex) ));
- DownloadManager::DownloadState state = m_Manager->getState(downloadIndex);
- if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR) || (state == DownloadManager::STATE_PAUSING)) {
- QPalette labelPalette;
- m_InstallLabel->setVisible(true);
- m_Progress->setVisible(false);
-#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Paused - Double Click to resume", 0));
-#else
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Paused - Double Click to resume", 0, QApplication::UnicodeUTF8));
-#endif
- labelPalette.setColor(QPalette::WindowText, Qt::darkRed);
- m_InstallLabel->setPalette(labelPalette);
- } else if (state == DownloadManager::STATE_FETCHINGMODINFO) {
- m_InstallLabel->setText(tr("Fetching Info 1"));
- m_Progress->setVisible(false);
- } else if (state == DownloadManager::STATE_FETCHINGFILEINFO) {
- m_InstallLabel->setText(tr("Fetching Info 2"));
- m_Progress->setVisible(false);
- } else if (state >= DownloadManager::STATE_READY) {
- QPalette labelPalette;
- m_InstallLabel->setVisible(true);
- m_Progress->setVisible(false);
- if (state == DownloadManager::STATE_INSTALLED) {
- // the tr-macro doesn't work here, maybe because the translation is actually associated with DownloadListWidget instead
- // of DownloadListWidgetDelegate?
-#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Installed - Double Click to re-install", 0));
-#else
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Installed - Double Click to re-install", 0, QApplication::UnicodeUTF8));
-#endif
- labelPalette.setColor(QPalette::WindowText, Qt::darkGray);
- } else if (state == DownloadManager::STATE_UNINSTALLED) {
-#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Uninstalled - Double Click to re-install", 0));
-#else
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Uninstalled - Double Click to re-install", 0, QApplication::UnicodeUTF8));
-#endif
- labelPalette.setColor(QPalette::WindowText, Qt::lightGray);
- } else {
-#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Done - Double Click to install", 0));
-#else
- m_InstallLabel->setText(QApplication::translate("DownloadListWidget", "Done - Double Click to install", 0, QApplication::UnicodeUTF8));
-#endif
- labelPalette.setColor(QPalette::WindowText, Qt::darkGreen);
- }
- m_InstallLabel->setPalette(labelPalette);
- if (m_Manager->isInfoIncomplete(downloadIndex)) {
- m_NameLabel->setText("<img src=\":/MO/gui/warning_16\" /> " + m_NameLabel->text());
+ menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
+ if (hidden) {
+ menu.addAction(tr("Un-Hide"), this, SLOT(issueRestoreToView()));
+ }
+ else {
+ menu.addAction(tr("Hide"), this, SLOT(issueRemoveFromView()));
+ }
}
- } else {
- m_InstallLabel->setVisible(false);
- m_Progress->setVisible(true);
- m_Progress->setValue(m_Manager->getProgress(downloadIndex).first);
- m_Progress->setFormat(m_Manager->getProgress(downloadIndex).second);
- }
-}
-
-void DownloadListWidgetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
-{
- try {
- auto iter = m_Cache.find(index.row());
- if (iter != m_Cache.end()) {
- drawCache(painter, option, *iter);
- return;
+ else if (state == DownloadManager::STATE_DOWNLOADING) {
+ menu.addAction(tr("Cancel"), this, SLOT(issueCancel()));
+ menu.addAction(tr("Pause"), this, SLOT(issuePause()));
+ menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
}
-
- m_ItemWidget->resize(QSize(m_View->columnWidth(0) + m_View->columnWidth(1) + m_View->columnWidth(2) + m_View->columnWidth(3), option.rect.height()));
-
- int downloadIndex = index.data().toInt();
-
- if (downloadIndex >= m_Manager->numTotalDownloads()) {
- paintPendingDownload(downloadIndex - m_Manager->numTotalDownloads());
- } else {
- paintRegularDownload(downloadIndex);
+ else if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR) || (state == DownloadManager::STATE_PAUSING)) {
+ menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
+ menu.addAction(tr("Resume"), this, SLOT(issueResume()));
+ menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
}
-#pragma message("caching disabled because changes in the list (including resorting) doesn't work correctly")
-// if (state >= DownloadManager::STATE_READY) {
- if (false) {
-#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
- QPixmap cache = m_ItemWidget->grab();
-#else
- QPixmap cache = QPixmap::grabWidget(m_ItemWidget);
-#endif
- m_Cache[index.row()] = cache;
- drawCache(painter, option, cache);
- } else {
- painter->save();
- painter->translate(QPoint(0, option.rect.topLeft().y()));
+ menu.addSeparator();
+ }
+ menu.addAction(tr("Delete Installed..."), this, SLOT(issueDeleteCompleted()));
+ menu.addAction(tr("Delete Uninstalled..."), this, SLOT(issueDeleteUninstalled()));
+ menu.addAction(tr("Delete All..."), this, SLOT(issueDeleteAll()));
- m_ItemWidget->render(painter);
- painter->restore();
- }
- } catch (const std::exception &e) {
- qCritical("failed to paint download list: %s", e.what());
+ if (!hidden) {
+ menu.addSeparator();
+ menu.addAction(tr("Hide Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
+ menu.addAction(tr("Hide Uninstalled..."), this, SLOT(issueRemoveFromViewUninstalled()));
+ menu.addAction(tr("Hide All..."), this, SLOT(issueRemoveFromViewAll()));
+ }
+ if (hidden) {
+ menu.addSeparator();
+ menu.addAction(tr("Un-Hide All..."), this, SLOT(issueRestoreToViewAll()));
}
-}
-QSize DownloadListWidgetDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const
-{
- const int width = m_ItemWidget->minimumWidth();
- const int height = m_ItemWidget->height();
- return QSize(width, height);
+ menu.exec(viewport()->mapToGlobal(point));
}
-
-void DownloadListWidgetDelegate::issueInstall()
+void DownloadListWidget::issueInstall()
{
emit installDownload(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueQueryInfo()
+void DownloadListWidget::issueQueryInfo()
{
emit queryInfo(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueDelete()
+void DownloadListWidget::issueDelete()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will permanently delete the selected download."),
@@ -256,52 +133,53 @@ void DownloadListWidgetDelegate::issueDelete()
}
}
-void DownloadListWidgetDelegate::issueRemoveFromView()
+void DownloadListWidget::issueRemoveFromView()
{
+ qDebug() << "removing from view: " << m_ContextRow;
emit removeDownload(m_ContextRow, false);
}
-void DownloadListWidgetDelegate::issueRestoreToView()
+void DownloadListWidget::issueRestoreToView()
{
emit restoreDownload(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueRestoreToViewAll()
+void DownloadListWidget::issueRestoreToViewAll()
{
emit restoreDownload(-1);
}
-void DownloadListWidgetDelegate::issueVisitOnNexus()
+void DownloadListWidget::issueVisitOnNexus()
{
emit visitOnNexus(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueOpenFile()
+void DownloadListWidget::issueOpenFile()
{
emit openFile(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueOpenInDownloadsFolder()
+void DownloadListWidget::issueOpenInDownloadsFolder()
{
emit openInDownloadsFolder(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueCancel()
+void DownloadListWidget::issueCancel()
{
emit cancelDownload(m_ContextRow);
}
-void DownloadListWidgetDelegate::issuePause()
+void DownloadListWidget::issuePause()
{
emit pauseDownload(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueResume()
+void DownloadListWidget::issueResume()
{
emit resumeDownload(m_ContextRow);
}
-void DownloadListWidgetDelegate::issueDeleteAll()
+void DownloadListWidget::issueDeleteAll()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all finished downloads from this list and from disk."),
@@ -310,7 +188,7 @@ void DownloadListWidgetDelegate::issueDeleteAll()
}
}
-void DownloadListWidgetDelegate::issueDeleteCompleted()
+void DownloadListWidget::issueDeleteCompleted()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all installed downloads from this list and from disk."),
@@ -319,7 +197,7 @@ void DownloadListWidgetDelegate::issueDeleteCompleted()
}
}
-void DownloadListWidgetDelegate::issueDeleteUninstalled()
+void DownloadListWidget::issueDeleteUninstalled()
{
if (QMessageBox::question(nullptr, tr("Delete Files?"),
tr("This will remove all uninstalled downloads from this list and from disk."),
@@ -328,7 +206,7 @@ void DownloadListWidgetDelegate::issueDeleteUninstalled()
}
}
-void DownloadListWidgetDelegate::issueRemoveFromViewAll()
+void DownloadListWidget::issueRemoveFromViewAll()
{
if (QMessageBox::question(nullptr, tr("Are you sure?"),
tr("This will remove all finished downloads from this list (but NOT from disk)."),
@@ -337,7 +215,7 @@ void DownloadListWidgetDelegate::issueRemoveFromViewAll()
}
}
-void DownloadListWidgetDelegate::issueRemoveFromViewCompleted()
+void DownloadListWidget::issueRemoveFromViewCompleted()
{
if (QMessageBox::question(nullptr, tr("Are you sure?"),
tr("This will remove all installed downloads from this list (but NOT from disk)."),
@@ -346,7 +224,7 @@ void DownloadListWidgetDelegate::issueRemoveFromViewCompleted()
}
}
-void DownloadListWidgetDelegate::issueRemoveFromViewUninstalled()
+void DownloadListWidget::issueRemoveFromViewUninstalled()
{
if (QMessageBox::question(nullptr, tr("Are you sure?"),
tr("This will remove all uninstalled downloads from this list (but NOT from disk)."),
@@ -354,82 +232,3 @@ void DownloadListWidgetDelegate::issueRemoveFromViewUninstalled()
emit removeDownload(-3, false);
}
}
-
-bool DownloadListWidgetDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
- const QStyleOptionViewItem &option, const QModelIndex &index)
-{
- try {
- if (event->type() == QEvent::MouseButtonDblClick) {
- QModelIndex sourceIndex = qobject_cast<QSortFilterProxyModel*>(model)->mapToSource(index);
- if (m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_READY) {
- emit installDownload(sourceIndex.row());
- } else if ((m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_PAUSED) || (m_Manager->getState(sourceIndex.row()) == DownloadManager::STATE_PAUSING)) {
- emit resumeDownload(sourceIndex.row());
- }
- return true;
- } else if (event->type() == QEvent::MouseButtonRelease) {
- QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
- if (mouseEvent->button() == Qt::RightButton) {
- QMenu menu(m_View);
- bool hidden = false;
- m_ContextRow = qobject_cast<QSortFilterProxyModel*>(model)->mapToSource(index).row();
- if (m_ContextRow < m_Manager->numTotalDownloads()) {
- DownloadManager::DownloadState state = m_Manager->getState(m_ContextRow);
- hidden = m_Manager->isHidden(m_ContextRow);
- if (state >= DownloadManager::STATE_READY) {
- menu.addAction(tr("Install"), this, SLOT(issueInstall()));
- if (m_Manager->isInfoIncomplete(m_ContextRow)) {
- menu.addAction(tr("Query Info"), this, SLOT(issueQueryInfo()));
- }else {
- menu.addAction(tr("Visit on Nexus"), this,SLOT(issueVisitOnNexus()));
- }
-
- menu.addAction(tr("Open File"), this, SLOT(issueOpenFile()));
- menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
-
- menu.addSeparator();
-
- menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
- if (hidden) {
- menu.addAction(tr("Un-Hide"), this, SLOT(issueRestoreToView()));
- } else {
- menu.addAction(tr("Hide"), this, SLOT(issueRemoveFromView()));
- }
- } else if (state == DownloadManager::STATE_DOWNLOADING){
- menu.addAction(tr("Cancel"), this, SLOT(issueCancel()));
- menu.addAction(tr("Pause"), this, SLOT(issuePause()));
- menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
- } else if ((state == DownloadManager::STATE_PAUSED) || (state == DownloadManager::STATE_ERROR) || (state == DownloadManager::STATE_PAUSING)) {
- menu.addAction(tr("Delete"), this, SLOT(issueDelete()));
- menu.addAction(tr("Resume"), this, SLOT(issueResume()));
- menu.addAction(tr("Show in Folder"), this, SLOT(issueOpenInDownloadsFolder()));
- }
-
- menu.addSeparator();
- }
- menu.addAction(tr("Delete Installed..."), this, SLOT(issueDeleteCompleted()));
- menu.addAction(tr("Delete Uninstalled..."), this, SLOT(issueDeleteUninstalled()));
- menu.addAction(tr("Delete All..."), this, SLOT(issueDeleteAll()));
-
- if (!hidden) {
- menu.addSeparator();
- menu.addAction(tr("Hide Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
- menu.addAction(tr("Hide Uninstalled..."), this, SLOT(issueRemoveFromViewUninstalled()));
- menu.addAction(tr("Hide All..."), this, SLOT(issueRemoveFromViewAll()));
- }
- if (hidden) {
- menu.addSeparator();
- menu.addAction(tr("Un-Hide All..."), this, SLOT(issueRestoreToViewAll()));
- }
-
- menu.exec(mouseEvent->globalPos());
-
- event->accept();
- return true;
- }
- }
- } catch (const std::exception &e) {
- qCritical("failed to handle editor event: %s", e.what());
- }
- return QItemDelegate::editorEvent(event, model, option, index);
-}
diff --git a/src/downloadlistwidget.h b/src/downloadlistwidget.h
index 7a7a25f7..0c17de87 100644
--- a/src/downloadlistwidget.h
+++ b/src/downloadlistwidget.h
@@ -31,6 +31,8 @@ namespace Ui {
class DownloadListWidget;
}
+class DownloadManager;
+
class DownloadListWidget : public QTreeView
{
Q_OBJECT
@@ -39,33 +41,9 @@ public:
explicit DownloadListWidget(QWidget *parent = 0);
~DownloadListWidget();
-signals:
- void resumeDownload(int index);
-
-private slots:
- void onDoubleClick(const QModelIndex &index);
-};
-
-class DownloadManager;
-
-class DownloadListWidgetDelegate : public QItemDelegate
-{
-
- Q_OBJECT
-
-public:
-
- DownloadListWidgetDelegate(DownloadManager *manager, bool metaDisplay, QTreeView *view, QObject *parent = 0);
- ~DownloadListWidgetDelegate();
-
- virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
- virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
-
- void paintPendingDownload(int downloadIndex) const;
- void paintRegularDownload(int downloadIndex) const;
+ void setManager(DownloadManager *manager);
signals:
-
void installDownload(int index);
void queryInfo(int index);
void removeDownload(int index, bool deleteFile);
@@ -77,19 +55,9 @@ signals:
void openFile(int index);
void openInDownloadsFolder(int index);
-protected:
-
- QString sizeFormat(quint64 size) const;
- bool editorEvent(QEvent *event, QAbstractItemModel *model,
- const QStyleOptionViewItem &option, const QModelIndex &index);
-
-private:
-
-
- void drawCache(QPainter *painter, const QStyleOptionViewItem &option, const QPixmap &cache) const;
-
private slots:
-
+ void onDoubleClick(const QModelIndex &index);
+ void onCustomContextMenu(const QPoint &point);
void issueInstall();
void issueDelete();
void issueRemoveFromView();
@@ -109,25 +77,9 @@ private slots:
void issueRemoveFromViewUninstalled();
void issueQueryInfo();
- void stateChanged(int row, DownloadManager::DownloadState);
- void resetCache(int);
-
private:
-
- DownloadListWidget *m_ItemWidget;
DownloadManager *m_Manager;
-
- bool m_MetaDisplay;
-
- QLabel *m_NameLabel;
- QLabel *m_SizeLabel;
- QProgressBar *m_Progress;
- QLabel *m_InstallLabel;
int m_ContextRow;
-
- QTreeView *m_View;
-
- mutable QMap<int, QPixmap> m_Cache;
};
#endif // DOWNLOADLISTWIDGET_H
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index f1cbf109..9f07b030 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -1853,4 +1853,4 @@ void DownloadManager::writeData(DownloadInfo *info)
"Canceling download \"%2\"...").arg(ret).arg(fileName));
}
}
-} \ No newline at end of file
+}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 5ca60ef1..80ddf093 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -5152,45 +5152,26 @@ void MainWindow::on_actionEndorseMO_triggered()
void MainWindow::updateDownloadListDelegate()
{
- /*
- if (m_OrganizerCore.settings().compactDownloads()) {
- ui->downloadView->setItemDelegate(
- new DownloadListWidgetCompactDelegate(m_OrganizerCore.downloadManager(),
- m_OrganizerCore.settings().metaDownloads(),
- ui->downloadView,
- ui->downloadView));
- } else {
- ui->downloadView->setItemDelegate(
- new DownloadListWidgetDelegate(m_OrganizerCore.downloadManager(),
- m_OrganizerCore.settings().metaDownloads(),
- ui->downloadView,
- ui->downloadView));
- }
- */
-
DownloadListSortProxy *sortProxy = new DownloadListSortProxy(m_OrganizerCore.downloadManager(), ui->downloadView);
sortProxy->setSourceModel(new DownloadList(m_OrganizerCore.downloadManager(), ui->downloadView));
connect(ui->downloadFilterEdit, SIGNAL(textChanged(QString)), sortProxy, SLOT(updateFilter(QString)));
connect(ui->downloadFilterEdit, SIGNAL(textChanged(QString)), this, SLOT(downloadFilterChanged(QString)));
ui->downloadView->setModel(sortProxy);
+ ui->downloadView->setManager(m_OrganizerCore.downloadManager());
//ui->downloadView->sortByColumn(1, Qt::DescendingOrder);
ui->downloadView->header()->resizeSections(QHeaderView::Stretch);
- connect(ui->downloadView, SIGNAL(resumeDownload(int)), m_OrganizerCore.downloadManager(), SLOT(resumeDownload(int)));
-
- /*
- connect(ui->downloadView->itemDelegate(), SIGNAL(installDownload(int)), &m_OrganizerCore, SLOT(installDownload(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(queryInfo(int)), m_OrganizerCore.downloadManager(), SLOT(queryInfo(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(visitOnNexus(int)), m_OrganizerCore.downloadManager(), SLOT(visitOnNexus(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(openFile(int)), m_OrganizerCore.downloadManager(), SLOT(openFile(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(openInDownloadsFolder(int)), m_OrganizerCore.downloadManager(), SLOT(openInDownloadsFolder(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(removeDownload(int, bool)), m_OrganizerCore.downloadManager(), SLOT(removeDownload(int, bool)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(restoreDownload(int)), m_OrganizerCore.downloadManager(), SLOT(restoreDownload(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(cancelDownload(int)), m_OrganizerCore.downloadManager(), SLOT(cancelDownload(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(pauseDownload(int)), m_OrganizerCore.downloadManager(), SLOT(pauseDownload(int)));
- connect(ui->downloadView->itemDelegate(), SIGNAL(resumeDownload(int)), this, SLOT(resumeDownload(int)));
- */
+ connect(ui->downloadView, SIGNAL(installDownload(int)), &m_OrganizerCore, SLOT(installDownload(int)));
+ connect(ui->downloadView, SIGNAL(queryInfo(int)), m_OrganizerCore.downloadManager(), SLOT(queryInfo(int)));
+ connect(ui->downloadView, SIGNAL(visitOnNexus(int)), m_OrganizerCore.downloadManager(), SLOT(visitOnNexus(int)));
+ connect(ui->downloadView, SIGNAL(openFile(int)), m_OrganizerCore.downloadManager(), SLOT(openFile(int)));
+ connect(ui->downloadView, SIGNAL(openInDownloadsFolder(int)), m_OrganizerCore.downloadManager(), SLOT(openInDownloadsFolder(int)));
+ connect(ui->downloadView, SIGNAL(removeDownload(int, bool)), m_OrganizerCore.downloadManager(), SLOT(removeDownload(int, bool)));
+ connect(ui->downloadView, SIGNAL(restoreDownload(int)), m_OrganizerCore.downloadManager(), SLOT(restoreDownload(int)));
+ connect(ui->downloadView, SIGNAL(cancelDownload(int)), m_OrganizerCore.downloadManager(), SLOT(cancelDownload(int)));
+ connect(ui->downloadView, SIGNAL(pauseDownload(int)), m_OrganizerCore.downloadManager(), SLOT(pauseDownload(int)));
+ connect(ui->downloadView, SIGNAL(resumeDownload(int)), this, SLOT(resumeDownload(int)));
}
diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 5dfd075b..771832fd 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -1311,7 +1311,7 @@ p, li { white-space: pre-wrap; }
</size>
</property>
<property name="contextMenuPolicy">
- <enum>Qt::PreventContextMenu</enum>
+ <enum>Qt::CustomContextMenu</enum>
</property>
<property name="acceptDrops">
<bool>true</bool>
diff --git a/src/organizer_en.ts b/src/organizer_en.ts
index 9b61eafc..e958c116 100644
--- a/src/organizer_en.ts
+++ b/src/organizer_en.ts
@@ -313,16 +313,26 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="downloadlist.cpp" line="85"/>
+ <source>Uninstalled</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="downloadlist.cpp" line="86"/>
<source>Downloaded</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlist.cpp" line="96"/>
+ <location filename="downloadlist.cpp" line="88"/>
+ <source>Paused</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="downloadlist.cpp" line="98"/>
<source>Information missing, please select &quot;Query Info&quot; from the context menu to re-retrieve.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlist.cpp" line="103"/>
+ <location filename="downloadlist.cpp" line="105"/>
<source>pending download</source>
<translation type="unfinished"></translation>
</message>
@@ -337,392 +347,349 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="downloadlistwidget.ui" line="102"/>
- <location filename="downloadlistwidget.cpp" line="173"/>
- <location filename="downloadlistwidget.cpp" line="175"/>
<source>Done - Double Click to install</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="139"/>
- <location filename="downloadlistwidget.cpp" line="141"/>
- <source>Paused - Double Click to resume</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="downloadlistwidget.cpp" line="159"/>
- <location filename="downloadlistwidget.cpp" line="161"/>
- <source>Installed - Double Click to re-install</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="downloadlistwidget.cpp" line="166"/>
- <location filename="downloadlistwidget.cpp" line="168"/>
- <source>Uninstalled - Double Click to re-install</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>DownloadListWidgetCompact</name>
- <message>
- <location filename="downloadlistwidgetcompact.ui" line="17"/>
- <location filename="downloadlistwidgetcompact.ui" line="56"/>
- <source>Placeholder</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="downloadlistwidgetcompact.ui" line="129"/>
- <source>Done</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>DownloadListWidgetCompactDelegate</name>
- <message>
- <location filename="downloadlistwidgetcompact.cpp" line="109"/>
- <source>&lt; game %1 mod %2 file %3 &gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="downloadlistwidgetcompact.cpp" line="114"/>
- <source>Pending</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="downloadlistwidgetcompact.cpp" line="141"/>
- <source>Paused</source>
+ <location filename="downloadlistwidget.cpp" line="67"/>
+ <source>Install</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="143"/>
- <source>Fetching Info 1</source>
+ <location filename="downloadlistwidget.cpp" line="69"/>
+ <source>Query Info</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="145"/>
- <source>Fetching Info 2</source>
+ <location filename="downloadlistwidget.cpp" line="72"/>
+ <source>Visit on Nexus</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="150"/>
- <source>Installed</source>
+ <location filename="downloadlistwidget.cpp" line="75"/>
+ <source>Open File</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="152"/>
- <source>Uninstalled</source>
+ <location filename="downloadlistwidget.cpp" line="76"/>
+ <location filename="downloadlistwidget.cpp" line="91"/>
+ <location filename="downloadlistwidget.cpp" line="96"/>
+ <source>Show in Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="154"/>
- <source>Done</source>
+ <location filename="downloadlistwidget.cpp" line="80"/>
+ <location filename="downloadlistwidget.cpp" line="94"/>
+ <source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="233"/>
- <location filename="downloadlistwidgetcompact.cpp" line="288"/>
- <location filename="downloadlistwidgetcompact.cpp" line="297"/>
- <location filename="downloadlistwidgetcompact.cpp" line="306"/>
- <location filename="downloadlistwidgetcompact.cpp" line="315"/>
- <location filename="downloadlistwidgetcompact.cpp" line="324"/>
- <location filename="downloadlistwidgetcompact.cpp" line="333"/>
- <source>Are you sure?</source>
+ <location filename="downloadlistwidget.cpp" line="82"/>
+ <source>Un-Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="234"/>
- <source>This will permanently delete the selected download.</source>
+ <location filename="downloadlistwidget.cpp" line="85"/>
+ <source>Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="289"/>
- <source>This will remove all finished downloads from this list and from disk.</source>
+ <location filename="downloadlistwidget.cpp" line="89"/>
+ <source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="298"/>
- <source>This will remove all installed downloads from this list and from disk.</source>
+ <location filename="downloadlistwidget.cpp" line="90"/>
+ <source>Pause</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="307"/>
- <source>This will remove all uninstalled downloads from this list and from disk.</source>
+ <location filename="downloadlistwidget.cpp" line="95"/>
+ <source>Resume</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="316"/>
- <source>This will permanently remove all finished downloads from this list (but NOT from disk).</source>
+ <location filename="downloadlistwidget.cpp" line="101"/>
+ <source>Delete Installed...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="325"/>
- <source>This will permanently remove all installed downloads from this list (but NOT from disk).</source>
+ <location filename="downloadlistwidget.cpp" line="102"/>
+ <source>Delete Uninstalled...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="334"/>
- <source>This will permanently remove all uninstalled downloads from this list (but NOT from disk).</source>
+ <location filename="downloadlistwidget.cpp" line="103"/>
+ <source>Delete All...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="363"/>
- <source>Install</source>
+ <location filename="downloadlistwidget.cpp" line="107"/>
+ <source>Hide Installed...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="365"/>
- <source>Query Info</source>
+ <location filename="downloadlistwidget.cpp" line="108"/>
+ <source>Hide Uninstalled...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="367"/>
- <source>Visit on Nexus</source>
+ <location filename="downloadlistwidget.cpp" line="109"/>
+ <source>Hide All...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="369"/>
- <source>Open File</source>
+ <location filename="downloadlistwidget.cpp" line="113"/>
+ <source>Un-Hide All...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="370"/>
- <location filename="downloadlistwidgetcompact.cpp" line="381"/>
- <location filename="downloadlistwidgetcompact.cpp" line="385"/>
- <source>Show in Folder</source>
+ <location filename="downloadlistwidget.cpp" line="131"/>
+ <location filename="downloadlistwidget.cpp" line="186"/>
+ <location filename="downloadlistwidget.cpp" line="195"/>
+ <location filename="downloadlistwidget.cpp" line="204"/>
+ <source>Delete Files?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="372"/>
- <source>Delete</source>
+ <location filename="downloadlistwidget.cpp" line="132"/>
+ <source>This will permanently delete the selected download.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="374"/>
- <source>Un-Hide</source>
+ <location filename="downloadlistwidget.cpp" line="187"/>
+ <source>This will remove all finished downloads from this list and from disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="376"/>
- <source>Hide</source>
+ <location filename="downloadlistwidget.cpp" line="196"/>
+ <source>This will remove all installed downloads from this list and from disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="379"/>
- <source>Cancel</source>
+ <location filename="downloadlistwidget.cpp" line="205"/>
+ <source>This will remove all uninstalled downloads from this list and from disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="380"/>
- <source>Pause</source>
+ <location filename="downloadlistwidget.cpp" line="213"/>
+ <location filename="downloadlistwidget.cpp" line="222"/>
+ <location filename="downloadlistwidget.cpp" line="231"/>
+ <source>Are you sure?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="383"/>
- <source>Remove</source>
+ <location filename="downloadlistwidget.cpp" line="214"/>
+ <source>This will remove all finished downloads from this list (but NOT from disk).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="384"/>
- <source>Resume</source>
+ <location filename="downloadlistwidget.cpp" line="223"/>
+ <source>This will remove all installed downloads from this list (but NOT from disk).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="389"/>
- <source>Delete Installed...</source>
+ <location filename="downloadlistwidget.cpp" line="232"/>
+ <source>This will remove all uninstalled downloads from this list (but NOT from disk).</source>
<translation type="unfinished"></translation>
</message>
+</context>
+<context>
+ <name>DownloadListWidgetCompact</name>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="390"/>
- <source>Delete Uninstalled...</source>
+ <location filename="downloadlistwidgetcompact.ui" line="17"/>
+ <location filename="downloadlistwidgetcompact.ui" line="56"/>
+ <source>Placeholder</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="391"/>
- <source>Delete All...</source>
+ <location filename="downloadlistwidgetcompact.ui" line="129"/>
+ <source>Done</source>
<translation type="unfinished"></translation>
</message>
+</context>
+<context>
+ <name>DownloadListWidgetCompactDelegate</name>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="394"/>
- <source>Hide Installed...</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="109"/>
+ <source>&lt; game %1 mod %2 file %3 &gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="395"/>
- <source>Hide Uninstalled...</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="114"/>
+ <source>Pending</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="396"/>
- <source>Hide All...</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="141"/>
+ <source>Paused</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidgetcompact.cpp" line="400"/>
- <source>Un-Hide All...</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="143"/>
+ <source>Fetching Info 1</source>
<translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>DownloadListWidgetDelegate</name>
<message>
- <location filename="downloadlistwidget.cpp" line="116"/>
- <source>&lt; game %1 mod %2 file %3 &gt;</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="145"/>
+ <source>Fetching Info 2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="119"/>
- <source>Pending</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="150"/>
+ <source>Installed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="146"/>
- <source>Fetching Info 1</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="152"/>
+ <source>Uninstalled</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="149"/>
- <source>Fetching Info 2</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="154"/>
+ <source>Done</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="252"/>
- <location filename="downloadlistwidget.cpp" line="306"/>
- <location filename="downloadlistwidget.cpp" line="315"/>
- <location filename="downloadlistwidget.cpp" line="324"/>
- <source>Delete Files?</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="233"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="288"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="297"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="306"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="315"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="324"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="333"/>
+ <source>Are you sure?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="253"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="234"/>
<source>This will permanently delete the selected download.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="307"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="289"/>
<source>This will remove all finished downloads from this list and from disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="316"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="298"/>
<source>This will remove all installed downloads from this list and from disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="325"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="307"/>
<source>This will remove all uninstalled downloads from this list and from disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="333"/>
- <location filename="downloadlistwidget.cpp" line="342"/>
- <location filename="downloadlistwidget.cpp" line="351"/>
- <source>Are you sure?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="downloadlistwidget.cpp" line="334"/>
- <source>This will remove all finished downloads from this list (but NOT from disk).</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="316"/>
+ <source>This will permanently remove all finished downloads from this list (but NOT from disk).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="343"/>
- <source>This will remove all installed downloads from this list (but NOT from disk).</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="325"/>
+ <source>This will permanently remove all installed downloads from this list (but NOT from disk).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="352"/>
- <source>This will remove all uninstalled downloads from this list (but NOT from disk).</source>
+ <location filename="downloadlistwidgetcompact.cpp" line="334"/>
+ <source>This will permanently remove all uninstalled downloads from this list (but NOT from disk).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="380"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="363"/>
<source>Install</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="382"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="365"/>
<source>Query Info</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="384"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="367"/>
<source>Visit on Nexus</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="387"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="369"/>
<source>Open File</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="388"/>
- <location filename="downloadlistwidget.cpp" line="401"/>
- <location filename="downloadlistwidget.cpp" line="405"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="370"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="381"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="385"/>
<source>Show in Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="392"/>
- <location filename="downloadlistwidget.cpp" line="403"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="372"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="394"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="374"/>
<source>Un-Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="396"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="376"/>
<source>Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="399"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="379"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="400"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="380"/>
<source>Pause</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="404"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="383"/>
+ <source>Remove</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="downloadlistwidgetcompact.cpp" line="384"/>
<source>Resume</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="410"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="389"/>
<source>Delete Installed...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="411"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="390"/>
<source>Delete Uninstalled...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="412"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="391"/>
<source>Delete All...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="416"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="394"/>
<source>Hide Installed...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="417"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="395"/>
<source>Hide Uninstalled...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="418"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="396"/>
<source>Hide All...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="downloadlistwidget.cpp" line="422"/>
+ <location filename="downloadlistwidgetcompact.cpp" line="400"/>
<source>Un-Hide All...</source>
<translation type="unfinished"></translation>
</message>
@@ -2470,7 +2437,7 @@ Please enter a name:</source>
</message>
<message>
<location filename="mainwindow.cpp" line="3447"/>
- <location filename="mainwindow.cpp" line="5469"/>
+ <location filename="mainwindow.cpp" line="5450"/>
<source>Are you sure?</source>
<translation type="unfinished"></translation>
</message>
@@ -2797,13 +2764,13 @@ You can also use online editors and converters instead.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="4327"/>
- <location filename="mainwindow.cpp" line="5580"/>
+ <location filename="mainwindow.cpp" line="5561"/>
<source>Enable selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4328"/>
- <location filename="mainwindow.cpp" line="5581"/>
+ <location filename="mainwindow.cpp" line="5562"/>
<source>Disable selected</source>
<translation type="unfinished"></translation>
</message>
@@ -2864,13 +2831,13 @@ You can also use online editors and converters instead.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="4389"/>
- <location filename="mainwindow.cpp" line="5628"/>
+ <location filename="mainwindow.cpp" line="5609"/>
<source>Exception: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4391"/>
- <location filename="mainwindow.cpp" line="5630"/>
+ <location filename="mainwindow.cpp" line="5611"/>
<source>Unknown exception</source>
<translation type="unfinished"></translation>
</message>
@@ -3008,7 +2975,7 @@ Click OK to restart MO now.</source>
</message>
<message>
<location filename="mainwindow.cpp" line="4937"/>
- <location filename="mainwindow.cpp" line="6242"/>
+ <location filename="mainwindow.cpp" line="6223"/>
<source>Set Priority</source>
<translation type="unfinished"></translation>
</message>
@@ -3073,196 +3040,196 @@ Click OK to restart MO now.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5278"/>
+ <location filename="mainwindow.cpp" line="5259"/>
<source>Thank you!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5278"/>
+ <location filename="mainwindow.cpp" line="5259"/>
<source>Thank you for your endorsement!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5313"/>
+ <location filename="mainwindow.cpp" line="5294"/>
<source>Request to Nexus failed: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5328"/>
- <location filename="mainwindow.cpp" line="5390"/>
+ <location filename="mainwindow.cpp" line="5309"/>
+ <location filename="mainwindow.cpp" line="5371"/>
<source>failed to read %1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5340"/>
- <location filename="mainwindow.cpp" line="5818"/>
+ <location filename="mainwindow.cpp" line="5321"/>
+ <location filename="mainwindow.cpp" line="5799"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5340"/>
+ <location filename="mainwindow.cpp" line="5321"/>
<source>failed to extract %1 (errorcode %2)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5372"/>
+ <location filename="mainwindow.cpp" line="5353"/>
<source>Extract BSA</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5401"/>
+ <location filename="mainwindow.cpp" line="5382"/>
<source>This archive contains invalid hashes. Some files may be broken.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5447"/>
+ <location filename="mainwindow.cpp" line="5428"/>
<source>Extract...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5470"/>
+ <location filename="mainwindow.cpp" line="5451"/>
<source>This will restart MO, continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5517"/>
+ <location filename="mainwindow.cpp" line="5498"/>
<source>Edit Categories...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5518"/>
+ <location filename="mainwindow.cpp" line="5499"/>
<source>Deselect filter</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5569"/>
+ <location filename="mainwindow.cpp" line="5550"/>
<source>Remove</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5585"/>
+ <location filename="mainwindow.cpp" line="5566"/>
<source>Enable all</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5586"/>
+ <location filename="mainwindow.cpp" line="5567"/>
<source>Disable all</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5607"/>
+ <location filename="mainwindow.cpp" line="5588"/>
<source>Unlock load order</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5610"/>
+ <location filename="mainwindow.cpp" line="5591"/>
<source>Lock load order</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5614"/>
+ <location filename="mainwindow.cpp" line="5595"/>
<source>Open Origin in Explorer</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5621"/>
+ <location filename="mainwindow.cpp" line="5602"/>
<source>Open Origin Info...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5764"/>
+ <location filename="mainwindow.cpp" line="5745"/>
<source>depends on missing &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5768"/>
+ <location filename="mainwindow.cpp" line="5749"/>
<source>incompatible with &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5794"/>
+ <location filename="mainwindow.cpp" line="5775"/>
<source>Please wait while LOOT is running</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5891"/>
+ <location filename="mainwindow.cpp" line="5872"/>
<source>loot failed. Exit code was: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5913"/>
+ <location filename="mainwindow.cpp" line="5894"/>
<source>failed to start loot</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5916"/>
+ <location filename="mainwindow.cpp" line="5897"/>
<source>failed to run loot: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5920"/>
+ <location filename="mainwindow.cpp" line="5901"/>
<source>Errors occured</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5967"/>
+ <location filename="mainwindow.cpp" line="5948"/>
<source>Backup of load order created</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5977"/>
+ <location filename="mainwindow.cpp" line="5958"/>
<source>Choose backup to restore</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5990"/>
+ <location filename="mainwindow.cpp" line="5971"/>
<source>No Backups</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="5990"/>
+ <location filename="mainwindow.cpp" line="5971"/>
<source>There are no backups to restore</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6011"/>
- <location filename="mainwindow.cpp" line="6033"/>
+ <location filename="mainwindow.cpp" line="5992"/>
+ <location filename="mainwindow.cpp" line="6014"/>
<source>Restore failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6012"/>
- <location filename="mainwindow.cpp" line="6034"/>
+ <location filename="mainwindow.cpp" line="5993"/>
+ <location filename="mainwindow.cpp" line="6015"/>
<source>Failed to restore the backup. Errorcode: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6023"/>
+ <location filename="mainwindow.cpp" line="6004"/>
<source>Backup of modlist created</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6129"/>
+ <location filename="mainwindow.cpp" line="6110"/>
<source>A file with the same name has already been downloaded. What would you like to do?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6131"/>
+ <location filename="mainwindow.cpp" line="6112"/>
<source>Overwrite</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6132"/>
+ <location filename="mainwindow.cpp" line="6113"/>
<source>Rename new file</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6133"/>
+ <location filename="mainwindow.cpp" line="6114"/>
<source>Ignore file</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="6242"/>
+ <location filename="mainwindow.cpp" line="6223"/>
<source>Set the priority of the selected mods</source>
<translation type="unfinished"></translation>
</message>