# HG changeset patch # User Wuzzy # Date 1544718533 -3600 # Node ID bf0ec13a21ea16764a74e49ba5956ec3352dcda6 # Parent 94f10f69fe76df6de61d9e0a8bc142c29111446b Move credits to RFC-4180-conforming CSV file diff -r 94f10f69fe76 -r bf0ec13a21ea QTfrontend/hedgewars.qrc --- a/QTfrontend/hedgewars.qrc Thu Dec 13 10:51:07 2018 -0500 +++ b/QTfrontend/hedgewars.qrc Thu Dec 13 17:28:53 2018 +0100 @@ -206,7 +206,7 @@ res/chat/lamp_off.png res/chat/ingame.png res/splash.png - res/html/about.html + res/credits.csv res/chat/hedgehogcontributor.png res/chat/hedgehogcontributor_gray.png res/chat/roomadmincontributor.png diff -r 94f10f69fe76 -r bf0ec13a21ea QTfrontend/res/credits.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QTfrontend/res/credits.csv Thu Dec 13 17:28:53 2018 +0100 @@ -0,0 +1,100 @@ +!__SECTION,"Programming", +"Engine, frontend, net server","Andrey Korotaev","unC0Rr@gmail.com" +"Many frontend improvements","Igor Ulyanov","disinbox@gmail.com" +"Many engine and frontend improvements","Derek Pomery","nemo@m8y.org" +"Drill rocket, ballgun, RC plane weapons","Martin Boze","afffect@gmail.com" +"Mine number and time game settings","David A. Cuadrado","krawek@gmail.com" +"Frontend improvements","Martin Minarik","ttsmj@pokec.sk" +"Frontend improvements","Kristian Lehmann","email@thexception.net" +"Mac OS X/iPhone port, OpenGL-ES conversion","Vittorio Giovara","vittorio.giovara@gmail.com" +"Many engine and frontend improvements (and bugs)","Richard Karolyi","sheepluva@ercatec.net" +"Gamepad and Lua integration","Mario Liebisch","mario.liebisch@gmail.com" +"Many engine improvements","Carlos Vives","mail@carlosvives.es" +"Maze maps","Henning Kühn","prg@cooco.de" +"Engine and frontend improvements","Henrik Rostedt","henrik.rostedt@gmail.com" +"Lua game modes and missions","John Lambert","redgrinner@gmail.com" +"Frontend improvements","Mayur Pawashe","zorgiepoo@gmail.com" +"Android port","Richard Deurwaarder","xeli@xelification.com" +"Android netplay, portability abstraction","Simeon Maxein","smaxein@googlemail.com" +"WebGL port, some pas2c and GLES2 work","Meng Xiangyun","xymengxy@gmail.com" +"Video recording","Stepan Podoskin","stepik-777@mail.ru" +"Campaign support, A Classic Fairytale campaign","Szabolcs Orbàn","szabibibi@gmail.com" +"Keybinds, feedback, maps and hats interfaces","Drew Gottlieb","gottlieb.drew@gmail.com" +"Login dialogs, frontend improvements","Ondrej Skopek","skopekondrej@gmail.com" +"Freezer weapon","Julia Struchenko","urbertar@gmail.com" +"iPhone/iPad ports","Anton Malmygin","antonc27@mail.ru" +"Battalion style","Anachron","Anachron14@gmx.de" +"Scripting, engine, frontend improvements, some missions","Wuzzy","Wuzzy2@mail.ru" +"Theme customization improvements","KoBeWi", +"Theme music, engine and frontend improvements","Valentin Kraevskiy", +!__SECTION,"Graphics", +!__SUBSECTION,"General", +,"John Dum","fizzy@gmail.com" +,"Joshua Frese","joshfrese@gmail.com" +,"Stanko Tadić","stanko@mfhinc.net" +,"Julien Koesten","julienkoesten@aol.com" +,"Joshua O'Sullivan","coheedftw@hotmail.co.uk" +,"Nils Lück","nils.luck.design@gmail.com" +,"Guillaume Englert","genglert@hybird.org" +,"CopherNeue","ppicondo.cvac@gmail.com" +,"Valentin Kraevskiy", +,"Carlos Vives","mail@carlosvives.es" +!__SUBSECTION,"Themes", +"TODO","TODO","nobody@nowhere.invalid" +!__SUBSECTION,"Hats", +,"Trey Perry","perry.j@gmail.com", +!__MISC,, +!__SECTION,"Sounds", +"Hedgehogs voice","Stephen Alexander","ArmagonNo1@gmail.com" +,"John Dum","fizzy@gmail.com" +,"Jonatan Nilsson","jonatanfan@gmail.com" +,"Daniel Martin","elhombresinremedio@gmail.com" +!__SECTION,"Music", +"TODO","TODO","nobody@nowhere.invalid" +!__SECTION,"Translations", +"Brazilian Portuguese","Romulo Fernandes Machado","abra185@gmail.com" +"Bulgarian","Svetoslav Stefanov", +"Czech","Petr Řezáček","rezacek@gmail.com" +"Chinese","Jie Luo","lililjlj@gmail.com" +"Finnish","Nina Kuisma","ninnnu@gmail.com" +"Finnish","Janne Uusitupa", +"French","Antoine Turmel","geekshadow@gmail.com" +"French","Clement Woitrain","sphrixclement@gmail.com" +"French","Matisumi", +"French","Case_Of", +"German","Peter Hüwe","PeterHuewe@gmx.de" +"German","Mario Liebisch","mario.liebisch@gmail.com" +"German","Richard Karolyi","sheepluva@ercatec.net" +"German","Wuzzy","Wuzzy2@mail.ru" +"Greek",,"talos_kriti@yahoo.gr" +"Italian","Luca Bonora","bonora.luca@gmail.com" +"Italian","Marco Bresciani","m.bresciani@email.it" +"Italian","Gianfranco Costamagna","costamagnagianfranco@yahoo.it" +"Italian","Enrico","enricobe@hotmail.com" +"Japanese","ADAM Etienne","etienne.adam@gmail.com" +"Japanese","Marco Bresciani","m.bresciani@email.it" +"Korean","Anthony Bellew","anthonyreflected@gmail.com" +"Lithuanian","Lukas Urbonas","lukasu08@gmail.com" +"Polish","Maciej Mroziński","mynick2@o2.pl" +"Polish","Wojciech Latkowski","magik17l@gmail.com" +"Polish","Piotr Mitana", +"Polish","Maciej Górny", +"Polish","KoBeWi", +"Portuguese","Fábio Canário","inufabie@gmail.com" +"Russian","Andrey Korotaev","unC0Rr@gmail.com" +"Russian","Vitaly Novichkov","admin@wohlnet.ru" +"Russian","Anton Malmygina","antonc27@mail.ru" +"Russian","Grigory Ustinov","grenka@altlinux.org" +"Scottish Gaelic","GunChleoc", +"Slovak","Jose Riha", +"Spanish","Carlos Vives","mail@carlosvives.es" +"Swedish","Niklas Grahn","raewolusjoon@yaoo.com" +"Swedish","Henrik Rostedt","henrik.rostedt@gmail.com" +"Ukrainian","Eugene V. Lyubimkin","jackyf.devel@gmail.com" +"Ukrainian","Igor Paliychuk","mansonigor@gmail.com" +"Ukrainian","Eugene Sakara","eresid@gmail.com" +!__SECTION,"Special thanks", +,"Aleksey Andreev","blaknayabr@gmail.com", +,"Aleksander Rudalev","alexv@pomorsu.ru", +,"Natasha Korotaeva","layout@pisem.net", +,"Adam ""ahigerd"" Higerd", diff -r 94f10f69fe76 -r bf0ec13a21ea QTfrontend/res/html/about.html --- a/QTfrontend/res/html/about.html Thu Dec 13 10:51:07 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ - - - -Hedgewars - Authors - - - - -

