From e3581269600fdc7744ffd1edfabd235957fccede Mon Sep 17 00:00:00 2001 From: Adam Leung <adamjleung123@gmail.com> Date: Tue, 17 Aug 2021 18:39:14 +1000 Subject: [PATCH] qt: Removed legacy firstrun dialog --- modules/gui/qt/Makefile.am | 2 - modules/gui/qt/dialogs/firstrun/firstrun.cpp | 108 ------------------ modules/gui/qt/dialogs/firstrun/firstrun.hpp | 46 -------- .../gui/qt/maininterface/main_interface.cpp | 1 - po/POTFILES.in | 2 - 5 files changed, 159 deletions(-) delete mode 100644 modules/gui/qt/dialogs/firstrun/firstrun.cpp delete mode 100644 modules/gui/qt/dialogs/firstrun/firstrun.hpp diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am index f6631fa578dc..999d4d3d5867 100644 --- a/modules/gui/qt/Makefile.am +++ b/modules/gui/qt/Makefile.am @@ -82,7 +82,6 @@ libqt_plugin_la_SOURCES = \ gui/qt/dialogs/fingerprint/chromaprint.hpp \ gui/qt/dialogs/fingerprint/fingerprintdialog.cpp \ gui/qt/dialogs/fingerprint/fingerprintdialog.hpp \ - gui/qt/dialogs/firstrun/firstrun.cpp gui/qt/dialogs/firstrun/firstrun.hpp \ gui/qt/dialogs/firstrun/firstrunwizard.cpp gui/qt/dialogs/firstrun/firstrunwizard.hpp \ gui/qt/dialogs/gototime/gototime.cpp gui/qt/dialogs/gototime/gototime.hpp \ gui/qt/dialogs/help/aboutmodel.cpp \ @@ -314,7 +313,6 @@ nodist_libqt_plugin_la_SOURCES = \ gui/qt/dialogs/extensions/extensions_manager.moc.cpp \ gui/qt/dialogs/fingerprint/chromaprint.moc.cpp \ gui/qt/dialogs/fingerprint/fingerprintdialog.moc.cpp \ - gui/qt/dialogs/firstrun/firstrun.moc.cpp \ gui/qt/dialogs/firstrun/firstrunwizard.moc.cpp \ gui/qt/dialogs/gototime/gototime.moc.cpp \ gui/qt/dialogs/help/aboutmodel.moc.cpp \ diff --git a/modules/gui/qt/dialogs/firstrun/firstrun.cpp b/modules/gui/qt/dialogs/firstrun/firstrun.cpp deleted file mode 100644 index 215a786c2b73..000000000000 --- a/modules/gui/qt/dialogs/firstrun/firstrun.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/***************************************************************************** - * firstrun.cpp : First Run dialogs - **************************************************************************** - * Copyright © 2009 VideoLAN - * - * Authors: Jean-Baptiste Kempf <jb (at) videolan.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ - -#include "firstrun.hpp" - -#include <QGridLayout> -#include <QGroupBox> -#include <QCheckBox> -#include <QLabel> -#include <QDialogButtonBox> - -FirstRun::FirstRun( QWidget *_p, qt_intf_t *_p_intf ) - : QWidget( _p ), p_intf( _p_intf ) -{ - msg_Dbg( p_intf, "Boring first Run Wizard" ); - buildPrivDialog(); - setVisible( true ); -} - -void FirstRun::save() -{ - config_PutInt( "metadata-network-access", checkbox->isChecked() ); -#ifdef UPDATE_CHECK - config_PutInt( "qt-updates-notif", checkbox2->isChecked() ); -#endif - config_PutInt( "qt-privacy-ask", 0 ); - - /* We have to save here because the user may not launch Prefs */ - config_SaveConfigFile( p_intf ); - close(); -} - -void FirstRun::buildPrivDialog() -{ - setWindowTitle( qtr( "Privacy and Network Access Policy" ) ); - setWindowRole( "vlc-privacy" ); - setWindowModality( Qt::ApplicationModal ); - setWindowFlags( Qt::Dialog ); - setAttribute( Qt::WA_DeleteOnClose ); - - QGridLayout *gLayout = new QGridLayout( this ); - - QGroupBox *blabla = new QGroupBox( qtr( "Privacy and Network Access Policy" ) ); - QGridLayout *blablaLayout = new QGridLayout( blabla ); - QLabel *text = new QLabel( qtr( - "<p>In order to protect your privacy, <i>VLC media player</i> " - "does <b>not</b> collect personal data or transmit them, " - "not even in anonymized form, to anyone." - "</p>\n" - "<p>Nevertheless, <i>VLC</i> is able to automatically retrieve " - "information about the media in your playlist from third party " - "Internet-based services. This includes cover art, track names, " - "artist names and other meta-data." - "</p>\n" - "<p>Consequently, this may entail identifying some of your media files to third party " - "entities. Therefore the <i>VLC</i> developers require your express " - "consent for the media player to access the Internet automatically." - "</p>\n" - ) ); - text->setWordWrap( true ); - text->setTextFormat( Qt::RichText ); - - blablaLayout->addWidget( text, 0, 0 ) ; - - QGroupBox *options = new QGroupBox( qtr( "Network Access Policy" ) ); - QGridLayout *optionsLayout = new QGridLayout( options ); - - gLayout->addWidget( blabla, 0, 0, 1, 3 ); - gLayout->addWidget( options, 1, 0, 1, 3 ); - int line = 0; - - checkbox = new QCheckBox( qtr( "Allow metadata network access" ) ); - checkbox->setChecked( true ); - optionsLayout->addWidget( checkbox, line++, 0 ); - -#ifdef UPDATE_CHECK - checkbox2 = new QCheckBox( qtr( "Regularly check for VLC updates" ) ); - checkbox2->setChecked( true ); - optionsLayout->addWidget( checkbox2, line++, 0 ); -#endif - - QDialogButtonBox *buttonsBox = new QDialogButtonBox( this ); - buttonsBox->addButton( qtr( "Continue" ), QDialogButtonBox::AcceptRole ); - - gLayout->addWidget( buttonsBox, 2, 0, 2, 3 ); - - CONNECT( buttonsBox, accepted(), this, save() ); - buttonsBox->setFocus(); -} diff --git a/modules/gui/qt/dialogs/firstrun/firstrun.hpp b/modules/gui/qt/dialogs/firstrun/firstrun.hpp deleted file mode 100644 index 35fbdcfc3203..000000000000 --- a/modules/gui/qt/dialogs/firstrun/firstrun.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/***************************************************************************** - * firstrun.hpp : First Run dialogs - **************************************************************************** - * Copyright © 2009 VideoLAN - * - * Authors: Jean-Baptiste Kempf <jb (at) videolan.org> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ - -#include "qt.hpp" - -#include <QWidget> -#include <QSettings> - -class QCheckBox; -class FirstRun : public QWidget -{ - Q_OBJECT - public: - static void CheckAndRun( QWidget *_p, qt_intf_t *p_intf ) - { - if( var_InheritBool( p_intf, "qt-privacy-ask") ) - new FirstRun( _p, p_intf ); - } - FirstRun( QWidget *, qt_intf_t * ); - private: - QCheckBox *checkbox, *checkbox2; - qt_intf_t *p_intf; - void buildPrivDialog(); - private slots: - void save(); -}; - diff --git a/modules/gui/qt/maininterface/main_interface.cpp b/modules/gui/qt/maininterface/main_interface.cpp index eaa9a777124a..9c1b760d6845 100644 --- a/modules/gui/qt/maininterface/main_interface.cpp +++ b/modules/gui/qt/maininterface/main_interface.cpp @@ -39,7 +39,6 @@ #include "util/color_scheme_model.hpp" #include "widgets/native/interface_widgets.hpp" // bgWidget, videoWidget -#include "dialogs/firstrun/firstrun.hpp" // First Run #include "playlist/playlist_model.hpp" #include "playlist/playlist_controller.hpp" diff --git a/po/POTFILES.in b/po/POTFILES.in index 63015333eb10..307e44c3617d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -731,8 +731,6 @@ modules/gui/qt/dialogs/extensions/extensions.cpp modules/gui/qt/dialogs/extensions/extensions.hpp modules/gui/qt/dialogs/fingerprint/fingerprintdialog.cpp modules/gui/qt/dialogs/fingerprint/fingerprintdialog.hpp -modules/gui/qt/dialogs/firstrun/firstrun.cpp -modules/gui/qt/dialogs/firstrun/firstrun.hpp modules/gui/qt/dialogs/firstrun/firstrunwizard.cpp modules/gui/qt/dialogs/firstrun/firstrunwizard.hpp modules/gui/qt/dialogs/gototime/gototime.cpp -- GitLab