diff --git a/CREDITS.txt b/CREDITS.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 4e8f11ca5..b022c3bcf 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -223,7 +223,6 @@ set(companion_SRCS burnconfigdialog.cpp multimodelprinter.cpp comparedialog.cpp - creditsdialog.cpp releasenotesdialog.cpp releasenotesfirmwaredialog.cpp customizesplashdialog.cpp @@ -257,7 +256,6 @@ set(companion_MOC_HDRS comparedialog.h printdialog.h logsdialog.h - creditsdialog.h releasenotesdialog.h releasenotesfirmwaredialog.h customizesplashdialog.h diff --git a/companion/src/companion.qrc b/companion/src/companion.qrc index c76418135..5c231c5a2 100644 --- a/companion/src/companion.qrc +++ b/companion/src/companion.qrc @@ -2,7 +2,6 @@ images/customize.png images/icon.png - ../../CREDITS.txt ../releasenotes.txt images/screenshot.png images/splash.png diff --git a/companion/src/creditsdialog.cpp b/companion/src/creditsdialog.cpp deleted file mode 100644 index 29b6b79bc..000000000 --- a/companion/src/creditsdialog.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (C) OpenTX - * - * Based on code named - * th9x - http://code.google.com/p/th9x - * er9x - http://code.google.com/p/er9x - * gruvin9x - http://code.google.com/p/gruvin9x - * - * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include "creditsdialog.h" -#include "ui_htmldialog.h" -#include "helpers.h" -#include - -CreditsDialog::CreditsDialog(QWidget * parent): - QDialog(parent), - ui(new Ui::HtmlDialog) -{ - ui->setupUi(this); - - setWindowTitle(tr("OpenTX Contributors")); - setWindowIcon(CompanionIcon("contributors.png")); - - QString str = "" \ - "" \ - " " \ - "" - ""; - - foreach(CreditsSection section, readCredits()) { - str.append(formatTable(sectionTitle(section.title), section.names, 3)); - } - - str.append("" \ - " " \ - "
 
" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "
"); - -#if 0 - QFile blacklist(":/BLACKLIST.txt"); - if (blacklist.open(QIODevice::ReadOnly | QIODevice::Text)) { - QStringList names; - names << blacklist.readAll(); - str.append(formatTable(tr("OpenTX Blacklist"), names, 1)); - } -#endif - - str.append(""); - ui->textEditor->setHtml(str); - ui->textEditor->scroll(0, 0); - ui->textEditor->setOpenExternalLinks(true); -} - -CreditsDialog::~CreditsDialog() -{ - delete ui; -} - -QList CreditsDialog::readCredits() -{ - QFile credits(":/CREDITS.txt"); - QList result; - if (credits.open(QIODevice::ReadOnly | QIODevice::Text)) { - while (!credits.atEnd()) { - QByteArray line = credits.readLine().trimmed(); - if (line.size() >= 2) { - if (line.startsWith("[") && line.endsWith("]")) { - result.push_back(CreditsSection(line.mid(1, line.size() - 2))); - } else { - result.back().addName(line); - } - } - } - } - return result; -} - -QString CreditsDialog::sectionTitle(const QString & title) -{ - if (title == "Main developers") - return tr("Main developers"); - else if (title == "Translators") - return tr("Translators"); - else if (title == "Companies and projects who have donated to OpenTX") - return tr("Companies and projects who have donated to OpenTX"); - else if (title == "People who have donated to OpenTX") - return tr("People who have donated to OpenTX"); - else - return tr("Other contributors"); -} - -QString CreditsDialog::formatTable(const QString & title, const QStringList & names, int columns) -{ - const float cwidth = 100.0 / columns; - QString str = "" \ - " " \ - " " \ - "
 
" + title + "
"; - - str.append(""); - - int column = 0; - foreach(QString name, names) { - if (column == 0) { - str.append(""); - } - QString trclass = name.contains("monthly") ? "bold" : "normal"; - str.append(QString("").arg(cwidth).arg(trclass).arg(name.trimmed().replace("monthly", tr("monthly")))); - if (++column == columns) { - str.append(""); - column = 0; - } - } - - if (column != 0) { - str.append(""); - } - - str.append("
%3
"); - return str; -} diff --git a/companion/src/creditsdialog.h b/companion/src/creditsdialog.h deleted file mode 100644 index c1327aeea..000000000 --- a/companion/src/creditsdialog.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) OpenTX - * - * Based on code named - * th9x - http://code.google.com/p/th9x - * er9x - http://code.google.com/p/er9x - * gruvin9x - http://code.google.com/p/gruvin9x - * - * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef _CREDITSDIALOG_H_ -#define _CREDITSDIALOG_H_ - -#include - -namespace Ui { - class HtmlDialog; -} - -class CreditsDialog : public QDialog -{ - Q_OBJECT - - class CreditsSection - { - public: - CreditsSection(const QString & title): - title(title) - { - } - - void addName(const QString & name) - { - names.push_back(name); - } - - QString title; - QStringList names; - }; - - public: - explicit CreditsDialog(QWidget * parent = 0); - ~CreditsDialog(); - - private: - Ui::HtmlDialog * ui; - QList readCredits(); - QString sectionTitle(const QString & title); - QString formatTable(const QString & title, const QStringList & names, int colums); -}; - -#endif // _CREDITSDIALOG_H_ diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 23c5f71b7..deb9652da 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -29,7 +29,6 @@ #include "downloaddialog.h" #include "printdialog.h" #include "version.h" -#include "creditsdialog.h" #include "releasenotesdialog.h" #include "releasenotesfirmwaredialog.h" #include "customizesplashdialog.h" @@ -868,13 +867,6 @@ void MainWindow::fwPrefs() dialog->deleteLater(); } -void MainWindow::contributors() -{ - CreditsDialog * dialog = new CreditsDialog(this); - dialog->exec(); - dialog->deleteLater(); -} - void MainWindow::sdsync() { // remember user-selectable options for duration of session TODO: save to settings @@ -1230,8 +1222,7 @@ void MainWindow::retranslateUi(bool showMsg) trAct(burnConfigAct, tr("Configure Communications..."), tr("Configure software for communicating with the Radio")); trAct(writeBUToRadioAct, tr("Write Backup to Radio"), tr("Write Backup from file to Radio")); trAct(readBUToFileAct, tr("Backup Radio to File"), tr("Save a complete backup file of all settings and model data in the Radio")); - trAct(contributorsAct, tr("Contributors..."), tr("A tribute to those who have contributed to OpenTX and Companion")); - + trAct(createProfileAct, tr("Add Radio Profile"), tr("Create a new Radio Settings Profile")); trAct(copyProfileAct, tr("Copy Current Radio Profile"), tr("Duplicate current Radio Settings Profile")); trAct(deleteProfileAct, tr("Delete Current Radio Profile..."), tr("Delete the current Radio Settings Profile")); @@ -1306,8 +1297,7 @@ void MainWindow::createActions() aboutAct = addAct("information.png", SLOT(about())); openDocURLAct = addAct("changelog.png", SLOT(openDocURL())); changelogAct = addAct("changelog.png", SLOT(changelog())); - contributorsAct = addAct("contributors.png", SLOT(contributors())); - + // these two get assigned menus in createMenus() recentFilesAct = addAct("recentdocument.png"); profilesMenuAct = addAct("profiles.png"); @@ -1315,7 +1305,6 @@ void MainWindow::createActions() exitAct->setMenuRole(QAction::QuitRole); aboutAct->setMenuRole(QAction::AboutRole); appPrefsAct->setMenuRole(QAction::PreferencesRole); - contributorsAct->setMenuRole(QAction::ApplicationSpecificRole); openDocURLAct->setMenuRole(QAction::ApplicationSpecificRole); checkForUpdatesAct->setMenuRole(QAction::ApplicationSpecificRole); changelogAct->setMenuRole(QAction::ApplicationSpecificRole); @@ -1402,8 +1391,7 @@ void MainWindow::createMenus() helpMenu->addSeparator(); helpMenu->addAction(changelogAct); helpMenu->addSeparator(); - helpMenu->addAction(contributorsAct); - + recentFilesMenu = new QMenu(this); recentFilesMenu->setToolTipsVisible(true); for ( int i = 0; i < g.historySize(); ++i) { diff --git a/companion/src/mainwindow.h b/companion/src/mainwindow.h index 0be249f04..78178d7f8 100644 --- a/companion/src/mainwindow.h +++ b/companion/src/mainwindow.h @@ -111,7 +111,6 @@ class MainWindow : public QMainWindow void readBackup(); void burnConfig(); void burnList(); - void contributors(); void sdsync(); void changelog(); void customizeSplash(); @@ -200,7 +199,6 @@ class MainWindow : public QMainWindow QAction *appPrefsAct; QAction *fwPrefsAct; QAction *checkForUpdatesAct; - QAction *contributorsAct; QAction *sdsyncAct; QAction *changelogAct; QAction *compareAct; diff --git a/radio/src/thirdparty/libopenui b/radio/src/thirdparty/libopenui index 3c280f84c..6b661c490 160000 --- a/radio/src/thirdparty/libopenui +++ b/radio/src/thirdparty/libopenui @@ -1 +1 @@ -Subproject commit 3c280f84cef56f84044c76d8aacea0d5e1bc8278 +Subproject commit 6b661c4907bcafc08436e5c96fc5a38e9eb6e499