From 7440827a7f8064269e74394895ec0c6073778490 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sat, 1 Sep 2007 17:43:49 +0000 Subject: [PATCH] qt4: Fix help dialog (again) Uses builtin AUTHORS THANKS and COPYING files on every platform Don't ship AUTHORS.txt and THANKS.txt on windows packages COPYING.txt is kept since it's used in the nsis installer Only show authors' name instead of the full AUTHORS file Removes an empty line in THANKS to make it easier to parse without using endless pipes --- Makefile.am | 2 +- THANKS | 1 - modules/gui/qt4/Modules.am | 6 +++--- modules/gui/qt4/dialogs/help.cpp | 24 ------------------------ 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/Makefile.am b/Makefile.am index 38db434c60..4c885c8d47 100644 --- a/Makefile.am +++ b/Makefile.am @@ -619,7 +619,7 @@ package-win-common: cp "$(top_builddir)/src/.libs/libvlc$(LIBEXT)" "vlc-${VERSION}/" cp "$(top_builddir)/src/.libs/libvlc-control$(LIBEXT)" "vlc-${VERSION}/" - for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \ + for file in MAINTAINERS NEWS COPYING README ; \ do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \ unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done diff --git a/THANKS b/THANKS index cbc1566150..eb58bbd4dc 100644 --- a/THANKS +++ b/THANKS @@ -1,5 +1,4 @@ $Id$ - VLC makes extensive use of the following persons' code: Aaron Holtzman - AC3 decoder, MPEG video decoder diff --git a/modules/gui/qt4/Modules.am b/modules/gui/qt4/Modules.am index 94dbc9a5d2..e6e88cce7e 100644 --- a/modules/gui/qt4/Modules.am +++ b/modules/gui/qt4/Modules.am @@ -82,14 +82,14 @@ dialogs/help.cpp: dialogs/about.hpp dialogs/about.hpp: Modules.am $(top_srcdir)/COPYING $(top_srcdir)/THANKS $(top_srcdir)/AUTHORS mkdir -p -- dialogs echo "/* Automatically generated file - DO NOT EDIT */" > dialogs/about.hpp.tmp - echo "static const char psz_licence[] =" >> dialogs/about.hpp.tmp + echo "static const char psz_license[] =" >> dialogs/about.hpp.tmp cat $(top_srcdir)/COPYING | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp echo ";" >> dialogs/about.hpp.tmp echo "static const char psz_thanks[] =" >> dialogs/about.hpp.tmp - cat $(top_srcdir)/THANKS | grep -v '$$Id:' | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp + grep -v '$$Id:' $(top_srcdir)/THANKS | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp echo ";" >> dialogs/about.hpp.tmp echo "static const char psz_authors[] =" >> dialogs/about.hpp.tmp - cat $(top_srcdir)/AUTHORS | grep -v '$$Id:' | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp + grep N: $(top_srcdir)/AUTHORS | cut -d" " -f 2- | sed s/'"'/'\\"'/g | awk '{ print "\""$$0"\\n\"" }' >> dialogs/about.hpp.tmp echo ";" >> dialogs/about.hpp.tmp mv -f -- dialogs/about.hpp.tmp dialogs/about.hpp diff --git a/modules/gui/qt4/dialogs/help.cpp b/modules/gui/qt4/dialogs/help.cpp index 7d91801862..db7e60f354 100644 --- a/modules/gui/qt4/dialogs/help.cpp +++ b/modules/gui/qt4/dialogs/help.cpp @@ -114,15 +114,7 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf ) /* GPL License */ QTextEdit *licenseEdit = new QTextEdit( this ); -#ifdef WIN32 - QFile *licenseFile = new QFile( "COPYING.txt" ); - licenseFile->open( QIODevice::ReadOnly | QIODevice::Text ); - licenseEdit->setText( licenseFile->readAll().data() ); - licenseFile->close(); -#else - char *psz_license = LICENCE; licenseEdit->setText( qfu( psz_license ) ); -#endif licenseEdit->setReadOnly( true ); /* People who helped */ @@ -136,29 +128,13 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf ) thanksLabel->setWordWrap( true ); thanksLayout->addWidget( thanksLabel ); QTextEdit *thanksEdit = new QTextEdit( this ); -#ifdef WIN32 - QFile *thanksFile = new QFile( "THANKS.txt" ); - thanksFile->open( QIODevice::ReadOnly | QIODevice::Text ); - thanksEdit->setText( thanksFile->readAll().data() ); - thanksFile->close(); -#else - char *psz_thanks = THANKS; thanksEdit->setText( qfu( psz_thanks ) ); -#endif thanksEdit->setReadOnly( true ); thanksLayout->addWidget( thanksEdit ); /* People who wrote the software */ QTextEdit *authorsEdit = new QTextEdit( this ); -#ifdef WIN32 - QFile *authorsFile = new QFile( "COPYING.txt" ); - authorsFile->open( QIODevice::ReadOnly | QIODevice::Text ); - authorsEdit->setText( authorsFile->readAll().data() ); - authorsFile->close(); -#else - char *psz_authors = AUTHORS; authorsEdit->setText( qfu( psz_authors ) ); -#endif authorsEdit->setReadOnly( true ); /* add the tabs to the Tabwidget */ -- 2.39.2