Only enable equalizer and analyzer with gstreamer and xine
This commit is contained in:
parent
60a9154326
commit
a499a70633
|
@ -42,6 +42,7 @@
|
|||
#include "rainbowanalyzer.h"
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "engine/enginetype.h"
|
||||
|
||||
const char *AnalyzerContainer::kSettingsGroup = "Analyzer";
|
||||
const char *AnalyzerContainer::kSettingsFramerate = "framerate";
|
||||
|
@ -109,6 +110,8 @@ void AnalyzerContainer::SetActions(QAction *visualisation) {
|
|||
|
||||
void AnalyzerContainer::mouseReleaseEvent(QMouseEvent *e) {
|
||||
|
||||
if (engine_->type() != Engine::EngineType::GStreamer && engine_->type() != Engine::EngineType::Xine) return;
|
||||
|
||||
if (e->button() == Qt::LeftButton) {
|
||||
if (ignore_next_click_) {
|
||||
ignore_next_click_ = false;
|
||||
|
@ -130,6 +133,9 @@ void AnalyzerContainer::ShowPopupMenu() {
|
|||
}
|
||||
|
||||
void AnalyzerContainer::mouseDoubleClickEvent(QMouseEvent*) {
|
||||
|
||||
if (engine_->type() != Engine::EngineType::GStreamer && engine_->type() != Engine::EngineType::Xine) return;
|
||||
|
||||
double_click_timer_->stop();
|
||||
ignore_next_click_ = true;
|
||||
|
||||
|
|
|
@ -468,6 +468,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
|
|||
connect(app_->player(), SIGNAL(Playing()), ui_->playlist, SLOT(ActivePlaying()));
|
||||
connect(app_->player(), SIGNAL(Stopped()), ui_->playlist, SLOT(ActiveStopped()));
|
||||
|
||||
connect(app_->player(), SIGNAL(Playing()), osd_, SLOT(Playing()));
|
||||
connect(app_->player(), SIGNAL(Paused()), osd_, SLOT(Paused()));
|
||||
connect(app_->player(), SIGNAL(Stopped()), osd_, SLOT(Stopped()));
|
||||
connect(app_->player(), SIGNAL(PlaylistFinished()), osd_, SLOT(PlaylistFinished()));
|
||||
|
@ -891,12 +892,8 @@ void MainWindow::RefreshStyleSheet() {
|
|||
|
||||
void MainWindow::EngineChanged(Engine::EngineType enginetype) {
|
||||
|
||||
if (enginetype == Engine::EngineType::GStreamer) {
|
||||
ui_->action_open_cd->setEnabled(true);
|
||||
}
|
||||
else {
|
||||
ui_->action_open_cd->setEnabled(false);
|
||||
}
|
||||
ui_->action_equalizer->setEnabled(enginetype == Engine::EngineType::GStreamer || enginetype == Engine::EngineType::Xine);
|
||||
ui_->action_open_cd->setEnabled(enginetype == Engine::EngineType::GStreamer);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue