diff options
| author | Tannin <devnull@localhost> | 2014-04-23 23:59:30 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-04-23 23:59:30 +0200 |
| commit | 2db33523a1c8497657963a88f70fe1726cbf8fc9 (patch) | |
| tree | 016b015087a64900db9787a2a3f3551128c43df3 /src/downloadlistwidget.cpp | |
| parent | 540747177ae02c9431d33a2c3adc1f747b74b868 (diff) | |
- added an option to show meta info on downloads instead of filenames
- MO will now cancel if user tries to run MO vfs-injected
- when saving the MO ini file it is now written to a tmp file first and then overwritten
- updated to link against boost python 1.55
Diffstat (limited to 'src/downloadlistwidget.cpp')
| -rw-r--r-- | src/downloadlistwidget.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/downloadlistwidget.cpp b/src/downloadlistwidget.cpp index 68dd2adf..953cdacd 100644 --- a/src/downloadlistwidget.cpp +++ b/src/downloadlistwidget.cpp @@ -40,8 +40,13 @@ DownloadListWidget::~DownloadListWidget() } -DownloadListWidgetDelegate::DownloadListWidgetDelegate(DownloadManager *manager, QTreeView *view, QObject *parent) - : QItemDelegate(parent), m_Manager(manager), m_ItemWidget(new DownloadListWidget), m_ContextRow(0), m_View(view) +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"); @@ -95,7 +100,7 @@ void DownloadListWidgetDelegate::paintPendingDownload(int downloadIndex) const void DownloadListWidgetDelegate::paintRegularDownload(int downloadIndex) const { - QString name = m_Manager->getFileName(downloadIndex); + QString name = m_MetaDisplay ? m_Manager->getDisplayName(downloadIndex) : m_Manager->getFileName(downloadIndex); if (name.length() > 53) { name.truncate(50); name.append("..."); |
