From ee77ff599b1e693a4fe7e027da2f46adaded0bf0 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 15 Jan 2019 19:34:56 -0500 Subject: [PATCH] 2019-01-15 Fred Gleason * Added a 'View Credits' button to the 'System Information' dialog in rdadmin(1). --- .gitignore | 1 + AUTHORS | 4 ++-- ChangeLog | 3 +++ helpers/cwrap.cpp | 2 +- lib/Makefile.am | 11 ++++++++--- lib/librd_cs.ts | 4 ++++ lib/librd_de.ts | 4 ++++ lib/librd_es.ts | 4 ++++ lib/librd_fr.ts | 4 ++++ lib/librd_nb.ts | 4 ++++ lib/librd_nn.ts | 4 ++++ lib/librd_pt_BR.ts | 4 ++++ lib/rdlicense.cpp | 27 +++++++++++++++++---------- lib/rdlicense.h | 8 ++++---- rdadmin/info_dialog.cpp | 25 +++++++++++++++++++++---- rdadmin/info_dialog.h | 1 + rdadmin/rdadmin_cs.ts | 5 +++++ rdadmin/rdadmin_de.ts | 5 +++++ rdadmin/rdadmin_es.ts | 5 +++++ rdadmin/rdadmin_fr.ts | 5 +++++ rdadmin/rdadmin_nb.ts | 5 +++++ rdadmin/rdadmin_nn.ts | 5 +++++ rdadmin/rdadmin_pt_BR.ts | 5 +++++ 23 files changed, 121 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 363c07b0..2f9dced4 100644 --- a/.gitignore +++ b/.gitignore @@ -61,6 +61,7 @@ importers/rivendell_filter importers/sas_filter importers/wings_filter install-sh +lib/credits.cpp lib/rdpaths.h libtool ltmain.sh diff --git a/AUTHORS b/AUTHORS index f61c3fc9..82cd221f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,4 @@ -The following folks have contributed to Rivendell: +The following people have contributed to the Rivendell codebase: Todd Baker C client binding for the Rivendell Web API [rivwebcapi]. @@ -29,7 +29,7 @@ Fred Gleason Patrick Linstruth General Bugfixes rddbconfig(8) Utility - TuneIn RLM + TuneIn and IceCast2 PyPAD scripts Dan Mills General Bughunter Extrordinaire diff --git a/ChangeLog b/ChangeLog index 48ecdb84..d37ae070 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18388,3 +18388,6 @@ * Updated 'INSTALL'. 2019-01-15 Fred Gleason * Updated copyright notices. +2019-01-15 Fred Gleason + * Added a 'View Credits' button to the 'System Information' dialog + in rdadmin(1). diff --git a/helpers/cwrap.cpp b/helpers/cwrap.cpp index c7ceddb2..674b8f0d 100644 --- a/helpers/cwrap.cpp +++ b/helpers/cwrap.cpp @@ -115,7 +115,7 @@ int main(int argc,char *argv[]) for(int i=0;i<(stat.st_size/LINE_LENGTH+1);i++) { n=read(input_fd,line,LINE_LENGTH); for(int j=0;j0) { diff --git a/lib/Makefile.am b/lib/Makefile.am index 69b15608..8252ef2d 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -28,9 +28,11 @@ CWRAP = ../helpers/cwrap moc_%.cpp: %.h $(MOC) $< -o $@ -# The cwrap dependency +# The cwrap dependencies html_%.cpp: %.html $(CWRAP) -o $@ $< +credits.cpp: + $(CWRAP) -o $@ ../AUTHORS instdir = @LOCAL_PREFIX@/lib @@ -61,7 +63,6 @@ dist_librd_la_SOURCES = dbversion.h\ export_spincount.cpp\ export_technical.cpp\ export_textlog.cpp\ - html_gpl2.cpp\ rdadd_cart.cpp rdadd_cart.h\ rdadd_log.cpp rdadd_log.h\ rdairplay_conf.cpp rdairplay_conf.h\ @@ -247,7 +248,9 @@ dist_librd_la_SOURCES = dbversion.h\ schedcartlist.cpp schedcartlist.h -nodist_librd_la_SOURCES = moc_rdadd_cart.cpp\ +nodist_librd_la_SOURCES = credits.cpp\ + html_gpl2.cpp\ + moc_rdadd_cart.cpp\ moc_rdadd_log.cpp\ moc_rdapplication.cpp\ moc_rdaudioconvert.cpp\ @@ -356,6 +359,8 @@ EXTRA_DIST = gpl2.html\ rdpaths.h.in CLEANFILES = *~\ + credits.cpp\ + html_gpl2.cpp\ moc_*\ *.lib\ *.obj\ diff --git a/lib/librd_cs.ts b/lib/librd_cs.ts index a018d2c3..a26ca38c 100644 --- a/lib/librd_cs.ts +++ b/lib/librd_cs.ts @@ -2163,6 +2163,10 @@ Bitte Kofiguration prüfen und erneut versuchen. GNU Public License v2 GNU Public License v2 + + Rivendell Credits + + RDListGroups diff --git a/lib/librd_de.ts b/lib/librd_de.ts index bb614933..efc8ccd5 100644 --- a/lib/librd_de.ts +++ b/lib/librd_de.ts @@ -2150,6 +2150,10 @@ Bitte Kofiguration prüfen und erneut versuchen. GNU Public License v2 GNU Public License v2 + + Rivendell Credits + + RDListGroups diff --git a/lib/librd_es.ts b/lib/librd_es.ts index b7f30efb..6f0631c9 100644 --- a/lib/librd_es.ts +++ b/lib/librd_es.ts @@ -2156,6 +2156,10 @@ Do you still want to proceed? GNU Public License v2 Licencia Pública GNU v2 + + Rivendell Credits + + RDListGroups diff --git a/lib/librd_fr.ts b/lib/librd_fr.ts index 785830e5..bd82f764 100644 --- a/lib/librd_fr.ts +++ b/lib/librd_fr.ts @@ -1905,6 +1905,10 @@ Do you want to overwrite it? GNU Public License v2 + + Rivendell Credits + + RDListGroups diff --git a/lib/librd_nb.ts b/lib/librd_nb.ts index 6239c676..b87466f3 100644 --- a/lib/librd_nb.ts +++ b/lib/librd_nb.ts @@ -2152,6 +2152,10 @@ Sjekk eksportoppsettet ditt og prøv att. GNU Public License v2 GNU Public-lisensen, versjon 2 + + Rivendell Credits + + RDListGroups diff --git a/lib/librd_nn.ts b/lib/librd_nn.ts index 6239c676..b87466f3 100644 --- a/lib/librd_nn.ts +++ b/lib/librd_nn.ts @@ -2152,6 +2152,10 @@ Sjekk eksportoppsettet ditt og prøv att. GNU Public License v2 GNU Public-lisensen, versjon 2 + + Rivendell Credits + + RDListGroups diff --git a/lib/librd_pt_BR.ts b/lib/librd_pt_BR.ts index 4ba63dfe..d874a501 100644 --- a/lib/librd_pt_BR.ts +++ b/lib/librd_pt_BR.ts @@ -2154,6 +2154,10 @@ Por Favor, cheque suas configurações e tenbte outra vez. GNU Public License v2 GNU Public License v2 + + Rivendell Credits + + RDListGroups diff --git a/lib/rdlicense.cpp b/lib/rdlicense.cpp index f5787c6d..b73c3b16 100644 --- a/lib/rdlicense.cpp +++ b/lib/rdlicense.cpp @@ -2,7 +2,7 @@ // // Display License Text. // -// (C) Copyright 2002-2003,2016 Fred Gleason +// (C) Copyright 2002-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -23,10 +23,11 @@ #include -#include +#include "credits.cpp" +#include "html_gpl2.cpp" RDLicense::RDLicense(QWidget *parent) - : QDialog(parent,"",true) + : QDialog(parent) { // // Fix the Window Size @@ -42,10 +43,9 @@ RDLicense::RDLicense(QWidget *parent) QFont button_font=QFont("Helvetica",14,QFont::Bold); button_font.setPixelSize(14); - license_edit=new Q3TextEdit(this,"license_edit"); + license_edit=new QTextEdit(this); license_edit-> - setGeometry(10,10,sizeHint().width()-20,sizeHint().height()-70); - license_edit->setTextFormat(Qt::RichText); + setGeometry(10,10,sizeHint().width()-20,sizeHint().height()-80); license_edit->setReadOnly(true); // @@ -74,10 +74,17 @@ QSizePolicy RDLicense::sizePolicy() const void RDLicense::exec(RDLicense::License lic) { switch(lic) { - case RDLicense::GplV2: - license_edit->setText((const char *)html_gpl2); - setCaption(tr("GNU Public License v2")); - break; + case RDLicense::Credits: + license_edit->setTextFormat(Qt::PlainText); + license_edit->setText(QString::fromUtf8((const char *)credits)); + setWindowTitle(tr("Rivendell Credits")); + break; + + case RDLicense::GplV2: + license_edit->setTextFormat(Qt::RichText); + license_edit->setText((const char *)html_gpl2); + setWindowTitle(tr("GNU Public License v2")); + break; } QDialog::exec(); } diff --git a/lib/rdlicense.h b/lib/rdlicense.h index 330e74fc..c3361959 100644 --- a/lib/rdlicense.h +++ b/lib/rdlicense.h @@ -2,7 +2,7 @@ // // Display License Text. // -// (C) Copyright 2002-2003,2016 Fred Gleason +// (C) Copyright 2002-2019 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -23,13 +23,13 @@ #define RDLICENSE_H #include -#include +#include class RDLicense : public QDialog { Q_OBJECT public: - enum License {GplV2=0}; + enum License {GplV2=0,Credits=1}; RDLicense(QWidget *parent=0); QSize sizeHint() const; QSizePolicy sizePolicy() const; @@ -41,7 +41,7 @@ class RDLicense : public QDialog void closeData(); private: - Q3TextEdit *license_edit; + QTextEdit *license_edit; }; diff --git a/rdadmin/info_dialog.cpp b/rdadmin/info_dialog.cpp index e93e0992..4915c479 100644 --- a/rdadmin/info_dialog.cpp +++ b/rdadmin/info_dialog.cpp @@ -38,15 +38,15 @@ #include #include -#include +#include "info_dialog.h" // // This is a kludge, but apparently needed to get the bitmap data // for the info banners, as Automake refuses to process the cwrap // dependency correctly. // -#include -#include +#include "xpm_info_banner1.cpp" +#include "xpm_info_banner2.cpp" InfoDialog::InfoDialog(QWidget *parent) : QDialog(parent) @@ -140,9 +140,18 @@ InfoDialog::InfoDialog(QWidget *parent) label->setText(tr("This program is free software, and comes with ABSOLUTELY NO WARRANTY,\nnot even the implied warranties of MERCHANTIBILITY or FITNESS FOR A\nPARTICULAR PURPOSE. Touch the \"View License\" button for details.")); // - // License Button + // Credits Button // QPushButton *button=new QPushButton(this); + button->setGeometry(sizeHint().width()/2-145,174,80,50); + button->setFont(button_font); + button->setText(tr("View\n&Credits")); + connect(button,SIGNAL(clicked()),this,SLOT(viewCreditsData())); + + // + // License Button + // + button=new QPushButton(this); button->setGeometry(sizeHint().width()/2-45,174,80,50); button->setFont(button_font); button->setText(tr("View\n&License")); @@ -173,6 +182,14 @@ QSizePolicy InfoDialog::sizePolicy() const } +void InfoDialog::viewCreditsData() +{ + RDLicense *lic=new RDLicense(this); + lic->exec(RDLicense::Credits); + delete lic; +} + + void InfoDialog::viewLicenseData() { RDLicense *lic=new RDLicense(this); diff --git a/rdadmin/info_dialog.h b/rdadmin/info_dialog.h index 7ec1f4b6..d0496feb 100644 --- a/rdadmin/info_dialog.h +++ b/rdadmin/info_dialog.h @@ -45,6 +45,7 @@ class InfoDialog : public QDialog QSizePolicy sizePolicy() const; private slots: + void viewCreditsData(); void viewLicenseData(); void closeData(); }; diff --git a/rdadmin/rdadmin_cs.ts b/rdadmin/rdadmin_cs.ts index b40b8c84..110869be 100644 --- a/rdadmin/rdadmin_cs.ts +++ b/rdadmin/rdadmin_cs.ts @@ -4517,6 +4517,11 @@ GNU Library General Public License. Klepněte na tlačítko pro zobrazení povol Copyright 2002-2019 Autorské právo 2002-2019 + + View +&Credits + + ListAuxFields diff --git a/rdadmin/rdadmin_de.ts b/rdadmin/rdadmin_de.ts index 95431601..ce05e7a0 100644 --- a/rdadmin/rdadmin_de.ts +++ b/rdadmin/rdadmin_de.ts @@ -4401,6 +4401,11 @@ anzeigen Copyright 2002-2019 Copyright 2002-2019 + + View +&Credits + + ListAuxFields diff --git a/rdadmin/rdadmin_es.ts b/rdadmin/rdadmin_es.ts index d93df2d0..3a583997 100644 --- a/rdadmin/rdadmin_es.ts +++ b/rdadmin/rdadmin_es.ts @@ -4484,6 +4484,11 @@ PARA UN PROPÓSITO PARTICULAR. Oprima el botón "Ver licencia" para d Copyright 2002-2019 Copyright 2002-2019 + + View +&Credits + + ListAuxFields diff --git a/rdadmin/rdadmin_fr.ts b/rdadmin/rdadmin_fr.ts index 114a6c6f..5137970e 100644 --- a/rdadmin/rdadmin_fr.ts +++ b/rdadmin/rdadmin_fr.ts @@ -3671,6 +3671,11 @@ PARTICULAR PURPOSE. Touch the "View License" button for details.&Close + + View +&Credits + + ListDropboxes diff --git a/rdadmin/rdadmin_nb.ts b/rdadmin/rdadmin_nb.ts index b33afa65..f169de48 100644 --- a/rdadmin/rdadmin_nb.ts +++ b/rdadmin/rdadmin_nb.ts @@ -4306,6 +4306,11 @@ Klikk på "Lisens"-knappen for fleire opplysningar. Copyright 2002-2019 Copyright 2002-2019 + + View +&Credits + + ListAuxFields diff --git a/rdadmin/rdadmin_nn.ts b/rdadmin/rdadmin_nn.ts index b33afa65..f169de48 100644 --- a/rdadmin/rdadmin_nn.ts +++ b/rdadmin/rdadmin_nn.ts @@ -4306,6 +4306,11 @@ Klikk på "Lisens"-knappen for fleire opplysningar. Copyright 2002-2019 Copyright 2002-2019 + + View +&Credits + + ListAuxFields diff --git a/rdadmin/rdadmin_pt_BR.ts b/rdadmin/rdadmin_pt_BR.ts index c0490a52..359681af 100644 --- a/rdadmin/rdadmin_pt_BR.ts +++ b/rdadmin/rdadmin_pt_BR.ts @@ -4381,6 +4381,11 @@ FINALIDADE PARTICULAR. Aperte o botão VER LICENÇA para mais detalhes.Copyright 2002-2019 Copyright 2002-2009 {2002-2019?} + + View +&Credits + + ListAuxFields