summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorrobotbrain <robotbrainify@gmail.com>2014-02-23 19:45:59 -0500
committerrobotbrain <robotbrainify@gmail.com>2014-02-23 19:48:00 -0500
commit5e33da258c3b5159dba854eb4792d0852a1ca363 (patch)
tree62f8819b0974c415e883d43eefb0ffb2fff73702 /gui
parent4a77524b059c12165e20b38de6c0d4ed08e56419 (diff)
downloadMultiMC-5e33da258c3b5159dba854eb4792d0852a1ca363.tar
MultiMC-5e33da258c3b5159dba854eb4792d0852a1ca363.tar.gz
MultiMC-5e33da258c3b5159dba854eb4792d0852a1ca363.tar.lz
MultiMC-5e33da258c3b5159dba854eb4792d0852a1ca363.tar.xz
MultiMC-5e33da258c3b5159dba854eb4792d0852a1ca363.zip
Close to finished. Need to fix the upload part. Viewing works (in grayscale)
Diffstat (limited to 'gui')
-rw-r--r--gui/MainWindow.cpp19
-rw-r--r--gui/MainWindow.h2
-rw-r--r--gui/dialogs/ScreenshotDialog.cpp2
-rw-r--r--gui/dialogs/ScreenshotDialog.ui21
4 files changed, 16 insertions, 28 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index 5a22f678..87c65601 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -1538,25 +1538,6 @@ void MainWindow::on_actionScreenshots_triggered()
void MainWindow::screenshotsUploaded(QList<ScreenShot *> screenshots)
{
- NetJob *job2 = new NetJob("Screenshot Data");
- for (ScreenShot *shot : screenshots)
- {
- job2->addNetAction(ScreenShotGet::make(shot));
- }
- ProgressDialog prog3(this);
- prog3.exec(job2);
- connect(job2, &NetJob::failed, [this]
- {
- CustomMessageBox::selectable(this, tr("Failed to upload screenshots!"),
- tr("Unknown error"), QMessageBox::Warning)->exec();
- });
- connect(job2, &NetJob::succeeded, [this, screenshots]
- { screenShotsGotten(screenshots); });
-}
-
-void MainWindow::screenShotsGotten(QList<ScreenShot *> screenshots)
-{
-
QStringList urls;
for (ScreenShot *shot : screenshots)
{
diff --git a/gui/MainWindow.h b/gui/MainWindow.h
index b57afcf5..0a474ef1 100644
--- a/gui/MainWindow.h
+++ b/gui/MainWindow.h
@@ -172,8 +172,6 @@ slots:
void screenshotsUploaded(QList<class ScreenShot*> screenshots);
- void screenShotsGotten(QList<class ScreenShot*> screenshots);
-
/*!
* Runs the DownloadUpdateTask and installs updates.
*/
diff --git a/gui/dialogs/ScreenshotDialog.cpp b/gui/dialogs/ScreenshotDialog.cpp
index 662c9e84..8900f15b 100644
--- a/gui/dialogs/ScreenshotDialog.cpp
+++ b/gui/dialogs/ScreenshotDialog.cpp
@@ -20,7 +20,7 @@ QList<ScreenShot*> ScreenshotDialog::selected()
{
QList<ScreenShot*> list;
QList<ScreenShot*> first = m_list->screenshots();
- for (QModelIndex index : ui->listView->selectionModel()->selectedIndexes())
+ for (QModelIndex index : ui->listView->selectionModel()->selectedRows())
{
list.append(first.at(index.row()));
}
diff --git a/gui/dialogs/ScreenshotDialog.ui b/gui/dialogs/ScreenshotDialog.ui
index c912dffe..af73e5ec 100644
--- a/gui/dialogs/ScreenshotDialog.ui
+++ b/gui/dialogs/ScreenshotDialog.ui
@@ -11,7 +11,11 @@
</rect>
</property>
<property name="windowTitle">
- <string>Dialog</string>
+ <string>Screenshots</string>
+ </property>
+ <property name="windowIcon">
+ <iconset resource="../../resources/multimc/multimc.qrc">
+ <normaloff>:/icons/multimc/scalable/apps/multimc.svg</normaloff>:/icons/multimc/scalable/apps/multimc.svg</iconset>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
@@ -36,12 +40,15 @@
</rect>
</property>
<property name="selectionMode">
- <enum>QAbstractItemView::MultiSelection</enum>
+ <enum>QAbstractItemView::ExtendedSelection</enum>
+ </property>
+ <property name="selectionBehavior">
+ <enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="iconSize">
<size>
- <width>480</width>
- <height>360</height>
+ <width>120</width>
+ <height>90</height>
</size>
</property>
<property name="flow">
@@ -51,11 +58,13 @@
<bool>true</bool>
</property>
<property name="viewMode">
- <enum>QListView::ListMode</enum>
+ <enum>QListView::IconMode</enum>
</property>
</widget>
</widget>
- <resources/>
+ <resources>
+ <include location="../../resources/multimc/multimc.qrc"/>
+ </resources>
<connections>
<connection>
<sender>buttonBox</sender>