Developers:

-

- Engine, frontend, net server: Andrey Korotaev <unC0Rr@gmail.com>
- Many frontend improvements: Igor Ulyanov <disinbox@gmail.com>
- Many engine and frontend improvements: Derek Pomery <nemo@m8y.org>
- Drill rocket, Ballgun, RC Plane weapons: Martin Boze <afffect@gmail.com>
- Mine number and time game settings: David A. Cuadrado <krawek@gmail.com>
- Frontend improvements: Martin Minarik <ttsmj@pokec.sk>
- Frontend improvements: Kristian Lehmann <email@thexception.net>
- Mac OS X/iPhone port, OpenGL-ES conversion: Vittorio Giovara <vittorio.giovara@gmail.com>
- Many engine and frontend improvements (and bugs): Richard Karolyi <sheepluva@ercatec.net>
- Gamepad and Lua integration: Mario Liebisch <mario.liebisch@gmail.com>
- Many engine improvements and graphics: Carlos Vives <mail@carlosvives.es>
- Maze maps: Henning Kühn <prg@cooco.de>
- Engine and frontend improvements: Henrik Rostedt <henrik.rostedt@gmail.com>
- Lua game modes and missions: John Lambert <redgrinner@gmail.com>
- Frontend improvements: Mayur Pawashe <zorgiepoo@gmail.com>
- Android port: Richard Deurwaarder <xeli@xelification.com>
- Android netplay, portability abstraction: Simeon Maxein <smaxein@googlemail.com>
- WebGL port, some pas2c and GLES2 work: Meng Xiangyun <xymengxy@gmail.com>
- Video recording: Stepan Podoskin <stepik-777@mail.ru>
- Campaign support, first campaign: Szabolcs Orbàn <szabibibi@gmail.com>
- Keybinds, feedback, maps and hats interfaces: Drew Gottlieb <gottlieb.drew@gmail.com>
- Login dialogs, frontend improvements: Ondrej Skopek <skopekondrej@gmail.com>
- Icegun weapon: Julia Struchenko <urbertar@gmail.com>
- iPhone/iPad ports: Anton Malmygin <antonc27@mail.ru>
- Battalion style: Anachron <Anachron14@gmx.de>
- Scripting, engine, frontend improvements, some missions: Wuzzy <Wuzzy2@mail.ru>
- Theme customization improvements: KoBeWi
- Theme music, engine and frontend improvements, graphics: Valentin Kraevskiy
-

