# HG changeset patch # User Chris Cannam # Date 1488050653 0 # Node ID 3f6c18fcc075765712a9f8f3f08e85a32dcdf574 # Parent 21befacf6cae9a86d89eff697c801a9cd9d2394c Rework network permission tester to note that aggregate info may be used, and tweak for clarity diff -r 21befacf6cae -r 3f6c18fcc075 main/MainWindow.cpp --- a/main/MainWindow.cpp Fri Feb 24 15:57:13 2017 +0000 +++ b/main/MainWindow.cpp Sat Feb 25 19:24:13 2017 +0000 @@ -319,7 +319,7 @@ connect(m_midiInput, SIGNAL(eventsAvailable()), this, SLOT(midiEventsAvailable())); - NetworkPermissionTester tester; + NetworkPermissionTester tester(withOSCSupport); bool networkPermission = tester.havePermission(); if (networkPermission) { if (withOSCSupport) { diff -r 21befacf6cae -r 3f6c18fcc075 main/NetworkPermissionTester.cpp --- a/main/NetworkPermissionTester.cpp Fri Feb 24 15:57:13 2017 +0000 +++ b/main/NetworkPermissionTester.cpp Sat Feb 25 19:24:13 2017 +0000 @@ -46,24 +46,43 @@ QGridLayout *layout = new QGridLayout; d.setLayout(layout); + QString preamble; + preamble = QCoreApplication::translate + ("NetworkPermissionTester", + "

Welcome to Sonic Visualiser!

" + "

Sonic Visualiser is a program for viewing and exploring audio data for semantic music analysis and annotation.

" + "

Developed in the Centre for Digital Music at Queen Mary University of London, Sonic Visualiser is open source software under the GNU General Public License.

" + "


" + "

Before we go on...

" + "

Sonic Visualiser would like permission to use the network.

"); + + QString bullets; + if (m_withOSC) { + bullets = QCoreApplication::translate + ("NetworkPermissionTester", + "

This is to:

" + ""); + } else { + bullets = QCoreApplication::translate + ("NetworkPermissionTester", + "

This is to:

" + ""); + } + + QString postamble; + postamble = QCoreApplication::translate + ("NetworkPermissionTester", + "

No personal information will be sent, no tracking is carried out, and no individual information will be shared with anyone else. We will however make aggregate counts of distinct requests for usage reporting.

" + "

We recommend that you allow this, because it makes Sonic Visualiser more useful to you and supports the public funding of this work. But if you do not wish to allow it, please un-check the box below.

"); + QLabel *label = new QLabel; label->setWordWrap(true); - label->setText - (QCoreApplication::translate - ("NetworkPermissionTester", - "

Welcome to Sonic Visualiser!

" - "

Sonic Visualiser is a program for viewing and exploring audio data for semantic music analysis and annotation.

" - "

Developed in the Centre for Digital Music at Queen Mary, University of London, Sonic Visualiser is provided free as open source software under the GNU General Public License.

" - "


" - "

Before we go on...

" - "

Sonic Visualiser would like to make networking connections and open a network port.

" - "

This is to:

" - "" - "

No personal information will be sent, no tracking is carried out, and all requests happen in the background without interrupting your work.

" - "

We recommend that you allow this, because it makes Sonic Visualiser more useful. But if you do not wish to do so, please un-check the box below.

")); + label->setText(preamble + bullets + postamble); layout->addWidget(label, 0, 0); QCheckBox *cb = new QCheckBox(QCoreApplication::translate("NetworkPermissionTester", "Allow this")); diff -r 21befacf6cae -r 3f6c18fcc075 main/NetworkPermissionTester.h --- a/main/NetworkPermissionTester.h Fri Feb 24 15:57:13 2017 +0000 +++ b/main/NetworkPermissionTester.h Sat Feb 25 19:24:13 2017 +0000 @@ -18,8 +18,11 @@ class NetworkPermissionTester { public: - NetworkPermissionTester() { } + NetworkPermissionTester(bool withOSCSupport) : m_withOSC(withOSCSupport) { } bool havePermission(); + +private: + bool m_withOSC; }; #endif