on xenial help sign in
improve the System indicator title, location item live updates, session item check status
commitd732c855a1d92fc3ac3dc03c5f1f082446db07f4 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 16 Sep 2015, 00:50 (11 years ago) parent0f4c4fd
7 files changed+48−50
po/unity8.pot+36−34 qml/Panel/IndicatorItem.qml+1−1 qml/Panel/IndicatorPage.qml+1−1 qml/Panel/Indicators/IndicatorDelegate.qml+1−1 qml/Panel/Indicators/MenuItemFactory.qml+7−11 qml/Panel/Indicators/MessageMenuItemFactory.qml+1−1 qml/Panel/Indicators/client/IndicatorRepresentation.qml+1−1
po/unity8.pot+36−34
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: unity8\n"
1010"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2015-08-25 14:53+0200\n"
11+"POT-Creation-Date: 2015-09-16 00:49+0200\n"
1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
1818"Content-Transfer-Encoding: 8bit\n"
1919"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
2020
21−#: plugins/LightDM/Greeter.cpp:112
21+#: plugins/IntegratedLightDM/Greeter.cpp:112
2222msgid "Password: "
2323msgstr ""
2424
@@ -134,83 +134,83 @@ msgid_plural "Please wait %1 minutes and then try again…"
134134msgstr[0] ""
135135msgstr[1] ""
136136
137−#: qml/Components/Dialogs.qml:112
137+#: qml/Components/Dialogs.qml:115
138138msgctxt "Title: Lock/Log out dialog"
139139msgid "Log out"
140140msgstr ""
141141
142−#: qml/Components/Dialogs.qml:113
142+#: qml/Components/Dialogs.qml:116
143143msgid "Are you sure you want to log out?"
144144msgstr ""
145145
146−#: qml/Components/Dialogs.qml:115
146+#: qml/Components/Dialogs.qml:118
147147msgctxt "Button: Lock the system"
148148msgid "Lock"
149149msgstr ""
150150
151−#: qml/Components/Dialogs.qml:122
151+#: qml/Components/Dialogs.qml:125
152152msgctxt "Button: Log out from the system"
153153msgid "Log Out"
154154msgstr ""
155155
156−#: qml/Components/Dialogs.qml:129 qml/Components/Dialogs.qml:162
157−#: qml/Components/Dialogs.qml:221
156+#: qml/Components/Dialogs.qml:132 qml/Components/Dialogs.qml:165
157+#: qml/Components/Dialogs.qml:224
158158msgid "Cancel"
159159msgstr ""
160160
161−#: qml/Components/Dialogs.qml:141
161+#: qml/Components/Dialogs.qml:144
162162msgctxt "Title: Reboot/Shut down dialog"
163163msgid "Shut down"
164164msgstr ""
165165
166−#: qml/Components/Dialogs.qml:142
166+#: qml/Components/Dialogs.qml:145
167167msgid "Are you sure you want to shut down?"
168168msgstr ""
169169
170−#: qml/Components/Dialogs.qml:144
170+#: qml/Components/Dialogs.qml:147
171171msgctxt "Button: Reboot the system"
172172msgid "Reboot"
173173msgstr ""
174174
175−#: qml/Components/Dialogs.qml:153
175+#: qml/Components/Dialogs.qml:156
176176msgctxt "Button: Shut down the system"
177177msgid "Shut down"
178178msgstr ""
179179
180−#: qml/Components/Dialogs.qml:175
180+#: qml/Components/Dialogs.qml:178
181181msgctxt "Title: Reboot dialog"
182182msgid "Reboot"
183183msgstr ""
184184
185−#: qml/Components/Dialogs.qml:176
185+#: qml/Components/Dialogs.qml:179
186186msgid "Are you sure you want to reboot?"
187187msgstr ""
188188
189−#: qml/Components/Dialogs.qml:178
189+#: qml/Components/Dialogs.qml:181
190190msgid "No"
191191msgstr ""
192192
193−#: qml/Components/Dialogs.qml:185
193+#: qml/Components/Dialogs.qml:188
194194msgid "Yes"
195195msgstr ""
196196
197−#: qml/Components/Dialogs.qml:200
197+#: qml/Components/Dialogs.qml:203
198198msgctxt "Title: Power off/Restart dialog"
199199msgid "Power"
200200msgstr ""
201201
202−#: qml/Components/Dialogs.qml:201
202+#: qml/Components/Dialogs.qml:204
203203msgid ""
204204"Are you sure you would like\n"
205205"to power off?"
206206msgstr ""
207207
208−#: qml/Components/Dialogs.qml:203
208+#: qml/Components/Dialogs.qml:206
209209msgctxt "Button: Power off the system"
210210msgid "Power off"
211211msgstr ""
212212
213−#: qml/Components/Dialogs.qml:212
213+#: qml/Components/Dialogs.qml:215
214214msgctxt "Button: Restart the system"
215215msgid "Restart"
216216msgstr ""
@@ -271,8 +271,10 @@ msgstr ""
271271msgid "Less..."
272272msgstr ""
273273
274−#: qml/Dash/Previews/PreviewCommentInput.qml:61
275−#: qml/Dash/Previews/PreviewRatingInput.qml:169
274+#: qml/Dash/Previews/PreviewCommentInput.qml:68
275+#: qml/Dash/Previews/PreviewRatingInput.qml:174
276+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:148
277+#: qml/Panel/Indicators/MessageMenuItemFactory.qml:205
276278msgid "Send"
277279msgstr ""
278280
@@ -387,62 +389,62 @@ msgstr ""
387389msgid "Conference"
388390msgstr ""
389391
390−#: qml/Panel/Indicators/MenuItemFactory.qml:674
392+#: qml/Panel/Indicators/MenuItemFactory.qml:718
391393msgid "Nothing is playing"
392394msgstr ""
393395
394−#: qml/Panel/Indicators/MenuItemFactory.qml:803
396+#: qml/Panel/Indicators/MenuItemFactory.qml:847
395397#, qt-format
396398msgid "%1 hour"
397399msgid_plural "%1 hours"
398400msgstr[0] ""
399401msgstr[1] ""
400402
401−#: qml/Panel/Indicators/MenuItemFactory.qml:807
403+#: qml/Panel/Indicators/MenuItemFactory.qml:851
402404#, qt-format
403405msgid "%1 minute"
404406msgid_plural "%1 minutes"
405407msgstr[0] ""
406408msgstr[1] ""
407409
408−#: qml/Panel/Indicators/MenuItemFactory.qml:812
410+#: qml/Panel/Indicators/MenuItemFactory.qml:856
409411#, qt-format
410412msgid "%1 second"
411413msgid_plural "%1 seconds"
412414msgstr[0] ""
413415msgstr[1] ""
414416
415−#: qml/Panel/Indicators/MenuItemFactory.qml:815
417+#: qml/Panel/Indicators/MenuItemFactory.qml:859
416418msgid "0 seconds"
417419msgstr ""
418420
419421#. Translators: String like "1 hour, 2 minutes, 3 seconds remaining"
420−#: qml/Panel/Indicators/MenuItemFactory.qml:817
422+#: qml/Panel/Indicators/MenuItemFactory.qml:861
421423#, qt-format
422424msgid "%1 remaining"
423425msgstr ""
424426
425−#: qml/Panel/Indicators/MenuItemFactory.qml:823
427+#: qml/Panel/Indicators/MenuItemFactory.qml:867
426428msgid "In queue…"
427429msgstr ""
428430
429−#: qml/Panel/Indicators/MenuItemFactory.qml:827
431+#: qml/Panel/Indicators/MenuItemFactory.qml:871
430432msgid "Downloading"
431433msgstr ""
432434
433−#: qml/Panel/Indicators/MenuItemFactory.qml:829
435+#: qml/Panel/Indicators/MenuItemFactory.qml:873
434436msgid "Paused, tap to resume"
435437msgstr ""
436438
437−#: qml/Panel/Indicators/MenuItemFactory.qml:831
439+#: qml/Panel/Indicators/MenuItemFactory.qml:875
438440msgid "Canceled"
439441msgstr ""
440442
441−#: qml/Panel/Indicators/MenuItemFactory.qml:833
443+#: qml/Panel/Indicators/MenuItemFactory.qml:877
442444msgid "Finished"
443445msgstr ""
444446
445−#: qml/Panel/Indicators/MenuItemFactory.qml:835
447+#: qml/Panel/Indicators/MenuItemFactory.qml:879
446448msgid "Failed, tap to retry"
447449msgstr ""
448450
qml/Panel/IndicatorItem.qml+1−1
@@ -243,7 +243,7 @@ IndicatorDelegate {
243243 return;
244244 }
245245
246− title = rootActionState.title ? rootActionState.title : "";
246+ title = rootActionState.title ? rootActionState.title : rootActionState.accessibleName;
247247 leftLabel = rootActionState.leftLabel ? rootActionState.leftLabel : "";
248248 rightLabel = rootActionState.rightLabel ? rootActionState.rightLabel : "";
249249 icons = rootActionState.icons;
qml/Panel/IndicatorPage.qml+1−1
@@ -23,7 +23,7 @@ IndicatorBase {
2323 id: main
2424
2525 //const
26− property string title: rootActionState.title
26+ property string title: rootActionState.title || rootActionState.accessibleName // some indicators don't expose a title but only the accessible-desc
2727 property alias highlightFollowsCurrentItem : mainMenu.highlightFollowsCurrentItem
2828 readonly property alias factory: _factory
2929
qml/Panel/Indicators/IndicatorDelegate.qml+1−1
@@ -21,5 +21,5 @@ import QtQuick 2.0
2121
2222IndicatorBase {
2323 readonly property bool indicatorVisible: rootActionState.indicatorVisible
24− readonly property string title: rootActionState.title
24+ readonly property string title: rootActionState.title || rootActionState.accessibleName
2525}
qml/Panel/Indicators/MenuItemFactory.qml+7−11
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013,2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -12,9 +12,6 @@
1212 *
1313 * You should have received a copy of the GNU Lesser General Public License
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors:
17− * Nick Dedekind <nick.dedekind@canonical.com>
1815 */
1916
2017import QtQuick 2.0
@@ -24,7 +21,7 @@ import QMenuModel 0.1
2421import Utils 0.1 as Utils
2522import Ubuntu.Components.ListItems 0.1 as ListItems
2623import Ubuntu.Components 1.1
27−import "../../Greeter"
24+import Unity.Session 0.1
2825
2926Item {
3027 id: menuFactory
@@ -82,8 +79,6 @@ Item {
8279 return defaultValue;
8380 }
8481
85− LightDM {id: lightDM} // Provide backend access
86−
8782 Component {
8883 id: separatorMenu;
8984
@@ -443,11 +438,12 @@ Item {
443438 property QtObject menuData: null
444439 property var menuModel: menuFactory.menuModel
445440 property int menuIndex: -1
446− //property var extendedData: menuData && menuData.ext || undefined
447441
448− name: menuData && menuData.label || ""
442+ name: menuData && menuData.label || "" // label is the user's real name
449443 iconSource: menuData && menuData.icon || ""
450− // active: true // TODO hook up with lightdm
444+
445+ // would be better to compare with the logname but sadly the indicator doesn't expose that
446+ active: DBusUnitySessionService.RealName() !== "" ? DBusUnitySessionService.RealName() == name : DBusUnitySessionService.UserName() == name
451447
452448 onTriggered: {
453449 menuModel.activate(menuIndex);
@@ -479,7 +475,7 @@ Item {
479475 property var tzFormatter: Utils.TimeFormatter {}
480476 property var updateTimer: Timer {
481477 repeat: true
482− running: true
478+ running: identifier == "indicator-datetime" // only run when we're open
483479 onTriggered: tzMenuItem.time = tzMenuItem.tzFormatter.currentTimeInTimezone(tzMenuItem.tz)
484480 }
485481
qml/Panel/Indicators/MessageMenuItemFactory.qml+1−1
@@ -145,7 +145,7 @@ Loader {
145145 title: menuData && menuData.label || ""
146146 time: timeFormatter.timeString
147147 body: getExtendedProperty(extendedData, "xCanonicalText", "")
148− replyButtonText: getExtendedProperty(replyActionDescription, "label", "Send")
148+ replyButtonText: getExtendedProperty(replyActionDescription, "label", i18n.tr("Send"))
149149 replyHintText: i18n.ctr("Label: Hint in message indicator line edit", "Reply")
150150 // icons
151151 avatar: getExtendedProperty(extendedData, "icon", "image://theme/contact")
qml/Panel/Indicators/client/IndicatorRepresentation.qml+1−1
@@ -26,7 +26,7 @@ import "../.."
2626Page {
2727 id: root
2828
29− title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title : ""
29+ title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title : indicatorProperties.accessibleName
3030 property variant indicatorProperties
3131
3232 anchors.fill: parent