Added the ability to disable window title updates.

This commit is contained in:
casey langen 2020-05-24 11:01:06 -07:00
parent aefb02ba3c
commit 6972a1df47
4 changed files with 5 additions and 2 deletions

View File

@ -128,7 +128,7 @@ void MainLayout::OnLayout() {
if (this->library->Indexer()->GetState() == IIndexer::StateIndexing) {
size_t cx = this->GetContentWidth();
this->SetPadding(1, 0, 0, 0);
this->syncing->MoveAndResize(0, 0, cx, 1);
this->syncing->MoveAndResize(0, 0, (int) cx, 1);
this->syncing->Show();
if (this->syncUpdateCount == 0) {
@ -234,7 +234,7 @@ void MainLayout::OnIndexerFinished(int count) {
}
void MainLayout::OnTrackChanged(size_t index, musik::core::TrackPtr track) {
if (!track) {
if (prefs->GetBool(cube::prefs::keys::DisableWindowTitleUpdates, false) || !track) {
App::Instance().SetTitle("musikcube");
}
else {

View File

@ -118,6 +118,7 @@ static inline std::shared_ptr<ISchema> AdvancedSettingsSchema() {
#endif
schema->AddBool(cube::prefs::keys::AutoHideCommandBar, false);
schema->AddBool(cube::prefs::keys::DisableRatingColumn, false);
schema->AddBool(cube::prefs::keys::DisableWindowTitleUpdates, false);
schema->AddString(cube::prefs::keys::RatingPositiveChar, kFilledStar.c_str());
schema->AddString(cube::prefs::keys::RatingNegativeChar, kEmptyStar.c_str());
schema->AddString(core::prefs::keys::AuddioApiToken, "");

View File

@ -58,6 +58,7 @@ namespace musik { namespace cube { namespace prefs {
const std::string keys::RatingNegativeChar = "RatingNegativeChar";
const std::string keys::AutoHideCommandBar = "AutoHideCommandBar";
const std::string keys::DisableRatingColumn = "DisableRatingColumn";
const std::string keys::DisableWindowTitleUpdates = "DisableWindowTitleUpdates";
const std::string keys::AppQuitKey = "AppQuitKey";
} } }

View File

@ -60,6 +60,7 @@ namespace musik { namespace cube { namespace prefs {
extern const std::string RatingNegativeChar;
extern const std::string AutoHideCommandBar;
extern const std::string DisableRatingColumn;
extern const std::string DisableWindowTitleUpdates;
extern const std::string AppQuitKey;
}