qt4: Fix help dialog (again)
authorRafaël Carré <funman@videolan.org>
Sat, 1 Sep 2007 17:43:49 +0000 (17:43 +0000)
committerRafaël Carré <funman@videolan.org>
Sat, 1 Sep 2007 17:43:49 +0000 (17:43 +0000)
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
THANKS
modules/gui/qt4/Modules.am
modules/gui/qt4/dialogs/help.cpp

index 38db434..4c885c8 100644 (file)
@@ -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 cbc1566..eb58bbd 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,5 +1,4 @@
 $Id$
-
 VLC makes extensive use of the following persons' code:
 
 Aaron Holtzman <aholtzma at ess.engr.uvic.ca> - AC3 decoder, MPEG video decoder
index 94dbc9a..e6e88cc 100644 (file)
@@ -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
 
index 7d91801..db7e60f 100644 (file)
@@ -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 */