From bf951c3eb82f90a83e5496b6a897f95f585aff89 Mon Sep 17 00:00:00 2001 From: Sky Date: Tue, 8 Oct 2013 22:11:24 +0100 Subject: Licenses, cleanup --- gui/LegacyModEditDialog.cpp | 32 ------------------------------ gui/LegacyModEditDialog.h | 6 ------ gui/MCModInfoFrame.cpp | 15 ++++++++++++++ gui/MCModInfoFrame.h | 20 +++++++++++++++---- gui/MCModInfoFrame.ui | 48 ++++++++++++++++++++++----------------------- 5 files changed, 55 insertions(+), 66 deletions(-) diff --git a/gui/LegacyModEditDialog.cpp b/gui/LegacyModEditDialog.cpp index 72792581..585bfdfb 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 fcf07f1c..b5d51fd5 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 805af56b..e7e669ec 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 7910bd0c..516fc5ed 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 022588d5..73b93a2e 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,18 +179,18 @@ - - + + - Credits: + Website: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - + + 200 @@ -194,7 +204,7 @@ - <html><head/><body><p><span style=" font-style:italic; color:#4a4a4a;">Mod credits</span></p></body></html> + <html><head/><body><p><span style=" font-style:italic; color:#4a4a4a;">Mod website</span></p></body></html> Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -202,20 +212,13 @@ true - - - - - - Website: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + true - - + + 200 @@ -229,7 +232,7 @@ - <html><head/><body><p><span style=" font-style:italic; color:#4a4a4a;">Mod website</span></p></body></html> + <html><head/><body><p><span style=" font-style:italic; color:#4a4a4a;">Mod credits</span></p></body></html> Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -237,15 +240,12 @@ true - - true - - - + + - Authors: + Credits: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop -- cgit v1.2.3