MainWindow: Remove engine changed
This commit is contained in:
parent
d26c291a2a
commit
356b7d8e64
|
@ -422,7 +422,7 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||||
app_->player()->SetAnalyzer(ui_->analyzer);
|
app_->player()->SetAnalyzer(ui_->analyzer);
|
||||||
app_->player()->SetEqualizer(equalizer_);
|
app_->player()->SetEqualizer(equalizer_);
|
||||||
app_->player()->Init();
|
app_->player()->Init();
|
||||||
EngineChanged(app_->player()->engine()->type());
|
|
||||||
const uint volume = app_->player()->GetVolume();
|
const uint volume = app_->player()->GetVolume();
|
||||||
ui_->volume->SetValue(volume);
|
ui_->volume->SetValue(volume);
|
||||||
VolumeChanged(volume);
|
VolumeChanged(volume);
|
||||||
|
@ -595,7 +595,6 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||||
// Player connections
|
// Player connections
|
||||||
QObject::connect(ui_->volume, &VolumeSlider::valueChanged, &*app_->player(), &Player::SetVolumeFromSlider);
|
QObject::connect(ui_->volume, &VolumeSlider::valueChanged, &*app_->player(), &Player::SetVolumeFromSlider);
|
||||||
|
|
||||||
QObject::connect(&*app_->player(), &Player::EngineChanged, this, &MainWindow::EngineChanged);
|
|
||||||
QObject::connect(&*app_->player(), &Player::Error, this, &MainWindow::ShowErrorDialog);
|
QObject::connect(&*app_->player(), &Player::Error, this, &MainWindow::ShowErrorDialog);
|
||||||
QObject::connect(&*app_->player(), &Player::SongChangeRequestProcessed, &*app_->playlist_manager(), &PlaylistManager::SongChangeRequestProcessed);
|
QObject::connect(&*app_->player(), &Player::SongChangeRequestProcessed, &*app_->playlist_manager(), &PlaylistManager::SongChangeRequestProcessed);
|
||||||
|
|
||||||
|
@ -942,6 +941,11 @@ MainWindow::MainWindow(Application *app, SharedPtr<SystemTrayIcon> tray_icon, OS
|
||||||
QObject::connect(&*app_->lastfm_import(), &LastFMImport::UpdateLastPlayed, &*app_->collection_backend(), &CollectionBackend::UpdateLastPlayed);
|
QObject::connect(&*app_->lastfm_import(), &LastFMImport::UpdateLastPlayed, &*app_->collection_backend(), &CollectionBackend::UpdateLastPlayed);
|
||||||
QObject::connect(&*app_->lastfm_import(), &LastFMImport::UpdatePlayCount, &*app_->collection_backend(), &CollectionBackend::UpdatePlayCount);
|
QObject::connect(&*app_->lastfm_import(), &LastFMImport::UpdatePlayCount, &*app_->collection_backend(), &CollectionBackend::UpdatePlayCount);
|
||||||
|
|
||||||
|
#if !defined(HAVE_AUDIOCD) || defined(Q_OS_WIN)
|
||||||
|
ui_->action_open_cd->setEnabled(false);
|
||||||
|
ui_->action_open_cd->setVisible(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Load settings
|
// Load settings
|
||||||
qLog(Debug) << "Loading settings";
|
qLog(Debug) << "Loading settings";
|
||||||
settings_.beginGroup(MainWindowSettings::kSettingsGroup);
|
settings_.beginGroup(MainWindowSettings::kSettingsGroup);
|
||||||
|
@ -1358,18 +1362,6 @@ void MainWindow::ExitFinished() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::EngineChanged(const EngineBase::Type enginetype) {
|
|
||||||
|
|
||||||
ui_->action_equalizer->setEnabled(enginetype == EngineBase::Type::GStreamer);
|
|
||||||
#if defined(HAVE_AUDIOCD) && !defined(Q_OS_WIN)
|
|
||||||
ui_->action_open_cd->setEnabled(enginetype == EngineBase::Type::GStreamer);
|
|
||||||
#else
|
|
||||||
ui_->action_open_cd->setEnabled(false);
|
|
||||||
ui_->action_open_cd->setVisible(false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::MediaStopped() {
|
void MainWindow::MediaStopped() {
|
||||||
|
|
||||||
setWindowTitle(u"Strawberry Music Player"_s);
|
setWindowTitle(u"Strawberry Music Player"_s);
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
#include "tagreader/tagreaderclient.h"
|
#include "tagreader/tagreaderclient.h"
|
||||||
#include "engine/enginebase.h"
|
|
||||||
#include "osd/osdbase.h"
|
#include "osd/osdbase.h"
|
||||||
#include "playlist/playlist.h"
|
#include "playlist/playlist.h"
|
||||||
#include "playlist/playlistitem.h"
|
#include "playlist/playlistitem.h"
|
||||||
|
@ -134,7 +133,6 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void FilePathChanged(const QString &path);
|
void FilePathChanged(const QString &path);
|
||||||
|
|
||||||
void EngineChanged(const EngineBase::Type enginetype);
|
|
||||||
void MediaStopped();
|
void MediaStopped();
|
||||||
void MediaPaused();
|
void MediaPaused();
|
||||||
void MediaPlaying();
|
void MediaPlaying();
|
||||||
|
|
Loading…
Reference in New Issue