Commit b7e89391 authored by Rafaël Carré's avatar Rafaël Carré

Makes THANKS & COPYING built in in qt4 about dialog

parent 2fd0b6be
......@@ -75,6 +75,17 @@ resources.cpp: res.qrc
sed -i -e 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp
mv -f $@.tmp $@
dialogs/help.cpp: dialogs/about.hpp
dialogs/about.hpp:
echo "char *psz_licence = { \\" > dialogs/about.hpp
cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\" \\" }' >> dialogs/about.hpp
echo "};" >> dialogs/about.hpp
echo "char *psz_thanks = { \\" >> dialogs/about.hpp
cat $(top_srcdir)/THANKS | grep -v '$$Id:' | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\" \\" }' >> dialogs/about.hpp
echo "};" >> dialogs/about.hpp
SOURCES_qt4 = qt4.cpp \
menus.cpp \
main_interface.cpp \
......@@ -119,6 +130,7 @@ noinst_HEADERS = \
dialogs/preferences.hpp \
dialogs/interaction.hpp \
dialogs/sout.hpp \
dialogs/about.hpp \
dialogs/help.hpp \
dialogs/gototime.hpp \
dialogs/open.hpp \
......
......@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "dialogs/about.hpp"
#include "dialogs/help.hpp"
#include "dialogs_provider.hpp"
......@@ -31,6 +32,7 @@
#include <QTabWidget>
#include <QFile>
#include <QLabel>
#include <QString>
HelpDialog *HelpDialog::instance = NULL;
......@@ -80,15 +82,15 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
layout->addWidget( closeButton, 2, 1, 1, 1 );
/* GPL License */
QFile *licenseFile = new QFile( "/usr/src/vlc/COPYING" );
QTextEdit *licenseEdit = new QTextEdit( this );
licenseEdit->setText( licenseFile->readAll() );
QString psz_qlicence = QString::fromUtf8( psz_licence );
licenseEdit->setText( psz_qlicence );
licenseEdit->setReadOnly( true );
/* People who helped */
QFile *thanksFile = new QFile( "/usr/src/vlc/THANKS" );
QTextEdit *thanksEdit = new QTextEdit( this );
thanksEdit->setText( thanksFile->readAll() );
QString psz_qthanks = QString::fromUtf8( psz_thanks );
thanksEdit->setText( psz_qthanks );
thanksEdit->setReadOnly( true );
/* add the tabs to the Tabwidget */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment