aboutsummaryrefslogtreecommitdiff
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-29 16:10:50 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-29 16:10:50 -0600
commit6b2c01ed6063bd7fd12e192668b738a075dc3a24 (patch)
tree423a2d2f6bc1ce45ced31ddc6cf69ea56a4ef98e /src/menu.cpp
parenta64c84b920f3e6ea4b2872f3d709ceab3eb3b700 (diff)
downloadayatana-indicator-datetime-6b2c01ed6063bd7fd12e192668b738a075dc3a24.tar.gz
ayatana-indicator-datetime-6b2c01ed6063bd7fd12e192668b738a075dc3a24.tar.bz2
ayatana-indicator-datetime-6b2c01ed6063bd7fd12e192668b738a075dc3a24.zip
fix instant calendar toggle issue reported in testing by seb128; add a test for this regression
Diffstat (limited to 'src/menu.cpp')
-rw-r--r--src/menu.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index b0ba79d..40a94fa 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -74,6 +74,9 @@ protected:
update_header(); // update header's label
update_section(Locations); // locations' relative time may have changed
});
+ m_state->settings->show_calendar.changed().connect([this](bool){
+ update_section(Calendar);
+ });
m_state->settings->show_events.changed().connect([this](bool){
update_section(Appointments); // showing events got toggled
});
@@ -219,8 +222,8 @@ private:
{
const bool allow_activation = (profile == Desktop)
|| (profile == Phone);
- const bool show_calendar = (profile == Desktop)
- || (profile == DesktopGreeter);
+ const bool show_calendar = m_state->settings->show_calendar.get() &&
+ ((profile == Desktop) || (profile == DesktopGreeter));
auto menu = g_menu_new();
// add a menuitem that shows the current date