From bf951c3eb82f90a83e5496b6a897f95f585aff89 Mon Sep 17 00:00:00 2001 From: Sky Date: Tue, 8 Oct 2013 22:11:24 +0100 Subject: [PATCH] Licenses, cleanup --- gui/LegacyModEditDialog.cpp | 32 ---------------- gui/LegacyModEditDialog.h | 6 --- gui/MCModInfoFrame.cpp | 15 ++++++++ gui/MCModInfoFrame.h | 20 ++++++++-- gui/MCModInfoFrame.ui | 76 ++++++++++++++++++------------------- 5 files changed, 69 insertions(+), 80 deletions(-) diff --git a/gui/LegacyModEditDialog.cpp b/gui/LegacyModEditDialog.cpp index 72792581a..585bfdfb1 100644 --- a/gui/LegacyModEditDialog.cpp +++ b/gui/LegacyModEditDialog.cpp @@ -345,38 +345,6 @@ void LegacyModEditDialog::on_buttonBox_rejected() close(); } -//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)); -} - void LegacyModEditDialog::on_jarModsTreeView_pressed(const QModelIndex &index) { int first, last; diff --git a/gui/LegacyModEditDialog.h b/gui/LegacyModEditDialog.h index fcf07f1cb..b5d51fd55 100644 --- a/gui/LegacyModEditDialog.h +++ b/gui/LegacyModEditDialog.h @@ -53,17 +53,11 @@ slots: void on_rmTexPackBtn_clicked(); void on_viewTexPackBtn_clicked(); - void on_jarWebsite_clicked(); - void on_loaderWebsite_clicked(); - void on_coreWebsite_clicked(); - // Questionable: SettingsDialog doesn't need this for some reason? void on_buttonBox_rejected(); void on_jarModsTreeView_pressed(const QModelIndex &index); - void on_coreModsTreeView_pressed(const QModelIndex &index); - void on_loaderModTreeView_pressed(const QModelIndex &index); protected: diff --git a/gui/MCModInfoFrame.cpp b/gui/MCModInfoFrame.cpp index 805af56b6..e7e669ece 100644 --- a/gui/MCModInfoFrame.cpp +++ b/gui/MCModInfoFrame.cpp @@ -1,3 +1,18 @@ +/* Copyright 2013 MultiMC Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "MCModInfoFrame.h" #include "ui_MCModInfoFrame.h" diff --git a/gui/MCModInfoFrame.h b/gui/MCModInfoFrame.h index 7910bd0ce..516fc5ed7 100644 --- a/gui/MCModInfoFrame.h +++ b/gui/MCModInfoFrame.h @@ -1,5 +1,19 @@ -#ifndef MCMODINFOFRAME_H -#define MCMODINFOFRAME_H +/* Copyright 2013 MultiMC Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once #include #include "logic/Mod.h" @@ -28,5 +42,3 @@ private: }; void handleModInfoUpdate(Mod &m, MCModInfoFrame *frame); - -#endif // MCMODINFOFRAME_H diff --git a/gui/MCModInfoFrame.ui b/gui/MCModInfoFrame.ui index 022588d56..73b93a2ef 100644 --- a/gui/MCModInfoFrame.ui +++ b/gui/MCModInfoFrame.ui @@ -144,6 +144,16 @@ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + Authors: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + @@ -169,41 +179,6 @@ - - - - Credits: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 200 - 0 - - - - - 16777215 - 92 - - - - <html><head/><body><p><span style=" font-style:italic; color:#4a4a4a;">Mod credits</span></p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - @@ -242,10 +217,35 @@ - - + + + + + 200 + 0 + + + + + 16777215 + 92 + + - Authors: + <html><head/><body><p><span style=" font-style:italic; color:#4a4a4a;">Mod credits</span></p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + Credits: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop