summaryrefslogtreecommitdiffstats
path: root/application/pages
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-03-12 16:00:06 +0100
committerPetr Mrázek <peterix@gmail.com>2017-04-07 00:20:01 +0200
commit8321187a20eec9871f327aa23f421e79dcfdd409 (patch)
treec765e3acdf9f01c27563e84d1fd4f27696a5996a /application/pages
parentab868df50eb6f9f3958bdc0a7ab9199dcdf46b3c (diff)
downloadMultiMC-8321187a20eec9871f327aa23f421e79dcfdd409.tar
MultiMC-8321187a20eec9871f327aa23f421e79dcfdd409.tar.gz
MultiMC-8321187a20eec9871f327aa23f421e79dcfdd409.tar.lz
MultiMC-8321187a20eec9871f327aa23f421e79dcfdd409.tar.xz
MultiMC-8321187a20eec9871f327aa23f421e79dcfdd409.zip
NOISSUE fix downloading of metadata files
Diffstat (limited to 'application/pages')
-rw-r--r--application/pages/global/PackagesPage.cpp (renamed from application/pages/global/MetadataPage.cpp)42
-rw-r--r--application/pages/global/PackagesPage.h (renamed from application/pages/global/MetadataPage.h)14
-rw-r--r--application/pages/global/PackagesPage.ui (renamed from application/pages/global/MetadataPage.ui)12
3 files changed, 34 insertions, 34 deletions
diff --git a/application/pages/global/MetadataPage.cpp b/application/pages/global/PackagesPage.cpp
index 4e355997..52efaf9a 100644
--- a/application/pages/global/MetadataPage.cpp
+++ b/application/pages/global/PackagesPage.cpp
@@ -13,8 +13,8 @@
* limitations under the License.
*/
-#include "MetadataPage.h"
-#include "ui_MetadataPage.h"
+#include "PackagesPage.h"
+#include "ui_PackagesPage.h"
#include <QDateTime>
#include <QSortFilterProxyModel>
@@ -49,9 +49,9 @@ static QString formatRequires(const VersionPtr &version)
return lines.join('\n');
}
-MetadataPage::MetadataPage(QWidget *parent) :
+PackagesPage::PackagesPage(QWidget *parent) :
QWidget(parent),
- ui(new Ui::MetadataPage)
+ ui(new Ui::PackagesPage)
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
@@ -77,29 +77,29 @@ MetadataPage::MetadataPage(QWidget *parent) :
m_versionProxy = new VersionProxyModel(this);
m_filterProxy->setSourceModel(m_versionProxy);
- connect(ui->indexView->selectionModel(), &QItemSelectionModel::currentChanged, this, &MetadataPage::updateCurrentVersionList);
- connect(ui->versionsView->selectionModel(), &QItemSelectionModel::currentChanged, this, &MetadataPage::updateVersion);
- connect(m_filterProxy, &QSortFilterProxyModel::dataChanged, this, &MetadataPage::versionListDataChanged);
+ connect(ui->indexView->selectionModel(), &QItemSelectionModel::currentChanged, this, &PackagesPage::updateCurrentVersionList);
+ connect(ui->versionsView->selectionModel(), &QItemSelectionModel::currentChanged, this, &PackagesPage::updateVersion);
+ connect(m_filterProxy, &QSortFilterProxyModel::dataChanged, this, &PackagesPage::versionListDataChanged);
updateCurrentVersionList(QModelIndex());
updateVersion();
}
-MetadataPage::~MetadataPage()
+PackagesPage::~PackagesPage()
{
delete ui;
}
-QIcon MetadataPage::icon() const
+QIcon PackagesPage::icon() const
{
- return MMC->getThemedIcon("looney");
+ return MMC->getThemedIcon("packages");
}
-void MetadataPage::on_refreshIndexBtn_clicked()
+void PackagesPage::on_refreshIndexBtn_clicked()
{
ProgressDialog(this).execWithTask(ENV.metadataIndex()->remoteUpdateTask());
}
-void MetadataPage::on_refreshFileBtn_clicked()
+void PackagesPage::on_refreshFileBtn_clicked()
{
VersionListPtr list = ui->indexView->currentIndex().data(Index::ListPtrRole).value<VersionListPtr>();
if (!list)
@@ -108,7 +108,7 @@ void MetadataPage::on_refreshFileBtn_clicked()
}
ProgressDialog(this).execWithTask(list->remoteUpdateTask());
}
-void MetadataPage::on_refreshVersionBtn_clicked()
+void PackagesPage::on_refreshVersionBtn_clicked()
{
VersionPtr version = ui->versionsView->currentIndex().data(VersionList::VersionPtrRole).value<VersionPtr>();
if (!version)
@@ -118,7 +118,7 @@ void MetadataPage::on_refreshVersionBtn_clicked()
ProgressDialog(this).execWithTask(version->remoteUpdateTask());
}
-void MetadataPage::on_fileSearchEdit_textChanged(const QString &search)
+void PackagesPage::on_fileSearchEdit_textChanged(const QString &search)
{
if (search.isEmpty())
{
@@ -131,7 +131,7 @@ void MetadataPage::on_fileSearchEdit_textChanged(const QString &search)
m_fileProxy->setFilterRegExp(".*" + parts.join(".*") + ".*");
}
}
-void MetadataPage::on_versionSearchEdit_textChanged(const QString &search)
+void PackagesPage::on_versionSearchEdit_textChanged(const QString &search)
{
if (search.isEmpty())
{
@@ -145,7 +145,7 @@ void MetadataPage::on_versionSearchEdit_textChanged(const QString &search)
}
}
-void MetadataPage::updateCurrentVersionList(const QModelIndex &index)
+void PackagesPage::updateCurrentVersionList(const QModelIndex &index)
{
if (index.isValid())
{
@@ -181,11 +181,11 @@ void MetadataPage::updateCurrentVersionList(const QModelIndex &index)
ui->fileNameLabel->setEnabled(false);
ui->fileName->clear();
m_versionProxy->setSourceModel(nullptr);
- ui->refreshFileBtn->setText(tr("Refresh ___"));
+ ui->refreshFileBtn->setText(tr("Refresh"));
}
}
-void MetadataPage::versionListDataChanged(const QModelIndex &tl, const QModelIndex &br)
+void PackagesPage::versionListDataChanged(const QModelIndex &tl, const QModelIndex &br)
{
if (QItemSelection(tl, br).contains(ui->versionsView->currentIndex()))
{
@@ -193,7 +193,7 @@ void MetadataPage::versionListDataChanged(const QModelIndex &tl, const QModelInd
}
}
-void MetadataPage::updateVersion()
+void PackagesPage::updateVersion()
{
VersionPtr version = std::dynamic_pointer_cast<Version>(
ui->versionsView->currentIndex().data(VersionList::VersionPointerRole).value<BaseVersionPtr>());
@@ -221,11 +221,11 @@ void MetadataPage::updateVersion()
ui->versionType->clear();
ui->versionRequiresLabel->setEnabled(false);
ui->versionRequires->clear();
- ui->refreshVersionBtn->setText(tr("Refresh ___"));
+ ui->refreshVersionBtn->setText(tr("Refresh"));
}
}
-void MetadataPage::opened()
+void PackagesPage::opened()
{
if (!ENV.metadataIndex()->isLocalLoaded())
{
diff --git a/application/pages/global/MetadataPage.h b/application/pages/global/PackagesPage.h
index f75b4952..80c2886d 100644
--- a/application/pages/global/MetadataPage.h
+++ b/application/pages/global/PackagesPage.h
@@ -20,21 +20,21 @@
#include "pages/BasePage.h"
namespace Ui {
-class MetadataPage;
+class PackagesPage;
}
class QSortFilterProxyModel;
class VersionProxyModel;
-class MetadataPage : public QWidget, public BasePage
+class PackagesPage : public QWidget, public BasePage
{
Q_OBJECT
public:
- explicit MetadataPage(QWidget *parent = 0);
- ~MetadataPage();
+ explicit PackagesPage(QWidget *parent = 0);
+ ~PackagesPage();
- QString id() const override { return "metadata-global"; }
- QString displayName() const override { return tr("Metadata"); }
+ QString id() const override { return "packages-global"; }
+ QString displayName() const override { return tr("Packages"); }
QIcon icon() const override;
void opened() override;
@@ -48,7 +48,7 @@ private slots:
void versionListDataChanged(const QModelIndex &tl, const QModelIndex &br);
private:
- Ui::MetadataPage *ui;
+ Ui::PackagesPage *ui;
QSortFilterProxyModel *m_fileProxy;
QSortFilterProxyModel *m_filterProxy;
VersionProxyModel *m_versionProxy;
diff --git a/application/pages/global/MetadataPage.ui b/application/pages/global/PackagesPage.ui
index 0bd33f32..158bf1b4 100644
--- a/application/pages/global/MetadataPage.ui
+++ b/application/pages/global/PackagesPage.ui
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>MetadataPage</class>
- <widget class="QWidget" name="MetadataPage">
+ <class>PackagesPage</class>
+ <widget class="QWidget" name="PackagesPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>640</width>
- <height>480</height>
+ <width>636</width>
+ <height>621</height>
</rect>
</property>
<property name="windowTitle">
@@ -67,7 +67,7 @@
<item>
<widget class="QPushButton" name="refreshVersionBtn">
<property name="text">
- <string>Refresh ___</string>
+ <string>Refresh</string>
</property>
</widget>
</item>
@@ -180,7 +180,7 @@
<item>
<widget class="QPushButton" name="refreshFileBtn">
<property name="text">
- <string>Refresh ___</string>
+ <string>Refresh</string>
</property>
</widget>
</item>