diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3e214d1bf..7253b485b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -173,6 +173,7 @@ set(SOURCES internet/core/internetmodel.cpp internet/core/internetplaylistitem.cpp internet/core/internetservice.cpp + internet/core/internetsettingscategory.cpp internet/core/internetshowsettingspage.cpp internet/core/internetview.cpp internet/core/internetviewcontainer.cpp diff --git a/src/internet/core/internetsettingscategory.cpp b/src/internet/core/internetsettingscategory.cpp new file mode 100644 index 000000000..5738b3066 --- /dev/null +++ b/src/internet/core/internetsettingscategory.cpp @@ -0,0 +1,24 @@ +/* This file is part of Clementine. + Copyright 2021, Jim Broadus + + Clementine 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 3 of the License, or + (at your option) any later version. + + Clementine 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 Clementine. If not, see . +*/ + +#include "internetsettingscategory.h" + +#include "internetshowsettingspage.h" + +InternetSettingsCategory::InternetSettingsCategory(SettingsDialog* dialog) + : SettingsCategory(SettingsDialog::Page_InternetShow, + new InternetShowSettingsPage(dialog), dialog) {} diff --git a/src/internet/core/internetsettingscategory.h b/src/internet/core/internetsettingscategory.h new file mode 100644 index 000000000..c5b116f06 --- /dev/null +++ b/src/internet/core/internetsettingscategory.h @@ -0,0 +1,28 @@ +/* This file is part of Clementine. + Copyright 2021, Jim Broadus + + Clementine 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 3 of the License, or + (at your option) any later version. + + Clementine 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 Clementine. If not, see . +*/ + +#ifndef INTERNETSETTINGSCATEGORY_H +#define INTERNETSETTINGSCATEGORY_H + +#include "ui/settingscategory.h" + +class InternetSettingsCategory : public SettingsCategory { + public: + InternetSettingsCategory(SettingsDialog* dialog); +}; + +#endif // INTERNETSETTINGSCATEGORY_H diff --git a/src/ui/settingsdialog.cpp b/src/ui/settingsdialog.cpp index 28f78d714..ff98643b4 100644 --- a/src/ui/settingsdialog.cpp +++ b/src/ui/settingsdialog.cpp @@ -31,7 +31,7 @@ #include "globalsearch/globalsearchsettingspage.h" #include "globalshortcutssettingspage.h" #include "iconloader.h" -#include "internet/core/internetshowsettingspage.h" +#include "internet/core/internetsettingscategory.h" #include "internet/digitally/digitallyimportedsettingspage.h" #include "internet/magnatune/magnatunesettingspage.h" #include "internet/podcasts/podcastsettingspage.h" @@ -170,9 +170,7 @@ SettingsDialog::SettingsDialog(Application* app, BackgroundStreams* streams, SIGNAL(NotificationPreview(OSD::Behaviour, QString, QString))); // Internet providers - InternetShowSettingsPage* internet_page = new InternetShowSettingsPage(this); - SettingsCategory* providers = - new SettingsCategory(Page_InternetShow, internet_page, this); + SettingsCategory* providers = new InternetSettingsCategory(this); AddCategory(providers); #ifdef HAVE_LIBLASTFM