@@ -20,7 +20,7 @@ import Ubuntu.Settings.Components 0.1
2020import QMenuModel 0.1
2121import Utils 0.1 as Utils
2222import Ubuntu.Components.ListItems 0.1 as ListItems
23−import Ubuntu.Components 1.1
23+import Ubuntu.Components 1.2
2424import Unity.Session 0.1
2525
2626Item {
@@ -58,17 +58,15 @@ Item {
5858 "unity.widgets.systemsettings.tablet.wifisection" : wifiSection,
5959 "unity.widgets.systemsettings.tablet.accesspoint" : accessPoint,
6060 "com.canonical.indicator.network.modeminfoitem" : modeminfoitem,
61− },
62− "indicator-messages" : {
63− "com.canonical.indicator.button" : messagesButtonMenu
64− },
65− "indicator-datetime" : {
61+
6662 "com.canonical.indicator.calendar": calendarMenu,
67− "com.canonical.indicator.location": timezoneMenu
68− },
69− "indicator-session" : {
63+ "com.canonical.indicator.location": timezoneMenu,
64+
7065 "indicator.user-menu-item": userMenuItem,
7166 "indicator.guest-menu-item": userMenuItem
67+ },
68+ "indicator-messages" : {
69+ "com.canonical.indicator.button" : messagesButtonMenu
7270 }
7371 }
7472
@@ -79,11 +77,6 @@ Item {
7977 return defaultValue;
8078 }
8179
82− Utils.TimeFormatter
83− {
84− id: tzFormatter
85− }
86−
8780 Component {
8881 id: separatorMenu;
8982
@@ -448,7 +441,8 @@ Item {
448441 iconSource: menuData && menuData.icon || ""
449442
450443 // would be better to compare with the logname but sadly the indicator doesn't expose that
451− active: DBusUnitySessionService.RealName() !== "" ? DBusUnitySessionService.RealName() == name : DBusUnitySessionService.UserName() == name
444+ active: DBusUnitySessionService.RealName() !== "" ? DBusUnitySessionService.RealName() == name
445+ : DBusUnitySessionService.UserName() == name
452446
453447 onTriggered: {
454448 menuModel.activate(menuIndex);
@@ -480,12 +474,15 @@ Item {
480474 readonly property var tz: getExtendedProperty(extendedData, "xCanonicalTimezone", "UTC")
481475 property var updateTimer: Timer {
482476 repeat: true
483− running: identifier == "indicator-datetime" // only run when we're open
484− onTriggered: tzMenuItem.time = tzFormatter.currentTimeInTimezone(tzMenuItem.tz)
477+ running: identifier == "indicator-datetime" && tzMenuItem.visible // only run when we're open
478+ onTriggered: tzMenuItem.time = Utils.TimezoneFormatter.currentTimeInTimezone(tzMenuItem.tz)
479+ onRunningChanged: {
480+ print("LIVE TIMER RUNNING:", running)
481+ }
485482 }
486483
487484 city: menuData && menuData.label || ""
488− time: tzFormatter.currentTimeInTimezone(tz)
485+ time: Utils.TimezoneFormatter.currentTimeInTimezone(tz)
489486 enabled: menuData && menuData.sensitive || false
490487 highlightWhenPressed: false
491488