- -

Art:

-

John Dum <fizzy@gmail.com> -
- Joshua Frese <joshfrese@gmail.com> -
- Stanko Tadić <stanko@mfhinc.net> -
- Julien Koesten <julienkoesten@aol.com> -
- Joshua O'Sullivan <coheedftw@hotmail.co.uk> -
- Nils Lück <nils.luck.design@gmail.com> -
- Guillaume Englert <genglert@hybird.org> -
-

CopherNeue <ppicondo.cvac@gmail.com> -
- Hats: Trey Perry <tx.perry.j@gmail.com> -

- -

Sounds:

-

- Hedgehogs voice: Stephen Alexander <ArmagonNo1@gmail.com> -
- John Dum <fizzy@gmail.com> -
- Jonatan Nilsson <jonatanfan@gmail.com> -
- Daniel Martin <elhombresinremedio@gmail.com> -

- -

Translations:

- Brazilian Portuguese: Romulo Fernandes Machado <abra185@gmail.com>
- Bulgarian: Svetoslav Stefanov
- Czech: Petr Řezáček <rezacek@gmail.com>
- Chinese: Jie Luo <lililjlj@gmail.com>
- English: Andrey Korotaev <unC0Rr@gmail.com>
- Finnish: Nina Kuisma <ninnnu@gmail.com>, Janne Uusitupa
- French: Antoine Turmel <geekshadow@gmail.com>, Clement Woitrain <sphrixclement@gmail.com>, Matisumi, Case_Of
- German: Peter Hüwe <PeterHuewe@gmx.de>, Mario Liebisch <mario.liebisch@gmail.com>, Richard Karolyi <sheepluva@ercatec.net>, Wuzzy <Wuzzy2@mail.ru>
- Greek: <talos_kriti@yahoo.gr>
- Italian: Luca Bonora <bonora.luca@gmail.com>, Marco Bresciani <m.bresciani@email.it>, Gianfranco Costamagna <costamagnagianfranco@yahoo.it>, Enrico <enricobe@hotmail.com>
- Japanese: ADAM Etienne <etienne.adam@gmail.com>, Marco Bresciani <m.bresciani@email.it>
- Korean: Anthony Bellew <anthonyreflected@gmail.com>
- Lithuanian: Lukas Urbonas <lukasu08@gmail.com>
- Polish: Maciej Mroziński <mynick2@o2.pl>, Wojciech Latkowski <magik17l@gmail.com>, Piotr Mitana, Maciej Górny, KoBeWi
- Portuguese: Fábio Canário <inufabie@gmail.com>
- Russian: Andrey Korotaev <unC0Rr@gmail.com>, Vitaly Novichkov <admin@wohlnet.ru>, Anton Malmygin <antonc27@mail.ru>, greno4ka, Grigory Ustinov <grenka@altlinux.org>
- Scottish Gaelic: GunChleoc
- Slovak: Jose Riha
- Spanish: Carlos Vives <mail@carlosvives.es>
- Swedish: Niklas Grahn <raewolusjoon@yaoo.com>, Henrik Rostedt <henrik.rostedt@gmail.com>
- Ukrainian: Eugene V. Lyubimkin <jackyf.devel@gmail.com>, Igor Paliychuk <mansonigor@gmail.com>, Eugene Sakara <eresid@gmail.com> -

