summaryrefslogtreecommitdiffstats
path: root/gui/LegacyModEditDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/LegacyModEditDialog.cpp')
-rw-r--r--gui/LegacyModEditDialog.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/gui/LegacyModEditDialog.cpp b/gui/LegacyModEditDialog.cpp
index 45f041f3..87647e0f 100644
--- a/gui/LegacyModEditDialog.cpp
+++ b/gui/LegacyModEditDialog.cpp
@@ -24,6 +24,7 @@
#include <pathutils.h>
#include <QFileDialog>
+//#include <QMessageBox>
#include <QDebug>
#include <QEvent>
#include <QKeyEvent>
@@ -342,4 +343,36 @@ void LegacyModEditDialog::on_viewTexPackBtn_clicked()
void LegacyModEditDialog::on_buttonBox_rejected()
{
close();
-} \ No newline at end of file
+}
+
+//FIXME: too much copypasta makes peterix a sad hacker. BUT IT'S SO DELICIOUS!
+
+void LegacyModEditDialog::on_coreWebsite_clicked()
+{
+ int first, last;
+ auto list = ui->coreModsTreeView->selectionModel()->selectedRows();
+
+ if (!lastfirst(list, first, last))
+ return;
+ showWebsiteForMod(this, m_coremods->operator[](first));
+}
+
+void LegacyModEditDialog::on_jarWebsite_clicked()
+{
+ int first, last;
+ auto list = ui->jarModsTreeView->selectionModel()->selectedRows();
+
+ if (!lastfirst(list, first, last))
+ return;
+ showWebsiteForMod(this, m_jarmods->operator[](first));
+}
+
+void LegacyModEditDialog::on_loaderWebsite_clicked()
+{
+ int first, last;
+ auto list = ui->loaderModTreeView->selectionModel()->selectedRows();
+
+ if (!lastfirst(list, first, last))
+ return;
+ showWebsiteForMod(this, m_mods->operator[](first));
+}