From 24d102c12a1470726c1d5321a918825cd3d18527 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 3 Sep 2020 00:41:17 +0200 Subject: gsettings: Drop the 'show-clock' setting. Always show the clock. The 'show-clock' gsetting option made it possible to "hide" the time from the indicator. Fixes AyatanaIndicator/ayatana-indicator-datetime#16. --- src/settings-live.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/settings-live.cpp') diff --git a/src/settings-live.cpp b/src/settings-live.cpp index 206b762..5c2addb 100644 --- a/src/settings-live.cpp +++ b/src/settings-live.cpp @@ -41,7 +41,6 @@ LiveSettings::LiveSettings(): update_custom_time_format(); update_locations(); update_show_calendar(); - update_show_clock(); update_show_date(); update_show_day(); update_show_detected_locations(); @@ -78,10 +77,6 @@ LiveSettings::LiveSettings(): g_settings_set_boolean(m_settings, SETTINGS_SHOW_CALENDAR_S, value); }); - show_clock.changed().connect([this](bool value){ - g_settings_set_boolean(m_settings, SETTINGS_SHOW_CLOCK_S, value); - }); - show_date.changed().connect([this](bool value){ g_settings_set_boolean(m_settings, SETTINGS_SHOW_DATE_S, value); }); @@ -174,11 +169,6 @@ void LiveSettings::update_show_calendar() show_calendar.set(val); } -void LiveSettings::update_show_clock() -{ - show_clock.set(g_settings_get_boolean(m_settings, SETTINGS_SHOW_CLOCK_S)); -} - void LiveSettings::update_show_date() { show_date.set(g_settings_get_boolean(m_settings, SETTINGS_SHOW_DATE_S)); @@ -284,9 +274,7 @@ void LiveSettings::on_changed(GSettings* /*settings*/, void LiveSettings::update_key(const std::string& key) { - if (key == SETTINGS_SHOW_CLOCK_S) - update_show_clock(); - else if (key == SETTINGS_LOCATIONS_S) + if (key == SETTINGS_LOCATIONS_S) update_locations(); else if (key == SETTINGS_TIME_FORMAT_S) update_time_format_mode(); -- cgit v1.2.3