- -

Special thanks:

- Aleksey Andreev <blaknayabr@gmail.com>
- Aleksander Rudalev <alexv@pomorsu.ru>
- Natasha Korotaeva <layout@pisem.net>
- Adam Higerd (aka ahigerd at FreeNode) -

- - diff -r 94f10f69fe76 -r bf0ec13a21ea QTfrontend/ui/widget/about.cpp --- a/QTfrontend/ui/widget/about.cpp Thu Dec 13 10:51:07 2018 -0500 +++ b/QTfrontend/ui/widget/about.cpp Thu Dec 13 17:28:53 2018 +0100 @@ -53,6 +53,143 @@ #include "about.h" +QString About::getCreditsHtml() +{ + // Open the credits file + + /* *** FILE FORMAT OF CREDITS FILE *** + The credits file is an RFC-4180-compliant CSV file with 3 columns: + * Task/contribution + * Contributor name + * Contributor e-mail + + The first and last columns are optional. + + There are special rows, which are marked by putting a "!__" in the + beginning of the first. The following special rows are supported: + + !__SECTION: Section. Column 1 is the section name + !__SUBSECTION: Subsection. Column 1 is the subsection name + !__MISC: Placeholder for other or unknown authors + */ + QFile creditsFile(":/res/credits.csv"); + if (!creditsFile.open(QIODevice::ReadOnly)) + { + qWarning("ERROR: Credits file could not be opened!"); + return "

ERROR: Credits file could not be opened!

"; + } + QString creditsString = creditsFile.readAll(); + QString out = QString("

" + tr("Credits") + "

\n"); + QStringList cells = QStringList() << QString("") << QString("") << QString(""); + bool firstSection = true; + unsigned long int column = 0; + unsigned long int charInCell = 0; + bool isInQuote = false; + bool ignoreChar = false; + bool lineComplete = false; + QChar currChar; + QChar prevChar; + for(long long int i = 0; i 0 && prevChar == '"' && (currChar == '\r' || currChar == ',')) + { + isInQuote = false; + ignoreChar = true; + } + + charInCell++; + if(!isInQuote && currChar == ',') + { + column++; + charInCell = 0; + } + else if(!isInQuote && currChar == '\n' && prevChar == '\r') + { + lineComplete = true; + } + if(!isInQuote && (currChar == '\r' || currChar == '\n' || currChar == ',')) + { + ignoreChar = true; + } + + + if(!ignoreChar) + { + cells[column].append(currChar); + } + ignoreChar = false; + + if(lineComplete) + { + task = cells[0]; + name = cells[1]; + mail = cells[2]; + + if(task == "!__SECTION") + { + if (!firstSection) + out = out + "\n"; + out = out + "

" + name + "

\n\n"; + out = out + "

" + name + "

\n"; + return out; +} + About::About(QWidget * parent) : QWidget(parent) { @@ -89,11 +226,32 @@ lbl1->setWordWrap(true); mainLayout->addWidget(lbl1, 0, 1); - lbl2 = new QTextBrowser(this); - lbl2->setOpenExternalLinks(true); - QUrl localpage = QUrl::fromLocalFile(":/res/html/about.html"); - lbl2->setSource(localpage); //sets the source of the label from the file above - mainLayout->addWidget(lbl2, 1, 1); + /* Credits */ + creditsBrowser = new QTextBrowser(this); + creditsBrowser->setOpenExternalLinks(true); + QString credits = getCreditsHtml(); + + QString header = + "" + "" + "" + "Hedgewars Credits" + "" + "" + "" + "" + ""; + QString footer = + "" + ""; + + creditsBrowser->setHtml(header + credits + footer); + mainLayout->addWidget(creditsBrowser, 1, 1); /* Library information */ diff -r 94f10f69fe76 -r bf0ec13a21ea QTfrontend/ui/widget/about.h --- a/QTfrontend/ui/widget/about.h Thu Dec 13 10:51:07 2018 -0500 +++ b/QTfrontend/ui/widget/about.h Thu Dec 13 17:28:53 2018 +0100 @@ -35,7 +35,8 @@ virtual void dropEvent(QDropEvent * event); private: - QTextBrowser * lbl2; + QString getCreditsHtml(); + QTextBrowser * creditsBrowser; }; #endif // _ABOUT_H