diff --git a/cockatrice/src/settings/cache_settings.cpp b/cockatrice/src/settings/cache_settings.cpp index 65229bee0..8292f40df 100644 --- a/cockatrice/src/settings/cache_settings.cpp +++ b/cockatrice/src/settings/cache_settings.cpp @@ -237,6 +237,7 @@ SettingsCache::SettingsCache() redirectCacheTtl = settings->value("personal/redirectCacheTtl", NETWORK_REDIRECT_CACHE_TTL_DEFAULT).toInt(); picDownload = settings->value("personal/picturedownload", true).toBool(); + showStatusBar = settings->value("personal/showStatusBar", true).toBool(); mainWindowGeometry = settings->value("interface/main_window_geometry").toByteArray(); tokenDialogGeometry = settings->value("interface/token_dialog_geometry").toByteArray(); @@ -589,6 +590,13 @@ void SettingsCache::setPicDownload(QT_STATE_CHANGED_T _picDownload) emit picDownloadChanged(); } +void SettingsCache::setShowStatusBar(bool value) +{ + showStatusBar = value; + settings->setValue("personal/showStatusBar", showStatusBar); + emit showStatusBarChanged(value); +} + void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled) { notificationsEnabled = static_cast(_notificationsEnabled); diff --git a/cockatrice/src/settings/cache_settings.h b/cockatrice/src/settings/cache_settings.h index d64e74750..dd8cade5b 100644 --- a/cockatrice/src/settings/cache_settings.h +++ b/cockatrice/src/settings/cache_settings.h @@ -55,6 +55,7 @@ signals: void cardDatabasePathChanged(); void themeChanged(); void picDownloadChanged(); + void showStatusBarChanged(bool state); void displayCardNamesChanged(); void overrideAllCardArtWithPersonalPreferenceChanged(bool _overrideAllCardArtWithPersonalPreference); void bumpSetsWithCardsInDeckToTopChanged(); @@ -222,6 +223,7 @@ private: QList releaseChannels; bool isPortableBuild; bool roundCardCorners; + bool showStatusBar; public: SettingsCache(); @@ -333,6 +335,10 @@ public: { return picDownload; } + bool getShowStatusBar() const + { + return showStatusBar; + } bool getNotificationsEnabled() const { return notificationsEnabled; @@ -828,6 +834,7 @@ public slots: void setChatMentionColor(const QString &_chatMentionColor); void setChatHighlightColor(const QString &_chatHighlightColor); void setPicDownload(QT_STATE_CHANGED_T _picDownload); + void setShowStatusBar(bool value); void setNotificationsEnabled(QT_STATE_CHANGED_T _notificationsEnabled); void setSpectatorNotificationsEnabled(QT_STATE_CHANGED_T _spectatorNotificationsEnabled); void setBuddyConnectNotificationsEnabled(QT_STATE_CHANGED_T _buddyConnectNotificationsEnabled); diff --git a/dbconverter/src/mocks.cpp b/dbconverter/src/mocks.cpp index ad9738a19..601ba706d 100644 --- a/dbconverter/src/mocks.cpp +++ b/dbconverter/src/mocks.cpp @@ -160,6 +160,9 @@ void SettingsCache::setTabLogOpen(bool /*value*/) void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */) { } +void SettingsCache::setShowStatusBar(bool /* value */) +{ +} void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */) { } diff --git a/tests/carddatabase/mocks.cpp b/tests/carddatabase/mocks.cpp index 05d0d2244..157595d2b 100644 --- a/tests/carddatabase/mocks.cpp +++ b/tests/carddatabase/mocks.cpp @@ -164,6 +164,9 @@ void SettingsCache::setTabLogOpen(bool /*value*/) void SettingsCache::setPicDownload(QT_STATE_CHANGED_T /* _picDownload */) { } +void SettingsCache::setShowStatusBar(bool /* value */) +{ +} void SettingsCache::setNotificationsEnabled(QT_STATE_CHANGED_T /* _notificationsEnabled */) { }