aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-24 10:49:00 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-03-24 10:49:00 -0500
commitf88a1cf792c1b8786db5f447fed148fcd2166d07 (patch)
tree9c0ee62ef6bcb3e6e8e60b4681ce72e71dd84dae
parent18013dbb911de3d71ad679f697490f161ec19a34 (diff)
downloadayatana-indicator-datetime-f88a1cf792c1b8786db5f447fed148fcd2166d07.tar.gz
ayatana-indicator-datetime-f88a1cf792c1b8786db5f447fed148fcd2166d07.tar.bz2
ayatana-indicator-datetime-f88a1cf792c1b8786db5f447fed148fcd2166d07.zip
fix settings menuitem label on the desktop.
-rw-r--r--src/menu.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index ff5b722..2768a2c 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -388,15 +388,17 @@ private:
GMenuModel* create_settings_section(Profile profile)
{
auto menu = g_menu_new();
+ const char * action_name;
if (profile == Desktop)
- {
- g_menu_append (menu, _("Date & Time Settings…"), "indicator.desktop.open-settings-app");
- }
+ action_name = "indicator.desktop.open-settings-app";
else if (profile == Phone)
- {
- g_menu_append (menu, _("Time & Date settings…"), "indicator.phone.open-settings-app");
- }
+ action_name = "indicator.phone.open-settings-app";
+ else
+ action_name = nullptr;
+
+ if (action_name != nullptr)
+ g_menu_append (menu, _("Time & Date settings…"), action_name);
return G_MENU_MODEL (menu);
}