-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make background steams build-optional #7129
base: master
Are you sure you want to change the base?
Conversation
src/ui/mainwindow.cpp
Outdated
#else | ||
ui_->action_rain->setVisible(false); | ||
ui_->action_hypnotoad->setVisible(false); | ||
ui_->action_enterprise->setVisible(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these be removed from mainwindow.ui and added to the extras menu dynamically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be a cleaner solution indeed, but I'm not sure how to deal with the translations of the menus, given that the translations are managed automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can just call tr() like this: https://github.com/clementine-player/Clementine/blob/master/src/ui/mainwindow.cpp#L666
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I'm still unsure about the translation files because there are remaining #: ../bin/src/ui_mainwindow.h:748
which don't match (now it's used in mainwindow.cpp
). I don't know if it could break something. At least it compiles and works fine.
src/engines/gstengine.cpp
Outdated
@@ -860,7 +864,9 @@ shared_ptr<GstEnginePipeline> GstEngine::CreatePipeline( | |||
qLog(Error) << "Could not initialize pipeline" << kEnterprisePipeline; | |||
ret.reset(); | |||
} | |||
} else { | |||
} else | |||
#endif // HAVE_BACKGROUND_STREAMS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe cleaner to return in the two if blocks above and get rid of the else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Added a build option
ENABLE_BACKGROUND_STREAMS
. When disabled, removes background streams (hypnotoad, rain, enterprise) code from the UI and engine with a bunch of#ifdef
. Stays enabled by default. Both option values have been tested.This is simply to make it possible to remove these potentially unwanted features.