diff --git a/CMakeLists.txt b/CMakeLists.txt index 33834d041..397eecdeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,7 +347,18 @@ FILE(GLOB_RECURSE lmms_SOURCES ${CMAKE_SOURCE_DIR}/src/*.cpp) SET(lmms_MOC ${lmms_INCLUDES}) -SET(lmms_EMBEDDED_RESOURCES ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/COPYING) +# Get list of all committers from git history, ordered by number of commits +FIND_PACKAGE(Git) +IF(GIT_FOUND) + SET(CONTRIBUTORS ${CMAKE_BINARY_DIR}/CONTRIBUTORS) + EXECUTE_PROCESS( + COMMAND ${GIT_EXECUTABLE} shortlog -sne + COMMAND cut -c8- + OUTPUT_FILE ${CONTRIBUTORS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +ENDIF(GIT_FOUND) + +SET(lmms_EMBEDDED_RESOURCES ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/COPYING ${CONTRIBUTORS}) QT4_WRAP_CPP(lmms_MOC_out ${lmms_MOC} OPTIONS -nw) QT4_WRAP_UI(lmms_UI_out ${lmms_UI}) diff --git a/src/gui/about_dialog.cpp b/src/gui/about_dialog.cpp index 41a502696..cd9cca16c 100644 --- a/src/gui/about_dialog.cpp +++ b/src/gui/about_dialog.cpp @@ -79,7 +79,19 @@ aboutDialog::aboutDialog() : authorLabel->setPlainText( embed::getText( "AUTHORS" ) ); licenseLabel->setPlainText( embed::getText( "COPYING" ) ); + + QString contText = embed::getText( "CONTRIBUTORS" ); + if ( contText.length() >= 2 ) + { + QWidget *widget = new QWidget(); + QVBoxLayout *layout = new QVBoxLayout(); + QTextEdit *contWidget = new QTextEdit(); + contWidget->setReadOnly(true); + contWidget->setText( contText ); + + layout->addWidget( new QLabel( tr("Contributors ordered by number of commits:"), this ) ); + layout->addWidget( contWidget ); + widget->setLayout( layout ); + tabWidget->insertTab( 2, widget, tr("Involved") ); + } } - - - diff --git a/src/gui/dialogs/about_dialog.ui b/src/gui/dialogs/about_dialog.ui index b795fd0f8..39c1974b9 100644 --- a/src/gui/dialogs/about_dialog.ui +++ b/src/gui/dialogs/about_dialog.ui @@ -1,3 +1,4 @@ + AboutDialog @@ -125,7 +126,7 @@ - Copyright (c) 2004-2013, LMMS developers + Copyright (c) 2004-2014, LMMS developers true @@ -151,7 +152,7 @@ - http://lmms.sourceforge.net + <html><head/><body><p><a href="http://lmms.sourceforge.net"><span style=" text-decoration: underline; color:#0000ff;">http://lmms.sourceforge.net</span></a></p></body></html> true