Let's disable title updating by default on non-Windows platform because it seems inherently problematic.

This commit is contained in:
casey langen 2020-12-19 16:58:56 -08:00
parent 30f4a5ed58
commit 5b1f07c953
4 changed files with 15 additions and 2 deletions

View File

@ -332,7 +332,10 @@ void MainLayout::OnIndexerFinished(int count) {
}
void MainLayout::OnTrackChanged(size_t index, musik::core::TrackPtr track) {
if (prefs->GetBool(cube::prefs::keys::DisableWindowTitleUpdates, false)) {
if (prefs->GetBool(
cube::prefs::keys::DisableWindowTitleUpdates,
cube::prefs::defaults::DisableWindowTitleUpdates))
{
return;
}

View File

@ -124,7 +124,7 @@ static inline std::shared_ptr<ISchema> AdvancedSettingsSchema() {
schema->AddInt(core::prefs::keys::PlaybackTrackQueryTimeoutMs, 5000);
schema->AddBool(core::prefs::keys::AsyncTrackListQueries, true);
schema->AddBool(cube::prefs::keys::DisableRatingColumn, false);
schema->AddBool(cube::prefs::keys::DisableWindowTitleUpdates, false);
schema->AddBool(cube::prefs::keys::DisableWindowTitleUpdates, cube::prefs::defaults::DisableWindowTitleUpdates);
schema->AddString(cube::prefs::keys::RatingPositiveChar, kFilledStar.c_str());
schema->AddString(cube::prefs::keys::RatingNegativeChar, kEmptyStar.c_str());
schema->AddBool(core::prefs::keys::IndexerLogEnabled, false);

View File

@ -63,5 +63,11 @@ namespace musik { namespace cube { namespace prefs {
const std::string keys::DisableWindowTitleUpdates = "DisableWindowTitleUpdates";
const std::string keys::AppQuitKey = "AppQuitKey";
#ifdef WIN32
const bool defaults::DisableWindowTitleUpdates = false;
#else
const bool defaults::DisableWindowTitleUpdates = true;
#endif
} } }

View File

@ -66,5 +66,9 @@ namespace musik { namespace cube { namespace prefs {
extern const std::string AppQuitKey;
}
namespace defaults {
extern const bool DisableWindowTitleUpdates;
}
} } }