on xenial help sign in
Merge trunk.
855960aMichał Sawicz
CMakeLists.txt+5−5
@@ -48,11 +48,11 @@ add_custom_target(cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2
48 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
48 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
49
49
50include(FindPkgConfig)
50include(FindPkgConfig)
51−find_package(Qt5Core)
51+find_package(Qt5Core 5.2 REQUIRED)
52−find_package(Qt5Qml)
52+find_package(Qt5Qml 5.2 REQUIRED)
53−find_package(Qt5Quick)
53+find_package(Qt5Quick 5.2 REQUIRED)
54−find_package(Qt5Gui)
54+find_package(Qt5Gui 5.2 REQUIRED)
55−find_package(Qt5DBus)
55+find_package(Qt5DBus 5.2 REQUIRED)
56
56
57# Standard install paths
57# Standard install paths
58include(GNUInstallDirs)
58include(GNUInstallDirs)
CODING+11−15
@@ -20,7 +20,7 @@ install dependencies
20If its your first time, install build dependencies
20If its your first time, install build dependencies
21
21
22$ cd ~/unity8/trunk
22$ cd ~/unity8/trunk
23−$ ./build --setup
23+$ ./build.sh --setup
24
24
25 this will:
25 this will:
26 - install the required dependencies to build, as well as run on the desktop
26 - install the required dependencies to build, as well as run on the desktop
@@ -31,7 +31,7 @@ build Unity 8
31-------------
31-------------
32
32
33$ cd ~/unity8/trunk
33$ cd ~/unity8/trunk
34−$ ./build
34+$ ./build.sh
35
35
36You may also rebuild with the -c for clean, which just deletes the build
36You may also rebuild with the -c for clean, which just deletes the build
37directory.
37directory.
@@ -43,10 +43,10 @@ Running Unity 8 on your desktop
43run the Unity 8 shell
43run the Unity 8 shell
44---------------------
44---------------------
45$ cd ~/unity8/trunk
45$ cd ~/unity8/trunk
46−$ ./run
46+$ ./run.sh
47
47
48Options can be passed to test the lock screen
48Options can be passed to test the lock screen
49−$ ./run -p OR -k
49+$ ./run.sh -p OR -k
50
50
51-p is for pin lock, for which the default prompt answer is "1234"
51-p is for pin lock, for which the default prompt answer is "1234"
52-k is for keylock passphrase, for which the default prompt answer is "password"
52-k is for keylock passphrase, for which the default prompt answer is "password"
@@ -78,19 +78,19 @@ Running Unity 8 on devices
78 on the device yourself)
78 on the device yourself)
79
79
80$ cd ~/unity/trunk
80$ cd ~/unity/trunk
81−$ ./run_on_device --setup
81+$ ./run_on_device.sh --setup
82 this will:
82 this will:
83 - install your public SSH key on the device
83 - install your public SSH key on the device
84 - install the needed dependencies
84 - install the needed dependencies
85
85
86−$ ./run_on_device
86+$ ./run_on_device.sh
87 this will:
87 this will:
88 - rsync the code to the device
88 - rsync the code to the device
89 - build on the device
89 - build on the device
90 - replace the running shell
90 - replace the running shell
91
91
92Options can be passed to test the lock screen
92Options can be passed to test the lock screen
93−$ ./run_on_device -p OR -k
93+$ ./run_on_device.sh -p OR -k
94
94
95-p is for pin lock, for which the default prompt answer is "1234"
95-p is for pin lock, for which the default prompt answer is "1234"
96-k is for keylock passphrase, for which the default prompt answer is "password"
96-k is for keylock passphrase, for which the default prompt answer is "password"
@@ -107,9 +107,9 @@ Notes
107- exporting ANDROID_SERIAL=$your_device_serial or
107- exporting ANDROID_SERIAL=$your_device_serial or
108 ANDROID_SERIAL=$your_device_ip:5555 will make adb not complain about
108 ANDROID_SERIAL=$your_device_ip:5555 will make adb not complain about
109 multiple devices
109 multiple devices
110−- you can export TARGET_IP=$your_device_ip TARGET_SSH_PORT=22 for run_on_device
110+- you can export TARGET_IP=$your_device_ip TARGET_SSH_PORT=22 for run_on_device.sh
111 to not use adb forwarding - useful if you use multiple devices
111 to not use adb forwarding - useful if you use multiple devices
112−- using Ninja (package ninja-build - run_on_device -s installs this now)
112+- using Ninja (package ninja-build - run_on_device.sh -s installs this now)
113 will improve build times (especially in the nothing-to-build case)
113 will improve build times (especially in the nothing-to-build case)
114
114
115
115
@@ -131,7 +131,7 @@ Running tests
131=============
131=============
132
132
133Tests are run from the build directory (which will be ./builddir if you used
133Tests are run from the build directory (which will be ./builddir if you used
134−the ./build script).
134+the ./build.sh script).
135
135
136To run the tests that do not require any graphical capability and therefore
136To run the tests that do not require any graphical capability and therefore
137are pretty fast run:
137are pretty fast run:
@@ -167,15 +167,11 @@ NB: Manual test or interation doesn't make sense for all components or classes,
167particularly the non-graphical ones. In such cases no "tryFoo" make target is
167particularly the non-graphical ones. In such cases no "tryFoo" make target is
168provided.
168provided.
169
169
170−NB: The tests expect the locale to be the C locale, they may fail if run
171−under a different locale, if you get failures others can not reproduce
172−prepend 'LC_ALL=C' to the 'make test' command
173−
174Running autopilot tests
170Running autopilot tests
175=======================
171=======================
176
172
177Autopilot tests are run from the build directory (which will be ./builddir if you used
173Autopilot tests are run from the build directory (which will be ./builddir if you used
178−the ./build script).
174+the ./build.sh script).
179
175
180$ make autopilot
176$ make autopilot
181
177
build → build.shrenamed+1−2
@@ -43,13 +43,12 @@ install_dependencies() {
43 gsettings-desktop-schemas \
43 gsettings-desktop-schemas \
44 gsettings-ubuntu-schemas \
44 gsettings-ubuntu-schemas \
45 qmenumodel-qml \
45 qmenumodel-qml \
46− qtdeclarative5-dee-plugin \
46+ qml-module-qtquick-xmllistmodel \
47 qtdeclarative5-gsettings1.0 \
47 qtdeclarative5-gsettings1.0 \
48 qtdeclarative5-ubuntu-ui-toolkit-plugin \
48 qtdeclarative5-ubuntu-ui-toolkit-plugin \
49 qtdeclarative5-ubuntu-settings-components \
49 qtdeclarative5-ubuntu-settings-components \
50 qtdeclarative5-ubuntu-thumbnailer0.1 \
50 qtdeclarative5-ubuntu-thumbnailer0.1 \
51 unity-notifications-impl \
51 unity-notifications-impl \
52− qtdeclarative5-xmllistmodel-plugin \
53 unity-scope-home \
52 unity-scope-home \
54 unity-lens-applications \
53 unity-lens-applications \
55 unity-plugin-scopes \
54 unity-plugin-scopes \
cmake/modules/Plugins.cmakedeleted−68
@@ -1,68 +0,0 @@
1−find_program(qmlplugindump_exe qmlplugindump)
2−
3−if(NOT qmlplugindump_exe)
4− msg(FATAL_ERROR "Could not locate qmlplugindump.")
5−endif()
6−
7−# Creates target for copying and installing qmlfiles
8−#
9−# export_qmlfiles(plugin sub_path)
10−#
11−#
12−# Target to be created:
13−# - plugin-qmlfiles - Copies the qml files (*.qml, *.js, qmldir) into the shadow build folder.
14−
15−macro(export_qmlfiles PLUGIN PLUGIN_SUBPATH)
16−
17− file(GLOB QMLFILES
18− *.qml
19− *.js
20− qmldir
21− )
22−
23− # copy the qmldir file
24− add_custom_target(${PLUGIN}-qmlfiles ALL
25− COMMAND cp ${QMLFILES} ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}
26− DEPENDS ${QMLFILES}
27− SOURCES ${QMLFILES}
28− )
29−
30− # install the qmlfiles file.
31− install(FILES ${QMLFILES}
32− DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
33− )
34−endmacro(export_qmlfiles)
35−
36−
37−# Creates target for generating the qmltypes file for a plugin and installs plugin files
38−#
39−# export_qmlplugin(plugin version sub_path [TARGETS target1 [target2 ...]])
40−#
41−# TARGETS additional install targets (eg the plugin shared object)
42−#
43−# Target to be created:
44−# - plugin-qmltypes - Generates the qmltypes file in the shadow build folder.
45−
46−macro(export_qmlplugin PLUGIN VERSION PLUGIN_SUBPATH)
47− set(multi_value_keywords TARGETS)
48− cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
49−
50− # Only try to generate .qmltypes if not cross compiling
51− if(NOT CMAKE_CROSSCOMPILING)
52− # create the plugin.qmltypes file
53− add_custom_target(${PLUGIN}-qmltypes ALL
54− COMMAND ${qmlplugindump_exe} -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
55− )
56− add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
57−
58− # install the qmltypes file.
59− install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
60− DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
61− )
62− endif()
63−
64− # install the additional targets
65− install(TARGETS ${qmlplugin_TARGETS}
66− DESTINATION ${SHELL_INSTALL_QML}/${PLUGIN_SUBPATH}
67− )
68−endmacro(export_qmlplugin)
cmake/modules/QmlPlugins.cmakenew file+143
@@ -0,0 +1,143 @@
1+# If you need to override the qmlplugindump binary, create the qmlplugin executable
2+# target before loading this plugin.
3+
4+if(NOT TARGET qmlplugindump)
5+ find_program(qmlplugindump_exe qmlplugindump)
6+
7+ if(NOT qmlplugindump_exe)
8+ msg(FATAL_ERROR "Could not locate qmlplugindump.")
9+ endif()
10+
11+ add_executable(qmlplugindump IMPORTED)
12+ set_target_properties(qmlplugindump PROPERTIES IMPORTED_LOCATION ${qmlplugindump_exe})
13+endif()
14+
15+
16+# Creates a target for copying resource files into build dir and optionally installing them.
17+#
18+# Files will be copied into ${BINARY_DIR}/${path} or ${CMAKE_CURRENT_BINARY_DIR} and installed
19+# into ${DESTINATION}/${path}.
20+#
21+# Resource file names are matched against {*.{qml,js,jpg,png,sci,svg},qmldir}.
22+#
23+# export_qmlfiles(plugin path
24+# [SEARCH_PATH path] # Path to search for resources in (defaults to ${CMAKE_CURRENT_SOURCE_DIR})
25+# [BINARY_DIR path]
26+# [DESTINATION path]
27+# [TARGET_PREFIX string] # Will be prefixed to the target name
28+# )
29+#
30+# Created target:
31+# - ${TARGET_PREFIX}${plugin}-qmlfiles - Copies resources into the binary dir.
32+
33+macro(export_qmlfiles PLUGIN PATH)
34+ set(single SEARCH_PATH BINARY_DIR DESTINATION TARGET_PREFIX)
35+ cmake_parse_arguments(QMLFILES "" "${single}" "" ${ARGN})
36+
37+ if(NOT QMLFILES_SEARCH_PATH)
38+ set(QMLFILES_SEARCH_PATH ${CMAKE_CURRENT_SOURCE_DIR})
39+ endif()
40+
41+ if(QMLFILES_BINARY_DIR)
42+ set(qmlfiles_dir ${QMLFILES_BINARY_DIR}/${PATH})
43+ else()
44+ set(qmlfiles_dir ${CMAKE_CURRENT_BINARY_DIR})
45+ endif()
46+
47+ file(GLOB QMLFILES
48+ ${QMLFILES_SEARCH_PATH}/*.qml
49+ ${QMLFILES_SEARCH_PATH}/*.js
50+ ${QMLFILES_SEARCH_PATH}/*.jpg
51+ ${QMLFILES_SEARCH_PATH}/*.png
52+ ${QMLFILES_SEARCH_PATH}/*.sci
53+ ${QMLFILES_SEARCH_PATH}/*.svg
54+ ${QMLFILES_SEARCH_PATH}/qmldir
55+ )
56+
57+ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${qmlfiles_dir})
58+
59+ # copy the files
60+ add_custom_target(${QMLFILES_TARGET_PREFIX}${PLUGIN}-qmlfiles ALL
61+ COMMAND cp ${QMLFILES} ${qmlfiles_dir}
62+ DEPENDS ${QMLFILES}
63+ SOURCES ${QMLFILES}
64+ )
65+
66+ if(QMLFILES_DESTINATION)
67+ # install the qmlfiles file.
68+ install(FILES ${QMLFILES}
69+ DESTINATION ${QMLFILES_DESTINATION}/${PATH}
70+ )
71+ endif()
72+endmacro(export_qmlfiles)
73+
74+
75+# Creates a target for generating the typeinfo file for a QML plugin and optionally installs it
76+# and additional targets.
77+#
78+# Files will be copied into ${BINARY_DIR}/${path} or ${CMAKE_CURRENT_BINARY_DIR} and installed
79+# into ${DESTINATION}/${path}. If you don't pass BINARY_DIR, it's assumed that current source
80+# path ends with ${path}.
81+#
82+# The generated file will be named after the last segment of the plugin name, e.g. Foo.qmltypes.
83+#
84+# export_qmlplugin(plugin version path
85+# [BINARY_DIR path]
86+# [DESTINATION path]
87+# [TARGET_PREFIX string] # Will be prefixed to the target name
88+# [ENVIRONMENT string] # Will be added to qmlplugindump's env
89+# [TARGETS target1 [target2 ...]] # Targets to depend on and install (e.g. the plugin shared object)
90+# )
91+#
92+# Created target:
93+# - ${TARGET_PREFIX}${plugin}-qmltypes - Generates the qmltypes file in the binary dir.
94+
95+macro(export_qmlplugin PLUGIN VERSION PATH)
96+ set(single BINARY_DIR DESTINATION TARGET_PREFIX ENVIRONMENT)
97+ set(multi TARGETS)
98+ cmake_parse_arguments(QMLPLUGIN "" "${single}" "${multi}" ${ARGN})
99+
100+ get_target_property(qmlplugindump_executable qmlplugindump LOCATION)
101+
102+ if(QMLPLUGIN_BINARY_DIR)
103+ set(qmlplugin_dir ${QMLPLUGIN_BINARY_DIR}/${PATH})
104+ else()
105+ # Find import path to point qmlplugindump at
106+ string(REGEX REPLACE "${PATH}$" "" QMLPLUGIN_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
107+ set(qmlplugin_dir ${CMAKE_CURRENT_BINARY_DIR})
108+ endif()
109+
110+ # Find the last segment of the plugin name to use as qmltypes basename
111+ string(REGEX MATCH "[^.]+$" plugin_suffix ${PLUGIN})
112+ set(target_prefix ${QMLPLUGIN_TARGET_PREFIX}${PLUGIN})
113+ set(qmltypes_path ${qmlplugin_dir}/${plugin_suffix}.qmltypes)
114+
115+ # Only generate typeinfo if not cross compiling
116+ if(NOT CMAKE_CROSSCOMPILING)
117+ add_custom_target(${target_prefix}-qmltypes ALL
118+ COMMAND env ${QMLPLUGIN_ENVIRONMENT} ${qmlplugindump_executable} -notrelocatable
119+ ${PLUGIN} ${VERSION} ${QMLPLUGIN_BINARY_DIR} > ${qmltypes_path}
120+ )
121+ add_dependencies(${target_prefix}-qmltypes ${target_prefix}-qmlfiles ${QMLPLUGIN_TARGETS})
122+
123+ if (QMLPLUGIN_DESTINATION)
124+ # Install the typeinfo file
125+ install(FILES ${qmltypes_path}
126+ DESTINATION ${QMLPLUGIN_DESTINATION}/${PATH}
127+ )
128+ endif()
129+ endif()
130+
131+ set_target_properties(${QMLPLUGIN_TARGETS} PROPERTIES
132+ ARCHIVE_OUTPUT_DIRECTORY ${qmlplugin_dir}
133+ LIBRARY_OUTPUT_DIRECTORY ${qmlplugin_dir}
134+ RUNTIME_OUTPUT_DIRECTORY ${qmlplugin_dir}
135+ )
136+
137+ if (QMLPLUGIN_DESTINATION)
138+ # Install additional targets
139+ install(TARGETS ${QMLPLUGIN_TARGETS}
140+ DESTINATION ${QMLPLUGIN_DESTINATION}/${PATH}
141+ )
142+ endif()
143+endmacro()
cmake/modules/QmlTest.cmake+2−4
@@ -59,11 +59,11 @@ macro(add_manual_qml_test SUBPATH COMPONENT_NAME)
59endmacro(add_manual_qml_test)
59endmacro(add_manual_qml_test)
60
60
61macro(add_qml_benchmark SUBPATH COMPONENT_NAME ITERATIONS)
61macro(add_qml_benchmark SUBPATH COMPONENT_NAME ITERATIONS)
62− add_qml_test_internal(${SUBPATH} ${COMPONENT_NAME} ${ITERATIONS})
62+ add_qml_test_internal(${SUBPATH} ${COMPONENT_NAME} ${ITERATIONS} ${ARGN})
63endmacro(add_qml_benchmark)
63endmacro(add_qml_benchmark)
64
64
65macro(add_qml_test SUBPATH COMPONENT_NAME)
65macro(add_qml_test SUBPATH COMPONENT_NAME)
66− add_qml_test_internal(${SUBPATH} ${COMPONENT_NAME} 0)
66+ add_qml_test_internal(${SUBPATH} ${COMPONENT_NAME} 0 ${ARGN})
67endmacro(add_qml_test)
67endmacro(add_qml_test)
68
68
69macro(add_qml_test_internal SUBPATH COMPONENT_NAME ITERATIONS)
69macro(add_qml_test_internal SUBPATH COMPONENT_NAME ITERATIONS)
@@ -156,8 +156,6 @@ macro(add_binary_qml_test CLASS_NAME LD_PATH DEPS)
156
156
157 add_qmltest_target(xvfbtest${CLASS_NAME} "${xvfbtestCommand}" FALSE TRUE)
157 add_qmltest_target(xvfbtest${CLASS_NAME} "${xvfbtestCommand}" FALSE TRUE)
158 add_dependencies(qmluitests xvfbtest${CLASS_NAME})
158 add_dependencies(qmluitests xvfbtest${CLASS_NAME})
159−
160− add_manual_qml_test(. ${CLASS_NAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
161endmacro(add_binary_qml_test)
159endmacro(add_binary_qml_test)
162
160
163macro(add_qmltest_target qmltest_TARGET qmltest_command qmltest_NO_TARGETS qmltest_NO_ADD_TEST)
161macro(add_qmltest_target qmltest_TARGET qmltest_command qmltest_NO_TARGETS qmltest_NO_ADD_TEST)
data/CMakeLists.txt+1−2
@@ -1,8 +1,7 @@
1# generate desktop file
1# generate desktop file
2configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
2configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
3−configure_file(${SCOPE_TOOL}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_TOOL}.desktop @ONLY)
4
3
5# install desktop files
4# install desktop files
6−install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop ${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_TOOL}.desktop
5+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
7 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
6 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
8 )
7 )
data/unity-scope-tool.desktop.indeleted−8
@@ -1,8 +0,0 @@
1−[Desktop Entry]
2−Type=Application
3−Name=Unity Scope Tool
4−Comment=Developer tool for Unity scopes.
5−Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity-scope-tool
6−Terminal=false
7−Icon=unity-scope-tool
8−X-Ubuntu-Touch=true
data/unity8.conf+9−1
@@ -12,6 +12,9 @@ respawn
12expect stop
12expect stop
13
13
14pre-start script
14pre-start script
15+ # Tell unity-mir to raise SIGSTOP after we start
16+ initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
17+
15 if [ -n "$MIR_SOCKET" ]; then
18 if [ -n "$MIR_SOCKET" ]; then
16 if [ -z "$UNITY_MIR_SOCKET" ]; then
19 if [ -z "$UNITY_MIR_SOCKET" ]; then
17 # Save original value of MIR_SOCKET in case we are restarted,
20 # Save original value of MIR_SOCKET in case we are restarted,
@@ -42,7 +45,12 @@ pre-start script
42 fi
45 fi
43
46
44 initctl emit scope-ui-starting
47 initctl emit scope-ui-starting
45− initctl emit indicator-services-start
48+ initctl emit --no-wait indicator-services-start
46end script
49end script
47
50
48exec ${BINARY:-unity8} $ARGS
51exec ${BINARY:-unity8} $ARGS
52+
53+post-stop script
54+ initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
55+ initctl unset-env --global UNITY_MIR_SOCKET
56+end script
debian/changelog+181
@@ -1,3 +1,184 @@
1+unity8 (7.86+14.10.20140522-0ubuntu1) utopic; urgency=low
2+
3+ [ Albert Astals ]
4+ * Use Interface classes from unity-api
5+
6+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 22 May 2014 17:59:23 +0000
7+
8+unity8 (7.86+14.10.20140519-0ubuntu1) utopic; urgency=low
9+
10+ [ Ubuntu daily release ]
11+ * New rebuild forced
12+
13+ [ Albert Astals ]
14+ * Use the new displayMargin feature Also port our DashViews to use
15+ same naming and behaviour + update tests
16+
17+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 19 May 2014 07:35:51 +0000
18+
19+unity8 (7.86+14.10.20140516.5-0ubuntu1) utopic; urgency=low
20+
21+ [ Michal Hruby ]
22+ * Updated scope tool to create proper config files after recent
23+ libunity-scopes-api changes.
24+
25+ [ Michał Sawicz ]
26+ * Refactor export_qmlfiles and export_qmlplugins to be more generic
27+ and clean up installed mocks.
28+
29+ [ Albert Astals ]
30+ * Remove empty dirs
31+ * Set the tabbarmodel index as we do on real code It works better :D
32+ (LP: #1317255)
33+
34+ [ Thomi Richards ]
35+ * Use new import location for ProcessSearchError in process_helpers
36+ script.
37+
38+ [ Andrea Cimitan ]
39+ * Adds shadow for the carousel
40+
41+ [ Daniel d'Andrada ]
42+ * Remove Revealer component It's not used anywhere anymore. It's been
43+ replaced by DragHandle.
44+
45+ [ Andy Doan ]
46+ * unlock_device: support more complex reboot/wait cycles Currently
47+ this script only allows you to override how to "wait" on the device.
48+ This changes the logic to also support how you go about rebooting
49+ the device. This is handy for the ubuntu-emulator because adb-reboot
50+ is not currently supported. However, we also have a more
51+ sophisticated, fool-proof way we reboot/wait in the CI lab that
52+ would be nice to take advantage of:
53+ http://bazaar.launchpad.net/~ubuntu-test-case-dev/ubuntu-test-
54+ cases/touch/view/head:/scripts/reboot-and-wait
55+
56+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 16 May 2014 18:46:32 +0000
57+
58+unity8 (7.86+14.10.20140516.2-0ubuntu1) utopic; urgency=low
59+
60+ [ CI bot ]
61+ * Resync trunk
62+
63+ [ Michael Zanetti ]
64+ * support appid:// entries in gsettings schema and make
65+ findDesktopFile work with short-appid (LP: #1239750)
66+
67+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 16 May 2014 12:32:40 +0000
68+
69+unity8 (7.86+14.10.20140514.1-0ubuntu1) utopic; urgency=low
70+
71+ [ Antti Kaijanmäki ]
72+ * Indicators/RootActionState: use g_variant_iter_loop to extract
73+ icons.
74+
75+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 14 May 2014 11:43:55 +0000
76+
77+unity8 (7.86+14.10.20140513-0ubuntu1) utopic; urgency=low
78+
79+ [ Andrea Cimitan ]
80+ * Improve padding in Text preview widget. (LP: #1316683)
81+
82+ [ CI bot ]
83+ * Resync trunk
84+
85+ [ Nick Dedekind ]
86+ * Removed binding loop from Unity.Indicators.MenuContentActivator
87+ Change handler for QMLListProperty used by MenuContent.qml:
88+ menuActivator.content[index].active If we're already asking for the
89+ index, we know it exists already. No need to send a
90+ changeNotification on an implied creation.
91+
92+ [ Josh Arenson ]
93+ * Implements usage-style documentation for unity8 executable. Fixes
94+ lp:1269282 (LP: #1269282)
95+
96+ [ Albert Astals ]
97+ * Create specialized Card code in Javascript instead of having various
98+ copied&pasted files (LP: #1297197)
99+
100+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 13 May 2014 08:34:02 +0000
101+
102+unity8 (7.86+14.10.20140507.3-0ubuntu1) utopic; urgency=low
103+
104+ [ Michał Sawicz ]
105+ * Remove HUD from the bottom edge. Again.
106+
107+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 07 May 2014 11:14:30 +0000
108+
109+unity8 (7.86+14.10.20140505-0ubuntu1) utopic; urgency=low
110+
111+ [ Ted Gould ]
112+ * Provide a dbus interface for setting the count and countVisible
113+ properties. (LP: #1301400)
114+
115+ [ Michał Sawicz ]
116+ * Pass env variables to initctl start.
117+ * Suffix .sh to our scripts and clean up debian/rules.
118+ * Adapt to Debian Qt package renames and drop unneeded Dee plugin
119+ dependency.
120+
121+ [ Ying-Chun Liu ]
122+ * Add Zoomable Image for Preview widgets.
123+
124+ [ Albert Astals ]
125+ * Remove support for Qt <= 5.2.1
126+
127+ [ Mirco Müller ]
128+ * Implemented feature-request from Design for modal snap-decision
129+ notifications on the phone. See LP #1285712 (LP: #1285712)
130+
131+ [ Andrea Cimitan ]
132+ * Make progressbas in preview widget big as the button
133+
134+ [ CI bot ]
135+ * Resync trunk
136+
137+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 05 May 2014 12:09:43 +0000
138+
139+unity8 (7.86+14.10.20140502.6-0ubuntu1) utopic; urgency=low
140+
141+ [ tpeeters ]
142+ * Adapt to new TabBar
143+
144+ [ Tim Peeters ]
145+ * Adapt to new TabBar
146+
147+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 02 May 2014 16:44:52 +0000
148+
149+unity8 (7.86+14.10.20140429.2-0ubuntu1) utopic; urgency=medium
150+
151+ [ Andrea Cimitan ]
152+ * Update upstart job to reflect latest unity-mir changes
153+ * Fix locale in qml tests and fixtimeformattertest (LP: #1301038)
154+ * Fix 1309135 (LP: #1309135)
155+
156+ [ Michał Sawicz ]
157+ * Split out unity8-common package
158+ * Don't wait for indicator services to start, and drop Scope Tool's
159+ .desktop file. (LP: #1310172)
160+
161+ [ Michael Terry ]
162+ * Stop clock from hiding when the 'show dash' button is pressed in
163+ greeter. (LP: #1308139)
164+ * Make swipe teases in the greeter more helpful and obvious (LP:
165+ #1267623)
166+
167+ [ Nick Dedekind ]
168+ * Fixed datetime indicator appointment colour (LP: #1307048)
169+
170+ [ Albert Astals ]
171+ * Improve Card creation time by adding loaders that make sure only
172+ what's needed is loaded (LP: #1297197)
173+ * CategoryDelegateRange: Fix condition for detecting overshooting
174+ * Make xvfbtests work in the DashView plugins
175+ * Fix binding loop in FilterGrid height
176+
177+ [ Victor R. Ruiz ]
178+ * Move autopilot notification code to a helper method.
179+
180+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 29 Apr 2014 15:21:33 +0000
181+
1unity8 (7.85+14.04.20140416-0ubuntu1) trusty; urgency=low
182unity8 (7.85+14.04.20140416-0ubuntu1) trusty; urgency=low
2
183
3 [ Albert Astals ]
184 [ Albert Astals ]
debian/control+41−30
@@ -11,34 +11,34 @@ Build-Depends: cmake,
11 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
11 libgl1-mesa-dev[!armhf] | libgl-dev[!armhf],
12 libgl1-mesa-dri,
12 libgl1-mesa-dri,
13 libgles2-mesa-dev[armhf],
13 libgles2-mesa-dev[armhf],
14+ libglib2.0-dev,
14 libgsettings-qt-dev,
15 libgsettings-qt-dev,
15 libhud-client2-dev,
16 libhud-client2-dev,
16 libpulse-dev,
17 libpulse-dev,
17 libqmenumodel-dev (>= 0.2.7),
18 libqmenumodel-dev (>= 0.2.7),
19+ libqt5xmlpatterns5-dev,
18 libunity-api-dev (>= 7.80.6),
20 libunity-api-dev (>= 7.80.6),
19 libunity-mir-dev,
21 libunity-mir-dev,
20 libusermetricsoutput1-dev,
22 libusermetricsoutput1-dev,
21 libxcb1-dev,
23 libxcb1-dev,
22− libglib2.0-dev,
23 pkg-config,
24 pkg-config,
24− python:any (>= 2.7),
25 python-setuptools,
25 python-setuptools,
26 python3-all:any,
26 python3-all:any,
27 python3-setuptools,
27 python3-setuptools,
28+ python:any (>= 2.7),
29+ qml-module-qtquick-xmllistmodel,
30+ qml-module-qtquick2,
31+ qml-module-qttest,
28 qt5-default,
32 qt5-default,
29− qtbase5-dev,
33+ qtbase5-dev (>= 5.2.1),
30 qtbase5-dev-tools,
34 qtbase5-dev-tools,
31− qtbase5-private-dev,
35+ qtbase5-private-dev (>= 5.2.1),
32− qtdeclarative5-dev,
36+ qtdeclarative5-dev (>= 5.2.1),
33 qtdeclarative5-dev-tools,
37 qtdeclarative5-dev-tools,
38+ qtdeclarative5-private-dev (>= 5.2.1),
34 qtdeclarative5-qtmultimedia-plugin,
39 qtdeclarative5-qtmultimedia-plugin,
35− qtdeclarative5-private-dev,
36− qtdeclarative5-qtquick2-plugin,
37− qtdeclarative5-test-plugin,
38 qtdeclarative5-ubuntu-settings-components,
40 qtdeclarative5-ubuntu-settings-components,
39 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.47),
41 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.47),
40− qtdeclarative5-xmllistmodel-plugin,
41− libqt5xmlpatterns5-dev,
42 ttf-ubuntu-font-family,
42 ttf-ubuntu-font-family,
43Standards-Version: 3.9.4
43Standards-Version: 3.9.4
44Homepage: http://launchpad.net/unity
44Homepage: http://launchpad.net/unity
@@ -60,7 +60,8 @@ Description: Indicators client test application
60
60
61Package: unity-scope-tool
61Package: unity-scope-tool
62Architecture: any
62Architecture: any
63+Depends: unity8-common (= ${source:Version}),
63−Depends: unity8 (= ${binary:Version}),
64+ unity8-private (= ${binary:Version}),
64 ${misc:Depends},
65 ${misc:Depends},
65 ${shlibs:Depends},
66 ${shlibs:Depends},
66Description: Development tool for Unity scopes
67Description: Development tool for Unity scopes
@@ -71,27 +72,17 @@ Package: unity8
71Architecture: any
72Architecture: any
72Provides: indicator-renderer,
73Provides: indicator-renderer,
73Depends: gsettings-desktop-schemas,
74Depends: gsettings-desktop-schemas,
75+ libcap2-bin,
74 libglib2.0-bin,
76 libglib2.0-bin,
75− libunity-mir1,
77+ libunity-mir1 (>= 0.4),
76 qmenumodel-qml (>= 0.2.7),
78 qmenumodel-qml (>= 0.2.7),
77− qtdeclarative5-dee-plugin,
79+ qml-module-qtquick-xmllistmodel,
78 qtdeclarative5-gsettings1.0,
80 qtdeclarative5-gsettings1.0,
79 qtdeclarative5-ubuntu-settings-components,
81 qtdeclarative5-ubuntu-settings-components,
80− qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
81− ubuntu-thumbnailer-impl-0,
82− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.47),
83− qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
84− qtdeclarative5-xmllistmodel-plugin,
85− unity-application-impl-2,
86 unity-launcher-impl-3,
82 unity-launcher-impl-3,
87− unity-notifications-impl-2,
83+ unity8-common (= ${source:Version}),
88− unity8-fake-env | unity-application-impl,
89 unity8-private (= ${binary:Version}),
84 unity8-private (= ${binary:Version}),
90 unity8-private | unity-launcher-impl,
85 unity8-private | unity-launcher-impl,
91− unity-plugin-scopes | unity-scopes-impl,
92− unity-scopes-impl-0,
93−# for setcap:
94− libcap2-bin,
95 ${misc:Depends},
86 ${misc:Depends},
96 ${shlibs:Depends},
87 ${shlibs:Depends},
97Recommends: unity-scope-click,
88Recommends: unity-scope-click,
@@ -99,10 +90,30 @@ Recommends: unity-scope-click,
99 unity-scope-scopes,
90 unity-scope-scopes,
100Breaks: indicator-network (<< 0.5.1),
91Breaks: indicator-network (<< 0.5.1),
101 ubuntu-touch-session (<< 0.107),
92 ubuntu-touch-session (<< 0.107),
102−Replaces: ubuntu-touch-session (<< 0.82~)
93+Replaces: ubuntu-touch-session (<< 0.82~),
103Description: Unity 8 shell
94Description: Unity 8 shell
104 The Unity 8 shell is the primary user interface for Ubuntu devices.
95 The Unity 8 shell is the primary user interface for Ubuntu devices.
105
96
97+Package: unity8-common
98+Architecture: all
99+Depends: qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
100+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.47),
101+ qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
102+ ubuntu-thumbnailer-impl-0,
103+ unity-application-impl-2,
104+ unity-notifications-impl-3,
105+ unity-plugin-scopes | unity-scopes-impl,
106+ unity-scopes-impl-0,
107+ unity8-fake-env | unity-application-impl,
108+ ${misc:Depends},
109+Breaks: unity8 (<< 7.86),
110+Replaces: unity8 (<< 7.86),
111+Description: Unity 8 shell (common files)
112+ The Unity 8 shell is the primary user interface for Ubuntu devices.
113+ .
114+ This package contains the QML, graphics and locale files shared between
115+ unity8 and unity-scope-tool.
116+
106Package: unity8-autopilot
117Package: unity8-autopilot
107Architecture: all
118Architecture: all
108Depends: gir1.2-glib-2.0,
119Depends: gir1.2-glib-2.0,
@@ -119,12 +130,12 @@ Depends: gir1.2-glib-2.0,
119 python3-fixtures,
130 python3-fixtures,
120 python3-gi,
131 python3-gi,
121 ubuntu-ui-toolkit-autopilot,
132 ubuntu-ui-toolkit-autopilot,
122− unity8 (>= ${source:Version}),
133+ unity8 (= ${source:Version}),
123− unity8-fake-env (>= ${source:Version}),
134+ unity8-fake-env (= ${source:Version}),
124 url-dispatcher-tools,
135 url-dispatcher-tools,
125 ${misc:Depends},
136 ${misc:Depends},
126− ${python:Depends},
127 ${python3:Depends},
137 ${python3:Depends},
138+ ${python:Depends},
128 ${shlibs:Depends},
139 ${shlibs:Depends},
129Description: Test package for Unity 8 shell
140Description: Test package for Unity 8 shell
130 Autopilot tests for the unity8 package
141 Autopilot tests for the unity8 package
@@ -146,9 +157,9 @@ Architecture: any
146Multi-Arch: same
157Multi-Arch: same
147Pre-Depends: ${misc:Pre-Depends},
158Pre-Depends: ${misc:Pre-Depends},
148Depends: gsettings-ubuntu-schemas,
159Depends: gsettings-ubuntu-schemas,
160+ libunity-core-6.0-9,
149 ${misc:Depends},
161 ${misc:Depends},
150 ${shlibs:Depends},
162 ${shlibs:Depends},
151− libunity-core-6.0-9,
152Provides: unity-launcher-impl,
163Provides: unity-launcher-impl,
153 unity-launcher-impl-3,
164 unity-launcher-impl-3,
154Description: Unity 8 private libs
165Description: Unity 8 private libs
debian/rules+1−2
@@ -6,8 +6,7 @@
6export DPKG_GENSYMBOLS_CHECK_LEVEL=4
6export DPKG_GENSYMBOLS_CHECK_LEVEL=4
7export NO_PNG_PKG_MANGLE=1
7export NO_PNG_PKG_MANGLE=1
8
8
9−.PHONY: build
10−build %:
9+%:
11 dh $@ --parallel --fail-missing --with python2,python3
10 dh $@ --parallel --fail-missing --with python2,python3
12
11
13override_dh_auto_clean:
12override_dh_auto_clean:
debian/unity-scope-tool.install−1
@@ -1,3 +1,2 @@
1usr/bin/unity-scope-tool
1usr/bin/unity-scope-tool
2−usr/share/applications/unity-scope-tool.desktop
3usr/share/unity8/ScopeTool.qml
2usr/share/unity8/ScopeTool.qml
debian/unity8-common.installnew file+5
@@ -0,0 +1,5 @@
1+usr/share/locale
2+usr/share/unity8/Components
3+usr/share/unity8/Dash
4+usr/share/unity8/Notifications
5+usr/share/unity8/graphics
debian/unity8-fake-env.install+1−1
@@ -1,4 +1,4 @@
1−usr/lib/*/unity8/qml/nonmirplugins
2usr/lib/*/unity8/qml/mocks
1usr/lib/*/unity8/qml/mocks
2+usr/lib/*/unity8/qml/nonmirplugins
3usr/lib/*/unity8/qml/scopefakes
3usr/lib/*/unity8/qml/scopefakes
4usr/share/unity8/mocks
4usr/share/unity8/mocks
debian/unity8-private.install+1−1
@@ -1,7 +1,7 @@
1usr/lib/*/unity8/qml/AccountsService
1usr/lib/*/unity8/qml/AccountsService
2+usr/lib/*/unity8/qml/Dash
2usr/lib/*/unity8/qml/HudClient
3usr/lib/*/unity8/qml/HudClient
3usr/lib/*/unity8/qml/LightDM
4usr/lib/*/unity8/qml/LightDM
4−usr/lib/*/unity8/qml/DashViews
5usr/lib/*/unity8/qml/Powerd
5usr/lib/*/unity8/qml/Powerd
6usr/lib/*/unity8/qml/SessionBroadcast
6usr/lib/*/unity8/qml/SessionBroadcast
7usr/lib/*/unity8/qml/Ubuntu
7usr/lib/*/unity8/qml/Ubuntu
debian/unity8.install+1−7
@@ -1,15 +1,9 @@
1+data/unity8.conf usr/share/upstart/sessions/
1usr/bin/unity8
2usr/bin/unity8
2usr/share/applications/unity8.desktop
3usr/share/applications/unity8.desktop
3−usr/share/locale
4−usr/share/unity8/Bottombar
5−usr/share/unity8/Components
6−usr/share/unity8/Dash
7usr/share/unity8/Greeter
4usr/share/unity8/Greeter
8usr/share/unity8/Hud
5usr/share/unity8/Hud
9usr/share/unity8/Launcher
6usr/share/unity8/Launcher
10−usr/share/unity8/Notifications
11usr/share/unity8/Panel
7usr/share/unity8/Panel
12usr/share/unity8/Shell.qml
8usr/share/unity8/Shell.qml
13usr/share/unity8/Stages
9usr/share/unity8/Stages
14−usr/share/unity8/graphics
15−data/unity8.conf usr/share/upstart/sessions/
plugins/AccountsService/CMakeLists.txt+1−4
@@ -1,5 +1,3 @@
1−include(Plugins)
2−
3add_definitions(-DSM_BUSNAME=systemBus)
1add_definitions(-DSM_BUSNAME=systemBus)
4
2
5add_library(AccountsService-qml MODULE
3add_library(AccountsService-qml MODULE
@@ -10,8 +8,7 @@ add_library(AccountsService-qml MODULE
10
8
11qt5_use_modules(AccountsService-qml DBus Qml)
9qt5_use_modules(AccountsService-qml DBus Qml)
12
10
13−export_qmlfiles(AccountsService AccountsService)
14−export_qmlplugin(AccountsService 0.1 AccountsService TARGETS AccountsService-qml)
11+add_unity8_plugin(AccountsService 0.1 AccountsService TARGETS AccountsService-qml)
15
12
16set(POLKIT_LIB_DIR "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/polkit-1")
13set(POLKIT_LIB_DIR "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/polkit-1")
17set(POLKIT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/polkit-1")
14set(POLKIT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/polkit-1")
plugins/AccountsService/qmldir+1−1
@@ -1,3 +1,3 @@
1module AccountsService
1module AccountsService
2plugin AccountsService-qml
2plugin AccountsService-qml
3−typeinfo plugin.qmltypes
3+typeinfo AccountsService.qmltypes
plugins/CMakeLists.txt+14−1
@@ -1,7 +1,20 @@
1+include(QmlPlugins)
2+
3+# Set up and install a plugin for unity8.
4+#
5+# add_unity8_plugin(plugin version path
6+# [...] # See export_qmlfiles and export_qmlplugin documentation for more options
7+# )
8+
9+macro(add_unity8_plugin PLUGIN VERSION PATH)
10+ export_qmlfiles(${PLUGIN} ${PATH} DESTINATION ${SHELL_INSTALL_QML} ${ARGN})
11+ export_qmlplugin(${PLUGIN} ${VERSION} ${PATH} DESTINATION ${SHELL_INSTALL_QML} ${ARGN})
12+endmacro()
13+
1add_subdirectory(AccountsService)
14add_subdirectory(AccountsService)
2add_subdirectory(HudClient)
15add_subdirectory(HudClient)
3add_subdirectory(LightDM)
16add_subdirectory(LightDM)
4−add_subdirectory(DashViews)
17+add_subdirectory(Dash)
5add_subdirectory(Powerd)
18add_subdirectory(Powerd)
6add_subdirectory(SessionBroadcast)
19add_subdirectory(SessionBroadcast)
7add_subdirectory(Ubuntu)
20add_subdirectory(Ubuntu)
plugins/DashViews/CMakeLists.txt → plugins/Dash/CMakeLists.txtrenamed+4−9
@@ -1,6 +1,3 @@
1−# export_qmlplugin macro
2−include(Plugins)
3−
4# There's no cmake var for v8 include path :-/
1# There's no cmake var for v8 include path :-/
5# so create one
2# so create one
6LIST(GET Qt5Core_INCLUDE_DIRS 0 QtCoreDir0)
3LIST(GET Qt5Core_INCLUDE_DIRS 0 QtCoreDir0)
@@ -30,17 +27,15 @@ set(QMLPLUGIN_SRC
30 organicgrid.cpp
27 organicgrid.cpp
31 )
28 )
32
29
33−add_library(DashViews-qml MODULE
30+add_library(Dash-qml MODULE
34 ${QMLPLUGIN_SRC}
31 ${QMLPLUGIN_SRC}
35 )
32 )
36
33
37−target_link_libraries(DashViews-qml
34+target_link_libraries(Dash-qml
38 ${Qt5Gui_LIBRARIES}
35 ${Qt5Gui_LIBRARIES}
39 ${Qt5Quick_LIBRARIES}
36 ${Qt5Quick_LIBRARIES}
40 )
37 )
41
38
42−qt5_use_modules(DashViews-qml Qml Quick)
39+qt5_use_modules(Dash-qml Qml Quick)
43
40
44−# export the qmldir qmltypes and plugin files
41+add_unity8_plugin(Dash 0.1 Dash TARGETS Dash-qml)
45−export_qmlfiles(DashViews DashViews)
46−export_qmlplugin(DashViews 0.1 DashViews TARGETS DashViews-qml)
plugins/Dash/CardCreator.jsnew file+520
@@ -0,0 +1,520 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+.pragma library
18+
19+var kBackgroundLoaderCode = 'Loader {\n\
20+ id: backgroundLoader; \n\
21+ objectName: "backgroundLoader"; \n\
22+ anchors.fill: parent; \n\
23+ asynchronous: root.asynchronous; \n\
24+ visible: status == Loader.Ready; \n\
25+ sourceComponent: UbuntuShape { \n\
26+ objectName: "background"; \n\
27+ radius: "medium"; \n\
28+ color: getColor(0) || "white"; \n\
29+ gradientColor: getColor(1) || color; \n\
30+ anchors.fill: parent; \n\
31+ image: backgroundImage.source ? backgroundImage : null; \n\
32+ property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b; \n\
33+ property Image backgroundImage: Image { \n\
34+ objectName: "backgroundImage"; \n\
35+ source: { \n\
36+ if (cardData && typeof cardData["background"] === "string") return cardData["background"]; \n\
37+ else if (template && typeof template["card-background"] === "string") return template["card-background"]; \n\
38+ else return ""; \n\
39+ } \n\
40+ } \n\
41+ function getColor(index) { \n\
42+ if (cardData && typeof cardData["background"] === "object" \n\
43+ && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) { \n\
44+ return cardData["background"]["elements"][index]; \n\
45+ } else if (template && typeof template["card-background"] === "object" \n\
46+ && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) { \n\
47+ return template["card-background"]["elements"][index]; \n\
48+ } else return undefined; \n\
49+ } \n\
50+ } \n\
51+ }\n';
52+
53+// %1 is used as anchors of artShapeHolder
54+// %2 is used as image width
55+// %3 is used as image height
56+var kArtShapeHolderCode = 'Item { \n\
57+ id: artShapeHolder; \n\
58+ height: root.fixedArtShapeSize.height != -1 ? root.fixedArtShapeSize.height : artShapeLoader.height; \n\
59+ width: root.fixedArtShapeSize.width != -1 ? root.fixedArtShapeSize.width : artShapeLoader.width; \n\
60+ anchors { %1 } \n\
61+ Loader { \n\
62+ id: artShapeLoader; \n\
63+ objectName: "artShapeLoader"; \n\
64+ active: cardData && cardData["art"] || false; \n\
65+ asynchronous: root.asynchronous; \n\
66+ visible: status == Loader.Ready; \n\
67+ sourceComponent: UbuntuShape { \n\
68+ id: artShape; \n\
69+ objectName: "artShape"; \n\
70+ radius: "medium"; \n\
71+ readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1; \n\
72+ readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect; \n\
73+ Component.onCompleted: updateWidthHeightBindings(); \n\
74+ onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings(); \n\
75+ visible: image.status == Image.Ready; \n\
76+ borderSource: artShapeBorderSource; \n\
77+ function updateWidthHeightBindings() { \n\
78+ if (aspectSmallerThanImageAspect) { \n\
79+ width = Qt.binding(function() { return !visible ? 0 : image.width }); \n\
80+ height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect }); \n\
81+ } else { \n\
82+ width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect }); \n\
83+ height = Qt.binding(function() { return !visible ? 0 : image.height }); \n\
84+ } \n\
85+ } \n\
86+ image: Image { \n\
87+ objectName: "artImage"; \n\
88+ source: cardData && cardData["art"] || ""; \n\
89+ cache: true; \n\
90+ asynchronous: root.asynchronous; \n\
91+ fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop; \n\
92+ readonly property real aspect: implicitWidth / implicitHeight; \n\
93+ width: %2; \n\
94+ height: %3; \n\
95+ } \n\
96+ } \n\
97+ } \n\
98+ }\n';
99+
100+var kOverlayLoaderCode = 'Loader { \n\
101+ id: overlayLoader; \n\
102+ anchors { \n\
103+ left: artShapeHolder.left; \n\
104+ right: artShapeHolder.right; \n\
105+ bottom: artShapeHolder.bottom; \n\
106+ } \n\
107+ active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false; \n\
108+ asynchronous: root.asynchronous; \n\
109+ visible: showHeader && status == Loader.Ready; \n\
110+ sourceComponent: ShaderEffect { \n\
111+ id: overlay; \n\
112+ height: fixedHeaderHeight != -1 ? fixedHeaderHeight : headerHeight; \n\
113+ opacity: 0.6; \n\
114+ property var source: ShaderEffectSource { \n\
115+ id: shaderSource; \n\
116+ sourceItem: artShapeLoader.item; \n\
117+ onVisibleChanged: if (visible) scheduleUpdate(); \n\
118+ live: false; \n\
119+ sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height); \n\
120+ } \n\
121+ vertexShader: " \n\
122+ uniform highp mat4 qt_Matrix; \n\
123+ attribute highp vec4 qt_Vertex; \n\
124+ attribute highp vec2 qt_MultiTexCoord0; \n\
125+ varying highp vec2 coord; \n\
126+ void main() { \n\
127+ coord = qt_MultiTexCoord0; \n\
128+ gl_Position = qt_Matrix * qt_Vertex; \n\
129+ }"; \n\
130+ fragmentShader: " \n\
131+ varying highp vec2 coord; \n\
132+ uniform sampler2D source; \n\
133+ uniform lowp float qt_Opacity; \n\
134+ void main() { \n\
135+ lowp vec4 tex = texture2D(source, coord); \n\
136+ gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity; \n\
137+ }"; \n\
138+ } \n\
139+ }\n';
140+
141+// %1 is used as anchors of row
142+// %2 is used as first child of the row
143+// %3 is used as second child of the row
144+var kHeaderRow2Code = 'Row { \n\
145+ id: row; \n\
146+ objectName: "outerRow"; \n\
147+ property real margins: units.gu(1); \n\
148+ spacing: margins; \n\
149+ anchors { %1 } \n\
150+ anchors.right: parent.right; \n\
151+ anchors.margins: margins;\n\
152+ data: [ %2\n\
153+ ,\n\
154+ %3 \n\
155+ ] \n\
156+ }\n';
157+
158+// %1 is used as anchors of row
159+// %2 is used as first child of the row
160+// %3 is used as second child of the row
161+// %4 is used as third child of the row
162+var kHeaderRow3Code = 'Row { \n\
163+ id: row; \n\
164+ objectName: "outerRow"; \n\
165+ property real margins: units.gu(1); \n\
166+ spacing: margins; \n\
167+ anchors { %1 } \n\
168+ anchors.right: parent.right; \n\
169+ anchors.margins: margins;\n\
170+ data: [ %2\n\
171+ ,\n\
172+ %3 \n\
173+ ,\n\
174+ %4 \n\
175+ ] \n\
176+ }\n';
177+
178+// %1 is used as first child of the column
179+// %2 is used as second child of the column
180+var kHeaderColumnCode = 'Column { \n\
181+ anchors.verticalCenter: parent.verticalCenter; \n\
182+ spacing: units.dp(2); \n\
183+ width: parent.width - x;\n\
184+ data: [ %1\n\
185+ ,\n\
186+ %2 \n\
187+ ] \n\
188+ }\n';
189+
190+// %1 is used as anchors of mascotShapeLoader
191+var kMascotShapeLoaderCode = 'Loader { \n\
192+ id: mascotShapeLoader; \n\
193+ objectName: "mascotShapeLoader"; \n\
194+ asynchronous: root.asynchronous; \n\
195+ active: mascotImage.status === Image.Ready; \n\
196+ visible: showHeader && active && status == Loader.Ready; \n\
197+ width: units.gu(6); \n\
198+ height: units.gu(5.625); \n\
199+ sourceComponent: UbuntuShape { image: mascotImage } \n\
200+ anchors { %1 } \n\
201+ }\n';
202+
203+// %1 is used as anchors of mascotImage
204+// %2 is used as visible of mascotImage
205+var kMascotImageCode = 'Image { \n\
206+ id: mascotImage; \n\
207+ objectName: "mascotImage"; \n\
208+ anchors { %1 } \n\
209+ readonly property int maxSize: Math.max(width, height) * 4; \n\
210+ source: cardData && cardData["mascot"]; \n\
211+ width: units.gu(6); \n\
212+ height: units.gu(5.625); \n\
213+ sourceSize { width: maxSize; height: maxSize } \n\
214+ fillMode: Image.PreserveAspectCrop; \n\
215+ horizontalAlignment: Image.AlignHCenter; \n\
216+ verticalAlignment: Image.AlignVCenter; \n\
217+ visible: %2; \n\
218+ }\n';
219+
220+// %1 is used as anchors of titleLabel
221+// %1 is used as color of titleLabel
222+// %3 is used as extra condition for visible of titleLabel
223+var kTitleLabelCode = 'Label { \n\
224+ id: titleLabel; \n\
225+ objectName: "titleLabel"; \n\
226+ anchors { %1 } \n\
227+ elide: Text.ElideRight; \n\
228+ fontSize: "small"; \n\
229+ wrapMode: Text.Wrap; \n\
230+ maximumLineCount: 2; \n\
231+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
232+ color: %2; \n\
233+ visible: showHeader %3; \n\
234+ text: root.title; \n\
235+ font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal; \n\
236+ horizontalAlignment: root.headerAlignment; \n\
237+ }\n';
238+
239+// %1 is used as anchors of subtitleLabel
240+// %2 is used as color of subtitleLabel
241+var kSubtitleLabelCode = 'Label { \n\
242+ id: subtitleLabel; \n\
243+ objectName: "subtitleLabel"; \n\
244+ anchors { %1 } \n\
245+ elide: Text.ElideRight; \n\
246+ fontSize: "small"; \n\
247+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale); \n\
248+ color: %2; \n\
249+ visible: titleLabel.visible && titleLabel.text; \n\
250+ text: cardData && cardData["subtitle"] || ""; \n\
251+ font.weight: Font.Light; \n\
252+ horizontalAlignment: root.headerAlignment; \n\
253+ }\n';
254+
255+// %1 is used as top anchor of summary
256+// %2 is used as topMargin anchor of summary
257+// %3 is used as color of summary
258+var kSummaryLabelCode = 'Label { \n\
259+ id: summary; \n\
260+ objectName: "summaryLabel"; \n\
261+ anchors { \n\
262+ top: %1; \n\
263+ left: parent.left; \n\
264+ right: parent.right; \n\
265+ margins: units.gu(1); \n\
266+ topMargin: %2; \n\
267+ } \n\
268+ wrapMode: Text.Wrap; \n\
269+ maximumLineCount: 5; \n\
270+ elide: Text.ElideRight; \n\
271+ text: cardData && cardData["summary"] || ""; \n\
272+ height: text ? implicitHeight : 0; \n\
273+ fontSize: "small"; \n\
274+ color: %3; \n\
275+ }\n';
276+
277+function cardString(template, components) {
278+ var code;
279+ code = 'AbstractButton { \n\
280+ id: root; \n\
281+ property var template; \n\
282+ property var components; \n\
283+ property var cardData; \n\
284+ property var artShapeBorderSource; \n\
285+ property real fontScale: 1.0; \n\
286+ property int headerAlignment: Text.AlignLeft; \n\
287+ property int fixedHeaderHeight: -1; \n\
288+ property size fixedArtShapeSize: Qt.size(-1, -1); \n\
289+ readonly property string title: cardData && cardData["title"] || ""; \n\
290+ property bool asynchronous: true; \n\
291+ property bool showHeader: true; \n\
292+ implicitWidth: childrenRect.width; \n';
293+
294+ var hasArt = components["art"] && components["art"]["field"] || false;
295+ var hasSummary = components["summary"] || false;
296+ var artAndSummary = hasArt && hasSummary;
297+ var isHorizontal = template["card-layout"] === "horizontal";
298+ var hasBackground = !isHorizontal && (template["card-background"] || components["background"] || artAndSummary);
299+ var hasTitle = components["title"] || false;
300+ var hasMascot = components["mascot"] || false;
301+ var headerAsOverlay = hasArt && template && template["overlay"] === true && (hasTitle || hasMascot);
302+ var hasSubtitle = components["subtitle"] || false;
303+ var hasHeaderRow = hasMascot && hasTitle;
304+
305+ if (hasBackground) {
306+ code += kBackgroundLoaderCode;
307+ }
308+
309+ if (hasArt) {
310+ code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
311+
312+ var widthCode, heightCode;
313+ var anchors;
314+ if (isHorizontal) {
315+ anchors = 'left: parent.left';
316+ if (hasMascot || hasTitle) {
317+ widthCode = 'height * artShape.aspect'
318+ heightCode = 'headerHeight';
319+ } else {
320+ // This side of the else is a bit silly, who wants an horizontal layout without mascot and title?
321+ // So we define a "random" height of the image height + 2 gu for the margins
322+ widthCode = 'height * artShape.aspect'
323+ heightCode = 'units.gu(7.625)';
324+ }
325+ } else {
326+ anchors = 'horizontalCenter: parent.horizontalCenter;';
327+ widthCode = 'root.width'
328+ heightCode = 'width / artShape.aspect';
329+ }
330+
331+ code += kArtShapeHolderCode.arg(anchors).arg(widthCode).arg(heightCode);
332+ } else {
333+ code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
334+ }
335+
336+ if (headerAsOverlay) {
337+ code += kOverlayLoaderCode;
338+ }
339+
340+ var headerVerticalAnchors;
341+ if (headerAsOverlay) {
342+ headerVerticalAnchors = 'bottom: artShapeHolder.bottom; \n\
343+ bottomMargin: units.gu(1);\n';
344+ } else {
345+ if (hasArt) {
346+ if (isHorizontal) {
347+ headerVerticalAnchors = 'top: artShapeHolder.top; \n\
348+ topMargin: units.gu(1);\n';
349+ } else {
350+ headerVerticalAnchors = 'top: artShapeHolder.bottom; \n\
351+ topMargin: units.gu(1);\n';
352+ }
353+ } else {
354+ headerVerticalAnchors = 'top: parent.top; \n\
355+ topMargin: units.gu(1);\n';
356+ }
357+ }
358+ var headerLeftAnchor;
359+ var headerLeftAnchorHasMagin = false;
360+ if (isHorizontal && hasArt) {
361+ headerLeftAnchor = 'left: artShapeHolder.right; \n\
362+ leftMargin: units.gu(1);\n';
363+ headerLeftAnchorHasMagin = true;
364+ } else {
365+ headerLeftAnchor = 'left: parent.left;\n';
366+ }
367+
368+ if (hasHeaderRow) {
369+ code += 'readonly property int headerHeight: row.height + row.margins * 2;\n'
370+ } else if (hasMascot) {
371+ code += 'readonly property int headerHeight: mascotImage.height + units.gu(1) * 2;\n'
372+ } else if (hasSubtitle) {
373+ code += 'readonly property int headerHeight: titleLabel.height + titleLabel.anchors.topMargin * 2 + subtitleLabel.height + subtitleLabel.anchors.topMargin;\n'
374+ } else if (hasTitle) {
375+ code += 'readonly property int headerHeight: titleLabel.height + titleLabel.anchors.topMargin * 2;\n'
376+ } else {
377+ code += 'readonly property int headerHeight: 0;\n'
378+ }
379+
380+ var mascotShapeCode = "";
381+ var mascotCode = "";
382+ if (hasMascot) {
383+ var useMascotShape = !hasBackground && !headerAsOverlay;
384+ var anchors = "";
385+ if (!hasHeaderRow) {
386+ anchors += headerLeftAnchor;
387+ anchors += headerVerticalAnchors;
388+ if (!headerLeftAnchorHasMagin) {
389+ anchors += 'leftMargin: units.gu(1);\n'
390+ }
391+ } else {
392+ anchors = "verticalCenter: parent.verticalCenter;"
393+ }
394+
395+ if (useMascotShape) {
396+ mascotShapeCode = kMascotShapeLoaderCode.arg(anchors);
397+ }
398+
399+ var mascotImageVisible = useMascotShape ? 'false' : 'showHeader';
400+ mascotCode = kMascotImageCode.arg(anchors).arg(mascotImageVisible);
401+ }
402+
403+ var summaryColorWithBackground = 'backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey"';
404+
405+ var titleSubtitleCode = "";
406+ if (hasTitle) {
407+ var color;
408+ if (headerAsOverlay) {
409+ color = '"white"';
410+ } else if (hasSummary) {
411+ color = 'summary.color';
412+ } else if (hasBackground) {
413+ color = summaryColorWithBackground;
414+ } else {
415+ color = '"grey"';
416+ }
417+
418+ var titleAnchors;
419+ var subtitleAnchors;
420+ if (hasMascot && hasSubtitle) {
421+ // Using row + column
422+ titleAnchors = 'left: parent.left; right: parent.right';
423+ subtitleAnchors = titleAnchors;
424+ } else if (hasMascot) {
425+ // Using row + label
426+ titleAnchors = 'verticalCenter: parent.verticalCenter;\n'
427+ } else {
428+ if (headerAsOverlay) {
429+ // Using anchors to the overlay
430+ titleAnchors = 'left: parent.left; \n\
431+ leftMargin: units.gu(1); \n\
432+ right: parent.right; \n\
433+ top: overlayLoader.top; \n\
434+ topMargin: units.gu(1);\n';
435+ } else {
436+ // Using anchors to the mascot/parent
437+ titleAnchors = "right: parent.right;";
438+ titleAnchors += headerLeftAnchor;
439+ titleAnchors += headerVerticalAnchors;
440+ }
441+ subtitleAnchors = 'left: titleLabel.left; \n\
442+ leftMargin: titleLabel.leftMargin; \n\
443+ right: titleLabel.right; \n\
444+ top: titleLabel.bottom; \n\
445+ topMargin: units.dp(2);\n';
446+ }
447+
448+ var titleLabelVisibleExtra = (headerAsOverlay ? '&& overlayLoader.active': '');
449+ var titleCode = kTitleLabelCode.arg(titleAnchors).arg(color).arg(titleLabelVisibleExtra);
450+ var subtitleCode = "";
451+ if (hasSubtitle) {
452+ subtitleCode += kSubtitleLabelCode.arg(subtitleAnchors).arg(color);
453+ }
454+
455+ if (hasMascot && hasSubtitle) {
456+ // If using row + column wrap the code in the column
457+ titleSubtitleCode = kHeaderColumnCode.arg(titleCode).arg(subtitleCode);
458+ } else {
459+ titleSubtitleCode = titleCode + subtitleCode;
460+ }
461+ }
462+
463+ if (hasHeaderRow) {
464+ if (mascotShapeCode != "") {
465+ code += kHeaderRow3Code.arg(headerVerticalAnchors + headerLeftAnchor).arg(mascotShapeCode).arg(mascotCode).arg(titleSubtitleCode);
466+ } else {
467+ code += kHeaderRow2Code.arg(headerVerticalAnchors + headerLeftAnchor).arg(mascotCode).arg(titleSubtitleCode);
468+ }
469+ } else {
470+ code += mascotShapeCode + mascotCode + titleSubtitleCode;
471+ }
472+
473+ if (hasSummary) {
474+ var summaryTopAnchor;
475+ if (isHorizontal && hasArt) summaryTopAnchor = "artShapeHolder.bottom";
476+ else if (headerAsOverlay && hasArt) summaryTopAnchor = "artShapeHolder.bottom";
477+ else if (hasHeaderRow) summaryTopAnchor = "row.bottom";
478+ else if (hasMascot) summaryTopAnchor = "mascotImage.bottom";
479+ else if (hasSubtitle) summaryTopAnchor = "subtitleLabel.bottom";
480+ else if (hasTitle) summaryTopAnchor = "titleLabel.bottom";
481+ else if (hasArt) summaryTopAnchor = "artShapeHolder.bottom";
482+ else summaryTopAnchor = "parent.top";
483+
484+ var color;
485+ if (hasBackground) {
486+ color = summaryColorWithBackground;
487+ } else {
488+ color = '"grey"';
489+ }
490+
491+ var summaryTopMargin = (hasMascot || hasSubtitle ? 'anchors.margins' : '0');
492+
493+ code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(color);
494+ }
495+
496+ if (hasSummary) {
497+ code += 'implicitHeight: summary.y + summary.height + (summary.text ? units.gu(1) : 0);\n';
498+ } else if (hasHeaderRow) {
499+ code += 'implicitHeight: row.y + row.height + units.gu(1);\n';
500+ } else if (hasMascot) {
501+ code += 'implicitHeight: mascotImage.y + mascotImage.height;\n';
502+ } else if (hasSubtitle) {
503+ code += 'implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
504+ } else if (hasTitle) {
505+ code += 'implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);\n';
506+ }
507+ // Close the AbstractButton
508+ code += '}\n';
509+
510+ return code;
511+}
512+
513+function createCardComponent(parent, template, components) {
514+ var imports = 'import QtQuick 2.2; \n\
515+ import Ubuntu.Components 0.1; \n\
516+ import Ubuntu.Thumbnailer 0.1;\n';
517+ var card = cardString(template, components);
518+ var code = imports + 'Component {\n' + card + '}\n';
519+ return Qt.createQmlObject(code, parent, "createCardComponent");
520+}
plugins/Dash/CardCreatorCache.qmlnew file+40
@@ -0,0 +1,40 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+pragma Singleton
18+import QtQuick 2.2
19+import "CardCreator.js" as CardCreator
20+
21+QtObject {
22+ id: root
23+
24+ property var cache: new Object();
25+
26+ function getCardComponent(template, components) {
27+ if (template === undefined || components === undefined)
28+ return undefined;
29+
30+ var tString = JSON.stringify(template);
31+ var cString = JSON.stringify(components);
32+ var allString = tString + cString;
33+ var component = cache[allString];
34+ if (component === undefined) {
35+ component = CardCreator.createCardComponent(root, template, components);
36+ cache[allString] = component;
37+ }
38+ return component;
39+ }
40+}
plugins/DashViews/abstractdashview.cpp → plugins/Dash/abstractdashview.cpprenamed+18−82
@@ -23,10 +23,8 @@ AbstractDashView::AbstractDashView()
23 , m_asyncRequestedIndex(-1)
23 , m_asyncRequestedIndex(-1)
24 , m_columnSpacing(0)
24 , m_columnSpacing(0)
25 , m_rowSpacing(0)
25 , m_rowSpacing(0)
26− , m_delegateCreationBegin(0)
26+ , m_displayMarginBeginning(0)
27− , m_delegateCreationEnd(0)
27+ , m_displayMarginEnd(0)
28− , m_delegateCreationBeginValid(false)
29− , m_delegateCreationEndValid(false)
30 , m_needsRelayout(false)
28 , m_needsRelayout(false)
31 , m_delegateValidated(false)
29 , m_delegateValidated(false)
32 , m_implicitHeightDirty(false)
30 , m_implicitHeightDirty(false)
@@ -46,17 +44,10 @@ void AbstractDashView::setModel(QAbstractItemModel *model)
46 if (!m_delegateModel) {
44 if (!m_delegateModel) {
47 createDelegateModel();
45 createDelegateModel();
48 } else {
46 } else {
49−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
50− disconnect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
51− }
52− m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
53− connect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
54−#else
55 disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
47 disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
56 }
48 }
57 m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
49 m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
58 connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
50 connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
59−#endif
60
51
61 cleanupExistingItems();
52 cleanupExistingItems();
62
53
@@ -121,73 +112,42 @@ void AbstractDashView::setRowSpacing(qreal rowSpacing)
121 }
112 }
122}
113}
123
114
124−qreal AbstractDashView::delegateCreationBegin() const
115+qreal AbstractDashView::displayMarginBeginning() const
125−{
126− return m_delegateCreationBegin;
127−}
128−
129−void AbstractDashView::setDelegateCreationBegin(qreal begin)
130{
116{
131− m_delegateCreationBeginValid = true;
117+ return m_displayMarginBeginning;
132− if (m_delegateCreationBegin == begin)
133− return;
134− m_delegateCreationBegin = begin;
135− if (isComponentComplete()) {
136− polish();
137− }
138− emit delegateCreationBeginChanged();
139}
118}
140
119
141−void AbstractDashView::resetDelegateCreationBegin()
120+void AbstractDashView::setDisplayMarginBeginning(qreal begin)
142{
121{
143− m_delegateCreationBeginValid = false;
122+ if (m_displayMarginBeginning == begin)
144− if (m_delegateCreationBegin == 0)
145 return;
123 return;
146− m_delegateCreationBegin = 0;
124+ m_displayMarginBeginning = begin;
147 if (isComponentComplete()) {
125 if (isComponentComplete()) {
148 polish();
126 polish();
149 }
127 }
150− emit delegateCreationBeginChanged();
128+ emit displayMarginBeginningChanged();
151}
129}
152
130
153−qreal AbstractDashView::delegateCreationEnd() const
131+qreal AbstractDashView::displayMarginEnd() const
154{
132{
155− return m_delegateCreationEnd;
133+ return m_displayMarginEnd;
156}
134}
157
135
158−void AbstractDashView::setDelegateCreationEnd(qreal end)
136+void AbstractDashView::setDisplayMarginEnd(qreal end)
159{
137{
160− m_delegateCreationEndValid = true;
138+ if (m_displayMarginEnd == end)
161− if (m_delegateCreationEnd == end)
162 return;
139 return;
163− m_delegateCreationEnd = end;
140+ m_displayMarginEnd = end;
164 if (isComponentComplete()) {
141 if (isComponentComplete()) {
165 polish();
142 polish();
166 }
143 }
167− emit delegateCreationEndChanged();
144+ emit displayMarginEndChanged();
168−}
169−
170−void AbstractDashView::resetDelegateCreationEnd()
171−{
172− m_delegateCreationEndValid = false;
173− if (m_delegateCreationEnd == 0)
174− return;
175− m_delegateCreationEnd = 0;
176− if (isComponentComplete()) {
177− polish();
178− }
179− emit delegateCreationEndChanged();
180}
145}
181
146
182void AbstractDashView::createDelegateModel()
147void AbstractDashView::createDelegateModel()
183{
148{
184−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
185− m_delegateModel = new QQuickVisualDataModel(qmlContext(this), this);
186− connect(m_delegateModel, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(itemCreated(int,QQuickItem*)));
187−#else
188 m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
149 m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
189 connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
150 connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
190−#endif
191 if (isComponentComplete())
151 if (isComponentComplete())
192 m_delegateModel->componentComplete();
152 m_delegateModel->componentComplete();
193}
153}
@@ -198,9 +158,8 @@ void AbstractDashView::refill()
198 return;
158 return;
199 }
159 }
200
160
201− const bool delegateRangesValid = m_delegateCreationBeginValid && m_delegateCreationEndValid;
161+ const qreal from = -m_displayMarginBeginning;
202− const qreal from = delegateRangesValid ? m_delegateCreationBegin : 0;
162+ const qreal to = height() + m_displayMarginEnd;
203− const qreal to = delegateRangesValid ? m_delegateCreationEnd : from + height();
204 const qreal buffer = (to - from) * bufferRatio;
163 const qreal buffer = (to - from) * bufferRatio;
205 const qreal bufferFrom = from - buffer;
164 const qreal bufferFrom = from - buffer;
206 const qreal bufferTo = to + buffer;
165 const qreal bufferTo = to + buffer;
@@ -253,16 +212,9 @@ QQuickItem *AbstractDashView::createItem(int modelIndex, bool asynchronous)
253 return nullptr;
212 return nullptr;
254
213
255 m_asyncRequestedIndex = -1;
214 m_asyncRequestedIndex = -1;
256−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
257− QQuickItem *item = m_delegateModel->item(modelIndex, asynchronous);
258−#else
259 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
215 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
260 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
216 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
261−#endif
262 if (!item) {
217 if (!item) {
263−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
264− m_asyncRequestedIndex = modelIndex;
265−#else
266 if (object) {
218 if (object) {
267 m_delegateModel->release(object);
219 m_delegateModel->release(object);
268 if (!m_delegateValidated) {
220 if (!m_delegateValidated) {
@@ -273,7 +225,6 @@ QQuickItem *AbstractDashView::createItem(int modelIndex, bool asynchronous)
273 } else {
225 } else {
274 m_asyncRequestedIndex = modelIndex;
226 m_asyncRequestedIndex = modelIndex;
275 }
227 }
276−#endif
277 return nullptr;
228 return nullptr;
278 } else {
229 } else {
279 addItemToView(modelIndex, item);
230 addItemToView(modelIndex, item);
@@ -283,13 +234,8 @@ QQuickItem *AbstractDashView::createItem(int modelIndex, bool asynchronous)
283
234
284void AbstractDashView::releaseItem(QQuickItem *item)
235void AbstractDashView::releaseItem(QQuickItem *item)
285{
236{
286−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
287− QQuickVisualModel::ReleaseFlags flags = m_delegateModel->release(item);
288− if (flags & QQuickVisualModel::Destroyed) {
289−#else
290 QQmlDelegateModel::ReleaseFlags flags = m_delegateModel->release(item);
237 QQmlDelegateModel::ReleaseFlags flags = m_delegateModel->release(item);
291 if (flags & QQmlDelegateModel::Destroyed) {
238 if (flags & QQmlDelegateModel::Destroyed) {
292−#endif
293 item->setParentItem(nullptr);
239 item->setParentItem(nullptr);
294 }
240 }
295}
241}
@@ -299,10 +245,6 @@ void AbstractDashView::setImplicitHeightDirty()
299 m_implicitHeightDirty = true;
245 m_implicitHeightDirty = true;
300}
246}
301
247
302−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
303−void AbstractDashView::itemCreated(int modelIndex, QQuickItem *item)
304−{
305−#else
306void AbstractDashView::itemCreated(int modelIndex, QObject *object)
248void AbstractDashView::itemCreated(int modelIndex, QObject *object)
307{
249{
308 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
250 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
@@ -310,7 +252,6 @@ void AbstractDashView::itemCreated(int modelIndex, QObject *object)
310 qWarning() << "AbstractDashView::itemCreated got a non item for index" << modelIndex;
252 qWarning() << "AbstractDashView::itemCreated got a non item for index" << modelIndex;
311 return;
253 return;
312 }
254 }
313−#endif
314 item->setParentItem(this);
255 item->setParentItem(this);
315
256
316 // We only need to call createItem if we are here because of an asynchronous generation
257 // We only need to call createItem if we are here because of an asynchronous generation
@@ -325,11 +266,7 @@ void AbstractDashView::itemCreated(int modelIndex, QObject *object)
325 }
266 }
326}
267}
327
268
328−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
329−void AbstractDashView::onModelUpdated(const QQuickChangeSet &changeSet, bool reset)
330−#else
331void AbstractDashView::onModelUpdated(const QQmlChangeSet &changeSet, bool reset)
269void AbstractDashView::onModelUpdated(const QQmlChangeSet &changeSet, bool reset)
332−#endif
333{
270{
334 if (reset) {
271 if (reset) {
335 cleanupExistingItems();
272 cleanupExistingItems();
@@ -364,9 +301,8 @@ void AbstractDashView::updatePolish()
364
301
365 refill();
302 refill();
366
303
367− const bool delegateRangesValid = m_delegateCreationBeginValid && m_delegateCreationEndValid;
304+ const qreal from = -m_displayMarginBeginning;
368− const qreal from = delegateRangesValid ? m_delegateCreationBegin : 0;
305+ const qreal to = height() + m_displayMarginEnd;
369− const qreal to = delegateRangesValid ? m_delegateCreationEnd : from + height();
370 updateItemCulling(from, to);
306 updateItemCulling(from, to);
371
307
372 if (m_implicitHeightDirty) {
308 if (m_implicitHeightDirty) {
plugins/DashViews/abstractdashview.h → plugins/Dash/abstractdashview.hrenamed+14−37
@@ -23,12 +23,8 @@ class QAbstractItemModel;
23class QQmlComponent;
23class QQmlComponent;
24#pragma GCC diagnostic push
24#pragma GCC diagnostic push
25#pragma GCC diagnostic ignored "-pedantic"
25#pragma GCC diagnostic ignored "-pedantic"
26−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
27−#include <private/qquickvisualdatamodel_p.h>
28−#else
29#include <private/qqmldelegatemodel_p.h>
26#include <private/qqmldelegatemodel_p.h>
30#include <qqmlinfo.h>
27#include <qqmlinfo.h>
31−#endif
32#pragma GCC diagnostic pop
28#pragma GCC diagnostic pop
33
29
34class AbstractDashView : public QQuickItem
30class AbstractDashView : public QQuickItem
@@ -39,14 +35,12 @@ class AbstractDashView : public QQuickItem
39 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
35 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
40 Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged)
36 Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged)
41 Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged)
37 Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged)
42− Q_PROPERTY(qreal delegateCreationBegin READ delegateCreationBegin
38+ Q_PROPERTY(qreal displayMarginBeginning READ displayMarginBeginning
43− WRITE setDelegateCreationBegin
39+ WRITE setDisplayMarginBeginning
44− NOTIFY delegateCreationBeginChanged
40+ NOTIFY displayMarginBeginningChanged)
45− RESET resetDelegateCreationBegin)
41+ Q_PROPERTY(qreal displayMarginEnd READ displayMarginEnd
46− Q_PROPERTY(qreal delegateCreationEnd READ delegateCreationEnd
42+ WRITE setDisplayMarginEnd
47− WRITE setDelegateCreationEnd
43+ NOTIFY displayMarginEndChanged)
48− NOTIFY delegateCreationEndChanged
49− RESET resetDelegateCreationEnd)
50
44
51friend class VerticalJournalTest;
45friend class VerticalJournalTest;
52friend class HorizontalJournalTest;
46friend class HorizontalJournalTest;
@@ -67,21 +61,19 @@ public:
67 qreal rowSpacing() const;
61 qreal rowSpacing() const;
68 void setRowSpacing(qreal rowSpacing);
62 void setRowSpacing(qreal rowSpacing);
69
63
70− qreal delegateCreationBegin() const;
64+ qreal displayMarginBeginning() const;
71− void setDelegateCreationBegin(qreal);
65+ void setDisplayMarginBeginning(qreal);
72− void resetDelegateCreationBegin();
73
66
74− qreal delegateCreationEnd() const;
67+ qreal displayMarginEnd() const;
75− void setDelegateCreationEnd(qreal);
68+ void setDisplayMarginEnd(qreal);
76− void resetDelegateCreationEnd();
77
69
78Q_SIGNALS:
70Q_SIGNALS:
79 void modelChanged();
71 void modelChanged();
80 void delegateChanged();
72 void delegateChanged();
81 void columnSpacingChanged();
73 void columnSpacingChanged();
82 void rowSpacingChanged();
74 void rowSpacingChanged();
83− void delegateCreationBeginChanged();
75+ void displayMarginBeginningChanged();
84− void delegateCreationEndChanged();
76+ void displayMarginEndChanged();
85
77
86protected Q_SLOTS:
78protected Q_SLOTS:
87 void relayout();
79 void relayout();
@@ -94,13 +86,8 @@ protected:
94 void setImplicitHeightDirty();
86 void setImplicitHeightDirty();
95
87
96private Q_SLOTS:
88private Q_SLOTS:
97−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
98− void itemCreated(int modelIndex, QQuickItem *item);
99− void onModelUpdated(const QQuickChangeSet &changeSet, bool reset);
100−#else
101 void itemCreated(int modelIndex, QObject *object);
89 void itemCreated(int modelIndex, QObject *object);
102 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
90 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
103−#endif
104 void onHeightChanged();
91 void onHeightChanged();
105
92
106private:
93private:
@@ -117,27 +104,17 @@ private:
117 virtual void doRelayout() = 0;
104 virtual void doRelayout() = 0;
118 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
105 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
119 virtual void calculateImplicitHeight() = 0;
106 virtual void calculateImplicitHeight() = 0;
120−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
121− virtual void processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes) = 0;
122−#else
123 virtual void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) = 0;
107 virtual void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) = 0;
124−#endif
125
108
126−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
127− QQuickVisualDataModel *m_delegateModel;
128−#else
129 QQmlDelegateModel *m_delegateModel;
109 QQmlDelegateModel *m_delegateModel;
130−#endif
131
110
132 // Index we are waiting because we requested it asynchronously
111 // Index we are waiting because we requested it asynchronously
133 int m_asyncRequestedIndex;
112 int m_asyncRequestedIndex;
134
113
135 int m_columnSpacing;
114 int m_columnSpacing;
136 int m_rowSpacing;
115 int m_rowSpacing;
137− qreal m_delegateCreationBegin;
116+ qreal m_displayMarginBeginning;
138− qreal m_delegateCreationEnd;
117+ qreal m_displayMarginEnd;
139− bool m_delegateCreationBeginValid;
140− bool m_delegateCreationEndValid;
141 bool m_needsRelayout;
118 bool m_needsRelayout;
142 bool m_delegateValidated;
119 bool m_delegateValidated;
143 bool m_implicitHeightDirty;
120 bool m_implicitHeightDirty;
plugins/DashViews/horizontaljournal.cpp → plugins/Dash/horizontaljournal.cpprenamed−12
@@ -28,12 +28,8 @@
28#include <qqmlengine.h>
28#include <qqmlengine.h>
29#pragma GCC diagnostic push
29#pragma GCC diagnostic push
30#pragma GCC diagnostic ignored "-pedantic"
30#pragma GCC diagnostic ignored "-pedantic"
31−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
32−#include <private/qquickvisualdatamodel_p.h>
33−#else
34#include <private/qqmldelegatemodel_p.h>
31#include <private/qqmldelegatemodel_p.h>
35#include <qqmlinfo.h>
32#include <qqmlinfo.h>
36−#endif
37#include <private/qquickitem_p.h>
33#include <private/qquickitem_p.h>
38#pragma GCC diagnostic pop
34#pragma GCC diagnostic pop
39
35
@@ -188,17 +184,9 @@ void HorizontalJournal::calculateImplicitHeight()
188 }
184 }
189}
185}
190
186
191−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
192−void HorizontalJournal::processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes)
193−#else
194void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
187void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
195−#endif
196{
188{
197−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
198− Q_FOREACH(const QQuickChangeSet::Remove &remove, removes) {
199−#else
200 Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
189 Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
201−#endif
202 for (int i = remove.count - 1; i >= 0; --i) {
190 for (int i = remove.count - 1; i >= 0; --i) {
203 const int indexToRemove = remove.index + i;
191 const int indexToRemove = remove.index + i;
204 // We only support removing from the end so
192 // We only support removing from the end so
plugins/DashViews/horizontaljournal.h → plugins/Dash/horizontaljournal.hrenamed−4
@@ -52,11 +52,7 @@ private:
52 void calculateImplicitHeight() override;
52 void calculateImplicitHeight() override;
53 void doRelayout() override;
53 void doRelayout() override;
54 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
54 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
55−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
56− void processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes) override;
57−#else
58 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
55 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
59−#endif
60
56
61 int m_firstVisibleIndex;
57 int m_firstVisibleIndex;
62 QList<QQuickItem*> m_visibleItems;
58 QList<QQuickItem*> m_visibleItems;
plugins/DashViews/listviewwithpageheader.cpp → plugins/Dash/listviewwithpageheader.cpprenamed−50
@@ -97,11 +97,7 @@
97#include <qqmlengine.h>
97#include <qqmlengine.h>
98#pragma GCC diagnostic push
98#pragma GCC diagnostic push
99#pragma GCC diagnostic ignored "-pedantic"
99#pragma GCC diagnostic ignored "-pedantic"
100−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
101−#include <private/qquickvisualdatamodel_p.h>
102−#else
103#include <private/qqmldelegatemodel_p.h>
100#include <private/qqmldelegatemodel_p.h>
104−#endif
105#include <private/qqmlglobal_p.h>
101#include <private/qqmlglobal_p.h>
106#include <private/qquickitem_p.h>
102#include <private/qquickitem_p.h>
107#include <private/qquickanimation_p.h>
103#include <private/qquickanimation_p.h>
@@ -191,17 +187,10 @@ void ListViewWithPageHeader::setModel(QAbstractItemModel *model)
191 if (!m_delegateModel) {
187 if (!m_delegateModel) {
192 createDelegateModel();
188 createDelegateModel();
193 } else {
189 } else {
194−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
195− disconnect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
196− }
197− m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
198− connect(m_delegateModel, SIGNAL(modelUpdated(QQuickChangeSet,bool)), this, SLOT(onModelUpdated(QQuickChangeSet,bool)));
199−#else
200 disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
190 disconnect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
201 }
191 }
202 m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
192 m_delegateModel->setModel(QVariant::fromValue<QAbstractItemModel *>(model));
203 connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
193 connect(m_delegateModel, SIGNAL(modelUpdated(QQmlChangeSet,bool)), this, SLOT(onModelUpdated(QQmlChangeSet,bool)));
204−#endif
205 Q_EMIT modelChanged();
194 Q_EMIT modelChanged();
206 polish();
195 polish();
207 // TODO?
196 // TODO?
@@ -570,13 +559,8 @@ void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
570
559
571void ListViewWithPageHeader::createDelegateModel()
560void ListViewWithPageHeader::createDelegateModel()
572{
561{
573−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
574− m_delegateModel = new QQuickVisualDataModel(qmlContext(this), this);
575− connect(m_delegateModel, SIGNAL(createdItem(int,QQuickItem*)), this, SLOT(itemCreated(int,QQuickItem*)));
576−#else
577 m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
562 m_delegateModel = new QQmlDelegateModel(qmlContext(this), this);
578 connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
563 connect(m_delegateModel, SIGNAL(createdItem(int,QObject*)), this, SLOT(itemCreated(int,QObject*)));
579−#endif
580 if (isComponentComplete())
564 if (isComponentComplete())
581 m_delegateModel->componentComplete();
565 m_delegateModel->componentComplete();
582 updateWatchedRoles();
566 updateWatchedRoles();
@@ -657,13 +641,8 @@ bool ListViewWithPageHeader::addVisibleItems(qreal fillFrom, qreal fillTo, bool
657void ListViewWithPageHeader::reallyReleaseItem(ListItem *listItem)
641void ListViewWithPageHeader::reallyReleaseItem(ListItem *listItem)
658{
642{
659 QQuickItem *item = listItem->m_item;
643 QQuickItem *item = listItem->m_item;
660−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
661− QQuickVisualModel::ReleaseFlags flags = m_delegateModel->release(item);
662− if (flags & QQuickVisualModel::Destroyed) {
663−#else
664 QQmlDelegateModel::ReleaseFlags flags = m_delegateModel->release(item);
644 QQmlDelegateModel::ReleaseFlags flags = m_delegateModel->release(item);
665 if (flags & QQmlDelegateModel::Destroyed) {
645 if (flags & QQmlDelegateModel::Destroyed) {
666−#endif
667 item->setParentItem(nullptr);
646 item->setParentItem(nullptr);
668 }
647 }
669 delete listItem->m_sectionItem;
648 delete listItem->m_sectionItem;
@@ -796,16 +775,9 @@ ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIn
796 return nullptr;
775 return nullptr;
797
776
798 m_asyncRequestedIndex = -1;
777 m_asyncRequestedIndex = -1;
799−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
800− QQuickItem *item = m_delegateModel->item(modelIndex, asynchronous);
801−#else
802 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
778 QObject* object = m_delegateModel->object(modelIndex, asynchronous);
803 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
779 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
804−#endif
805 if (!item) {
780 if (!item) {
806−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
807− m_asyncRequestedIndex = modelIndex;
808−#else
809 if (object) {
781 if (object) {
810 m_delegateModel->release(object);
782 m_delegateModel->release(object);
811 if (!m_delegateValidated) {
783 if (!m_delegateValidated) {
@@ -816,7 +788,6 @@ ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIn
816 } else {
788 } else {
817 m_asyncRequestedIndex = modelIndex;
789 m_asyncRequestedIndex = modelIndex;
818 }
790 }
819−#endif
820 return 0;
791 return 0;
821 } else {
792 } else {
822// qDebug() << "ListViewWithPageHeader::createItem::We have the item" << modelIndex << item;
793// qDebug() << "ListViewWithPageHeader::createItem::We have the item" << modelIndex << item;
@@ -872,10 +843,6 @@ ListViewWithPageHeader::ListItem *ListViewWithPageHeader::createItem(int modelIn
872 }
843 }
873}
844}
874
845
875−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
876−void ListViewWithPageHeader::itemCreated(int modelIndex, QQuickItem *item)
877−{
878−#else
879void ListViewWithPageHeader::itemCreated(int modelIndex, QObject *object)
846void ListViewWithPageHeader::itemCreated(int modelIndex, QObject *object)
880{
847{
881 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
848 QQuickItem *item = qmlobject_cast<QQuickItem*>(object);
@@ -883,7 +850,6 @@ void ListViewWithPageHeader::itemCreated(int modelIndex, QObject *object)
883 qWarning() << "ListViewWithPageHeader::itemCreated got a non item for index" << modelIndex;
850 qWarning() << "ListViewWithPageHeader::itemCreated got a non item for index" << modelIndex;
884 return;
851 return;
885 }
852 }
886−#endif
887// qDebug() << "ListViewWithPageHeader::itemCreated" << modelIndex << item;
853// qDebug() << "ListViewWithPageHeader::itemCreated" << modelIndex << item;
888 // Check we are not being taken down and don't paint anything
854 // Check we are not being taken down and don't paint anything
889 // TODO Check if we still need this in 5.2
855 // TODO Check if we still need this in 5.2
@@ -924,21 +890,13 @@ void ListViewWithPageHeader::onHeightChanged()
924}
890}
925
891
926
892
927−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
928−void ListViewWithPageHeader::onModelUpdated(const QQuickChangeSet &changeSet, bool /*reset*/)
929−#else
930void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool /*reset*/)
893void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool /*reset*/)
931−#endif
932{
894{
933 // TODO Do something with reset
895 // TODO Do something with reset
934// qDebug() << "ListViewWithPageHeader::onModelUpdated" << changeSet << reset;
896// qDebug() << "ListViewWithPageHeader::onModelUpdated" << changeSet << reset;
935 const auto oldFirstVisibleIndex = m_firstVisibleIndex;
897 const auto oldFirstVisibleIndex = m_firstVisibleIndex;
936
898
937−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
938− Q_FOREACH(const QQuickChangeSet::Remove &remove, changeSet.removes()) {
939−#else
940 Q_FOREACH(const QQmlChangeSet::Remove &remove, changeSet.removes()) {
899 Q_FOREACH(const QQmlChangeSet::Remove &remove, changeSet.removes()) {
941−#endif
942// qDebug() << "ListViewWithPageHeader::onModelUpdated Remove" << remove.index << remove.count;
900// qDebug() << "ListViewWithPageHeader::onModelUpdated Remove" << remove.index << remove.count;
943 if (remove.index + remove.count > m_firstVisibleIndex && remove.index < m_firstVisibleIndex + m_visibleItems.count()) {
901 if (remove.index + remove.count > m_firstVisibleIndex && remove.index < m_firstVisibleIndex + m_visibleItems.count()) {
944 const qreal oldFirstValidIndexPos = m_visibleItems.first()->y();
902 const qreal oldFirstValidIndexPos = m_visibleItems.first()->y();
@@ -992,11 +950,7 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
992 }
950 }
993 }
951 }
994
952
995−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
996− Q_FOREACH(const QQuickChangeSet::Insert &insert, changeSet.inserts()) {
997−#else
998 Q_FOREACH(const QQmlChangeSet::Insert &insert, changeSet.inserts()) {
953 Q_FOREACH(const QQmlChangeSet::Insert &insert, changeSet.inserts()) {
999−#endif
1000// qDebug() << "ListViewWithPageHeader::onModelUpdated Insert" << insert.index << insert.count;
954// qDebug() << "ListViewWithPageHeader::onModelUpdated Insert" << insert.index << insert.count;
1001 const bool insertingInValidIndexes = insert.index > m_firstVisibleIndex && insert.index < m_firstVisibleIndex + m_visibleItems.count();
955 const bool insertingInValidIndexes = insert.index > m_firstVisibleIndex && insert.index < m_firstVisibleIndex + m_visibleItems.count();
1002 const bool firstItemWithViewOnTop = insert.index == 0 && m_firstVisibleIndex == 0 && m_visibleItems.first()->y() + m_clipItem->y() > contentY();
956 const bool firstItemWithViewOnTop = insert.index == 0 && m_firstVisibleIndex == 0 && m_visibleItems.first()->y() + m_clipItem->y() > contentY();
@@ -1054,11 +1008,7 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
1054 }
1008 }
1055 }
1009 }
1056
1010
1057−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
1058− Q_FOREACH(const QQuickChangeSet::Change &change, changeSet.changes()) {
1059−#else
1060 Q_FOREACH(const QQmlChangeSet::Change &change, changeSet.changes()) {
1011 Q_FOREACH(const QQmlChangeSet::Change &change, changeSet.changes()) {
1061−#endif
1062// qDebug() << "ListViewWithPageHeader::onModelUpdated Change" << change.index << change.count;
1012// qDebug() << "ListViewWithPageHeader::onModelUpdated Change" << change.index << change.count;
1063 for (int i = change.index; i < change.count; ++i) {
1013 for (int i = change.index; i < change.count; ++i) {
1064 ListItem *item = itemAtIndex(i);
1014 ListItem *item = itemAtIndex(i);
plugins/DashViews/listviewwithpageheader.h → plugins/Dash/listviewwithpageheader.hrenamed−20
@@ -17,21 +17,13 @@
17#ifndef LISTVIEWWITHPAGEHEADER_H
17#ifndef LISTVIEWWITHPAGEHEADER_H
18#define LISTVIEWWITHPAGEHEADER_H
18#define LISTVIEWWITHPAGEHEADER_H
19
19
20−#pragma GCC diagnostic push
21−#pragma GCC diagnostic ignored "-pedantic"
22#include <private/qquickitemchangelistener_p.h>
20#include <private/qquickitemchangelistener_p.h>
23#include <private/qquickflickable_p.h>
21#include <private/qquickflickable_p.h>
24−#pragma GCC diagnostic pop
25
22
26class QAbstractItemModel;
23class QAbstractItemModel;
27class QQuickNumberAnimation;
24class QQuickNumberAnimation;
28−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
29−class QQuickChangeSet;
30−class QQuickVisualDataModel;
31−#else
32class QQmlChangeSet;
25class QQmlChangeSet;
33class QQmlDelegateModel;
26class QQmlDelegateModel;
34−#endif
35
27
36
28
37/**
29/**
@@ -117,19 +109,11 @@ protected:
117 void updatePolish();
109 void updatePolish();
118
110
119private Q_SLOTS:
111private Q_SLOTS:
120−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
121− void itemCreated(int modelIndex, QQuickItem *item);
122−#else
123 void itemCreated(int modelIndex, QObject *object);
112 void itemCreated(int modelIndex, QObject *object);
124−#endif
125 void onContentHeightChanged();
113 void onContentHeightChanged();
126 void onContentWidthChanged();
114 void onContentWidthChanged();
127 void onHeightChanged();
115 void onHeightChanged();
128−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
129− void onModelUpdated(const QQuickChangeSet &changeSet, bool reset);
130−#else
131 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
116 void onModelUpdated(const QQmlChangeSet &changeSet, bool reset);
132−#endif
133 void onShowHeaderAnimationFinished();
117 void onShowHeaderAnimationFinished();
134
118
135private:
119private:
@@ -168,11 +152,7 @@ private:
168 QQuickItem *getSectionItem(int modelIndex, bool alreadyInserted);
152 QQuickItem *getSectionItem(int modelIndex, bool alreadyInserted);
169 QQuickItem *getSectionItem(const QString &sectionText);
153 QQuickItem *getSectionItem(const QString &sectionText);
170
154
171−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
172− QQuickVisualDataModel *m_delegateModel;
173−#else
174 QQmlDelegateModel *m_delegateModel;
155 QQmlDelegateModel *m_delegateModel;
175−#endif
176
156
177 // Index we are waiting because we requested it asynchronously
157 // Index we are waiting because we requested it asynchronously
178 int m_asyncRequestedIndex;
158 int m_asyncRequestedIndex;
plugins/DashViews/organicgrid.cpp → plugins/Dash/organicgrid.cpprenamed−8
@@ -237,17 +237,9 @@ void OrganicGrid::calculateImplicitHeight()
237 }
237 }
238}
238}
239
239
240−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
241−void OrganicGrid::processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes)
242−#else
243void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
240void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
244−#endif
245{
241{
246−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
247− Q_FOREACH(const QQuickChangeSet::Remove &remove, removes) {
248−#else
249 Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
242 Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
250−#endif
251 for (int i = remove.count - 1; i >= 0; --i) {
243 for (int i = remove.count - 1; i >= 0; --i) {
252 const int indexToRemove = remove.index + i;
244 const int indexToRemove = remove.index + i;
253 // We only support removing from the end
245 // We only support removing from the end
plugins/DashViews/organicgrid.h → plugins/Dash/organicgrid.hrenamed−4
@@ -79,11 +79,7 @@ private:
79 void doRelayout() override;
79 void doRelayout() override;
80 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
80 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
81 void calculateImplicitHeight() override;
81 void calculateImplicitHeight() override;
82−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
83− void processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes) override;
84−#else
85 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
82 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
86−#endif
87
83
88 QSizeF m_smallDelegateSize;
84 QSizeF m_smallDelegateSize;
89 QSizeF m_bigDelegateSize;
85 QSizeF m_bigDelegateSize;
plugins/DashViews/plugin.cpp → plugins/Dash/plugin.cpprenamed+2−2
@@ -24,9 +24,9 @@
24
24
25#include <QAbstractItemModel>
25#include <QAbstractItemModel>
26
26
27−void DashViewsPlugin::registerTypes(const char *uri)
27+void DashPlugin::registerTypes(const char *uri)
28{
28{
29− Q_ASSERT(uri == QLatin1String("DashViews"));
29+ Q_ASSERT(uri == QLatin1String("Dash"));
30 qmlRegisterType<QAbstractItemModel>();
30 qmlRegisterType<QAbstractItemModel>();
31 qmlRegisterType<HorizontalJournal>(uri, 0, 1, "HorizontalJournal");
31 qmlRegisterType<HorizontalJournal>(uri, 0, 1, "HorizontalJournal");
32 qmlRegisterType<ListViewWithPageHeader>(uri, 0, 1, "ListViewWithPageHeader");
32 qmlRegisterType<ListViewWithPageHeader>(uri, 0, 1, "ListViewWithPageHeader");
plugins/DashViews/plugin.h → plugins/Dash/plugin.hrenamed+3−3
@@ -15,13 +15,13 @@
15 *
15 *
16 */
16 */
17
17
18−#ifndef DASHVIEWS_PLUGIN_H
18+#ifndef DASH_PLUGIN_H
19−#define DASHVIEWS_PLUGIN_H
19+#define DASH_PLUGIN_H
20
20
21#include <QtQml/QQmlEngine>
21#include <QtQml/QQmlEngine>
22#include <QtQml/QQmlExtensionPlugin>
22#include <QtQml/QQmlExtensionPlugin>
23
23
24−class DashViewsPlugin : public QQmlExtensionPlugin
24+class DashPlugin : public QQmlExtensionPlugin
25{
25{
26 Q_OBJECT
26 Q_OBJECT
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
27 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
plugins/Dash/qmldirnew file+4
@@ -0,0 +1,4 @@
1+module Dash
2+plugin Dash-qml
3+typeinfo Dash.qmltypes
4+singleton CardCreatorCache 0.1 CardCreatorCache.qml
plugins/DashViews/verticaljournal.cpp → plugins/Dash/verticaljournal.cpprenamed−8
@@ -239,17 +239,9 @@ void VerticalJournal::updateItemCulling(qreal visibleFromY, qreal visibleToY)
239 }
239 }
240}
240}
241
241
242−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
243−void VerticalJournal::processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes)
244−#else
245void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
242void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
246−#endif
247{
243{
248−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
249− Q_FOREACH(const QQuickChangeSet::Remove &remove, removes) {
250−#else
251 Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
244 Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
252−#endif
253 for (int i = remove.count - 1; i >= 0; --i) {
245 for (int i = remove.count - 1; i >= 0; --i) {
254 const int indexToRemove = remove.index + i;
246 const int indexToRemove = remove.index + i;
255 // Since we only support removing from the end, indexToRemove
247 // Since we only support removing from the end, indexToRemove
plugins/DashViews/verticaljournal.h → plugins/Dash/verticaljournal.hrenamed−4
@@ -90,11 +90,7 @@ private:
90 void calculateImplicitHeight() override;
90 void calculateImplicitHeight() override;
91 void doRelayout() override;
91 void doRelayout() override;
92 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
92 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
93−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
94− void processModelRemoves(const QVector<QQuickChangeSet::Remove> &removes) override;
95−#else
96 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
93 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
97−#endif
98
94
99 QVector<QList<ViewItem>> m_columnVisibleItems;
95 QVector<QList<ViewItem>> m_columnVisibleItems;
100 QHash<int, int> m_indexColumnMap;
96 QHash<int, int> m_indexColumnMap;
plugins/DashViews/qmldirdeleted−3
@@ -1,3 +0,0 @@
1−module DashViews
2−plugin DashViews-qml
3−typeinfo plugin.qmltypes
plugins/HudClient/CMakeLists.txt+1−6
@@ -1,6 +1,3 @@
1−# export_qmlplugin macro
2−include(Plugins)
3−
4find_package(Qt5Core REQUIRED)
1find_package(Qt5Core REQUIRED)
5find_package(Qt5Quick REQUIRED)
2find_package(Qt5Quick REQUIRED)
6pkg_search_module(DEE dee-1.0 REQUIRED)
3pkg_search_module(DEE dee-1.0 REQUIRED)
@@ -38,6 +35,4 @@ target_link_libraries(HudClientQml
38
35
39qt5_use_modules(HudClientQml Qml)
36qt5_use_modules(HudClientQml Qml)
40
37
41−# export the qmldir qmltypes and plugin files
42−export_qmlfiles(HudClient HudClient)
43−export_qmlplugin(HudClient 0.1 HudClient TARGETS HudClientQml)
38+add_unity8_plugin(HudClient 0.1 HudClient TARGETS HudClientQml)
plugins/HudClient/qmldir+1−1
@@ -1,3 +1,3 @@
1module HudClient
1module HudClient
2plugin HudClientQml
2plugin HudClientQml
3−typeinfo plugin.qmltypes
3+typeinfo HudClient.qmltypes
plugins/LightDM/CMakeLists.txt+1−6
@@ -1,6 +1,3 @@
1−# export_qmlplugin macro
2−include(Plugins)
3−
4# Dependencies
1# Dependencies
5include(FindPkgConfig)
2include(FindPkgConfig)
6pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
3pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
@@ -37,6 +34,4 @@ target_link_libraries(LightDM-qml
37
34
38qt5_use_modules(LightDM-qml DBus Gui Qml)
35qt5_use_modules(LightDM-qml DBus Gui Qml)
39
36
40−# export the qmldir qmltypes and plugin files
41−export_qmlfiles(LightDM LightDM)
42−export_qmlplugin(LightDM 0.1 LightDM TARGETS LightDM-qml)
37+add_unity8_plugin(LightDM 0.1 LightDM TARGETS LightDM-qml)
plugins/LightDM/qmldir+1−1
@@ -1,3 +1,3 @@
1module LightDM
1module LightDM
2plugin LightDM-qml
2plugin LightDM-qml
3−typeinfo plugin.qmltypes
3+typeinfo LightDM.qmltypes
plugins/Powerd/CMakeLists.txt+1−3
@@ -1,4 +1,3 @@
1−include(Plugins)
2include(FindPkgConfig)
1include(FindPkgConfig)
3
2
4pkg_search_module(GIO REQUIRED gio-2.0)
3pkg_search_module(GIO REQUIRED gio-2.0)
@@ -17,5 +16,4 @@ add_library(Powerd-qml MODULE
17qt5_use_modules(Powerd-qml DBus Qml)
16qt5_use_modules(Powerd-qml DBus Qml)
18target_link_libraries(Powerd-qml ${GIO_LDFLAGS})
17target_link_libraries(Powerd-qml ${GIO_LDFLAGS})
19
18
20−export_qmlfiles(Powerd Powerd)
21−export_qmlplugin(Powerd 0.1 Powerd TARGETS Powerd-qml)
19+add_unity8_plugin(Powerd 0.1 Powerd TARGETS Powerd-qml)
plugins/Powerd/qmldir+1−1
@@ -1,3 +1,3 @@
1module Powerd
1module Powerd
2plugin Powerd-qml
2plugin Powerd-qml
3−typeinfo plugin.qmltypes
3+typeinfo Powerd.qmltypes
plugins/SessionBroadcast/CMakeLists.txt+1−4
@@ -1,5 +1,3 @@
1−include(Plugins)
2−
3add_definitions(-DSM_BUSNAME=systemBus)
1add_definitions(-DSM_BUSNAME=systemBus)
4
2
5add_library(SessionBroadcast-qml MODULE
3add_library(SessionBroadcast-qml MODULE
@@ -9,5 +7,4 @@ add_library(SessionBroadcast-qml MODULE
9
7
10qt5_use_modules(SessionBroadcast-qml DBus Qml)
8qt5_use_modules(SessionBroadcast-qml DBus Qml)
11
9
12−export_qmlfiles(SessionBroadcast SessionBroadcast)
13−export_qmlplugin(SessionBroadcast 0.1 SessionBroadcast TARGETS SessionBroadcast-qml)
10+add_unity8_plugin(SessionBroadcast 0.1 SessionBroadcast TARGETS SessionBroadcast-qml)
plugins/SessionBroadcast/qmldir+1−1
@@ -1,3 +1,3 @@
1module SessionBroadcast
1module SessionBroadcast
2plugin SessionBroadcast-qml
2plugin SessionBroadcast-qml
3−typeinfo plugin.qmltypes
3+typeinfo SessionBroadcast.qmltypes
plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt+1−6
@@ -1,6 +1,3 @@
1−# export_qmlplugin macro
2−include(Plugins)
3−
4include_directories(
1include_directories(
5 ${CMAKE_CURRENT_SOURCE_DIR}
2 ${CMAKE_CURRENT_SOURCE_DIR}
6 ${CMAKE_CURRENT_BINARY_DIR}
3 ${CMAKE_CURRENT_BINARY_DIR}
@@ -17,6 +14,4 @@ add_library(DownloadDaemonListener MODULE ${DOWNLOADDAEMONLISTENER_SOURCES})
17
14
18qt5_use_modules(DownloadDaemonListener Qml Quick DBus Core)
15qt5_use_modules(DownloadDaemonListener Qml Quick DBus Core)
19
16
20−# export the qmldir qmltypes and plugin files
21−export_qmlfiles(Ubuntu.DownloadDaemonListener Ubuntu/DownloadDaemonListener)
22−export_qmlplugin(Ubuntu.DownloadDaemonListener 0.1 Ubuntu/DownloadDaemonListener TARGETS DownloadDaemonListener)
17+add_unity8_plugin(Ubuntu.DownloadDaemonListener 0.1 Ubuntu/DownloadDaemonListener TARGETS DownloadDaemonListener)
plugins/Ubuntu/DownloadDaemonListener/qmldir+1−1
@@ -1,3 +1,3 @@
1module Ubuntu.DownloadDaemonListener
1module Ubuntu.DownloadDaemonListener
2plugin DownloadDaemonListener
2plugin DownloadDaemonListener
3−typeinfo plugins.qmltypes
3+typeinfo DownloadDaemonListener.qmltypes
plugins/Ubuntu/Gestures/CMakeLists.txt+1−6
@@ -1,6 +1,3 @@
1−# export_qmlplugin macro
2−include(Plugins)
3−
4set(UbuntuGestureQml_SOURCES
1set(UbuntuGestureQml_SOURCES
5 plugin.cpp
2 plugin.cpp
6 AxisVelocityCalculator.cpp
3 AxisVelocityCalculator.cpp
@@ -19,6 +16,4 @@ qt5_use_modules(UbuntuGestureQml Core Quick)
19# So that Foo.cpp can #include "Foo.moc"
16# So that Foo.cpp can #include "Foo.moc"
20include_directories(${CMAKE_CURRENT_BINARY_DIR})
17include_directories(${CMAKE_CURRENT_BINARY_DIR})
21
18
22−# export the qmldir qmltypes and plugin files
23−export_qmlfiles(Ubuntu.Gestures Ubuntu/Gestures)
24−export_qmlplugin(Ubuntu.Gestures 0.1 Ubuntu/Gestures TARGETS UbuntuGestureQml)
19+add_unity8_plugin(Ubuntu.Gestures 0.1 Ubuntu/Gestures TARGETS UbuntuGestureQml)
plugins/Ubuntu/Gestures/qmldir+1−1
@@ -1,3 +1,3 @@
1module Ubuntu.Gestures
1module Ubuntu.Gestures
2plugin UbuntuGestureQml
2plugin UbuntuGestureQml
3−typeinfo plugin.qmltypes
3+typeinfo Gestures.qmltypes
plugins/Unity/Indicators/CMakeLists.txt+4−7
@@ -1,6 +1,3 @@
1−# export_qmlplugin macro
2−include(Plugins)
3−
4project(IndicatorsQml)
1project(IndicatorsQml)
5
2
6pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
3pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
@@ -10,8 +7,6 @@ pkg_check_modules(QMENUMODEL REQUIRED qmenumodel)
10find_package(Qt5Core REQUIRED)
7find_package(Qt5Core REQUIRED)
11find_package(Qt5Quick REQUIRED)
8find_package(Qt5Quick REQUIRED)
12
9
13−add_subdirectory(qml)
14−
15include_directories(
10include_directories(
16 ${CMAKE_CURRENT_SOURCE_DIR}
11 ${CMAKE_CURRENT_SOURCE_DIR}
17 ${CMAKE_CURRENT_BINARY_DIR}
12 ${CMAKE_CURRENT_BINARY_DIR}
@@ -56,5 +51,7 @@ target_link_libraries(IndicatorsQml
56
51
57qt5_use_modules(IndicatorsQml Core Qml Quick)
52qt5_use_modules(IndicatorsQml Core Qml Quick)
58
53
59−# export the qmltypes and plugin files
60−export_qmlplugin(Unity.Indicators 0.1 Unity/Indicators TARGETS IndicatorsQml)
54+add_unity8_plugin(Unity.Indicators 0.1 Unity/Indicators
55+ SEARCH_PATH qml
56+ TARGETS IndicatorsQml
57+)
plugins/Unity/Indicators/menucontentactivator.cpp−1
@@ -316,7 +316,6 @@ MenuContentState* MenuContentActivatorPrivate::content_at(QQmlListProperty<MenuC
316 if (!d->m_content.contains(index)) {
316 if (!d->m_content.contains(index)) {
317 MenuContentState* content = new MenuContentState(false);
317 MenuContentState* content = new MenuContentState(false);
318 d->m_content[index] = content;
318 d->m_content[index] = content;
319− Q_EMIT p->contentChanged();
320 return content;
319 return content;
321 }
320 }
322
321
plugins/Unity/Indicators/qml/CMakeLists.txtdeleted−5
@@ -1,5 +0,0 @@
1−# export_qmlplugin macro
2−include(Plugins)
3−
4−# export the qmldir, *.qml files.
5−export_qmlfiles(Unity.Indicators Unity/Indicators)
plugins/Unity/Indicators/qml/MenuItemFactory.qml+1−1
@@ -273,7 +273,7 @@ Item {
273 text: menuData && menuData.label || ""
273 text: menuData && menuData.label || ""
274 iconSource: menuData && menuData.icon || "image://theme/calendar"
274 iconSource: menuData && menuData.icon || "image://theme/calendar"
275 time: timeFormatter.timeString
275 time: timeFormatter.timeString
276− eventColor: menu && menu.ext.hasOwnProperty("xCanonicalColor") ? menu.ext.xCanonicalColor : Qt.rgba(0.0, 0.0, 0.0, 0.0)
276+ eventColor: getExtendedProperty(extendedData, "xCanonicalColor", Qt.rgba(0.0, 0.0, 0.0, 0.0))
277 enabled: menuData && menuData.sensitive || false
277 enabled: menuData && menuData.sensitive || false
278
278
279 onMenuModelChanged: {
279 onMenuModelChanged: {
plugins/Unity/Indicators/qml/qmldir+1−1
@@ -1,6 +1,6 @@
1module Unity.Indicators
1module Unity.Indicators
2plugin IndicatorsQml
2plugin IndicatorsQml
3−typeinfo plugin.qmltypes
3+typeinfo Indicators.qmltypes
4
4
5CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
5CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
6IndicatorBase 0.1 IndicatorBase.qml
6IndicatorBase 0.1 IndicatorBase.qml
plugins/Unity/Indicators/rootactionstate.cpp+7−8
@@ -240,19 +240,18 @@ QVariant RootActionState::toQVariant(GVariant* state) const
240
240
241 QStringList icons;
241 QStringList icons;
242
242
243− if (g_variant_type_is_array(g_variant_get_type(vvalue))) {
243+ if (g_variant_is_of_type(vvalue, G_VARIANT_TYPE("av"))) {
244−
244+ GVariantIter iter;
245−
245+ GVariant *val = 0;
246− for (int i = 0, iMax = g_variant_n_children(vvalue); i < iMax; i++) {
246+ g_variant_iter_init (&iter, vvalue);
247− GVariant *child = g_variant_get_child_value(vvalue, i);
247+ while (g_variant_iter_loop (&iter, "v", &val))
248−
248+ {
249 // FIXME - should be sending a url.
249 // FIXME - should be sending a url.
250− GIcon *gicon = g_icon_deserialize (child);
250+ GIcon *gicon = g_icon_deserialize (val);
251 if (gicon) {
251 if (gicon) {
252 icons << iconUri(gicon);
252 icons << iconUri(gicon);
253 g_object_unref (gicon);
253 g_object_unref (gicon);
254 }
254 }
255− g_variant_unref(child);
256 }
255 }
257 }
256 }
258 // will overwrite icon.
257 // will overwrite icon.
plugins/Unity/Launcher/CMakeLists.txt+1−3
@@ -32,6 +32,4 @@ target_link_libraries(UnityLauncher-qml ${GSETTINGS_QT_LDFLAGS})
32
32
33qt5_use_modules(UnityLauncher-qml DBus Qml)
33qt5_use_modules(UnityLauncher-qml DBus Qml)
34
34
35−# export the qmldir and qmltypes files
36−export_qmlfiles(Unity.Launcher Unity/Launcher)
37−export_qmlplugin(Unity.Launcher 0.1 Unity/Launcher TARGETS UnityLauncher-qml)
35+add_unity8_plugin(Unity.Launcher 0.1 Unity/Launcher TARGETS UnityLauncher-qml)
plugins/Unity/Launcher/backend/launcherbackend.cpp+293−29
@@ -31,13 +31,14 @@
31class LauncherBackendItem
31class LauncherBackendItem
32{
32{
33public:
33public:
34− QString desktopFile;
35 QString displayName;
34 QString displayName;
36 QString icon;
35 QString icon;
36+ int count;
37+ bool countVisible;
37};
38};
38
39
39LauncherBackend::LauncherBackend(QObject *parent):
40LauncherBackend::LauncherBackend(QObject *parent):
40− QObject(parent),
41+ QDBusVirtualObject(parent),
41 m_accounts(nullptr)
42 m_accounts(nullptr)
42{
43{
43#ifndef LAUNCHER_TESTING
44#ifndef LAUNCHER_TESTING
@@ -45,10 +46,25 @@ LauncherBackend::LauncherBackend(QObject *parent):
45#endif
46#endif
46 m_user = qgetenv("USER");
47 m_user = qgetenv("USER");
47 syncFromAccounts();
48 syncFromAccounts();
49+
50+ /* Set up ourselves on DBus */
51+ QDBusConnection con = QDBusConnection::sessionBus();
52+ if (!con.registerService("com.canonical.Unity.Launcher")) {
53+ qDebug() << "Unable to register launcher name";
54+ }
55+ if (!con.registerVirtualObject("/com/canonical/Unity/Launcher", this, QDBusConnection::VirtualObjectRegisterOption::SubPath)) {
56+ qDebug() << "Unable to register launcher object";
57+ }
48}
58}
49
59
50LauncherBackend::~LauncherBackend()
60LauncherBackend::~LauncherBackend()
51{
61{
62+ /* Remove oursevles from DBus */
63+ QDBusConnection con = QDBusConnection::sessionBus();
64+ con.unregisterService("com.canonical.Unity.Launcher");
65+ con.unregisterObject("/com/canonical/Unity/Launcher");
66+
67+ /* Clear data */
52 m_storedApps.clear();
68 m_storedApps.clear();
53
69
54 Q_FOREACH(LauncherBackendItem *item, m_itemCache) {
70 Q_FOREACH(LauncherBackendItem *item, m_itemCache) {
@@ -90,17 +106,12 @@ void LauncherBackend::setStoredApplications(const QStringList &appIds)
90
106
91QString LauncherBackend::desktopFile(const QString &appId) const
107QString LauncherBackend::desktopFile(const QString &appId) const
92{
108{
93− LauncherBackendItem *item = m_itemCache.value(appId);
94− if (item) {
95− return item->desktopFile;
96− }
97−
98 return findDesktopFile(appId);
109 return findDesktopFile(appId);
99}
110}
100
111
101QString LauncherBackend::displayName(const QString &appId) const
112QString LauncherBackend::displayName(const QString &appId) const
102{
113{
103− LauncherBackendItem *item = m_itemCache.value(appId);
114+ LauncherBackendItem *item = m_itemCache.value(appId, nullptr);
104 if (item) {
115 if (item) {
105 return item->displayName;
116 return item->displayName;
106 }
117 }
@@ -118,16 +129,9 @@ QString LauncherBackend::displayName(const QString &appId) const
118QString LauncherBackend::icon(const QString &appId) const
129QString LauncherBackend::icon(const QString &appId) const
119{
130{
120 QString iconName;
131 QString iconName;
121− LauncherBackendItem *item = m_itemCache.value(appId);
132+ LauncherBackendItem *item = getItem(appId);
122 if (item) {
133 if (item) {
123 iconName = item->icon;
134 iconName = item->icon;
124− } else {
125− QString df = findDesktopFile(appId);
126− if (!df.isEmpty()) {
127− LauncherBackendItem *item = parseDesktopFile(df);
128− m_itemCache.insert(appId, item);
129− iconName = item->icon;
130− }
131 }
135 }
132
136
133 return iconName;
137 return iconName;
@@ -153,10 +157,70 @@ int LauncherBackend::progress(const QString &appId) const
153
157
154int LauncherBackend::count(const QString &appId) const
158int LauncherBackend::count(const QString &appId) const
155{
159{
156− // TODO: Return value for count emblem.
160+ int count = -1;
157− // TODO: emit countChanged() when this value changes.
161+ LauncherBackendItem *item = getItem(appId);
158− Q_UNUSED(appId)
162+
163+ if (item) {
164+ if (item->countVisible) {
165+ count = item->count;
166+ }
167+ }
168+
169+ return count;
170+}
171+
172+void LauncherBackend::setCount(const QString &appId, int count) const
173+{
174+ LauncherBackendItem *item = getItem(appId);
175+
176+ bool emitchange = false;
177+ if (item) {
178+ emitchange = (item->count != count);
179+ item->count = count;
180+ }
181+
182+ if (emitchange) {
183+ /* TODO: This needs to use the accessor to handle the visibility
184+ correctly, but when we have the two properties we can just use
185+ the local value */
186+ Q_EMIT countChanged(appId, this->count(appId));
187+ QVariant vcount(item->count);
188+ emitPropChangedDbus(appId, "count", vcount);
189+ }
190+}
191+
192+bool LauncherBackend::countVisible(const QString &appId) const
193+{
194+ bool visible = false;
195+ LauncherBackendItem *item = getItem(appId);
196+
197+ if (item) {
198+ visible = item->countVisible;
199+ }
200+
159− return 0;
201+ return visible;
202+}
203+
204+void LauncherBackend::setCountVisible(const QString &appId, bool visible) const
205+{
206+ LauncherBackendItem *item = getItem(appId);
207+
208+ bool emitchange = false;
209+ if (item) {
210+ emitchange = (item->countVisible != visible);
211+ item->countVisible = visible;
212+ } else {
213+ qDebug() << "Unable to find:" << appId;
214+ }
215+
216+ if (emitchange) {
217+ /* TODO: Because we're using visible in determining the
218+ count we need to emit a count changed as well */
219+ Q_EMIT countChanged(appId, this->count(appId));
220+ Q_EMIT countVisibleChanged(appId, item->countVisible);
221+ QVariant vCountVisible(item->countVisible);
222+ emitPropChangedDbus(appId, "countVisible", vCountVisible);
223+ }
160}
224}
161
225
162void LauncherBackend::setUser(const QString &username)
226void LauncherBackend::setUser(const QString &username)
@@ -194,13 +258,33 @@ void LauncherBackend::syncFromAccounts()
194 Q_FOREACH(const QString &entry, gSettings.get("favorites").toStringList()) {
258 Q_FOREACH(const QString &entry, gSettings.get("favorites").toStringList()) {
195 if (entry.startsWith("application://")) {
259 if (entry.startsWith("application://")) {
196 QString appId = entry;
260 QString appId = entry;
197− // Transform "application://foobar.desktop" to "foobar"
261+ // Transform "application://foobar.desktop" to "application://foobar"
198 appId.remove("application://");
262 appId.remove("application://");
199 if (appId.endsWith(".desktop")) {
263 if (appId.endsWith(".desktop")) {
200 appId.chop(8);
264 appId.chop(8);
201 }
265 }
202 QString df = findDesktopFile(appId);
266 QString df = findDesktopFile(appId);
203
267
268+ if (!df.isEmpty()) {
269+ m_storedApps << appId;
270+
271+ if (!m_itemCache.contains(appId)) {
272+ m_itemCache.insert(appId, parseDesktopFile(df));
273+ }
274+ }
275+ }
276+ if (entry.startsWith("appid://")) {
277+ QString appId = entry;
278+ appId.remove("appid://");
279+ // Strip hook name and current-user-version in case its there
280+
281+ if (appId.split('/').count() != 3) {
282+ qWarning() << "ignoring entry " + appId + ". Not a valid appId.";
283+ continue;
284+ }
285+ appId = appId.split('/').first() + "_" + appId.split('/').at(1);
286+ QString df = findDesktopFile(appId);
287+
204 if (!df.isEmpty()) {
288 if (!df.isEmpty()) {
205 m_storedApps << appId;
289 m_storedApps << appId;
206
290
@@ -245,10 +329,13 @@ QString LauncherBackend::findDesktopFile(const QString &appId) const
245 helper = helper.replace(dashPos, 1, '/');
329 helper = helper.replace(dashPos, 1, '/');
246 }
330 }
247
331
248− Q_FOREACH(const QString &searchDir, searchDirs) {
332+ Q_FOREACH(const QString &searchDirName, searchDirs) {
249− QFileInfo fileInfo(QDir(searchDir), helper + ".desktop");
333+ QDir searchDir(searchDirName);
250− if (fileInfo.exists()) {
334+ Q_FOREACH(const QString &desktopFile, searchDir.entryList(QStringList() << "*.desktop")) {
335+ if (desktopFile.startsWith(helper)) {
336+ QFileInfo fileInfo(searchDir, desktopFile);
251− return fileInfo.absoluteFilePath();
337+ return fileInfo.absoluteFilePath();
338+ }
252 }
339 }
253 }
340 }
254
341
@@ -263,7 +350,6 @@ LauncherBackendItem* LauncherBackend::parseDesktopFile(const QString &desktopFil
263 QSettings settings(desktopFile, QSettings::IniFormat);
350 QSettings settings(desktopFile, QSettings::IniFormat);
264
351
265 LauncherBackendItem* item = new LauncherBackendItem();
352 LauncherBackendItem* item = new LauncherBackendItem();
266− item->desktopFile = desktopFile;
267 item->displayName = settings.value("Desktop Entry/Name").toString();
353 item->displayName = settings.value("Desktop Entry/Name").toString();
268
354
269 QString iconString = settings.value("Desktop Entry/Icon").toString();
355 QString iconString = settings.value("Desktop Entry/Icon").toString();
@@ -275,6 +361,35 @@ LauncherBackendItem* LauncherBackend::parseDesktopFile(const QString &desktopFil
275 } else {
361 } else {
276 item->icon = "image://theme/" + iconString;
362 item->icon = "image://theme/" + iconString;
277 }
363 }
364+
365+ /* TODO: These should be looked up in a cache somewhere */
366+ item->count = 0;
367+ item->countVisible = false;
368+
369+ return item;
370+}
371+
372+/* Gets an item, and tries to create a new one if we need it to */
373+LauncherBackendItem* LauncherBackend::getItem(const QString &appId) const
374+{
375+ LauncherBackendItem *item = m_itemCache.value(appId, nullptr);
376+ if (!item) {
377+ QString df = findDesktopFile(appId);
378+ if (!df.isEmpty()) {
379+ item = parseDesktopFile(df);
380+ if (item) {
381+ m_itemCache[appId] = item;
382+ } else {
383+ qWarning() << "Unable to parse desktop file for" << appId << "path" << df;
384+ }
385+ } else {
386+ qWarning() << "Unable to find desktop file for:" << appId;
387+ }
388+ }
389+
390+ if (!item)
391+ qWarning() << "Unable to find item for: " << appId;
392+
278 return item;
393 return item;
279}
394}
280
395
@@ -285,16 +400,17 @@ void LauncherBackend::loadFromVariant(const QVariantMap &details)
285 }
400 }
286 QString appId = details.value("id").toString();
401 QString appId = details.value("id").toString();
287
402
288− LauncherBackendItem *item = m_itemCache.value(appId);
403+ LauncherBackendItem *item = m_itemCache.value(appId, nullptr);
289 if (item) {
404 if (item) {
290 delete item;
405 delete item;
291 }
406 }
292
407
293 item = new LauncherBackendItem();
408 item = new LauncherBackendItem();
294
409
295− item->desktopFile = details.value("desktopFile").toString();
296 item->displayName = details.value("name").toString();
410 item->displayName = details.value("name").toString();
297 item->icon = details.value("icon").toString();
411 item->icon = details.value("icon").toString();
412+ item->count = details.value("count").toInt();
413+ item->countVisible = details.value("countVisible").toBool();
298
414
299 m_itemCache.insert(appId, item);
415 m_itemCache.insert(appId, item);
300 m_storedApps.append(appId);
416 m_storedApps.append(appId);
@@ -307,7 +423,8 @@ QVariantMap LauncherBackend::itemToVariant(const QString &appId) const
307 details.insert("id", appId);
423 details.insert("id", appId);
308 details.insert("name", item->displayName);
424 details.insert("name", item->displayName);
309 details.insert("icon", item->icon);
425 details.insert("icon", item->icon);
310− details.insert("desktopFile", item->desktopFile);
426+ details.insert("count", item->count);
427+ details.insert("countVisible", item->countVisible);
311 return details;
428 return details;
312}
429}
313
430
@@ -318,3 +435,150 @@ bool LauncherBackend::isDefaultsItem(const QList<QVariantMap> &apps) const
318 // list of one item with the 'defaults' field set to true.
435 // list of one item with the 'defaults' field set to true.
319 return (apps.size() == 1 && apps[0].value("defaults").toBool());
436 return (apps.size() == 1 && apps[0].value("defaults").toBool());
320}
437}
438+
439+bool LauncherBackend::handleMessage(const QDBusMessage& message, const QDBusConnection& connection)
440+{
441+ /* Check to make sure we're getting properties on our interface */
442+ if (message.type() != QDBusMessage::MessageType::MethodCallMessage) {
443+ return false;
444+ }
445+ if (message.interface() != "org.freedesktop.DBus.Properties") {
446+ return false;
447+ }
448+ if (message.arguments()[0].toString() != "com.canonical.Unity.Launcher.Item") {
449+ return false;
450+ }
451+
452+ /* Break down the path to just the app id */
453+ QString pathtemp = message.path();
454+ if (!pathtemp.startsWith("/com/canonical/Unity/Launcher/")) {
455+ return false;
456+ }
457+ pathtemp.remove("/com/canonical/Unity/Launcher/");
458+ if (pathtemp.indexOf('/') >= 0) {
459+ return false;
460+ }
461+
462+ /* Find ourselves an appid */
463+ QString appid = decodeAppId(pathtemp);
464+ QVariantList retval;
465+
466+ if (message.member() == "Get") {
467+ if (message.arguments()[1].toString() == "count") {
468+ retval.append(QVariant::fromValue(QDBusVariant(this->count(appid))));
469+ } else if (message.arguments()[1].toString() == "countVisible") {
470+ retval.append(QVariant::fromValue(QDBusVariant(this->countVisible(appid))));
471+ }
472+ } else if (message.member() == "Set") {
473+ if (message.arguments()[1].toString() == "count") {
474+ this->setCount(appid, message.arguments()[2].value<QDBusVariant>().variant().toInt());
475+ } else if (message.arguments()[1].toString() == "countVisible") {
476+ this->setCountVisible(appid, message.arguments()[2].value<QDBusVariant>().variant().toBool());
477+ }
478+ } else if (message.member() == "GetAll") {
479+ retval.append(this->itemToVariant(appid));
480+ } else {
481+ return false;
482+ }
483+
484+ QDBusMessage reply = message.createReply(retval);
485+ return connection.send(reply);
486+}
487+
488+QString LauncherBackend::introspect(const QString &path) const
489+{
490+ /* This case we should just list the nodes */
491+ if (path == "/com/canonical/Unity/Launcher/" || path == "/com/canonical/Unity/Launcher") {
492+ QString nodes;
493+
494+ Q_FOREACH(const QString &appId, m_itemCache.keys()) {
495+ nodes.append("<node name=\"");
496+ nodes.append(encodeAppId(appId));
497+ nodes.append("\"/>\n");
498+ }
499+
500+ return nodes;
501+ }
502+
503+ /* Should not happen, but let's handle it */
504+ if (!path.startsWith("/com/canonical/Unity/Launcher")) {
505+ return "";
506+ }
507+
508+ /* Now we should be looking at a node */
509+ QString nodeiface =
510+ "<interface name=\"com.canonical.Unity.Launcher.Item\">"
511+ "<property name=\"count\" type=\"i\" access=\"readwrite\" />"
512+ "<property name=\"countVisible\" type=\"b\" access=\"readwrite\" />"
513+ "</interface>";
514+ return nodeiface;
515+}
516+
517+QString LauncherBackend::decodeAppId(const QString& path)
518+{
519+ QByteArray bytes = path.toUtf8();
520+ QByteArray decoded;
521+
522+ for (int i = 0; i < bytes.size(); ++i) {
523+ char chr = bytes.at(i);
524+
525+ if (chr == '_') {
526+ QString number;
527+ number.append(bytes.at(i+1));
528+ number.append(bytes.at(i+2));
529+
530+ bool okay;
531+ char newchar = number.toUInt(&okay, 16);
532+ if (okay)
533+ decoded.append(newchar);
534+
535+ i += 2;
536+ } else {
537+ decoded.append(chr);
538+ }
539+ }
540+
541+ return QString::fromUtf8(decoded);
542+}
543+
544+QString LauncherBackend::encodeAppId(const QString& appId)
545+{
546+ QByteArray bytes = appId.toUtf8();
547+ QString encoded;
548+
549+ for (int i = 0; i < bytes.size(); ++i) {
550+ uchar chr = bytes.at(i);
551+
552+ if ((chr >= 'a' && chr <= 'z') ||
553+ (chr >= 'A' && chr <= 'Z') ||
554+ (chr >= '0' && chr <= '9'&& i != 0)) {
555+ encoded.append(chr);
556+ } else {
557+ QString hexval = QString("_%1").arg(chr, 2, 16, QChar('0'));
558+ encoded.append(hexval.toUpper());
559+ }
560+ }
561+
562+ return encoded;
563+}
564+
565+void LauncherBackend::emitPropChangedDbus(const QString& appId, const QString& property, QVariant &value) const
566+{
567+ QString path("/com/canonical/Unity/Launcher/");
568+ path.append(encodeAppId(appId));
569+
570+ QDBusMessage message = QDBusMessage::createSignal(path, "org.freedesktop.DBus.Properties", "PropertiesChanged");
571+
572+ QList<QVariant> arguments;
573+ QVariantHash changedprops;
574+ changedprops[property] = QVariant::fromValue(QDBusVariant(value));
575+ QVariantList deletedprops;
576+
577+ arguments.append(changedprops);
578+ arguments.append(deletedprops);
579+
580+ message.setArguments(arguments);
581+
582+ QDBusConnection con = QDBusConnection::sessionBus();
583+ con.send(message);
584+}
plugins/Unity/Launcher/backend/launcherbackend.h+52−4
@@ -24,6 +24,7 @@
24#include <QObject>
24#include <QObject>
25#include <QSettings>
25#include <QSettings>
26#include <QStringList>
26#include <QStringList>
27+#include <QDBusVirtualObject>
27
28
28class AccountsServiceDBusAdaptor;
29class AccountsServiceDBusAdaptor;
29
30
@@ -32,11 +33,13 @@ class AccountsServiceDBusAdaptor;
32 */
33 */
33
34
34class LauncherBackendItem;
35class LauncherBackendItem;
36+class LauncherBackendTest;
35
37
36−class LauncherBackend : public QObject
38+class LauncherBackend : public QDBusVirtualObject
37{
39{
38 Q_OBJECT
40 Q_OBJECT
39
41
42+ friend LauncherBackendTest;
40
43
41public:
44public:
42 LauncherBackend(QObject *parent = 0);
45 LauncherBackend(QObject *parent = 0);
@@ -116,16 +119,53 @@ public:
116 */
119 */
117 int count(const QString &appId) const;
120 int count(const QString &appId) const;
118
121
122+ /**
123+ * @brief Set the count on an item
124+ * @param appId The ID of the application
125+ * @param count Count to show on the application
126+ */
127+ void setCount(const QString &appId, int count) const;
128+
129+ /**
130+ * @brief Get whether the count should be visible
131+ * @param appId The ID of the application.
132+ * @returns Whether to show a count on the launcher
133+ */
134+ bool countVisible(const QString &appId) const;
135+
136+ /**
137+ * @brief Set the visibility of the count item
138+ * @param appId The ID of the application
139+ * @param visible Whether the count should be visible
140+ */
141+ void setCountVisible(const QString &appId, bool visible) const;
142+
119 /**
143 /**
120 * @brief Sets the username for which to look up launcher items.
144 * @brief Sets the username for which to look up launcher items.
121 * @param username The username to use.
145 * @param username The username to use.
122 */
146 */
123 void setUser(const QString &username);
147 void setUser(const QString &username);
124
148
149+ /**
150+ * @brief Handle a message to an application node
151+ * @param message DBus message to handle
152+ * @param connection DBus connection that we're using
153+ * @returns whether the message was handled
154+ */
155+ virtual bool handleMessage(const QDBusMessage& message, const QDBusConnection& connection);
156+
157+ /**
158+ * @brief Get introspection information on the objects we're exporting
159+ * @param path the dbus path containing the appid
160+ * @returns Introspection information for that node in the tree
161+ */
162+ virtual QString introspect (const QString &path) const;
163+
125Q_SIGNALS:
164Q_SIGNALS:
126− void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList);
165+ void quickListChanged(const QString &appId, const QList<QuickListEntry> &quickList) const;
127− void progressChanged(const QString &appId, int progress);
166+ void progressChanged(const QString &appId, int progress) const;
128− void countChanged(const QString &appId, int count);
167+ void countChanged(const QString &appId, int count) const;
168+ void countVisibleChanged(const QString &appId, bool visible) const;
129
169
130private:
170private:
131 QString findDesktopFile(const QString &appId) const;
171 QString findDesktopFile(const QString &appId) const;
@@ -143,6 +183,14 @@ private:
143
183
144 AccountsServiceDBusAdaptor *m_accounts;
184 AccountsServiceDBusAdaptor *m_accounts;
145 QString m_user;
185 QString m_user;
186+
187+ void emitPropChangedDbus(const QString& appId, const QString& property, QVariant &value) const;
188+
189+protected: /* Protected to allow testing */
190+ LauncherBackendItem* getItem(const QString& appId) const;
191+
192+ static QString decodeAppId(const QString& path);
193+ static QString encodeAppId(const QString& appId);
146};
194};
147
195
148#endif // LAUNCHERBACKEND_H
196#endif // LAUNCHERBACKEND_H
plugins/Unity/Launcher/qmldir+1−1
@@ -1,3 +1,3 @@
1module Unity.Launcher
1module Unity.Launcher
2plugin UnityLauncher-qml
2plugin UnityLauncher-qml
3−typeinfo plugin.qmltypes
3+typeinfo Launcher.qmltypes
plugins/Utils/CMakeLists.txt+1−4
@@ -11,7 +11,6 @@ include_directories(
11)
11)
12
12
13set(QMLPLUGIN_SRC
13set(QMLPLUGIN_SRC
14− bottombarvisibilitycommunicatorshell.cpp
15 qlimitproxymodelqml.cpp
14 qlimitproxymodelqml.cpp
16 qsortfilterproxymodelqml.cpp
15 qsortfilterproxymodelqml.cpp
17 timeformatter.cpp
16 timeformatter.cpp
@@ -34,6 +33,4 @@ set_target_properties(Utils-qml PROPERTIES COMPILE_FLAGS -fvisibility=default)
34
33
35qt5_use_modules(Utils-qml Qml Quick DBus Network XmlPatterns Gui Concurrent)
34qt5_use_modules(Utils-qml Qml Quick DBus Network XmlPatterns Gui Concurrent)
36
35
37−# export the qmldir qmltypes and plugin files
38−export_qmlfiles(Utils Utils)
39−export_qmlplugin(Utils 0.1 Utils TARGETS Utils-qml)
36+add_unity8_plugin(Utils 0.1 Utils TARGETS Utils-qml)
plugins/Utils/bottombarvisibilitycommunicatorshell.cppdeleted−49
@@ -1,49 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#include "bottombarvisibilitycommunicatorshell.h"
18−
19−BottomBarVisibilityCommunicatorShell::BottomBarVisibilityCommunicatorShell()
20− : m_forceHidden(false),
21− m_position(0)
22−{
23−}
24−
25−bool BottomBarVisibilityCommunicatorShell::forceHidden() const
26−{
27− return m_forceHidden;
28−}
29−
30−double BottomBarVisibilityCommunicatorShell::position() const
31−{
32− return m_position;
33−}
34−
35−void BottomBarVisibilityCommunicatorShell::setForceHidden(bool forceHidden)
36−{
37− if (forceHidden != m_forceHidden) {
38− m_forceHidden = forceHidden;
39− Q_EMIT forceHiddenChanged(forceHidden);
40− }
41−}
42−
43−void BottomBarVisibilityCommunicatorShell::setPosition(double position)
44−{
45− if (position != m_position) {
46− m_position = position;
47− Q_EMIT positionChanged(position);
48− }
49−}
plugins/Utils/bottombarvisibilitycommunicatorshell.hdeleted−59
@@ -1,59 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#ifndef BOTTOMBARVISIBILITYCOMMUNICATORSHELL_H
18−#define BOTTOMBARVISIBILITYCOMMUNICATORSHELL_H
19−
20−#include <QObject>
21−
22−class QDBusInterface;
23−
24−/** This is an internal class used to talk with the bottom bar used by either
25− * applications or the SDK.
26− * There is a method to force the bottom bar to be hidden or otherwise behave as usual
27− */
28−
29−class BottomBarVisibilityCommunicatorShell : public QObject
30−{
31− Q_OBJECT
32− Q_PROPERTY(bool forceHidden READ forceHidden WRITE setForceHidden NOTIFY forceHiddenChanged)
33− Q_PROPERTY(double position READ position WRITE setPosition NOTIFY positionChanged)
34−
35− Q_CLASSINFO("D-Bus Interface", "com.canonical.Shell.BottomBarVisibilityCommunicator")
36−public:
37− static BottomBarVisibilityCommunicatorShell& instance() {
38− static BottomBarVisibilityCommunicatorShell instance;
39− return instance;
40− }
41−
42− bool forceHidden() const;
43− void setForceHidden(bool forceHidden);
44−
45− double position() const;
46− void setPosition(double position);
47−
48−Q_SIGNALS:
49− void forceHiddenChanged(bool forceHidden);
50− void positionChanged(double position);
51−
52−private:
53− BottomBarVisibilityCommunicatorShell();
54−
55− bool m_forceHidden;
56− double m_position;
57−};
58−
59−#endif
plugins/Utils/plugin.cpp−10
@@ -26,16 +26,12 @@
26#include "plugin.h"
26#include "plugin.h"
27
27
28// local
28// local
29−#include "bottombarvisibilitycommunicatorshell.h"
30#include "qlimitproxymodelqml.h"
29#include "qlimitproxymodelqml.h"
31#include "qsortfilterproxymodelqml.h"
30#include "qsortfilterproxymodelqml.h"
32#include "timeformatter.h"
31#include "timeformatter.h"
33#include "unitymenumodelpaths.h"
32#include "unitymenumodelpaths.h"
34#include "easingcurve.h"
33#include "easingcurve.h"
35
34
36−static const char* BOTTOM_BAR_VISIBILITY_COMMUNICATOR_DBUS_PATH = "/BottomBarVisibilityCommunicator";
37−static const char* DBUS_SERVICE = "com.canonical.Shell.BottomBarVisibilityCommunicator";
38−
39void UtilsPlugin::registerTypes(const char *uri)
35void UtilsPlugin::registerTypes(const char *uri)
40{
36{
41 Q_ASSERT(uri == QLatin1String("Utils"));
37 Q_ASSERT(uri == QLatin1String("Utils"));
@@ -45,16 +41,10 @@ void UtilsPlugin::registerTypes(const char *uri)
45 qmlRegisterType<UnityMenuModelPaths>(uri, 0, 1, "UnityMenuModelPaths");
41 qmlRegisterType<UnityMenuModelPaths>(uri, 0, 1, "UnityMenuModelPaths");
46 qmlRegisterType<TimeFormatter>(uri, 0, 1, "TimeFormatter");
42 qmlRegisterType<TimeFormatter>(uri, 0, 1, "TimeFormatter");
47 qmlRegisterType<GDateTimeFormatter>(uri, 0, 1, "GDateTimeFormatter");
43 qmlRegisterType<GDateTimeFormatter>(uri, 0, 1, "GDateTimeFormatter");
48− qmlRegisterUncreatableType<BottomBarVisibilityCommunicatorShell>(uri, 0, 1, "BottomBarVisibilityCommunicatorShell", "Can't create BottomBarVisibilityCommunicatorShell");
49 qmlRegisterType<EasingCurve>(uri, 0, 1, "EasingCurve");
44 qmlRegisterType<EasingCurve>(uri, 0, 1, "EasingCurve");
50}
45}
51
46
52void UtilsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
47void UtilsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
53{
48{
54 QQmlExtensionPlugin::initializeEngine(engine, uri);
49 QQmlExtensionPlugin::initializeEngine(engine, uri);
55−
56− QDBusConnection::sessionBus().registerService(DBUS_SERVICE);
57− BottomBarVisibilityCommunicatorShell *bottomBarVisibilityCommunicator = &BottomBarVisibilityCommunicatorShell::instance();
58− QDBusConnection::sessionBus().registerObject(BOTTOM_BAR_VISIBILITY_COMMUNICATOR_DBUS_PATH, bottomBarVisibilityCommunicator, QDBusConnection::ExportAllContents);
59− engine->rootContext()->setContextProperty("bottomBarVisibilityCommunicatorShell", bottomBarVisibilityCommunicator);
60}
50}
plugins/Utils/qmldir+1−1
@@ -1,3 +1,3 @@
1module Utils
1module Utils
2plugin Utils-qml
2plugin Utils-qml
3−typeinfo plugin.qmltypes
3+typeinfo Utils.qmltypes
po/am.po+9−13
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-18 19:28+0000\n"
11"PO-Revision-Date: 2014-01-18 19:28+0000\n"
12"Last-Translator: samson <Unknown>\n"
12"Last-Translator: samson <Unknown>\n"
13"Language-Team: Amharic <am@li.org>\n"
13"Language-Team: Amharic <am@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n > 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr "መላኪያ"
114msgstr "መላኪያ"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,14 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "መፈለጊያ"
163msgstr "መፈለጊያ"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "እባክዎን ያስገቡ %1"
168msgstr "እባክዎን ያስገቡ %1"
166−
167−#~ msgid "Comments:"
168−#~ msgstr "አስተያየቶች:"
169−
170−#, qt-format
171−#~ msgid "(%1)"
172−#~ msgstr "(%1)"
po/ar.po+9−27
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-02-21 11:19+0000\n"
11"PO-Revision-Date: 2014-02-21 11:19+0000\n"
12"Last-Translator: Ibrahim Saed <ibraheem5000@gmail.com>\n"
12"Last-Translator: Ibrahim Saed <ibraheem5000@gmail.com>\n"
13"Language-Team: Arabic <ar@li.org>\n"
13"Language-Team: Arabic <ar@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n % 100 >= "
18−"3 && n % 100 <= 10 ? 3 : n % 100 >= 11 && n % 100 <= 99 ? 4 : 5;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,7 +87,7 @@ msgstr "شاهد المزيد"
89msgid "See less"
87msgid "See less"
90msgstr "شاهد أقل"
88msgstr "شاهد أقل"
91
89
92−#: qml/Dash/DashApps.qml:38
90+#: qml/Dash/DashApps.qml:37
93msgid "Recent"
91msgid "Recent"
94msgstr ""
92msgstr ""
95
93
@@ -118,6 +116,10 @@ msgstr "أضف تعليق"
118msgid "Send"
116msgid "Send"
119msgstr "أرسل"
117msgstr "أرسل"
120
118
119+#: qml/Greeter/Greeter.qml:151
120+msgid "Swipe to unlock"
121+msgstr ""
122+
121#: qml/Greeter/Lockscreen.qml:149
123#: qml/Greeter/Lockscreen.qml:149
122msgid "Emergency Call"
124msgid "Emergency Call"
123msgstr "مكالمة طوارئ"
125msgstr "مكالمة طوارئ"
@@ -163,27 +165,7 @@ msgstr "من فضلك أدخِل رقم التعريف الشخصي لبطاقة
163msgid "Search"
165msgid "Search"
164msgstr "ابحث"
166msgstr "ابحث"
165
167
166−#: qml/Shell.qml:417
168+#: qml/Shell.qml:348
167#, qt-format
169#, qt-format
168msgid "Please enter %1"
170msgid "Please enter %1"
169msgstr "من فضلك أدخِل %1"
171msgstr "من فضلك أدخِل %1"
170−
171−#~ msgid "Review"
172−#~ msgstr "التعليق"
173−
174−#, qt-format
175−#~ msgid "(%1)"
176−#~ msgstr "(%1)"
177−
178−#~ msgid "Comments:"
179−#~ msgstr "التعليقات:"
180−
181−#, qt-format
182−#~ msgid "%1 review"
183−#~ msgid_plural "%1 reviews"
184−#~ msgstr[0] "لا تعليقات (%1)"
185−#~ msgstr[1] "تعليق واحد (%1)"
186−#~ msgstr[2] "تعليقان (%1)"
187−#~ msgstr[3] "%1 تعليقات"
188−#~ msgstr[4] "%1 تعليقا"
189−#~ msgstr[5] "%1 تعليق"
po/ast.po+9−5
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-04-04 02:16+0000\n"
11"PO-Revision-Date: 2014-04-04 02:16+0000\n"
12"Last-Translator: Xuacu Saturio <xuacusk8@gmail.com>\n"
12"Last-Translator: Xuacu Saturio <xuacusk8@gmail.com>\n"
13"Language-Team: Asturian <ast@li.org>\n"
13"Language-Team: Asturian <ast@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-04-08 07:13+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
18−"X-Generator: Launchpad (build 16976)\n"
18+"X-Generator: Launchpad (build 16985)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -88,7 +88,7 @@ msgstr "Ver más"
88msgid "See less"
88msgid "See less"
89msgstr "Ver menos"
89msgstr "Ver menos"
90
90
91−#: qml/Dash/DashApps.qml:38
91+#: qml/Dash/DashApps.qml:37
92msgid "Recent"
92msgid "Recent"
93msgstr "Reciente"
93msgstr "Reciente"
94
94
@@ -117,6 +117,10 @@ msgstr "Amestar una reseña"
117msgid "Send"
117msgid "Send"
118msgstr "Unviar"
118msgstr "Unviar"
119
119
120+#: qml/Greeter/Greeter.qml:151
121+msgid "Swipe to unlock"
122+msgstr ""
123+
120#: qml/Greeter/Lockscreen.qml:149
124#: qml/Greeter/Lockscreen.qml:149
121msgid "Emergency Call"
125msgid "Emergency Call"
122msgstr "Llamada d'emerxencia"
126msgstr "Llamada d'emerxencia"
@@ -162,7 +166,7 @@ msgstr "Escriba'l PIN de la SIM"
162msgid "Search"
166msgid "Search"
163msgstr "Guetar"
167msgstr "Guetar"
164
168
165−#: qml/Shell.qml:417
169+#: qml/Shell.qml:348
166#, qt-format
170#, qt-format
167msgid "Please enter %1"
171msgid "Please enter %1"
168msgstr "Introduz %1"
172msgstr "Introduz %1"
po/az.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-15 09:50+0000\n"
11"PO-Revision-Date: 2014-01-15 09:50+0000\n"
12"Last-Translator: Turan Mahmudov <turan.mahmudov@gmail.com>\n"
12"Last-Translator: Turan Mahmudov <turan.mahmudov@gmail.com>\n"
13"Language-Team: Azerbaijani <az@li.org>\n"
13"Language-Team: Azerbaijani <az@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +85,7 @@ msgstr ""
86msgid "See less"
85msgid "See less"
87msgstr ""
86msgstr ""
88
87
89−#: qml/Dash/DashApps.qml:38
88+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
89msgid "Recent"
91msgstr ""
90msgstr ""
92
91
@@ -115,6 +114,10 @@ msgstr "Rəy yaz"
115msgid "Send"
114msgid "Send"
116msgstr "Göndər"
115msgstr "Göndər"
117
116
117+#: qml/Greeter/Greeter.qml:151
118+msgid "Swipe to unlock"
119+msgstr ""
120+
118#: qml/Greeter/Lockscreen.qml:149
121#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
122msgid "Emergency Call"
120msgstr "Zərurət zəngi"
123msgstr "Zərurət zəngi"
@@ -160,23 +163,7 @@ msgstr ""
160msgid "Search"
163msgid "Search"
161msgstr "Axtar"
164msgstr "Axtar"
162
165
163−#: qml/Shell.qml:417
166+#: qml/Shell.qml:348
164#, qt-format
167#, qt-format
165msgid "Please enter %1"
168msgid "Please enter %1"
166msgstr "Xahiş edirik daxil edin: %1"
169msgstr "Xahiş edirik daxil edin: %1"
167−
168−#~ msgid "Comments:"
169−#~ msgstr "Şərhlər:"
170−
171−#~ msgid "Review"
172−#~ msgstr "Rəy"
173−
174−#, qt-format
175−#~ msgid "%1 review"
176−#~ msgid_plural "%1 reviews"
177−#~ msgstr[0] "%1 rəy"
178−#~ msgstr[1] "%1 rəy"
179−
180−#, qt-format
181−#~ msgid "(%1)"
182−#~ msgstr "(%1)"
po/bg.po+9−5
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-04-01 14:08+0000\n"
11"PO-Revision-Date: 2014-04-01 14:08+0000\n"
12"Last-Translator: Atanas Kovachki <Unknown>\n"
12"Last-Translator: Atanas Kovachki <Unknown>\n"
13"Language-Team: Bulgarian <bg@li.org>\n"
13"Language-Team: Bulgarian <bg@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-04-03 06:06+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
18−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -91,7 +91,7 @@ msgstr ""
91msgid "See less"
91msgid "See less"
92msgstr ""
92msgstr ""
93
93
94−#: qml/Dash/DashApps.qml:38
94+#: qml/Dash/DashApps.qml:37
95msgid "Recent"
95msgid "Recent"
96msgstr "Последни"
96msgstr "Последни"
97
97
@@ -120,6 +120,10 @@ msgstr "Добави отзив"
120msgid "Send"
120msgid "Send"
121msgstr "Изпрати"
121msgstr "Изпрати"
122
122
123+#: qml/Greeter/Greeter.qml:151
124+msgid "Swipe to unlock"
125+msgstr ""
126+
123#: qml/Greeter/Lockscreen.qml:149
127#: qml/Greeter/Lockscreen.qml:149
124msgid "Emergency Call"
128msgid "Emergency Call"
125msgstr "Спешно повикване"
129msgstr "Спешно повикване"
@@ -165,7 +169,7 @@ msgstr ""
165msgid "Search"
169msgid "Search"
166msgstr "Търсене"
170msgstr "Търсене"
167
171
168−#: qml/Shell.qml:417
172+#: qml/Shell.qml:348
169#, qt-format
173#, qt-format
170msgid "Please enter %1"
174msgid "Please enter %1"
171msgstr "Моля, въведете %1"
175msgstr "Моля, въведете %1"
po/br.po+9−5
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-04-15 18:15+0000\n"
11"PO-Revision-Date: 2014-04-15 18:15+0000\n"
12"Last-Translator: Rouxel <vincent.rouxel@mailoo.org>\n"
12"Last-Translator: Rouxel <vincent.rouxel@mailoo.org>\n"
13"Language-Team: Breton <br@li.org>\n"
13"Language-Team: Breton <br@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-04-16 07:12+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
18−"X-Generator: Launchpad (build 16976)\n"
18+"X-Generator: Launchpad (build 16985)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -84,7 +84,7 @@ msgstr ""
84msgid "See less"
84msgid "See less"
85msgstr ""
85msgstr ""
86
86
87−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
88msgid "Recent"
88msgid "Recent"
89msgstr ""
89msgstr ""
90
90
@@ -113,6 +113,10 @@ msgstr ""
113msgid "Send"
113msgid "Send"
114msgstr ""
114msgstr ""
115
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
116#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
117msgid "Emergency Call"
121msgid "Emergency Call"
118msgstr ""
122msgstr ""
@@ -158,7 +162,7 @@ msgstr ""
158msgid "Search"
162msgid "Search"
159msgstr ""
163msgstr ""
160
164
161−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
162#, qt-format
166#, qt-format
163msgid "Please enter %1"
167msgid "Please enter %1"
164msgstr ""
168msgstr ""
po/bs.po+9−7
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-16 22:33+0000\n"
11"PO-Revision-Date: 2014-01-16 22:33+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Bosnian <bs@li.org>\n"
13"Language-Team: Bosnian <bs@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
18−"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +84,7 @@ msgstr ""
86msgid "See less"
84msgid "See less"
87msgstr ""
85msgstr ""
88
86
89−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
88msgid "Recent"
91msgstr ""
89msgstr ""
92
90
@@ -115,6 +113,10 @@ msgstr ""
115msgid "Send"
113msgid "Send"
116msgstr ""
114msgstr ""
117
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
118#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
121msgid "Emergency Call"
120msgstr ""
122msgstr ""
@@ -160,7 +162,7 @@ msgstr ""
160msgid "Search"
162msgid "Search"
161msgstr ""
163msgstr ""
162
164
163−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
164#, qt-format
166#, qt-format
165msgid "Please enter %1"
167msgid "Please enter %1"
166msgstr ""
168msgstr ""
po/ca.po+16−29
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-10 07:45+0000\n"
11+"PO-Revision-Date: 2014-05-14 08:15+0000\n"
12"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n"
12"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n"
13"Language-Team: Catalan <ca@li.org>\n"
13"Language-Team: Catalan <ca@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17007)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,28 +84,28 @@ msgstr "Cerques recents"
85
84
86#: qml/Components/SeeMore.qml:35
85#: qml/Components/SeeMore.qml:35
87msgid "See more"
86msgid "See more"
88−msgstr ""
87+msgstr "Mostra'n més"
89
88
90#: qml/Components/SeeMore.qml:58
89#: qml/Components/SeeMore.qml:58
91msgid "See less"
90msgid "See less"
92−msgstr ""
91+msgstr "Mostra'n menys"
93
92
94−#: qml/Dash/DashApps.qml:38
93+#: qml/Dash/DashApps.qml:37
95msgid "Recent"
94msgid "Recent"
96msgstr ""
95msgstr ""
97
96
98#: qml/Dash/PreviewListView.qml:52
97#: qml/Dash/PreviewListView.qml:52
99#, qt-format
98#, qt-format
100msgid "%1 Preview"
99msgid "%1 Preview"
101−msgstr ""
100+msgstr "Previsualització de %1"
102
101
103#: qml/Dash/Previews/PreviewActionCombo.qml:34
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
104msgid "More..."
103msgid "More..."
105−msgstr ""
104+msgstr "Més..."
106
105
107#: qml/Dash/Previews/PreviewActionCombo.qml:34
106#: qml/Dash/Previews/PreviewActionCombo.qml:34
108msgid "Less..."
107msgid "Less..."
109−msgstr ""
108+msgstr "Menys..."
110
109
111#: qml/Dash/Previews/PreviewRatingInput.qml:81
110#: qml/Dash/Previews/PreviewRatingInput.qml:81
112msgid "Rate this"
111msgid "Rate this"
@@ -120,6 +119,10 @@ msgstr "Afegiu una ressenya"
120msgid "Send"
119msgid "Send"
121msgstr "Envia"
120msgstr "Envia"
122
121
122+#: qml/Greeter/Greeter.qml:151
123+msgid "Swipe to unlock"
124+msgstr ""
125+
123#: qml/Greeter/Lockscreen.qml:149
126#: qml/Greeter/Lockscreen.qml:149
124msgid "Emergency Call"
127msgid "Emergency Call"
125msgstr "Trucada d'emergència"
128msgstr "Trucada d'emergència"
@@ -159,29 +162,13 @@ msgstr "Mostra la contrasenya"
159
162
160#: qml/Notifications/NotificationMenuItemFactory.qml:103
163#: qml/Notifications/NotificationMenuItemFactory.qml:103
161msgid "Please enter SIM PIN"
164msgid "Please enter SIM PIN"
162−msgstr ""
165+msgstr "Introduïu el PIN de la targeta SIM"
163
166
164#: qml/Panel/SearchIndicator.qml:27
167#: qml/Panel/SearchIndicator.qml:27
165msgid "Search"
168msgid "Search"
166msgstr "Cerca"
169msgstr "Cerca"
167
170
168−#: qml/Shell.qml:417
171+#: qml/Shell.qml:348
169#, qt-format
172#, qt-format
170msgid "Please enter %1"
173msgid "Please enter %1"
171msgstr "Introduïu %1"
174msgstr "Introduïu %1"
172−
173−#, qt-format
174−#~ msgid "(%1)"
175−#~ msgstr "(%1)"
176−
177−#~ msgid "Comments:"
178−#~ msgstr "Comentaris:"
179−
180−#~ msgid "Review"
181−#~ msgstr "Ressenya"
182−
183−#, qt-format
184−#~ msgid "%1 review"
185−#~ msgid_plural "%1 reviews"
186−#~ msgstr[0] "%1 ressenya"
187−#~ msgstr[1] "%1 ressenyes"
po/ckb.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-21 11:05+0000\n"
11"PO-Revision-Date: 2014-01-21 11:05+0000\n"
12"Last-Translator: Aras <aras.noori@gmail.com>\n"
12"Last-Translator: Aras <aras.noori@gmail.com>\n"
13"Language-Team: Kurdish (Sorani) <ckb@li.org>\n"
13"Language-Team: Kurdish (Sorani) <ckb@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "پێداچوونەوە زۆر بکە"
114msgid "Send"
113msgid "Send"
115msgstr "ناردن"
114msgstr "ناردن"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "هێڵی فریاگوزاری"
122msgstr "هێڵی فریاگوزاری"
@@ -159,23 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "گەڕان"
163msgstr "گەڕان"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "تکایە %1 بنووسە"
168msgstr "تکایە %1 بنووسە"
166−
167−#, qt-format
168−#~ msgid "(%1)"
169−#~ msgstr "(%1)"
170−
171−#~ msgid "Comments:"
172−#~ msgstr "لێدوانەکان:"
173−
174−#, qt-format
175−#~ msgid "%1 review"
176−#~ msgid_plural "%1 reviews"
177−#~ msgstr[0] "%1 پێداچوونەوە"
178−#~ msgstr[1] "%1 پێداچوونەوەکان"
179−
180−#~ msgid "Review"
181−#~ msgstr "پێداچوونەوە"
po/cs.po+9−23
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-08 10:11+0000\n"
11"PO-Revision-Date: 2014-01-08 10:11+0000\n"
12"Last-Translator: Tadeáš Pařík <tadeas.parik@gmail.com>\n"
12"Last-Translator: Tadeáš Pařík <tadeas.parik@gmail.com>\n"
13"Language-Team: Czech <cs@li.org>\n"
13"Language-Team: Czech <cs@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "Přidat recenzi"
114msgid "Send"
113msgid "Send"
115msgstr "Odeslat"
114msgstr "Odeslat"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "Tísňové volání"
122msgstr "Tísňové volání"
@@ -159,24 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Hledat"
163msgstr "Hledat"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "Zadejte prosím %1"
168msgstr "Zadejte prosím %1"
166−
167−#~ msgid "Comments:"
168−#~ msgstr "Komentáře:"
169−
170−#, qt-format
171−#~ msgid "(%1)"
172−#~ msgstr "(%1)"
173−
174−#~ msgid "Review"
175−#~ msgstr "Recenze"
176−
177−#, qt-format
178−#~ msgid "%1 review"
179−#~ msgid_plural "%1 reviews"
180−#~ msgstr[0] "%1 recenze"
181−#~ msgstr[1] "%1 recenze"
182−#~ msgstr[2] "%1 recenzí"
po/da.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-14 20:16+0000\n"
11"PO-Revision-Date: 2014-01-14 20:16+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Danish <da@li.org>\n"
13"Language-Team: Danish <da@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/de.po+20−33
@@ -7,25 +7,24 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-15 11:01+0000\n"
11+"PO-Revision-Date: 2014-05-20 13:45+0000\n"
12−"Last-Translator: Dennis Baudys <Unknown>\n"
12+"Last-Translator: Tobias Bannert <Unknown>\n"
13"Language-Team: German <de@li.org>\n"
13"Language-Team: German <de@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17017)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
23msgid "Lock to Launcher"
22msgid "Lock to Launcher"
24−msgstr ""
23+msgstr "Im Starter sperren"
25
24
26#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
27msgid "Unlock from Launcher"
26msgid "Unlock from Launcher"
28−msgstr ""
27+msgstr "Aus dem Starter entsperren"
29
28
30#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
31msgid "Skip intro"
30msgid "Skip intro"
@@ -81,28 +80,28 @@ msgstr "Letzte Suchbegriffe"
81
80
82#: qml/Components/SeeMore.qml:35
81#: qml/Components/SeeMore.qml:35
83msgid "See more"
82msgid "See more"
84−msgstr ""
83+msgstr "Mehr ansehen"
85
84
86#: qml/Components/SeeMore.qml:58
85#: qml/Components/SeeMore.qml:58
87msgid "See less"
86msgid "See less"
88−msgstr ""
87+msgstr "Weniger ansehen"
89
88
90−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
91msgid "Recent"
90msgid "Recent"
92−msgstr ""
91+msgstr "Kürzlich"
93
92
94#: qml/Dash/PreviewListView.qml:52
93#: qml/Dash/PreviewListView.qml:52
95#, qt-format
94#, qt-format
96msgid "%1 Preview"
95msgid "%1 Preview"
97−msgstr ""
96+msgstr "%1 Vorschau"
98
97
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
100msgid "More..."
99msgid "More..."
101−msgstr ""
100+msgstr "Mehr …"
102
101
103#: qml/Dash/Previews/PreviewActionCombo.qml:34
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
104msgid "Less..."
103msgid "Less..."
105−msgstr ""
104+msgstr "Weniger …"
106
105
107#: qml/Dash/Previews/PreviewRatingInput.qml:81
106#: qml/Dash/Previews/PreviewRatingInput.qml:81
108msgid "Rate this"
107msgid "Rate this"
@@ -116,6 +115,10 @@ msgstr "Bewertung hinzufügen"
116msgid "Send"
115msgid "Send"
117msgstr "Senden"
116msgstr "Senden"
118
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr "Wischen zum Entsperren"
121+
119#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
120msgid "Emergency Call"
123msgid "Emergency Call"
121msgstr "Notruf"
124msgstr "Notruf"
@@ -155,29 +158,13 @@ msgstr "Passwort anzeigen"
155
158
156#: qml/Notifications/NotificationMenuItemFactory.qml:103
159#: qml/Notifications/NotificationMenuItemFactory.qml:103
157msgid "Please enter SIM PIN"
160msgid "Please enter SIM PIN"
158−msgstr ""
161+msgstr "Bitte die PIN der SIM eingeben"
159
162
160#: qml/Panel/SearchIndicator.qml:27
163#: qml/Panel/SearchIndicator.qml:27
161msgid "Search"
164msgid "Search"
162msgstr "Suchen"
165msgstr "Suchen"
163
166
164−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
165#, qt-format
168#, qt-format
166msgid "Please enter %1"
169msgid "Please enter %1"
167msgstr "Bitte geben Sie %1 ein"
170msgstr "Bitte geben Sie %1 ein"
168−
169−#~ msgid "Comments:"
170−#~ msgstr "Kommentare:"
171−
172−#, qt-format
173−#~ msgid "(%1)"
174−#~ msgstr "(%1)"
175−
176−#~ msgid "Review"
177−#~ msgstr "Bewertung"
178−
179−#, qt-format
180−#~ msgid "%1 review"
181−#~ msgid_plural "%1 reviews"
182−#~ msgstr[0] "%1 Bewertung"
183−#~ msgstr[1] "%1 Bewertungen"
po/el.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-02-26 09:58+0000\n"
11"PO-Revision-Date: 2014-02-26 09:58+0000\n"
12"Last-Translator: j3lc <x_nikos@yahoo.gr>\n"
12"Last-Translator: j3lc <x_nikos@yahoo.gr>\n"
13"Language-Team: Greek <el@li.org>\n"
13"Language-Team: Greek <el@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,7 +88,7 @@ msgstr "Περρισότερα"
89msgid "See less"
88msgid "See less"
90msgstr "Λιγότερα"
89msgstr "Λιγότερα"
91
90
92−#: qml/Dash/DashApps.qml:38
91+#: qml/Dash/DashApps.qml:37
93msgid "Recent"
92msgid "Recent"
94msgstr ""
93msgstr ""
95
94
@@ -118,6 +117,10 @@ msgstr "Προσθέστε την αξιολόγησή σας"
118msgid "Send"
117msgid "Send"
119msgstr "Αποστολή"
118msgstr "Αποστολή"
120
119
120+#: qml/Greeter/Greeter.qml:151
121+msgid "Swipe to unlock"
122+msgstr ""
123+
121#: qml/Greeter/Lockscreen.qml:149
124#: qml/Greeter/Lockscreen.qml:149
122msgid "Emergency Call"
125msgid "Emergency Call"
123msgstr "Κλήση έκτακτης ανάγκης"
126msgstr "Κλήση έκτακτης ανάγκης"
@@ -163,23 +166,7 @@ msgstr "Παρακαλώ εισάγετε το PIN της κάρτας SIM"
163msgid "Search"
166msgid "Search"
164msgstr "Αναζήτηση"
167msgstr "Αναζήτηση"
165
168
166−#: qml/Shell.qml:417
169+#: qml/Shell.qml:348
167#, qt-format
170#, qt-format
168msgid "Please enter %1"
171msgid "Please enter %1"
169msgstr "Πληκτρολογήστε %1"
172msgstr "Πληκτρολογήστε %1"
170−
171−#, qt-format
172−#~ msgid "%1 review"
173−#~ msgid_plural "%1 reviews"
174−#~ msgstr[0] "%1 αξιολόγηση"
175−#~ msgstr[1] "%1 αξιολογήσεις"
176−
177−#, qt-format
178−#~ msgid "(%1)"
179−#~ msgstr "(%1)"
180−
181−#~ msgid "Comments:"
182−#~ msgstr "Σχόλια:"
183−
184−#~ msgid "Review"
185−#~ msgstr "Αξιολόγηση"
po/en_AU.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-09-28 07:46+0000\n"
11"PO-Revision-Date: 2013-09-28 07:46+0000\n"
12"Last-Translator: Jared Norris <jarednorris@ubuntu.com>\n"
12"Last-Translator: Jared Norris <jarednorris@ubuntu.com>\n"
13"Language-Team: English (Australia) <en_AU@li.org>\n"
13"Language-Team: English (Australia) <en_AU@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "Add a review"
114msgid "Send"
113msgid "Send"
115msgstr "Send"
114msgstr "Send"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "Emergency Call"
122msgstr "Emergency Call"
@@ -159,23 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Search"
163msgstr "Search"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "Please enter %1"
168msgstr "Please enter %1"
166−
167−#~ msgid "Comments:"
168−#~ msgstr "Comments:"
169−
170−#~ msgid "Review"
171−#~ msgstr "Review"
172−
173−#, qt-format
174−#~ msgid "%1 review"
175−#~ msgid_plural "%1 reviews"
176−#~ msgstr[0] "%1 review"
177−#~ msgstr[1] "%1 reviews"
178−
179−#, qt-format
180−#~ msgid "(%1)"
181−#~ msgstr "(%1)"
po/en_GB.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-03-07 13:27+0000\n"
11"PO-Revision-Date: 2014-03-07 13:27+0000\n"
12"Last-Translator: Andi Chandler <Unknown>\n"
12"Last-Translator: Andi Chandler <Unknown>\n"
13"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
13"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -87,7 +86,7 @@ msgstr "See more"
87msgid "See less"
86msgid "See less"
88msgstr "See less"
87msgstr "See less"
89
88
90−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
91msgid "Recent"
90msgid "Recent"
92msgstr ""
91msgstr ""
93
92
@@ -116,6 +115,10 @@ msgstr "Add a review"
116msgid "Send"
115msgid "Send"
117msgstr "Send"
116msgstr "Send"
118
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr ""
121+
119#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
120msgid "Emergency Call"
123msgid "Emergency Call"
121msgstr "Emergency Call"
124msgstr "Emergency Call"
@@ -161,23 +164,7 @@ msgstr "Please enter SIM PIN"
161msgid "Search"
164msgid "Search"
162msgstr "Search"
165msgstr "Search"
163
166
164−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
165#, qt-format
168#, qt-format
166msgid "Please enter %1"
169msgid "Please enter %1"
167msgstr "Please enter %1"
170msgstr "Please enter %1"
168−
169−#~ msgid "Comments:"
170−#~ msgstr "Comments:"
171−
172−#~ msgid "Review"
173−#~ msgstr "Review"
174−
175−#, qt-format
176−#~ msgid "%1 review"
177−#~ msgid_plural "%1 reviews"
178−#~ msgstr[0] "%1 review"
179−#~ msgstr[1] "%1 reviews"
180−
181−#, qt-format
182−#~ msgid "(%1)"
183−#~ msgstr "(%1)"
po/eo.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-26 22:35+0000\n"
11"PO-Revision-Date: 2013-06-26 22:35+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Esperanto <eo@li.org>\n"
13"Language-Team: Esperanto <eo@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/es.po+10−6
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-03-28 22:37+0000\n"
11+"PO-Revision-Date: 2014-05-15 15:38+0000\n"
12"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n"
12"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n"
13"Language-Team: Spanish <es@li.org>\n"
13"Language-Team: Spanish <es@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-03-29 07:34+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
18−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17007)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,7 +89,7 @@ msgstr "Ver más"
89msgid "See less"
89msgid "See less"
90msgstr "Ver menos"
90msgstr "Ver menos"
91
91
92−#: qml/Dash/DashApps.qml:38
92+#: qml/Dash/DashApps.qml:37
93msgid "Recent"
93msgid "Recent"
94msgstr "Recientes"
94msgstr "Recientes"
95
95
@@ -118,6 +118,10 @@ msgstr "Añadir una reseña"
118msgid "Send"
118msgid "Send"
119msgstr "Enviar"
119msgstr "Enviar"
120
120
121+#: qml/Greeter/Greeter.qml:151
122+msgid "Swipe to unlock"
123+msgstr "Deslice para desbloquear"
124+
121#: qml/Greeter/Lockscreen.qml:149
125#: qml/Greeter/Lockscreen.qml:149
122msgid "Emergency Call"
126msgid "Emergency Call"
123msgstr "Llamada de emergencia"
127msgstr "Llamada de emergencia"
@@ -163,7 +167,7 @@ msgstr "Escriba el PIN de la SIM"
163msgid "Search"
167msgid "Search"
164msgstr "Buscar"
168msgstr "Buscar"
165
169
166−#: qml/Shell.qml:417
170+#: qml/Shell.qml:348
167#, qt-format
171#, qt-format
168msgid "Please enter %1"
172msgid "Please enter %1"
169msgstr "Introduzca %1"
173msgstr "Introduzca %1"
po/eu.po+9−5
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-03-30 12:44+0000\n"
11"PO-Revision-Date: 2014-03-30 12:44+0000\n"
12"Last-Translator: Ibai Oihanguren Sala <Unknown>\n"
12"Last-Translator: Ibai Oihanguren Sala <Unknown>\n"
13"Language-Team: Basque <eu@li.org>\n"
13"Language-Team: Basque <eu@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-03-31 06:44+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
18−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -88,7 +88,7 @@ msgstr "Ikusi gehiago"
88msgid "See less"
88msgid "See less"
89msgstr "Ikusi gutxiago"
89msgstr "Ikusi gutxiago"
90
90
91−#: qml/Dash/DashApps.qml:38
91+#: qml/Dash/DashApps.qml:37
92msgid "Recent"
92msgid "Recent"
93msgstr "Azkenak"
93msgstr "Azkenak"
94
94
@@ -117,6 +117,10 @@ msgstr "Gehitu kritika"
117msgid "Send"
117msgid "Send"
118msgstr "Bidali"
118msgstr "Bidali"
119
119
120+#: qml/Greeter/Greeter.qml:151
121+msgid "Swipe to unlock"
122+msgstr ""
123+
120#: qml/Greeter/Lockscreen.qml:149
124#: qml/Greeter/Lockscreen.qml:149
121msgid "Emergency Call"
125msgid "Emergency Call"
122msgstr "Larrialdi-deia"
126msgstr "Larrialdi-deia"
@@ -162,7 +166,7 @@ msgstr "Sartu SIMaren PINa"
162msgid "Search"
166msgid "Search"
163msgstr "Bilatu"
167msgstr "Bilatu"
164
168
165−#: qml/Shell.qml:417
169+#: qml/Shell.qml:348
166#, qt-format
170#, qt-format
167msgid "Please enter %1"
171msgid "Please enter %1"
168msgstr "Sartu %1"
172msgstr "Sartu %1"
po/fa.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-10-31 19:02+0000\n"
11"PO-Revision-Date: 2013-10-31 19:02+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Persian <fa@li.org>\n"
13"Language-Team: Persian <fa@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/fi.po+10−6
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-04-05 09:57+0000\n"
11+"PO-Revision-Date: 2014-05-15 13:06+0000\n"
12"Last-Translator: Jiri Grönroos <Unknown>\n"
12"Last-Translator: Jiri Grönroos <Unknown>\n"
13"Language-Team: Finnish <fi@li.org>\n"
13"Language-Team: Finnish <fi@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-04-08 07:13+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
18−"X-Generator: Launchpad (build 16976)\n"
18+"X-Generator: Launchpad (build 17007)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +86,7 @@ msgstr "Näytä lisää"
86msgid "See less"
86msgid "See less"
87msgstr "Näytä vähemmän"
87msgstr "Näytä vähemmän"
88
88
89−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
90msgid "Recent"
91msgstr "Viimeisimmät"
91msgstr "Viimeisimmät"
92
92
@@ -115,6 +115,10 @@ msgstr "Lisää arvostelu"
115msgid "Send"
115msgid "Send"
116msgstr "Lähetä"
116msgstr "Lähetä"
117
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr "Avaa pyyhkäisemällä"
121+
118#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
123msgid "Emergency Call"
120msgstr "Hätäpuhelu"
124msgstr "Hätäpuhelu"
@@ -160,7 +164,7 @@ msgstr "Anna SIM-kortin PIN-koodi"
160msgid "Search"
164msgid "Search"
161msgstr "Hae"
165msgstr "Hae"
162
166
163−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
164#, qt-format
168#, qt-format
165msgid "Please enter %1"
169msgid "Please enter %1"
166msgstr "Kirjoita %1"
170msgstr "Kirjoita %1"
po/fo.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-14 20:08+0000\n"
11"PO-Revision-Date: 2014-01-14 20:08+0000\n"
12"Last-Translator: Jógvan Olsen <jeggy@jebster.net>\n"
12"Last-Translator: Jógvan Olsen <jeggy@jebster.net>\n"
13"Language-Team: Faroese <fo@li.org>\n"
13"Language-Team: Faroese <fo@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Leita"
163msgstr "Leita"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/fr.po+30−34
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-28 00:34+0000\n"
11+"PO-Revision-Date: 2014-05-08 17:29+0000\n"
12−"Last-Translator: Pierre <Unknown>\n"
12+"Last-Translator: Sébastien Maes <nautilussebastien@gmail.com>\n"
13"Language-Team: French <fr@li.org>\n"
13"Language-Team: French <fr@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n > 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-10 08:01+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16996)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -25,7 +24,7 @@ msgstr "Conserver dans le lanceur"
25
24
26#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
27msgid "Unlock from Launcher"
26msgid "Unlock from Launcher"
28−msgstr ""
27+msgstr "Retirer du lanceur"
29
28
30#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
31msgid "Skip intro"
30msgid "Skip intro"
@@ -38,6 +37,7 @@ msgstr "Bord droit"
38#: qml/Components/EdgeDemo.qml:114
37#: qml/Components/EdgeDemo.qml:114
39msgid "Try swiping from the right edge to unlock the phone"
38msgid "Try swiping from the right edge to unlock the phone"
40msgstr ""
39msgstr ""
40+"Faites glisser votre doigt à partir du bord droit pour déverrouiller."
41
41
42#: qml/Components/EdgeDemo.qml:145
42#: qml/Components/EdgeDemo.qml:145
43msgid "Top edge"
43msgid "Top edge"
@@ -46,6 +46,8 @@ msgstr "Bord supérieur"
46#: qml/Components/EdgeDemo.qml:146
46#: qml/Components/EdgeDemo.qml:146
47msgid "Try swiping from the top edge to access the indicators"
47msgid "Try swiping from the top edge to access the indicators"
48msgstr ""
48msgstr ""
49+"Faites glisser votre doigt à partir du bord supérieur pour accéder aux "
50+"indicateurs."
49
51
50#: qml/Components/EdgeDemo.qml:171
52#: qml/Components/EdgeDemo.qml:171
51msgid "Close"
53msgid "Close"
@@ -54,6 +56,8 @@ msgstr "Fermer"
54#: qml/Components/EdgeDemo.qml:172
56#: qml/Components/EdgeDemo.qml:172
55msgid "Swipe up again to close the settings screen"
57msgid "Swipe up again to close the settings screen"
56msgstr ""
58msgstr ""
59+"Faites glisser à nouveau votre doigt vers le bord supérieur pour fermer "
60+"l'écran des paramètres"
57
61
58#: qml/Components/EdgeDemo.qml:199
62#: qml/Components/EdgeDemo.qml:199
59msgid "Left edge"
63msgid "Left edge"
@@ -62,16 +66,20 @@ msgstr "Bord gauche"
62#: qml/Components/EdgeDemo.qml:200
66#: qml/Components/EdgeDemo.qml:200
63msgid "Swipe from the left to reveal the launcher for quick access to apps"
67msgid "Swipe from the left to reveal the launcher for quick access to apps"
64msgstr ""
68msgstr ""
69+"Faites glisser votre doigt à partir du bord gauche pour afficher le lanceur "
70+"d'applications."
65
71
66#: qml/Components/EdgeDemo.qml:227
72#: qml/Components/EdgeDemo.qml:227
67msgid "Well done"
73msgid "Well done"
68−msgstr ""
74+msgstr "Félicitations"
69
75
70#: qml/Components/EdgeDemo.qml:228
76#: qml/Components/EdgeDemo.qml:228
71msgid ""
77msgid ""
72"You have now mastered the edge gestures and can start using the "
78"You have now mastered the edge gestures and can start using the "
73"phone<br><br>Tap on the screen to start"
79"phone<br><br>Tap on the screen to start"
74msgstr ""
80msgstr ""
81+"Vous maîtrisez maintenant les différents gestes et pouvez commencer à "
82+"utiliser le téléphone<br><br>Appuyez sur l'écran pour commencer"
75
83
76#: qml/Components/PageHeader.qml:365
84#: qml/Components/PageHeader.qml:365
77msgid "Recent searches"
85msgid "Recent searches"
@@ -79,28 +87,28 @@ msgstr "Recherches récentes"
79
87
80#: qml/Components/SeeMore.qml:35
88#: qml/Components/SeeMore.qml:35
81msgid "See more"
89msgid "See more"
82−msgstr ""
90+msgstr "Voir plus"
83
91
84#: qml/Components/SeeMore.qml:58
92#: qml/Components/SeeMore.qml:58
85msgid "See less"
93msgid "See less"
86−msgstr ""
94+msgstr "Voir moins"
87
95
88−#: qml/Dash/DashApps.qml:38
96+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
97msgid "Recent"
90−msgstr ""
98+msgstr "Récent"
91
99
92#: qml/Dash/PreviewListView.qml:52
100#: qml/Dash/PreviewListView.qml:52
93#, qt-format
101#, qt-format
94msgid "%1 Preview"
102msgid "%1 Preview"
95−msgstr ""
103+msgstr "%1 Aperçu"
96
104
97#: qml/Dash/Previews/PreviewActionCombo.qml:34
105#: qml/Dash/Previews/PreviewActionCombo.qml:34
98msgid "More..."
106msgid "More..."
99−msgstr ""
107+msgstr "Plus..."
100
108
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
109#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "Less..."
110msgid "Less..."
103−msgstr ""
111+msgstr "Moins..."
104
112
105#: qml/Dash/Previews/PreviewRatingInput.qml:81
113#: qml/Dash/Previews/PreviewRatingInput.qml:81
106msgid "Rate this"
114msgid "Rate this"
@@ -114,6 +122,10 @@ msgstr "Ajouter un avis"
114msgid "Send"
122msgid "Send"
115msgstr "Envoyer"
123msgstr "Envoyer"
116
124
125+#: qml/Greeter/Greeter.qml:151
126+msgid "Swipe to unlock"
127+msgstr "Faites glisser pour déverrouiller"
128+
117#: qml/Greeter/Lockscreen.qml:149
129#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
130msgid "Emergency Call"
119msgstr "Appel d'urgence"
131msgstr "Appel d'urgence"
@@ -145,7 +157,7 @@ msgstr "Parlez maintenant…"
145
157
146#: qml/Hud/Hud.qml:94
158#: qml/Hud/Hud.qml:94
147msgid "Speaking..."
159msgid "Speaking..."
148−msgstr ""
160+msgstr "En cours d'écoute..."
149
161
150#: qml/Notifications/NotificationMenuItemFactory.qml:91
162#: qml/Notifications/NotificationMenuItemFactory.qml:91
151msgid "Show password"
163msgid "Show password"
@@ -153,29 +165,13 @@ msgstr "Afficher le mot de passe"
153
165
154#: qml/Notifications/NotificationMenuItemFactory.qml:103
166#: qml/Notifications/NotificationMenuItemFactory.qml:103
155msgid "Please enter SIM PIN"
167msgid "Please enter SIM PIN"
156−msgstr ""
168+msgstr "Veuillez entrer le code PIN de votre carte SIM"
157
169
158#: qml/Panel/SearchIndicator.qml:27
170#: qml/Panel/SearchIndicator.qml:27
159msgid "Search"
171msgid "Search"
160msgstr "Rechercher"
172msgstr "Rechercher"
161
173
162−#: qml/Shell.qml:417
174+#: qml/Shell.qml:348
163#, qt-format
175#, qt-format
164msgid "Please enter %1"
176msgid "Please enter %1"
165msgstr "Veuillez saisir %1"
177msgstr "Veuillez saisir %1"
166−
167−#~ msgid "Review"
168−#~ msgstr "Avis"
169−
170−#, qt-format
171−#~ msgid "%1 review"
172−#~ msgid_plural "%1 reviews"
173−#~ msgstr[0] "%1 avis"
174−#~ msgstr[1] "%1 avis"
175−
176−#~ msgid "Comments:"
177−#~ msgstr "Commentaires :"
178−
179−#, qt-format
180−#~ msgid "(%1)"
181−#~ msgstr "(%1)"
po/gd.po+22−36
@@ -7,26 +7,24 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2013-09-30 10:34+0000\n"
11+"PO-Revision-Date: 2014-05-17 21:08+0000\n"
12"Last-Translator: Akerbeltz <fios@akerbeltz.org>\n"
12"Last-Translator: Akerbeltz <fios@akerbeltz.org>\n"
13"Language-Team: Gaelic; Scottish <gd@li.org>\n"
13"Language-Team: Gaelic; Scottish <gd@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : "
18−"(n > 2 && n < 20) ? 2 : 3;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-18 05:57+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17007)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
24msgid "Lock to Launcher"
22msgid "Lock to Launcher"
25−msgstr ""
23+msgstr "Glais ris an lòinsear"
26
24
27#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
28msgid "Unlock from Launcher"
26msgid "Unlock from Launcher"
29−msgstr ""
27+msgstr "Dealaich on lòinsear"
30
28
31#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
32msgid "Skip intro"
30msgid "Skip intro"
@@ -79,6 +77,8 @@ msgid ""
79"You have now mastered the edge gestures and can start using the "
77"You have now mastered the edge gestures and can start using the "
80"phone<br><br>Tap on the screen to start"
78"phone<br><br>Tap on the screen to start"
81msgstr ""
79msgstr ""
80+"Fhuair thu air na gluasadan oire ceart a dhèanamh a-nis agus is urrainn dhut "
81+"am fòn a chleachdadh<br><br>Thoir gnogag air an sgrìn airson tòiseachadh"
82
82
83#: qml/Components/PageHeader.qml:365
83#: qml/Components/PageHeader.qml:365
84msgid "Recent searches"
84msgid "Recent searches"
@@ -86,28 +86,28 @@ msgstr "Na lorg thu o chionn goirid"
86
86
87#: qml/Components/SeeMore.qml:35
87#: qml/Components/SeeMore.qml:35
88msgid "See more"
88msgid "See more"
89−msgstr ""
89+msgstr "Seall barrachd"
90
90
91#: qml/Components/SeeMore.qml:58
91#: qml/Components/SeeMore.qml:58
92msgid "See less"
92msgid "See less"
93−msgstr ""
93+msgstr "Seall nas lugha"
94
94
95−#: qml/Dash/DashApps.qml:38
95+#: qml/Dash/DashApps.qml:37
96msgid "Recent"
96msgid "Recent"
97−msgstr ""
97+msgstr "O chionn goirid"
98
98
99#: qml/Dash/PreviewListView.qml:52
99#: qml/Dash/PreviewListView.qml:52
100#, qt-format
100#, qt-format
101msgid "%1 Preview"
101msgid "%1 Preview"
102−msgstr ""
102+msgstr "Ro-shealladh %1"
103
103
104#: qml/Dash/Previews/PreviewActionCombo.qml:34
104#: qml/Dash/Previews/PreviewActionCombo.qml:34
105msgid "More..."
105msgid "More..."
106−msgstr ""
106+msgstr "Barrachd..."
107
107
108#: qml/Dash/Previews/PreviewActionCombo.qml:34
108#: qml/Dash/Previews/PreviewActionCombo.qml:34
109msgid "Less..."
109msgid "Less..."
110−msgstr ""
110+msgstr "Nas lugha..."
111
111
112#: qml/Dash/Previews/PreviewRatingInput.qml:81
112#: qml/Dash/Previews/PreviewRatingInput.qml:81
113msgid "Rate this"
113msgid "Rate this"
@@ -121,6 +121,10 @@ msgstr "Cuir lèirmheas ris"
121msgid "Send"
121msgid "Send"
122msgstr "Cuir"
122msgstr "Cuir"
123
123
124+#: qml/Greeter/Greeter.qml:151
125+msgid "Swipe to unlock"
126+msgstr "Dèan grad-shlaighdeadh gus a' ghlas a thoirt dheth"
127+
124#: qml/Greeter/Lockscreen.qml:149
128#: qml/Greeter/Lockscreen.qml:149
125msgid "Emergency Call"
129msgid "Emergency Call"
126msgstr "Gairm èiginn"
130msgstr "Gairm èiginn"
@@ -156,35 +160,17 @@ msgstr "A' bruidhinn..."
156
160
157#: qml/Notifications/NotificationMenuItemFactory.qml:91
161#: qml/Notifications/NotificationMenuItemFactory.qml:91
158msgid "Show password"
162msgid "Show password"
159−msgstr ""
163+msgstr "Seall am facal-faire"
160
164
161#: qml/Notifications/NotificationMenuItemFactory.qml:103
165#: qml/Notifications/NotificationMenuItemFactory.qml:103
162msgid "Please enter SIM PIN"
166msgid "Please enter SIM PIN"
163−msgstr ""
167+msgstr "Cuir a-steach SIM PIN"
164
168
165#: qml/Panel/SearchIndicator.qml:27
169#: qml/Panel/SearchIndicator.qml:27
166msgid "Search"
170msgid "Search"
167msgstr "Lorg"
171msgstr "Lorg"
168
172
169−#: qml/Shell.qml:417
173+#: qml/Shell.qml:348
170#, qt-format
174#, qt-format
171msgid "Please enter %1"
175msgid "Please enter %1"
172msgstr "Cuir a-steach %1"
176msgstr "Cuir a-steach %1"
173−
174−#, qt-format
175−#~ msgid "(%1)"
176−#~ msgstr "(%1)"
177−
178−#~ msgid "Comments:"
179−#~ msgstr "Beachdan"
180−
181−#~ msgid "Review"
182−#~ msgstr "Lèirmheas"
183−
184−#, qt-format
185−#~ msgid "%1 review"
186−#~ msgid_plural "%1 reviews"
187−#~ msgstr[0] "%1 lèirmheas"
188−#~ msgstr[1] "%1 lèirmheas"
189−#~ msgstr[2] "%1 lèirmheasan"
190−#~ msgstr[3] "%1 lèirmheas"
po/gl.po+10−6
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-04-08 07:04+0000\n"
11+"PO-Revision-Date: 2014-05-03 07:31+0000\n"
12"Last-Translator: Marcos Lans <Unknown>\n"
12"Last-Translator: Marcos Lans <Unknown>\n"
13"Language-Team: Galician <gl@li.org>\n"
13"Language-Team: Galician <gl@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-04-09 07:31+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-06 07:34+0000\n"
18−"X-Generator: Launchpad (build 16976)\n"
18+"X-Generator: Launchpad (build 16996)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +86,7 @@ msgstr "Ver máis"
86msgid "See less"
86msgid "See less"
87msgstr "Ver menos"
87msgstr "Ver menos"
88
88
89−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
90msgid "Recent"
91msgstr "Recentes"
91msgstr "Recentes"
92
92
@@ -115,6 +115,10 @@ msgstr "Engadir unha opinión"
115msgid "Send"
115msgid "Send"
116msgstr "Enviar"
116msgstr "Enviar"
117
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr "Esvare para desbloquear"
121+
118#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
123msgid "Emergency Call"
120msgstr "Chamada de emerxencia"
124msgstr "Chamada de emerxencia"
@@ -160,7 +164,7 @@ msgstr "Introduza o PIN da SIM"
160msgid "Search"
164msgid "Search"
161msgstr "Buscar"
165msgstr "Buscar"
162
166
163−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
164#, qt-format
168#, qt-format
165msgid "Please enter %1"
169msgid "Please enter %1"
166msgstr "Introduza %1"
170msgstr "Introduza %1"
po/he.po+19−30
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2013-11-20 08:30+0000\n"
11+"PO-Revision-Date: 2014-05-15 21:19+0000\n"
12"Last-Translator: Yaron <sh.yaron@gmail.com>\n"
12"Last-Translator: Yaron <sh.yaron@gmail.com>\n"
13"Language-Team: Hebrew <he@li.org>\n"
13"Language-Team: Hebrew <he@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17007)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -72,6 +71,8 @@ msgid ""
72"You have now mastered the edge gestures and can start using the "
71"You have now mastered the edge gestures and can start using the "
73"phone<br><br>Tap on the screen to start"
72"phone<br><br>Tap on the screen to start"
74msgstr ""
73msgstr ""
74+"ברגעים אלו סיימת את התמחותך בשימוש במחוות קצה והטלפון פתוח לשימושך<br><br>נא "
75+"לגעת במסך כדי להתחיל"
75
76
76#: qml/Components/PageHeader.qml:365
77#: qml/Components/PageHeader.qml:365
77msgid "Recent searches"
78msgid "Recent searches"
@@ -79,28 +80,28 @@ msgstr "חיפושים אחרונים"
79
80
80#: qml/Components/SeeMore.qml:35
81#: qml/Components/SeeMore.qml:35
81msgid "See more"
82msgid "See more"
82−msgstr ""
83+msgstr "לראות עוד"
83
84
84#: qml/Components/SeeMore.qml:58
85#: qml/Components/SeeMore.qml:58
85msgid "See less"
86msgid "See less"
86−msgstr ""
87+msgstr "לראות פחות"
87
88
88−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
90msgid "Recent"
90−msgstr ""
91+msgstr "בשימוש לאחרונה"
91
92
92#: qml/Dash/PreviewListView.qml:52
93#: qml/Dash/PreviewListView.qml:52
93#, qt-format
94#, qt-format
94msgid "%1 Preview"
95msgid "%1 Preview"
95−msgstr ""
96+msgstr "תצוגה מקדימה של %1"
96
97
97#: qml/Dash/Previews/PreviewActionCombo.qml:34
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
98msgid "More..."
99msgid "More..."
99−msgstr ""
100+msgstr "עוד…"
100
101
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "Less..."
103msgid "Less..."
103−msgstr ""
104+msgstr "פחות…"
104
105
105#: qml/Dash/Previews/PreviewRatingInput.qml:81
106#: qml/Dash/Previews/PreviewRatingInput.qml:81
106msgid "Rate this"
107msgid "Rate this"
@@ -114,6 +115,10 @@ msgstr "הוספת סקירה"
114msgid "Send"
115msgid "Send"
115msgstr "שליחה"
116msgstr "שליחה"
116
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr "יש להחליק לפתיחה"
121+
117#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
123msgid "Emergency Call"
119msgstr "שיחת חירום"
124msgstr "שיחת חירום"
@@ -153,29 +158,13 @@ msgstr "הצגת הססמה"
153
158
154#: qml/Notifications/NotificationMenuItemFactory.qml:103
159#: qml/Notifications/NotificationMenuItemFactory.qml:103
155msgid "Please enter SIM PIN"
160msgid "Please enter SIM PIN"
156−msgstr ""
161+msgstr "נא להזין את קוד ה־<U+200F>SIM"
157
162
158#: qml/Panel/SearchIndicator.qml:27
163#: qml/Panel/SearchIndicator.qml:27
159msgid "Search"
164msgid "Search"
160msgstr "חיפוש"
165msgstr "חיפוש"
161
166
162−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
163#, qt-format
168#, qt-format
164msgid "Please enter %1"
169msgid "Please enter %1"
165msgstr "נא להזין %1"
170msgstr "נא להזין %1"
166−
167−#, qt-format
168−#~ msgid "(%1)"
169−#~ msgstr "(%1)"
170−
171−#~ msgid "Comments:"
172−#~ msgstr "הערות:"
173−
174−#~ msgid "Review"
175−#~ msgstr "סקירה"
176−
177−#, qt-format
178−#~ msgid "%1 review"
179−#~ msgid_plural "%1 reviews"
180−#~ msgstr[0] "סקירה %1"
181−#~ msgstr[1] "%1 סקירות"
po/hi.po+9−9
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-15 01:49+0000\n"
11"PO-Revision-Date: 2014-01-15 01:49+0000\n"
12"Last-Translator: Siddhanathan S. <Unknown>\n"
12"Last-Translator: Siddhanathan S. <Unknown>\n"
13"Language-Team: Hindi <hi@li.org>\n"
13"Language-Team: Hindi <hi@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "समीक्षा दे"
114msgid "Send"
113msgid "Send"
115msgstr "भेजें"
114msgstr "भेजें"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "आपातकालीन कॉल"
122msgstr "आपातकालीन कॉल"
@@ -159,10 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "खोजें"
163msgstr "खोजें"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
166−
167−#~ msgid "Review"
168−#~ msgstr "समीक्षा"
po/hr.po+9−7
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-27 04:14+0000\n"
11"PO-Revision-Date: 2013-06-27 04:14+0000\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
13"Language-Team: Croatian <hr@li.org>\n"
13"Language-Team: Croatian <hr@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
18−"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +84,7 @@ msgstr ""
86msgid "See less"
84msgid "See less"
87msgstr ""
85msgstr ""
88
86
89−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
88msgid "Recent"
91msgstr ""
89msgstr ""
92
90
@@ -115,6 +113,10 @@ msgstr ""
115msgid "Send"
113msgid "Send"
116msgstr ""
114msgstr ""
117
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
118#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
121msgid "Emergency Call"
120msgstr ""
122msgstr ""
@@ -160,7 +162,7 @@ msgstr ""
160msgid "Search"
162msgid "Search"
161msgstr "Pretraživanje"
163msgstr "Pretraživanje"
162
164
163−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
164#, qt-format
166#, qt-format
165msgid "Please enter %1"
167msgid "Please enter %1"
166msgstr ""
168msgstr ""
po/hu.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-14 23:02+0000\n"
11"PO-Revision-Date: 2014-01-14 23:02+0000\n"
12"Last-Translator: Kristóf Kiszel <Unknown>\n"
12"Last-Translator: Kristóf Kiszel <Unknown>\n"
13"Language-Team: Hungarian <hu@li.org>\n"
13"Language-Team: Hungarian <hu@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -87,7 +86,7 @@ msgstr ""
87msgid "See less"
86msgid "See less"
88msgstr ""
87msgstr ""
89
88
90−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
91msgid "Recent"
90msgid "Recent"
92msgstr ""
91msgstr ""
93
92
@@ -116,6 +115,10 @@ msgstr "Értékelés hozzáadása"
116msgid "Send"
115msgid "Send"
117msgstr "Küldés"
116msgstr "Küldés"
118
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr ""
121+
119#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
120msgid "Emergency Call"
123msgid "Emergency Call"
121msgstr "Vészhívás"
124msgstr "Vészhívás"
@@ -161,23 +164,7 @@ msgstr ""
161msgid "Search"
164msgid "Search"
162msgstr "Keresés"
165msgstr "Keresés"
163
166
164−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
165#, qt-format
168#, qt-format
166msgid "Please enter %1"
169msgid "Please enter %1"
167msgstr "Adja meg a következőt: %1"
170msgstr "Adja meg a következőt: %1"
168−
169−#, qt-format
170−#~ msgid "%1 review"
171−#~ msgid_plural "%1 reviews"
172−#~ msgstr[0] "%1 értékelés"
173−#~ msgstr[1] "%1 értékelés"
174−
175−#, qt-format
176−#~ msgid "(%1)"
177−#~ msgstr "(%1)"
178−
179−#~ msgid "Comments:"
180−#~ msgstr "Hozzászólások:"
181−
182−#~ msgid "Review"
183−#~ msgstr "Értékelés"
po/hy.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-27 04:43+0000\n"
11"PO-Revision-Date: 2013-06-27 04:43+0000\n"
12"Last-Translator: iAbaS <sosabazyan@yandex.ru>\n"
12"Last-Translator: iAbaS <sosabazyan@yandex.ru>\n"
13"Language-Team: Armenian <hy@li.org>\n"
13"Language-Team: Armenian <hy@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Որոնում"
163msgstr "Որոնում"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/id.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-26 22:35+0000\n"
11"PO-Revision-Date: 2013-06-26 22:35+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Indonesian <id@li.org>\n"
13"Language-Team: Indonesian <id@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/is.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-09-18 16:22+0000\n"
11"PO-Revision-Date: 2013-09-18 16:22+0000\n"
12"Last-Translator: Andri Thorlacius <Unknown>\n"
12"Last-Translator: Andri Thorlacius <Unknown>\n"
13"Language-Team: Icelandic <is@li.org>\n"
13"Language-Team: Icelandic <is@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +85,7 @@ msgstr ""
86msgid "See less"
85msgid "See less"
87msgstr ""
86msgstr ""
88
87
89−#: qml/Dash/DashApps.qml:38
88+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
89msgid "Recent"
91msgstr ""
90msgstr ""
92
91
@@ -115,6 +114,10 @@ msgstr "Gefa umsögn"
115msgid "Send"
114msgid "Send"
116msgstr "Senda"
115msgstr "Senda"
117
116
117+#: qml/Greeter/Greeter.qml:151
118+msgid "Swipe to unlock"
119+msgstr ""
120+
118#: qml/Greeter/Lockscreen.qml:149
121#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
122msgid "Emergency Call"
120msgstr "Neyðarsímtal"
123msgstr "Neyðarsímtal"
@@ -160,23 +163,7 @@ msgstr ""
160msgid "Search"
163msgid "Search"
161msgstr "Leita"
164msgstr "Leita"
162
165
163−#: qml/Shell.qml:417
166+#: qml/Shell.qml:348
164#, qt-format
167#, qt-format
165msgid "Please enter %1"
168msgid "Please enter %1"
166msgstr ""
169msgstr ""
167−
168−#, qt-format
169−#~ msgid "(%1)"
170−#~ msgstr "(%1)"
171−
172−#~ msgid "Comments:"
173−#~ msgstr "Athugasemdir:"
174−
175−#~ msgid "Review"
176−#~ msgstr "Umsögn"
177−
178−#, qt-format
179−#~ msgid "%1 review"
180−#~ msgid_plural "%1 reviews"
181−#~ msgstr[0] "%1 ummæli"
182−#~ msgstr[1] "%1 ummæli"
po/it.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-22 09:15+0000\n"
11"PO-Revision-Date: 2014-01-22 09:15+0000\n"
12"Last-Translator: Domenico <domenico.verde125@live.it>\n"
12"Last-Translator: Domenico <domenico.verde125@live.it>\n"
13"Language-Team: Italian <it@li.org>\n"
13"Language-Team: Italian <it@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -90,7 +89,7 @@ msgstr ""
90msgid "See less"
89msgid "See less"
91msgstr ""
90msgstr ""
92
91
93−#: qml/Dash/DashApps.qml:38
92+#: qml/Dash/DashApps.qml:37
94msgid "Recent"
93msgid "Recent"
95msgstr ""
94msgstr ""
96
95
@@ -119,6 +118,10 @@ msgstr "Aggiungi una recensione"
119msgid "Send"
118msgid "Send"
120msgstr "Invia"
119msgstr "Invia"
121
120
121+#: qml/Greeter/Greeter.qml:151
122+msgid "Swipe to unlock"
123+msgstr ""
124+
122#: qml/Greeter/Lockscreen.qml:149
125#: qml/Greeter/Lockscreen.qml:149
123msgid "Emergency Call"
126msgid "Emergency Call"
124msgstr "Chiamata di emergenza"
127msgstr "Chiamata di emergenza"
@@ -164,23 +167,7 @@ msgstr ""
164msgid "Search"
167msgid "Search"
165msgstr "Cerca"
168msgstr "Cerca"
166
169
167−#: qml/Shell.qml:417
170+#: qml/Shell.qml:348
168#, qt-format
171#, qt-format
169msgid "Please enter %1"
172msgid "Please enter %1"
170msgstr "Inserire %1"
173msgstr "Inserire %1"
171−
172−#, qt-format
173−#~ msgid "(%1)"
174−#~ msgstr "(%1)"
175−
176−#, qt-format
177−#~ msgid "%1 review"
178−#~ msgid_plural "%1 reviews"
179−#~ msgstr[0] "%1 recensione"
180−#~ msgstr[1] "%1 recensioni"
181−
182−#~ msgid "Comments:"
183−#~ msgstr "Commenti:"
184−
185−#~ msgid "Review"
186−#~ msgstr "Recensisci"
po/ja.po+9−13
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-18 07:01+0000\n"
11"PO-Revision-Date: 2014-01-18 07:01+0000\n"
12"Last-Translator: Shushi Kurose <md81bird@hitaki.net>\n"
12"Last-Translator: Shushi Kurose <md81bird@hitaki.net>\n"
13"Language-Team: Japanese <ja@li.org>\n"
13"Language-Team: Japanese <ja@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr "送信"
114msgstr "送信"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,14 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "検索"
163msgstr "検索"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
166−
167−#~ msgid "Comments:"
168−#~ msgstr "コメント:"
169−
170−#, qt-format
171−#~ msgid "(%1)"
172−#~ msgstr "(%1)"
po/km.po+12−24
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-03-04 02:32+0000\n"
11+"PO-Revision-Date: 2014-05-19 01:42+0000\n"
12"Last-Translator: Khoem Sokhem <khoemsokhem@khmeros.info>\n"
12"Last-Translator: Khoem Sokhem <khoemsokhem@khmeros.info>\n"
13"Language-Team: Khmer <km@li.org>\n"
13"Language-Team: Khmer <km@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17017)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,14 +88,14 @@ msgstr "មើល​ច្រើន​ទៀត"
89msgid "See less"
88msgid "See less"
90msgstr "មើល​តិច​ជាង"
89msgstr "មើល​តិច​ជាង"
91
90
92−#: qml/Dash/DashApps.qml:38
91+#: qml/Dash/DashApps.qml:37
93msgid "Recent"
92msgid "Recent"
94−msgstr ""
93+msgstr "បច្ចុប្បន្ន"
95
94
96#: qml/Dash/PreviewListView.qml:52
95#: qml/Dash/PreviewListView.qml:52
97#, qt-format
96#, qt-format
98msgid "%1 Preview"
97msgid "%1 Preview"
99−msgstr ""
98+msgstr "មើល​ជា​មុន %1"
100
99
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
100#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "More..."
101msgid "More..."
@@ -118,6 +117,10 @@ msgstr "បន្ថែម​ការ​ពិនិត្យ"
118msgid "Send"
117msgid "Send"
119msgstr "ផ្ញើ"
118msgstr "ផ្ញើ"
120
119
120+#: qml/Greeter/Greeter.qml:151
121+msgid "Swipe to unlock"
122+msgstr "អូស​ដើម្បី​ដោះសោ"
123+
121#: qml/Greeter/Lockscreen.qml:149
124#: qml/Greeter/Lockscreen.qml:149
122msgid "Emergency Call"
125msgid "Emergency Call"
123msgstr "ការ​ហៅ​ពេល​អាសន្ន"
126msgstr "ការ​ហៅ​ពេល​អាសន្ន"
@@ -163,22 +166,7 @@ msgstr "បញ្ចូល​កូដ PIN របស់​ស៊ីមកាត"
163msgid "Search"
166msgid "Search"
164msgstr "ស្វែង​រក"
167msgstr "ស្វែង​រក"
165
168
166−#: qml/Shell.qml:417
169+#: qml/Shell.qml:348
167#, qt-format
170#, qt-format
168msgid "Please enter %1"
171msgid "Please enter %1"
169msgstr "សូម​បញ្ចូល %1"
172msgstr "សូម​បញ្ចូល %1"
170−
171−#, qt-format
172−#~ msgid "(%1)"
173−#~ msgstr "(%1)"
174−
175−#, qt-format
176−#~ msgid "%1 review"
177−#~ msgid_plural "%1 reviews"
178−#~ msgstr[0] "ពិនិត្យ​មើល %1"
179−
180−#~ msgid "Comments:"
181−#~ msgstr "មតិយោបល់៖"
182−
183−#~ msgid "Review"
184−#~ msgstr "ការ​ពិនិត្យ"
po/kn.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-27 05:43+0000\n"
11"PO-Revision-Date: 2013-06-27 05:43+0000\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
13"Language-Team: Kannada <kn@li.org>\n"
13"Language-Team: Kannada <kn@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "ಹುಡುಕು"
163msgstr "ಹುಡುಕು"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/ko.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-10-10 07:04+0000\n"
11"PO-Revision-Date: 2013-10-10 07:04+0000\n"
12"Last-Translator: Kim Boram <boramism@gmail.com>\n"
12"Last-Translator: Kim Boram <boramism@gmail.com>\n"
13"Language-Team: Korean <ko@li.org>\n"
13"Language-Team: Korean <ko@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "검색"
163msgstr "검색"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/ky.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-27 06:17+0000\n"
11"PO-Revision-Date: 2013-06-27 06:17+0000\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
13"Language-Team: Kirghiz <ky@li.org>\n"
13"Language-Team: Kirghiz <ky@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Издөө"
163msgstr "Издөө"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/lo.po+9−13
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-10-02 10:00+0000\n"
11"PO-Revision-Date: 2013-10-02 10:00+0000\n"
12"Last-Translator: Anousak <anousak@gmail.com>\n"
12"Last-Translator: Anousak <anousak@gmail.com>\n"
13"Language-Team: Lao <lo@li.org>\n"
13"Language-Team: Lao <lo@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr "ສົ່ງ"
114msgstr "ສົ່ງ"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,14 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "ຊອກຫາ"
163msgstr "ຊອກຫາ"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "ກະລູນາປ້ອນ %1"
168msgstr "ກະລູນາປ້ອນ %1"
166−
167−#, qt-format
168−#~ msgid "(%1)"
169−#~ msgstr "(%1)"
170−
171−#~ msgid "Comments:"
172−#~ msgstr "ຄໍ່ເຫັນ"
po/lt.po+15−30
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-15 12:42+0000\n"
11+"PO-Revision-Date: 2014-05-19 17:15+0000\n"
12−"Last-Translator: Gediminas Paulauskas <menesis@pov.lt>\n"
12+"Last-Translator: Mantas Kriaučiūnas <mantas@akl.lt>\n"
13"Language-Team: Lithuanian <lt@li.org>\n"
13"Language-Team: Lithuanian <lt@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
18−"(n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17017)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -89,9 +87,9 @@ msgstr ""
89msgid "See less"
87msgid "See less"
90msgstr ""
88msgstr ""
91
89
92−#: qml/Dash/DashApps.qml:38
90+#: qml/Dash/DashApps.qml:37
93msgid "Recent"
91msgid "Recent"
94−msgstr ""
92+msgstr "Paskiausieji"
95
93
96#: qml/Dash/PreviewListView.qml:52
94#: qml/Dash/PreviewListView.qml:52
97#, qt-format
95#, qt-format
@@ -100,11 +98,11 @@ msgstr ""
100
98
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "More..."
100msgid "More..."
103−msgstr ""
101+msgstr "Daugiau..."
104
102
105#: qml/Dash/Previews/PreviewActionCombo.qml:34
103#: qml/Dash/Previews/PreviewActionCombo.qml:34
106msgid "Less..."
104msgid "Less..."
107−msgstr ""
105+msgstr "Mažiau..."
108
106
109#: qml/Dash/Previews/PreviewRatingInput.qml:81
107#: qml/Dash/Previews/PreviewRatingInput.qml:81
110msgid "Rate this"
108msgid "Rate this"
@@ -118,6 +116,10 @@ msgstr "Pridėkite apžvalgą"
118msgid "Send"
116msgid "Send"
119msgstr "Siųsti"
117msgstr "Siųsti"
120
118
119+#: qml/Greeter/Greeter.qml:151
120+msgid "Swipe to unlock"
121+msgstr "Braukite ir atrakinsite"
122+
121#: qml/Greeter/Lockscreen.qml:149
123#: qml/Greeter/Lockscreen.qml:149
122msgid "Emergency Call"
124msgid "Emergency Call"
123msgstr "Pagalbos skambutis"
125msgstr "Pagalbos skambutis"
@@ -157,30 +159,13 @@ msgstr "Rodyti slaptažodį"
157
159
158#: qml/Notifications/NotificationMenuItemFactory.qml:103
160#: qml/Notifications/NotificationMenuItemFactory.qml:103
159msgid "Please enter SIM PIN"
161msgid "Please enter SIM PIN"
160−msgstr ""
162+msgstr "Įveskite SIM kortelės PIN kodą"
161
163
162#: qml/Panel/SearchIndicator.qml:27
164#: qml/Panel/SearchIndicator.qml:27
163msgid "Search"
165msgid "Search"
164msgstr "Paieška"
166msgstr "Paieška"
165
167
166−#: qml/Shell.qml:417
168+#: qml/Shell.qml:348
167#, qt-format
169#, qt-format
168msgid "Please enter %1"
170msgid "Please enter %1"
169msgstr "Prašom įvesti %1"
171msgstr "Prašom įvesti %1"
170−
171−#~ msgid "Comments:"
172−#~ msgstr "Komentarai:"
173−
174−#~ msgid "Review"
175−#~ msgstr "Apžvalga"
176−
177−#, qt-format
178−#~ msgid "%1 review"
179−#~ msgid_plural "%1 reviews"
180−#~ msgstr[0] "%1 apžvalga"
181−#~ msgstr[1] "%1 apžvalgos"
182−#~ msgstr[2] "%1 apžvalgų"
183−
184−#, qt-format
185−#~ msgid "(%1)"
186−#~ msgstr "(%1)"
po/lv.po+27−24
@@ -7,29 +7,28 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-11 16:48+0000\n"
11+"PO-Revision-Date: 2014-05-07 18:17+0000\n"
12"Last-Translator: Jānis-Marks Gailis <jeanmarc.gailis@gmail.com>\n"
12"Last-Translator: Jānis-Marks Gailis <jeanmarc.gailis@gmail.com>\n"
13"Language-Team: Latvian <lv@li.org>\n"
13"Language-Team: Latvian <lv@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-10 08:01+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16996)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
23msgid "Lock to Launcher"
22msgid "Lock to Launcher"
24−msgstr ""
23+msgstr "Pieslēgt palaidējam"
25
24
26#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
27msgid "Unlock from Launcher"
26msgid "Unlock from Launcher"
28−msgstr ""
27+msgstr "Atslēgt no palaidēja"
29
28
30#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
31msgid "Skip intro"
30msgid "Skip intro"
32−msgstr ""
31+msgstr "Izlaist Intro"
33
32
34#: qml/Components/EdgeDemo.qml:113
33#: qml/Components/EdgeDemo.qml:113
35msgid "Right edge"
34msgid "Right edge"
@@ -37,7 +36,7 @@ msgstr "Labā mala"
37
36
38#: qml/Components/EdgeDemo.qml:114
37#: qml/Components/EdgeDemo.qml:114
39msgid "Try swiping from the right edge to unlock the phone"
38msgid "Try swiping from the right edge to unlock the phone"
40−msgstr ""
39+msgstr "Mēģiniet iesvelt no labās malas, lai atbloķētu tālruni"
41
40
42#: qml/Components/EdgeDemo.qml:145
41#: qml/Components/EdgeDemo.qml:145
43msgid "Top edge"
42msgid "Top edge"
@@ -45,7 +44,7 @@ msgstr "Augšējā mala"
45
44
46#: qml/Components/EdgeDemo.qml:146
45#: qml/Components/EdgeDemo.qml:146
47msgid "Try swiping from the top edge to access the indicators"
46msgid "Try swiping from the top edge to access the indicators"
48−msgstr ""
47+msgstr "Mēģiniet iesvelt no augšējās malas, lai piekļūt pie indikatoriem"
49
48
50#: qml/Components/EdgeDemo.qml:171
49#: qml/Components/EdgeDemo.qml:171
51msgid "Close"
50msgid "Close"
@@ -79,15 +78,15 @@ msgstr "Nesen veiktās meklēšanas"
79
78
80#: qml/Components/SeeMore.qml:35
79#: qml/Components/SeeMore.qml:35
81msgid "See more"
80msgid "See more"
82−msgstr ""
81+msgstr "Redzēt vairāk"
83
82
84#: qml/Components/SeeMore.qml:58
83#: qml/Components/SeeMore.qml:58
85msgid "See less"
84msgid "See less"
86−msgstr ""
85+msgstr "Redzēt mazāk"
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90−msgstr ""
89+msgstr "Nesens"
91
90
92#: qml/Dash/PreviewListView.qml:52
91#: qml/Dash/PreviewListView.qml:52
93#, qt-format
92#, qt-format
@@ -96,36 +95,40 @@ msgstr ""
96
95
97#: qml/Dash/Previews/PreviewActionCombo.qml:34
96#: qml/Dash/Previews/PreviewActionCombo.qml:34
98msgid "More..."
97msgid "More..."
99−msgstr ""
98+msgstr "Vairāk..."
100
99
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
100#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "Less..."
101msgid "Less..."
103−msgstr ""
102+msgstr "Mazāk..."
104
103
105#: qml/Dash/Previews/PreviewRatingInput.qml:81
104#: qml/Dash/Previews/PreviewRatingInput.qml:81
106msgid "Rate this"
105msgid "Rate this"
107−msgstr ""
106+msgstr "Novērtēt šo"
108
107
109#: qml/Dash/Previews/PreviewRatingInput.qml:126
108#: qml/Dash/Previews/PreviewRatingInput.qml:126
110msgid "Add a review"
109msgid "Add a review"
111−msgstr ""
110+msgstr "Komentēt"
112
111
113#: qml/Dash/Previews/PreviewRatingInput.qml:166
112#: qml/Dash/Previews/PreviewRatingInput.qml:166
114msgid "Send"
113msgid "Send"
114+msgstr "Sūtīt"
115+
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
115msgstr ""
118msgstr ""
116
119
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119−msgstr ""
122+msgstr "Neatliekamās Palīdzības zvans"
120
123
121#: qml/Greeter/PassphraseLockscreen.qml:59
124#: qml/Greeter/PassphraseLockscreen.qml:59
122#, qt-format
125#, qt-format
123msgid "Hello %1"
126msgid "Hello %1"
124−msgstr ""
127+msgstr "Sveiki, %1"
125
128
126#: qml/Greeter/PassphraseLockscreen.qml:59
129#: qml/Greeter/PassphraseLockscreen.qml:59
127msgid "Hello"
130msgid "Hello"
128−msgstr ""
131+msgstr "Sveiki"
129
132
130#: qml/Hud/HudParametrizedActionsPage.qml:132
133#: qml/Hud/HudParametrizedActionsPage.qml:132
131msgid "Confirm"
134msgid "Confirm"
@@ -149,7 +152,7 @@ msgstr "Runa..."
149
152
150#: qml/Notifications/NotificationMenuItemFactory.qml:91
153#: qml/Notifications/NotificationMenuItemFactory.qml:91
151msgid "Show password"
154msgid "Show password"
152−msgstr ""
155+msgstr "Rādīt paroli"
153
156
154#: qml/Notifications/NotificationMenuItemFactory.qml:103
157#: qml/Notifications/NotificationMenuItemFactory.qml:103
155msgid "Please enter SIM PIN"
158msgid "Please enter SIM PIN"
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Meklēt"
163msgstr "Meklēt"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165−msgstr ""
168+msgstr "Lūdzu ievadiet %1"
po/ml.po+10−23
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-11-23 11:44+0000\n"
11"PO-Revision-Date: 2013-11-23 11:44+0000\n"
12−"Last-Translator: STyM Alfazz <Unknown>\n"
12+"Last-Translator: Stym alfaZ <Unknown>\n"
13"Language-Team: Malayalam <ml@li.org>\n"
13"Language-Team: Malayalam <ml@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -87,7 +86,7 @@ msgstr ""
87msgid "See less"
86msgid "See less"
88msgstr ""
87msgstr ""
89
88
90−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
91msgid "Recent"
90msgid "Recent"
92msgstr ""
91msgstr ""
93
92
@@ -116,6 +115,10 @@ msgstr "ഒരു അവലോകനം ചേര്‍ക്കുക"
116msgid "Send"
115msgid "Send"
117msgstr "അയയ്‌ക്കുക"
116msgstr "അയയ്‌ക്കുക"
118
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr ""
121+
119#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
120msgid "Emergency Call"
123msgid "Emergency Call"
121msgstr "അടിയന്തിര വിളി"
124msgstr "അടിയന്തിര വിളി"
@@ -161,23 +164,7 @@ msgstr ""
161msgid "Search"
164msgid "Search"
162msgstr "തിരയുക"
165msgstr "തിരയുക"
163
166
164−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
165#, qt-format
168#, qt-format
166msgid "Please enter %1"
169msgid "Please enter %1"
167msgstr "ദയവായി %1 നല്‍കുക"
170msgstr "ദയവായി %1 നല്‍കുക"
168−
169−#, qt-format
170−#~ msgid "(%1)"
171−#~ msgstr "(%1)"
172−
173−#~ msgid "Comments:"
174−#~ msgstr "അഭിപ്രായങ്ങള്‍:"
175−
176−#~ msgid "Review"
177−#~ msgstr "അവലോകനം"
178−
179−#, qt-format
180−#~ msgid "%1 review"
181−#~ msgid_plural "%1 reviews"
182−#~ msgstr[0] "%1 അവലോകനം"
183−#~ msgstr[1] "%1 അവലോകനങ്ങള്‍"
po/mr.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-14 19:54+0000\n"
11"PO-Revision-Date: 2014-01-14 19:54+0000\n"
12"Last-Translator: Rohan Deshmukh <Unknown>\n"
12"Last-Translator: Rohan Deshmukh <Unknown>\n"
13"Language-Team: Marathi <mr@li.org>\n"
13"Language-Team: Marathi <mr@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/ms.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-17 09:05+0000\n"
11"PO-Revision-Date: 2014-01-17 09:05+0000\n"
12"Last-Translator: abuyop <Unknown>\n"
12"Last-Translator: abuyop <Unknown>\n"
13"Language-Team: Malay <ms@li.org>\n"
13"Language-Team: Malay <ms@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "Tambah ulasan"
114msgid "Send"
113msgid "Send"
115msgstr "Hantar"
114msgstr "Hantar"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "panggilan Kecemasan"
122msgstr "panggilan Kecemasan"
@@ -159,23 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Gelintar"
163msgstr "Gelintar"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "Sila masukkan %1"
168msgstr "Sila masukkan %1"
166−
167−#~ msgid "Comments:"
168−#~ msgstr "Ulasan:"
169−
170−#~ msgid "Review"
171−#~ msgstr "Tinjauan"
172−
173−#, qt-format
174−#~ msgid "%1 review"
175−#~ msgid_plural "%1 reviews"
176−#~ msgstr[0] "%1 ulasan"
177−#~ msgstr[1] "%1 ulasan"
178−
179−#, qt-format
180−#~ msgid "(%1)"
181−#~ msgstr "(%1)"
po/my.po+9−13
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-12-12 11:12+0000\n"
11"PO-Revision-Date: 2013-12-12 11:12+0000\n"
12"Last-Translator: Pyae Sone <Unknown>\n"
12"Last-Translator: Pyae Sone <Unknown>\n"
13"Language-Team: Burmese <my@li.org>\n"
13"Language-Team: Burmese <my@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr "ပို့မည်"
114msgstr "ပို့မည်"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "အရေးပေါ်ခေါ်မည်"
122msgstr "အရေးပေါ်ခေါ်မည်"
@@ -159,14 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "ရှာဖွေ"
163msgstr "ရှာဖွေ"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "%1ကိုရိုက်ထည့်ပါ"
168msgstr "%1ကိုရိုက်ထည့်ပါ"
166−
167−#, qt-format
168−#~ msgid "(%1)"
169−#~ msgstr "(%1)"
170−
171−#~ msgid "Comments:"
172−#~ msgstr "မှတ်ချက်များ-"
po/nb.po+41−36
@@ -7,125 +7,130 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2013-06-27 07:02+0000\n"
11+"PO-Revision-Date: 2014-05-19 15:25+0000\n"
12−"Last-Translator: Joakim Langvand <jlangvand@gmail.com>\n"
12+"Last-Translator: Thor Fjalestad <silvereyerocker@gmail.com>\n"
13"Language-Team: Norwegian Bokmal <nb@li.org>\n"
13"Language-Team: Norwegian Bokmal <nb@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17017)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
23msgid "Lock to Launcher"
22msgid "Lock to Launcher"
24−msgstr ""
23+msgstr "Lås til oppstarter"
25
24
26#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
27msgid "Unlock from Launcher"
26msgid "Unlock from Launcher"
28−msgstr ""
27+msgstr "Lås opp fra oppstarter"
29
28
30#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
31msgid "Skip intro"
30msgid "Skip intro"
32−msgstr ""
31+msgstr "Hopp over introduksjon"
33
32
34#: qml/Components/EdgeDemo.qml:113
33#: qml/Components/EdgeDemo.qml:113
35msgid "Right edge"
34msgid "Right edge"
36−msgstr ""
35+msgstr "Høyre kant"
37
36
38#: qml/Components/EdgeDemo.qml:114
37#: qml/Components/EdgeDemo.qml:114
39msgid "Try swiping from the right edge to unlock the phone"
38msgid "Try swiping from the right edge to unlock the phone"
40−msgstr ""
39+msgstr "Prøv å sveipe fra høyre side for å låse opp telefonen"
41
40
42#: qml/Components/EdgeDemo.qml:145
41#: qml/Components/EdgeDemo.qml:145
43msgid "Top edge"
42msgid "Top edge"
44−msgstr ""
43+msgstr "Øvre kant"
45
44
46#: qml/Components/EdgeDemo.qml:146
45#: qml/Components/EdgeDemo.qml:146
47msgid "Try swiping from the top edge to access the indicators"
46msgid "Try swiping from the top edge to access the indicators"
48−msgstr ""
47+msgstr "Prøv å sveipe fra toppen for å få tilgang til innstillingene"
49
48
50#: qml/Components/EdgeDemo.qml:171
49#: qml/Components/EdgeDemo.qml:171
51msgid "Close"
50msgid "Close"
52−msgstr ""
51+msgstr "Lukk"
53
52
54#: qml/Components/EdgeDemo.qml:172
53#: qml/Components/EdgeDemo.qml:172
55msgid "Swipe up again to close the settings screen"
54msgid "Swipe up again to close the settings screen"
56−msgstr ""
55+msgstr "Sveip opp igjen for å lukke innstillingsmenyen"
57
56
58#: qml/Components/EdgeDemo.qml:199
57#: qml/Components/EdgeDemo.qml:199
59msgid "Left edge"
58msgid "Left edge"
60−msgstr ""
59+msgstr "Venstre kant"
61
60
62#: qml/Components/EdgeDemo.qml:200
61#: qml/Components/EdgeDemo.qml:200
63msgid "Swipe from the left to reveal the launcher for quick access to apps"
62msgid "Swipe from the left to reveal the launcher for quick access to apps"
64−msgstr ""
63+msgstr "Sveip fra venstre for å få tilgang til programoppstarteren"
65
64
66#: qml/Components/EdgeDemo.qml:227
65#: qml/Components/EdgeDemo.qml:227
67msgid "Well done"
66msgid "Well done"
68−msgstr ""
67+msgstr "Bra jobba"
69
68
70#: qml/Components/EdgeDemo.qml:228
69#: qml/Components/EdgeDemo.qml:228
71msgid ""
70msgid ""
72"You have now mastered the edge gestures and can start using the "
71"You have now mastered the edge gestures and can start using the "
73"phone<br><br>Tap on the screen to start"
72"phone<br><br>Tap on the screen to start"
74msgstr ""
73msgstr ""
74+"Du har nå mestret kantbevegelsene, og er klar til å bruke "
75+"telefonen<br><br>Trykk på skjermen for å begynne"
75
76
76#: qml/Components/PageHeader.qml:365
77#: qml/Components/PageHeader.qml:365
77msgid "Recent searches"
78msgid "Recent searches"
78−msgstr "Siste søk"
79+msgstr "Nylige søk"
79
80
80#: qml/Components/SeeMore.qml:35
81#: qml/Components/SeeMore.qml:35
81msgid "See more"
82msgid "See more"
82−msgstr ""
83+msgstr "Vis mer"
83
84
84#: qml/Components/SeeMore.qml:58
85#: qml/Components/SeeMore.qml:58
85msgid "See less"
86msgid "See less"
86−msgstr ""
87+msgstr "Vis mindre"
87
88
88−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
90msgid "Recent"
90−msgstr ""
91+msgstr "Nylig"
91
92
92#: qml/Dash/PreviewListView.qml:52
93#: qml/Dash/PreviewListView.qml:52
93#, qt-format
94#, qt-format
94msgid "%1 Preview"
95msgid "%1 Preview"
95−msgstr ""
96+msgstr "%1-forhåndsvisning"
96
97
97#: qml/Dash/Previews/PreviewActionCombo.qml:34
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
98msgid "More..."
99msgid "More..."
99−msgstr ""
100+msgstr "Mer …"
100
101
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
102#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "Less..."
103msgid "Less..."
103−msgstr ""
104+msgstr "Mindre …"
104
105
105#: qml/Dash/Previews/PreviewRatingInput.qml:81
106#: qml/Dash/Previews/PreviewRatingInput.qml:81
106msgid "Rate this"
107msgid "Rate this"
107−msgstr ""
108+msgstr "Vurder dette"
108
109
109#: qml/Dash/Previews/PreviewRatingInput.qml:126
110#: qml/Dash/Previews/PreviewRatingInput.qml:126
110msgid "Add a review"
111msgid "Add a review"
111−msgstr ""
112+msgstr "Skriv en anmeldelse"
112
113
113#: qml/Dash/Previews/PreviewRatingInput.qml:166
114#: qml/Dash/Previews/PreviewRatingInput.qml:166
114msgid "Send"
115msgid "Send"
115−msgstr ""
116+msgstr "Send"
117+
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr "Sveip for å låse opp"
116
121
117#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
123msgid "Emergency Call"
119−msgstr ""
124+msgstr "Nødanrop"
120
125
121#: qml/Greeter/PassphraseLockscreen.qml:59
126#: qml/Greeter/PassphraseLockscreen.qml:59
122#, qt-format
127#, qt-format
123msgid "Hello %1"
128msgid "Hello %1"
124−msgstr ""
129+msgstr "Hei, %1"
125
130
126#: qml/Greeter/PassphraseLockscreen.qml:59
131#: qml/Greeter/PassphraseLockscreen.qml:59
127msgid "Hello"
132msgid "Hello"
128−msgstr ""
133+msgstr "Hei"
129
134
130#: qml/Hud/HudParametrizedActionsPage.qml:132
135#: qml/Hud/HudParametrizedActionsPage.qml:132
131msgid "Confirm"
136msgid "Confirm"
@@ -149,17 +154,17 @@ msgstr "Snakker …"
149
154
150#: qml/Notifications/NotificationMenuItemFactory.qml:91
155#: qml/Notifications/NotificationMenuItemFactory.qml:91
151msgid "Show password"
156msgid "Show password"
152−msgstr ""
157+msgstr "Vis passord"
153
158
154#: qml/Notifications/NotificationMenuItemFactory.qml:103
159#: qml/Notifications/NotificationMenuItemFactory.qml:103
155msgid "Please enter SIM PIN"
160msgid "Please enter SIM PIN"
156−msgstr ""
161+msgstr "Skriv inn PIN-koden til SIM-kortet"
157
162
158#: qml/Panel/SearchIndicator.qml:27
163#: qml/Panel/SearchIndicator.qml:27
159msgid "Search"
164msgid "Search"
160msgstr "Søk"
165msgstr "Søk"
161
166
162−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
163#, qt-format
168#, qt-format
164msgid "Please enter %1"
169msgid "Please enter %1"
165−msgstr ""
170+msgstr "Skriv inn %1"
po/nl.po+9−22
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-15 16:42+0000\n"
11"PO-Revision-Date: 2014-01-15 16:42+0000\n"
12"Last-Translator: Hannie Dumoleyn <Unknown>\n"
12"Last-Translator: Hannie Dumoleyn <Unknown>\n"
13"Language-Team: Dutch <nl@li.org>\n"
13"Language-Team: Dutch <nl@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "Voeg recensie toe"
114msgid "Send"
113msgid "Send"
115msgstr "Versturen"
114msgstr "Versturen"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "Noodoproep"
122msgstr "Noodoproep"
@@ -159,23 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Zoeken"
163msgstr "Zoeken"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "Voer %1 in"
168msgstr "Voer %1 in"
166−
167−#, qt-format
168−#~ msgid "%1 review"
169−#~ msgid_plural "%1 reviews"
170−#~ msgstr[0] "%1 recensie"
171−#~ msgstr[1] "%1 recensies"
172−
173−#, qt-format
174−#~ msgid "(%1)"
175−#~ msgstr "(%1)"
176−
177−#~ msgid "Comments:"
178−#~ msgstr "Reacties:"
179−
180−#~ msgid "Review"
181−#~ msgstr "Recensie"
po/pl.po+9−24
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-10 11:38+0000\n"
11"PO-Revision-Date: 2014-01-10 11:38+0000\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
13"Language-Team: Polish <pl@li.org>\n"
13"Language-Team: Polish <pl@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
18−"|| n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -88,7 +86,7 @@ msgstr ""
88msgid "See less"
86msgid "See less"
89msgstr ""
87msgstr ""
90
88
91−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
92msgid "Recent"
90msgid "Recent"
93msgstr ""
91msgstr ""
94
92
@@ -117,6 +115,10 @@ msgstr "Dodaj recenzję"
117msgid "Send"
115msgid "Send"
118msgstr "Wyślij"
116msgstr "Wyślij"
119
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr ""
121+
120#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
121msgid "Emergency Call"
123msgid "Emergency Call"
122msgstr "Telefon ratunkowy"
124msgstr "Telefon ratunkowy"
@@ -162,24 +164,7 @@ msgstr ""
162msgid "Search"
164msgid "Search"
163msgstr "Szukaj"
165msgstr "Szukaj"
164
166
165−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
166#, qt-format
168#, qt-format
167msgid "Please enter %1"
169msgid "Please enter %1"
168msgstr "Wprowadź %1"
170msgstr "Wprowadź %1"
169−
170−#~ msgid "Comments:"
171−#~ msgstr "Komentarze:"
172−
173−#~ msgid "Review"
174−#~ msgstr "Recenzja"
175−
176−#, qt-format
177−#~ msgid "%1 review"
178−#~ msgid_plural "%1 reviews"
179−#~ msgstr[0] "%1 opinia"
180−#~ msgstr[1] "%1 opinie"
181−#~ msgstr[2] "%1 opinii"
182−
183−#, qt-format
184−#~ msgid "(%1)"
185−#~ msgstr "(%1)"
po/pt.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-14 19:18+0000\n"
11"PO-Revision-Date: 2014-01-14 19:18+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Portuguese <pt@li.org>\n"
13"Language-Team: Portuguese <pt@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/pt_BR.po+20−31
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-01-18 23:24+0000\n"
11+"PO-Revision-Date: 2014-05-15 14:31+0000\n"
12−"Last-Translator: Fábio Nogueira <deb-user-ba@ubuntu.com>\n"
12+"Last-Translator: Rafael Neri <Unknown>\n"
13"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
13"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n > 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17007)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -74,6 +73,8 @@ msgid ""
74"You have now mastered the edge gestures and can start using the "
73"You have now mastered the edge gestures and can start using the "
75"phone<br><br>Tap on the screen to start"
74"phone<br><br>Tap on the screen to start"
76msgstr ""
75msgstr ""
76+"Agora você já domina os gestos das bordas e pode começar a usar o "
77+"telefone<br><br>Toque na tela para iniciar"
77
78
78#: qml/Components/PageHeader.qml:365
79#: qml/Components/PageHeader.qml:365
79msgid "Recent searches"
80msgid "Recent searches"
@@ -81,28 +82,28 @@ msgstr "Pesquisas recentes"
81
82
82#: qml/Components/SeeMore.qml:35
83#: qml/Components/SeeMore.qml:35
83msgid "See more"
84msgid "See more"
84−msgstr ""
85+msgstr "Ver mais"
85
86
86#: qml/Components/SeeMore.qml:58
87#: qml/Components/SeeMore.qml:58
87msgid "See less"
88msgid "See less"
88−msgstr ""
89+msgstr "Ver menos"
89
90
90−#: qml/Dash/DashApps.qml:38
91+#: qml/Dash/DashApps.qml:37
91msgid "Recent"
92msgid "Recent"
92−msgstr ""
93+msgstr "Recentes"
93
94
94#: qml/Dash/PreviewListView.qml:52
95#: qml/Dash/PreviewListView.qml:52
95#, qt-format
96#, qt-format
96msgid "%1 Preview"
97msgid "%1 Preview"
97−msgstr ""
98+msgstr "%1 visualização"
98
99
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
100#: qml/Dash/Previews/PreviewActionCombo.qml:34
100msgid "More..."
101msgid "More..."
101−msgstr ""
102+msgstr "Mais..."
102
103
103#: qml/Dash/Previews/PreviewActionCombo.qml:34
104#: qml/Dash/Previews/PreviewActionCombo.qml:34
104msgid "Less..."
105msgid "Less..."
105−msgstr ""
106+msgstr "Menos..."
106
107
107#: qml/Dash/Previews/PreviewRatingInput.qml:81
108#: qml/Dash/Previews/PreviewRatingInput.qml:81
108msgid "Rate this"
109msgid "Rate this"
@@ -116,6 +117,10 @@ msgstr "Adicionar uma análise"
116msgid "Send"
117msgid "Send"
117msgstr "Enviar"
118msgstr "Enviar"
118
119
120+#: qml/Greeter/Greeter.qml:151
121+msgid "Swipe to unlock"
122+msgstr "Deslizar para desbloquear"
123+
119#: qml/Greeter/Lockscreen.qml:149
124#: qml/Greeter/Lockscreen.qml:149
120msgid "Emergency Call"
125msgid "Emergency Call"
121msgstr "Chamada de emergência"
126msgstr "Chamada de emergência"
@@ -155,29 +160,13 @@ msgstr "Exibir senha"
155
160
156#: qml/Notifications/NotificationMenuItemFactory.qml:103
161#: qml/Notifications/NotificationMenuItemFactory.qml:103
157msgid "Please enter SIM PIN"
162msgid "Please enter SIM PIN"
158−msgstr ""
163+msgstr "Por favor, digite o PIN do cartão SIM"
159
164
160#: qml/Panel/SearchIndicator.qml:27
165#: qml/Panel/SearchIndicator.qml:27
161msgid "Search"
166msgid "Search"
162msgstr "Pesquisar"
167msgstr "Pesquisar"
163
168
164−#: qml/Shell.qml:417
169+#: qml/Shell.qml:348
165#, qt-format
170#, qt-format
166msgid "Please enter %1"
171msgid "Please enter %1"
167msgstr "Por favor, digite %1"
172msgstr "Por favor, digite %1"
168−
169−#, qt-format
170−#~ msgid "(%1)"
171−#~ msgstr "(%1)"
172−
173−#, qt-format
174−#~ msgid "%1 review"
175−#~ msgid_plural "%1 reviews"
176−#~ msgstr[0] "%1 análise"
177−#~ msgstr[1] "%1 análises"
178−
179−#~ msgid "Comments:"
180−#~ msgstr "Comentários:"
181−
182−#~ msgid "Review"
183−#~ msgstr "Revisão"
po/ro.po+9−7
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-27 07:53+0000\n"
11"PO-Revision-Date: 2013-06-27 07:53+0000\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
13"Language-Team: Romanian <ro@li.org>\n"
13"Language-Team: Romanian <ro@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 "
18−"== 0) && (n != 0))) ? 2: 1));\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +84,7 @@ msgstr ""
86msgid "See less"
84msgid "See less"
87msgstr ""
85msgstr ""
88
86
89−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
88msgid "Recent"
91msgstr ""
89msgstr ""
92
90
@@ -115,6 +113,10 @@ msgstr ""
115msgid "Send"
113msgid "Send"
116msgstr ""
114msgstr ""
117
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
118#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
121msgid "Emergency Call"
120msgstr ""
122msgstr ""
@@ -160,7 +162,7 @@ msgstr ""
160msgid "Search"
162msgid "Search"
161msgstr "Căutare"
163msgstr "Căutare"
162
164
163−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
164#, qt-format
166#, qt-format
165msgid "Please enter %1"
167msgid "Please enter %1"
166msgstr ""
168msgstr ""
po/ru.po+10−6
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-04-03 13:07+0000\n"
11+"PO-Revision-Date: 2014-05-15 12:57+0000\n"
12"Last-Translator: Zonov Roman <Unknown>\n"
12"Last-Translator: Zonov Roman <Unknown>\n"
13"Language-Team: Russian <ru@li.org>\n"
13"Language-Team: Russian <ru@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-04-04 07:12+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
18−"X-Generator: Launchpad (build 16976)\n"
18+"X-Generator: Launchpad (build 17007)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -91,7 +91,7 @@ msgstr "Подробнее"
91msgid "See less"
91msgid "See less"
92msgstr "Вкратце"
92msgstr "Вкратце"
93
93
94−#: qml/Dash/DashApps.qml:38
94+#: qml/Dash/DashApps.qml:37
95msgid "Recent"
95msgid "Recent"
96msgstr "Недавние"
96msgstr "Недавние"
97
97
@@ -120,6 +120,10 @@ msgstr "Добавьте отзыв"
120msgid "Send"
120msgid "Send"
121msgstr "Отправить"
121msgstr "Отправить"
122
122
123+#: qml/Greeter/Greeter.qml:151
124+msgid "Swipe to unlock"
125+msgstr "Смахните, чтобы разблокировать"
126+
123#: qml/Greeter/Lockscreen.qml:149
127#: qml/Greeter/Lockscreen.qml:149
124msgid "Emergency Call"
128msgid "Emergency Call"
125msgstr "Экстренный вызов"
129msgstr "Экстренный вызов"
@@ -165,7 +169,7 @@ msgstr "Введите PIN код"
165msgid "Search"
169msgid "Search"
166msgstr "Поиск"
170msgstr "Поиск"
167
171
168−#: qml/Shell.qml:417
172+#: qml/Shell.qml:348
169#, qt-format
173#, qt-format
170msgid "Please enter %1"
174msgid "Please enter %1"
171msgstr "Пожалуйста, введите %1"
175msgstr "Пожалуйста, введите %1"
po/shn.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-10-07 11:46+0000\n"
11"PO-Revision-Date: 2013-10-07 11:46+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Shan <shn@li.org>\n"
13"Language-Team: Shan <shn@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=(n == 1) ? 0 : 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/si.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-26 22:36+0000\n"
11"PO-Revision-Date: 2013-06-26 22:36+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Sinhalese <si@li.org>\n"
13"Language-Team: Sinhalese <si@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/sl.po+9−25
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-02-21 16:38+0000\n"
11"PO-Revision-Date: 2014-02-21 16:38+0000\n"
12"Last-Translator: Damir Jerovšek <Unknown>\n"
12"Last-Translator: Damir Jerovšek <Unknown>\n"
13"Language-Team: Slovenian <sl@li.org>\n"
13"Language-Team: Slovenian <sl@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || "
18−"n%100==4 ? 3 : 0);\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -90,7 +88,7 @@ msgstr "Pokaži več"
90msgid "See less"
88msgid "See less"
91msgstr "Pokaži manj"
89msgstr "Pokaži manj"
92
90
93−#: qml/Dash/DashApps.qml:38
91+#: qml/Dash/DashApps.qml:37
94msgid "Recent"
92msgid "Recent"
95msgstr ""
93msgstr ""
96
94
@@ -119,6 +117,10 @@ msgstr "Dodaj oceno"
119msgid "Send"
117msgid "Send"
120msgstr "Pošlji"
118msgstr "Pošlji"
121
119
120+#: qml/Greeter/Greeter.qml:151
121+msgid "Swipe to unlock"
122+msgstr ""
123+
122#: qml/Greeter/Lockscreen.qml:149
124#: qml/Greeter/Lockscreen.qml:149
123msgid "Emergency Call"
125msgid "Emergency Call"
124msgstr "Klic v sili"
126msgstr "Klic v sili"
@@ -164,25 +166,7 @@ msgstr "Vnesite PIN kartice SIM"
164msgid "Search"
166msgid "Search"
165msgstr "Iskanje"
167msgstr "Iskanje"
166
168
167−#: qml/Shell.qml:417
169+#: qml/Shell.qml:348
168#, qt-format
170#, qt-format
169msgid "Please enter %1"
171msgid "Please enter %1"
170msgstr "Vnesite %1"
172msgstr "Vnesite %1"
171−
172−#~ msgid "Review"
173−#~ msgstr "Ocena"
174−
175−#~ msgid "Comments:"
176−#~ msgstr "Opombe:"
177−
178−#, qt-format
179−#~ msgid "%1 review"
180−#~ msgid_plural "%1 reviews"
181−#~ msgstr[0] "%1 ocen"
182−#~ msgstr[1] "%1 ocena"
183−#~ msgstr[2] "%1 oceni"
184−#~ msgstr[3] "%1 ocene"
185−
186−#, qt-format
187−#~ msgid "(%1)"
188−#~ msgstr "(%1)"
po/sq.po+9−16
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-15 13:51+0000\n"
11"PO-Revision-Date: 2014-01-15 13:51+0000\n"
12"Last-Translator: Besmir Zanaj <besmirzanaj@gmail.com>\n"
12"Last-Translator: Besmir Zanaj <besmirzanaj@gmail.com>\n"
13"Language-Team: Albanian <sq@li.org>\n"
13"Language-Team: Albanian <sq@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:48+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:43+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +85,7 @@ msgstr ""
86msgid "See less"
85msgid "See less"
87msgstr ""
86msgstr ""
88
87
89−#: qml/Dash/DashApps.qml:38
88+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
89msgid "Recent"
91msgstr ""
90msgstr ""
92
91
@@ -115,6 +114,10 @@ msgstr "Shto një rishikim"
115msgid "Send"
114msgid "Send"
116msgstr ""
115msgstr ""
117
116
117+#: qml/Greeter/Greeter.qml:151
118+msgid "Swipe to unlock"
119+msgstr ""
120+
118#: qml/Greeter/Lockscreen.qml:149
121#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
122msgid "Emergency Call"
120msgstr ""
123msgstr ""
@@ -160,17 +163,7 @@ msgstr ""
160msgid "Search"
163msgid "Search"
161msgstr ""
164msgstr ""
162
165
163−#: qml/Shell.qml:417
166+#: qml/Shell.qml:348
164#, qt-format
167#, qt-format
165msgid "Please enter %1"
168msgid "Please enter %1"
166msgstr ""
169msgstr ""
167−
168−#, qt-format
169−#~ msgid "%1 review"
170−#~ msgid_plural "%1 reviews"
171−#~ msgstr[0] "%1 rishikim"
172−#~ msgstr[1] "%1 rishikime"
173−
174−#, qt-format
175−#~ msgid "(%1)"
176−#~ msgstr "(%1)"
po/sr.po+9−7
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-27 09:19+0000\n"
11"PO-Revision-Date: 2013-06-27 09:19+0000\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
13"Language-Team: Serbian <sr@li.org>\n"
13"Language-Team: Serbian <sr@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
18−"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,7 +84,7 @@ msgstr ""
86msgid "See less"
84msgid "See less"
87msgstr ""
85msgstr ""
88
86
89−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
88msgid "Recent"
91msgstr ""
89msgstr ""
92
90
@@ -115,6 +113,10 @@ msgstr ""
115msgid "Send"
113msgid "Send"
116msgstr ""
114msgstr ""
117
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
118#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
121msgid "Emergency Call"
120msgstr ""
122msgstr ""
@@ -160,7 +162,7 @@ msgstr ""
160msgid "Search"
162msgid "Search"
161msgstr "Претрага"
163msgstr "Претрага"
162
164
163−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
164#, qt-format
166#, qt-format
165msgid "Please enter %1"
167msgid "Please enter %1"
166msgstr ""
168msgstr ""
po/sv.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-26 22:36+0000\n"
11"PO-Revision-Date: 2013-06-26 22:36+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Swedish <sv@li.org>\n"
13"Language-Team: Swedish <sv@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/sw.po+9−9
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-14 19:28+0000\n"
11"PO-Revision-Date: 2014-01-14 19:28+0000\n"
12"Last-Translator: Damas Mlabwa <Unknown>\n"
12"Last-Translator: Damas Mlabwa <Unknown>\n"
13"Language-Team: Swahili <sw@li.org>\n"
13"Language-Team: Swahili <sw@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr "Tuma"
114msgstr "Tuma"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,10 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "Tafuta"
163msgstr "Tafuta"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
166−
167−#~ msgid "Comments:"
168−#~ msgstr "Maoni:"
po/ta.po+10−23
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-10-24 11:36+0000\n"
11"PO-Revision-Date: 2013-10-24 11:36+0000\n"
12−"Last-Translator: Arun Kumar -அருண் குமார் <thangam.arunx@gmail.com>\n"
12+"Last-Translator: Arun Kumar - அருண் குமார் <thangam.arunx@gmail.com>\n"
13"Language-Team: Ubuntu Tamil Team/Free Tamil Computing/Thamizha\n"
13"Language-Team: Ubuntu Tamil Team/Free Tamil Computing/Thamizha\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20"Language: ta\n"
19"Language: ta\n"
21
20
22#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:43
@@ -88,7 +87,7 @@ msgstr ""
88msgid "See less"
87msgid "See less"
89msgstr ""
88msgstr ""
90
89
91−#: qml/Dash/DashApps.qml:38
90+#: qml/Dash/DashApps.qml:37
92msgid "Recent"
91msgid "Recent"
93msgstr ""
92msgstr ""
94
93
@@ -117,6 +116,10 @@ msgstr "ஒரு பரிசீலனையை சேர்"
117msgid "Send"
116msgid "Send"
118msgstr "அனுப்பு"
117msgstr "அனுப்பு"
119
118
119+#: qml/Greeter/Greeter.qml:151
120+msgid "Swipe to unlock"
121+msgstr ""
122+
120#: qml/Greeter/Lockscreen.qml:149
123#: qml/Greeter/Lockscreen.qml:149
121msgid "Emergency Call"
124msgid "Emergency Call"
122msgstr "அவசர அழைப்பு"
125msgstr "அவசர அழைப்பு"
@@ -162,23 +165,7 @@ msgstr ""
162msgid "Search"
165msgid "Search"
163msgstr "தெடு"
166msgstr "தெடு"
164
167
165−#: qml/Shell.qml:417
168+#: qml/Shell.qml:348
166#, qt-format
169#, qt-format
167msgid "Please enter %1"
170msgid "Please enter %1"
168msgstr "தயவுச்செய்து %1 உள்ளிடு"
171msgstr "தயவுச்செய்து %1 உள்ளிடு"
169−
170−#, qt-format
171−#~ msgid "(%1)"
172−#~ msgstr "(%1)"
173−
174−#, qt-format
175−#~ msgid "%1 review"
176−#~ msgid_plural "%1 reviews"
177−#~ msgstr[0] "%1 பரிசீலனை"
178−#~ msgstr[1] "%1 பரிசீலனைகள்"
179−
180−#~ msgid "Review"
181−#~ msgstr "மறுஆய்வு"
182−
183−#~ msgid "Comments:"
184−#~ msgstr "கருத்துகள்:"
po/te.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-06-27 09:57+0000\n"
11"PO-Revision-Date: 2013-06-27 09:57+0000\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
12"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
13"Language-Team: Telugu <te@li.org>\n"
13"Language-Team: Telugu <te@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/tr.po+13−26
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-03-05 08:54+0000\n"
11+"PO-Revision-Date: 2014-05-19 12:52+0000\n"
12−"Last-Translator: Muhammed Yüce <muhammedyuceee@gmail.com>\n"
12+"Last-Translator: Volkan Gezer <Unknown>\n"
13"Language-Team: Turkish <tr@li.org>\n"
13"Language-Team: Turkish <tr@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17017)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -88,14 +87,14 @@ msgstr "Daha fazlası"
88msgid "See less"
87msgid "See less"
89msgstr "Daha azını gör"
88msgstr "Daha azını gör"
90
89
91−#: qml/Dash/DashApps.qml:38
90+#: qml/Dash/DashApps.qml:37
92msgid "Recent"
91msgid "Recent"
93−msgstr ""
92+msgstr "En son"
94
93
95#: qml/Dash/PreviewListView.qml:52
94#: qml/Dash/PreviewListView.qml:52
96#, qt-format
95#, qt-format
97msgid "%1 Preview"
96msgid "%1 Preview"
98−msgstr ""
97+msgstr "%1 Önizlemesi"
99
98
100#: qml/Dash/Previews/PreviewActionCombo.qml:34
99#: qml/Dash/Previews/PreviewActionCombo.qml:34
101msgid "More..."
100msgid "More..."
@@ -117,6 +116,10 @@ msgstr "Bir inceleme ekle"
117msgid "Send"
116msgid "Send"
118msgstr "Gönder"
117msgstr "Gönder"
119
118
119+#: qml/Greeter/Greeter.qml:151
120+msgid "Swipe to unlock"
121+msgstr "Açmak için kaydırın"
122+
120#: qml/Greeter/Lockscreen.qml:149
123#: qml/Greeter/Lockscreen.qml:149
121msgid "Emergency Call"
124msgid "Emergency Call"
122msgstr "Acil Arama"
125msgstr "Acil Arama"
@@ -162,23 +165,7 @@ msgstr "Lütfen SIM PIN'inizi girin"
162msgid "Search"
165msgid "Search"
163msgstr "Ara"
166msgstr "Ara"
164
167
165−#: qml/Shell.qml:417
168+#: qml/Shell.qml:348
166#, qt-format
169#, qt-format
167msgid "Please enter %1"
170msgid "Please enter %1"
168msgstr "Lütfen %1 girin"
171msgstr "Lütfen %1 girin"
169−
170−#~ msgid "Review"
171−#~ msgstr "İnceleme"
172−
173−#, qt-format
174−#~ msgid "%1 review"
175−#~ msgid_plural "%1 reviews"
176−#~ msgstr[0] "%1 inceleme"
177−#~ msgstr[1] "%1 inceleme"
178−
179−#, qt-format
180−#~ msgid "(%1)"
181−#~ msgstr "(%1)"
182−
183−#~ msgid "Comments:"
184−#~ msgstr "Yorumlar:"
po/ug.po+12−8
@@ -7,15 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2014-04-14 09:31+0000\n"
11+"PO-Revision-Date: 2014-04-22 05:46+0000\n"
12−"Last-Translator: volkhan <Unknown>\n"
12+"Last-Translator: abdurahman <Unknown>\n"
13"Language-Team: Uyghur <ug@li.org>\n"
13"Language-Team: Uyghur <ug@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-04-15 07:57+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
18−"X-Generator: Launchpad (build 16976)\n"
18+"X-Generator: Launchpad (build 16985)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -86,14 +86,14 @@ msgstr "جىقراق كۆرۈش"
86msgid "See less"
86msgid "See less"
87msgstr "ئازراق كۆرۈش"
87msgstr "ئازراق كۆرۈش"
88
88
89−#: qml/Dash/DashApps.qml:38
89+#: qml/Dash/DashApps.qml:37
90msgid "Recent"
90msgid "Recent"
91msgstr "يېقىنقى"
91msgstr "يېقىنقى"
92
92
93#: qml/Dash/PreviewListView.qml:52
93#: qml/Dash/PreviewListView.qml:52
94#, qt-format
94#, qt-format
95msgid "%1 Preview"
95msgid "%1 Preview"
96−msgstr ""
96+msgstr "%1 ئالدىن كۆرۈپ بىقىش"
97
97
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
98#: qml/Dash/Previews/PreviewActionCombo.qml:34
99msgid "More..."
99msgid "More..."
@@ -115,6 +115,10 @@ msgstr "باھا قوشۇش"
115msgid "Send"
115msgid "Send"
116msgstr "ئەۋەت"
116msgstr "ئەۋەت"
117
117
118+#: qml/Greeter/Greeter.qml:151
119+msgid "Swipe to unlock"
120+msgstr ""
121+
118#: qml/Greeter/Lockscreen.qml:149
122#: qml/Greeter/Lockscreen.qml:149
119msgid "Emergency Call"
123msgid "Emergency Call"
120msgstr "جىددىي تېلېفون"
124msgstr "جىددىي تېلېفون"
@@ -160,7 +164,7 @@ msgstr "پارولىنى كىرگۈزۈڭPINكارتىڭىزنىڭ SIM"
160msgid "Search"
164msgid "Search"
161msgstr "ئىزدە"
165msgstr "ئىزدە"
162
166
163−#: qml/Shell.qml:417
167+#: qml/Shell.qml:348
164#, qt-format
168#, qt-format
165msgid "Please enter %1"
169msgid "Please enter %1"
166msgstr "%1 نى كىرگۈزۈڭ"
170msgstr "%1 نى كىرگۈزۈڭ"
po/uk.po+20−33
@@ -7,17 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2013-11-23 12:37+0000\n"
11+"PO-Revision-Date: 2014-05-15 12:00+0000\n"
12−"Last-Translator: Ignat Kizenko <Unknown>\n"
12+"Last-Translator: Yuri Chornoivan <yurchor@gmail.com>\n"
13"Language-Team: Ukrainian <uk@li.org>\n"
13"Language-Team: Ukrainian <uk@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
18−"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-16 06:52+0000\n"
20−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17007)\n"
21
19
22#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
23#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -76,6 +74,8 @@ msgid ""
76"You have now mastered the edge gestures and can start using the "
74"You have now mastered the edge gestures and can start using the "
77"phone<br><br>Tap on the screen to start"
75"phone<br><br>Tap on the screen to start"
78msgstr ""
76msgstr ""
77+"Вами налаштовано дії у відповідь на дотики на краях екрана. Тепер телефоном "
78+"можна користуватися.<br><br>Торкніться екрана, щоб розпочати."
79
79
80#: qml/Components/PageHeader.qml:365
80#: qml/Components/PageHeader.qml:365
81msgid "Recent searches"
81msgid "Recent searches"
@@ -83,28 +83,28 @@ msgstr "Нещодавні пошуки"
83
83
84#: qml/Components/SeeMore.qml:35
84#: qml/Components/SeeMore.qml:35
85msgid "See more"
85msgid "See more"
86−msgstr ""
86+msgstr "Докладніше"
87
87
88#: qml/Components/SeeMore.qml:58
88#: qml/Components/SeeMore.qml:58
89msgid "See less"
89msgid "See less"
90−msgstr ""
90+msgstr "Стисліше"
91
91
92−#: qml/Dash/DashApps.qml:38
92+#: qml/Dash/DashApps.qml:37
93msgid "Recent"
93msgid "Recent"
94−msgstr ""
94+msgstr "Нещодавні"
95
95
96#: qml/Dash/PreviewListView.qml:52
96#: qml/Dash/PreviewListView.qml:52
97#, qt-format
97#, qt-format
98msgid "%1 Preview"
98msgid "%1 Preview"
99−msgstr ""
99+msgstr "Перегляд %1"
100
100
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "More..."
102msgid "More..."
103−msgstr ""
103+msgstr "Більше…"
104
104
105#: qml/Dash/Previews/PreviewActionCombo.qml:34
105#: qml/Dash/Previews/PreviewActionCombo.qml:34
106msgid "Less..."
106msgid "Less..."
107−msgstr ""
107+msgstr "Менше..."
108
108
109#: qml/Dash/Previews/PreviewRatingInput.qml:81
109#: qml/Dash/Previews/PreviewRatingInput.qml:81
110msgid "Rate this"
110msgid "Rate this"
@@ -118,6 +118,10 @@ msgstr "Додати рецензію"
118msgid "Send"
118msgid "Send"
119msgstr "Надіслати"
119msgstr "Надіслати"
120
120
121+#: qml/Greeter/Greeter.qml:151
122+msgid "Swipe to unlock"
123+msgstr "Проведіть пальцем, щоб розблокувати"
124+
121#: qml/Greeter/Lockscreen.qml:149
125#: qml/Greeter/Lockscreen.qml:149
122msgid "Emergency Call"
126msgid "Emergency Call"
123msgstr "Терміновий виклик"
127msgstr "Терміновий виклик"
@@ -157,30 +161,13 @@ msgstr "Показати пароль"
157
161
158#: qml/Notifications/NotificationMenuItemFactory.qml:103
162#: qml/Notifications/NotificationMenuItemFactory.qml:103
159msgid "Please enter SIM PIN"
163msgid "Please enter SIM PIN"
160−msgstr ""
164+msgstr "Введіть PIN-код SIM-картки"
161
165
162#: qml/Panel/SearchIndicator.qml:27
166#: qml/Panel/SearchIndicator.qml:27
163msgid "Search"
167msgid "Search"
164msgstr "Пошук"
168msgstr "Пошук"
165
169
166−#: qml/Shell.qml:417
170+#: qml/Shell.qml:348
167#, qt-format
171#, qt-format
168msgid "Please enter %1"
172msgid "Please enter %1"
169msgstr "Будь ласка, введіть %1"
173msgstr "Будь ласка, введіть %1"
170−
171−#~ msgid "Comments:"
172−#~ msgstr "Коментарі:"
173−
174−#~ msgid "Review"
175−#~ msgstr "Рецензія"
176−
177−#, qt-format
178−#~ msgid "%1 review"
179−#~ msgid_plural "%1 reviews"
180−#~ msgstr[0] "%1 рецензія"
181−#~ msgstr[1] "%1 рецензії"
182−#~ msgstr[2] "%1 рецензій"
183−
184−#, qt-format
185−#~ msgid "(%1)"
186−#~ msgstr "(%1)"
po/unity8.pot+7−3
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: unity8\n"
9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"
10"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
11+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -84,7 +84,7 @@ msgstr ""
84msgid "See less"
84msgid "See less"
85msgstr ""
85msgstr ""
86
86
87−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
88msgid "Recent"
88msgid "Recent"
89msgstr ""
89msgstr ""
90
90
@@ -113,6 +113,10 @@ msgstr ""
113msgid "Send"
113msgid "Send"
114msgstr ""
114msgstr ""
115
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
116#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
117msgid "Emergency Call"
121msgid "Emergency Call"
118msgstr ""
122msgstr ""
@@ -158,7 +162,7 @@ msgstr ""
158msgid "Search"
162msgid "Search"
159msgstr ""
163msgstr ""
160
164
161−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
162#, qt-format
166#, qt-format
163msgid "Please enter %1"
167msgid "Please enter %1"
164msgstr ""
168msgstr ""
po/vi.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-15 01:19+0000\n"
11"PO-Revision-Date: 2014-01-15 01:19+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Vietnamese <vi@li.org>\n"
13"Language-Team: Vietnamese <vi@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/xh.po+9−6
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2013-09-28 13:20+0000\n"
11"PO-Revision-Date: 2013-09-28 13:20+0000\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Language-Team: Xhosa <xh@li.org>\n"
13"Language-Team: Xhosa <xh@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr ""
114msgid "Send"
113msgid "Send"
115msgstr ""
114msgstr ""
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr ""
122msgstr ""
@@ -159,7 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr ""
163msgstr ""
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
po/zh_CN.po+37−34
@@ -7,71 +7,70 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11−"PO-Revision-Date: 2013-10-09 13:51+0000\n"
11+"PO-Revision-Date: 2014-05-19 02:24+0000\n"
12−"Last-Translator: Aron Xu <Unknown>\n"
12+"Last-Translator: Shuduo Sang <Unknown>\n"
13"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
13"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-22 06:49+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 17017)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
23msgid "Lock to Launcher"
22msgid "Lock to Launcher"
24−msgstr ""
23+msgstr "固定到启动器"
25
24
26#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
27msgid "Unlock from Launcher"
26msgid "Unlock from Launcher"
28−msgstr ""
27+msgstr "从启动器移除"
29
28
30#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
31msgid "Skip intro"
30msgid "Skip intro"
32−msgstr ""
31+msgstr "跳过简介"
33
32
34#: qml/Components/EdgeDemo.qml:113
33#: qml/Components/EdgeDemo.qml:113
35msgid "Right edge"
34msgid "Right edge"
36−msgstr ""
35+msgstr "右边缘"
37
36
38#: qml/Components/EdgeDemo.qml:114
37#: qml/Components/EdgeDemo.qml:114
39msgid "Try swiping from the right edge to unlock the phone"
38msgid "Try swiping from the right edge to unlock the phone"
40−msgstr ""
39+msgstr "从右边滑动可以解锁"
41
40
42#: qml/Components/EdgeDemo.qml:145
41#: qml/Components/EdgeDemo.qml:145
43msgid "Top edge"
42msgid "Top edge"
44−msgstr ""
43+msgstr "上边缘"
45
44
46#: qml/Components/EdgeDemo.qml:146
45#: qml/Components/EdgeDemo.qml:146
47msgid "Try swiping from the top edge to access the indicators"
46msgid "Try swiping from the top edge to access the indicators"
48−msgstr ""
47+msgstr "从上边缘划入可以访问指示器"
49
48
50#: qml/Components/EdgeDemo.qml:171
49#: qml/Components/EdgeDemo.qml:171
51msgid "Close"
50msgid "Close"
52−msgstr ""
51+msgstr "关闭"
53
52
54#: qml/Components/EdgeDemo.qml:172
53#: qml/Components/EdgeDemo.qml:172
55msgid "Swipe up again to close the settings screen"
54msgid "Swipe up again to close the settings screen"
56−msgstr ""
55+msgstr "再次向上划动可以关闭设置界面"
57
56
58#: qml/Components/EdgeDemo.qml:199
57#: qml/Components/EdgeDemo.qml:199
59msgid "Left edge"
58msgid "Left edge"
60−msgstr ""
59+msgstr "左边缘"
61
60
62#: qml/Components/EdgeDemo.qml:200
61#: qml/Components/EdgeDemo.qml:200
63msgid "Swipe from the left to reveal the launcher for quick access to apps"
62msgid "Swipe from the left to reveal the launcher for quick access to apps"
64−msgstr ""
63+msgstr "从左边划入展开启动器可以快速打开应用"
65
64
66#: qml/Components/EdgeDemo.qml:227
65#: qml/Components/EdgeDemo.qml:227
67msgid "Well done"
66msgid "Well done"
68−msgstr ""
67+msgstr "做得好"
69
68
70#: qml/Components/EdgeDemo.qml:228
69#: qml/Components/EdgeDemo.qml:228
71msgid ""
70msgid ""
72"You have now mastered the edge gestures and can start using the "
71"You have now mastered the edge gestures and can start using the "
73"phone<br><br>Tap on the screen to start"
72"phone<br><br>Tap on the screen to start"
74−msgstr ""
73+msgstr "您现在已经掌握了边缘滑动手势,可以开始使用手机了<br><br>请点击屏幕开始使用"
75
74
76#: qml/Components/PageHeader.qml:365
75#: qml/Components/PageHeader.qml:365
77msgid "Recent searches"
76msgid "Recent searches"
@@ -79,44 +78,48 @@ msgstr "近期搜索"
79
78
80#: qml/Components/SeeMore.qml:35
79#: qml/Components/SeeMore.qml:35
81msgid "See more"
80msgid "See more"
82−msgstr ""
81+msgstr "了解更多"
83
82
84#: qml/Components/SeeMore.qml:58
83#: qml/Components/SeeMore.qml:58
85msgid "See less"
84msgid "See less"
86−msgstr ""
85+msgstr "显示更少"
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90−msgstr ""
89+msgstr "最近使用过的"
91
90
92#: qml/Dash/PreviewListView.qml:52
91#: qml/Dash/PreviewListView.qml:52
93#, qt-format
92#, qt-format
94msgid "%1 Preview"
93msgid "%1 Preview"
95−msgstr ""
94+msgstr "%1 预览"
96
95
97#: qml/Dash/Previews/PreviewActionCombo.qml:34
96#: qml/Dash/Previews/PreviewActionCombo.qml:34
98msgid "More..."
97msgid "More..."
99−msgstr ""
98+msgstr "更多..."
100
99
101#: qml/Dash/Previews/PreviewActionCombo.qml:34
100#: qml/Dash/Previews/PreviewActionCombo.qml:34
102msgid "Less..."
101msgid "Less..."
103−msgstr ""
102+msgstr "更少..."
104
103
105#: qml/Dash/Previews/PreviewRatingInput.qml:81
104#: qml/Dash/Previews/PreviewRatingInput.qml:81
106msgid "Rate this"
105msgid "Rate this"
107−msgstr ""
106+msgstr "评分"
108
107
109#: qml/Dash/Previews/PreviewRatingInput.qml:126
108#: qml/Dash/Previews/PreviewRatingInput.qml:126
110msgid "Add a review"
109msgid "Add a review"
111−msgstr ""
110+msgstr "添加评论"
112
111
113#: qml/Dash/Previews/PreviewRatingInput.qml:166
112#: qml/Dash/Previews/PreviewRatingInput.qml:166
114msgid "Send"
113msgid "Send"
115−msgstr ""
114+msgstr "发送"
115+
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr "滑动解锁"
116
119
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119−msgstr ""
122+msgstr "紧急电话"
120
123
121#: qml/Greeter/PassphraseLockscreen.qml:59
124#: qml/Greeter/PassphraseLockscreen.qml:59
122#, qt-format
125#, qt-format
@@ -149,17 +152,17 @@ msgstr "讲话中..."
149
152
150#: qml/Notifications/NotificationMenuItemFactory.qml:91
153#: qml/Notifications/NotificationMenuItemFactory.qml:91
151msgid "Show password"
154msgid "Show password"
152−msgstr ""
155+msgstr "显示密码"
153
156
154#: qml/Notifications/NotificationMenuItemFactory.qml:103
157#: qml/Notifications/NotificationMenuItemFactory.qml:103
155msgid "Please enter SIM PIN"
158msgid "Please enter SIM PIN"
156−msgstr ""
159+msgstr "请输入 SIM PIN"
157
160
158#: qml/Panel/SearchIndicator.qml:27
161#: qml/Panel/SearchIndicator.qml:27
159msgid "Search"
162msgid "Search"
160msgstr "搜索"
163msgstr "搜索"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165−msgstr ""
168+msgstr "请输入 %1"
po/zh_HK.po+9−21
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-25 13:32+0000\n"
11"PO-Revision-Date: 2014-01-25 13:32+0000\n"
12"Last-Translator: Daniel Cheung <daniel.2345@hotmail.com>\n"
12"Last-Translator: Daniel Cheung <daniel.2345@hotmail.com>\n"
13"Language-Team: Chinese (Hong Kong) <zh_HK@li.org>\n"
13"Language-Team: Chinese (Hong Kong) <zh_HK@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "新增評論"
114msgid "Send"
113msgid "Send"
115msgstr "傳送"
114msgstr "傳送"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "緊急電話"
122msgstr "緊急電話"
@@ -159,22 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "搜尋"
163msgstr "搜尋"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr "請輸入 %1"
168msgstr "請輸入 %1"
166−
167−#~ msgid "Comments:"
168−#~ msgstr "評論:"
169−
170−#~ msgid "Review"
171−#~ msgstr "評論"
172−
173−#, qt-format
174−#~ msgid "%1 review"
175−#~ msgid_plural "%1 reviews"
176−#~ msgstr[0] "%1 評論"
177−
178−#, qt-format
179−#~ msgid "(%1)"
180−#~ msgstr "(%1)"
po/zh_TW.po+9−21
@@ -7,16 +7,15 @@ msgid ""
7msgstr ""
7msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10−"POT-Creation-Date: 2014-03-25 16:48+0100\n"
10+"POT-Creation-Date: 2014-04-10 11:13-0400\n"
11"PO-Revision-Date: 2014-01-16 06:04+0000\n"
11"PO-Revision-Date: 2014-01-16 06:04+0000\n"
12"Last-Translator: Henry Yang <henry9846@hotmail.com>\n"
12"Last-Translator: Henry Yang <henry9846@hotmail.com>\n"
13"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
13"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"Plural-Forms: nplurals=1; plural=0;\n"
18−"X-Launchpad-Export-Date: 2014-03-28 06:49+0000\n"
17+"X-Launchpad-Export-Date: 2014-05-01 06:44+0000\n"
19−"X-Generator: Launchpad (build 16967)\n"
18+"X-Generator: Launchpad (build 16985)\n"
20
19
21#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
22#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -85,7 +84,7 @@ msgstr ""
85msgid "See less"
84msgid "See less"
86msgstr ""
85msgstr ""
87
86
88−#: qml/Dash/DashApps.qml:38
87+#: qml/Dash/DashApps.qml:37
89msgid "Recent"
88msgid "Recent"
90msgstr ""
89msgstr ""
91
90
@@ -114,6 +113,10 @@ msgstr "新增回覆"
114msgid "Send"
113msgid "Send"
115msgstr "發送"
114msgstr "發送"
116
115
116+#: qml/Greeter/Greeter.qml:151
117+msgid "Swipe to unlock"
118+msgstr ""
119+
117#: qml/Greeter/Lockscreen.qml:149
120#: qml/Greeter/Lockscreen.qml:149
118msgid "Emergency Call"
121msgid "Emergency Call"
119msgstr "緊急連絡"
122msgstr "緊急連絡"
@@ -159,22 +162,7 @@ msgstr ""
159msgid "Search"
162msgid "Search"
160msgstr "搜尋"
163msgstr "搜尋"
161
164
162−#: qml/Shell.qml:417
165+#: qml/Shell.qml:348
163#, qt-format
166#, qt-format
164msgid "Please enter %1"
167msgid "Please enter %1"
165msgstr ""
168msgstr ""
166−
167−#~ msgid "Comments:"
168−#~ msgstr "備註:"
169−
170−#~ msgid "Review"
171−#~ msgstr "回覆"
172−
173−#, qt-format
174−#~ msgid "%1 review"
175−#~ msgid_plural "%1 reviews"
176−#~ msgstr[0] "%1 回覆"
177−
178−#, qt-format
179−#~ msgid "(%1)"
180−#~ msgstr "(%1)"
qml/Bottombar/Bottombar.qmldeleted−227
@@ -1,227 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import "../Components"
19−import Utils 0.1
20−import Unity.Application 0.1
21−import Ubuntu.Gestures 0.1
22−import Ubuntu.Components 0.1
23−
24−Item {
25− id: bottombar
26−
27− // Whether there's an application on foreground (as opposed to have shell's Dash on foreground)
28− property bool applicationIsOnForeground
29−
30− property variant theHud
31− property bool enabled: false
32− property bool preventHiding: dragArea.dragging
33− readonly property real bottomEdgeButtonCenterDistance: units.gu(34)
34−
35− state: "hidden"
36−
37− function hide() {
38− dismissTimer.stop()
39− bottombar.state = "hidden"
40− }
41−
42− onApplicationIsOnForegroundChanged: {
43− if (!applicationIsOnForeground) {
44− hide()
45− }
46− }
47−
48− onStateChanged: {
49− if (state == "hidden") {
50− dismissTimer.stop()
51− bottomBarVisibilityCommunicatorShell.forceHidden = false
52− } else {
53− dismissTimer.restart()
54− }
55− }
56−
57− onPreventHidingChanged: {
58− if (!preventHiding) {
59− if (state == "hint" || state == "reveal")
60− hide()
61− }
62−
63− if (dismissTimer.running) {
64− dismissTimer.restart();
65− }
66− }
67−
68− Timer {
69− id: dismissTimer
70− interval: 1000
71− onTriggered: {
72− if (!bottombar.preventHiding) {
73− bottombar.state = "hidden"
74− } else {
75− dismissTimer.restart()
76− }
77− }
78− }
79−
80− HudButton {
81− id: hudButton
82−
83− readonly property bool centeredHud: parent.width < units.gu(68) // Nexus 7 has 67 gu width
84−
85− x: centeredHud ? parent.width / 2 - width / 2 : MathUtils.clamp(dragArea.touchStartX - (width / 2), 0, bottombar.width - width)
86− y: bottombar.height - bottomEdgeButtonCenterDistance - (height / 2) - bottomMargin
87− z: 1
88− visible: opacity != 0
89−
90− mouseOver: {
91− if (dragArea.status === DirectionalDragArea.Recognized) {
92− var touchLocal = mapFromItem(dragArea, dragArea.touchX, dragArea.touchY)
93− return touchLocal.x > 0 && touchLocal.x < width
94− && touchLocal.y > 0 && touchLocal.y < height
95− } else {
96− return false
97− }
98− }
99−
100− onClicked: theHud.show()
101−
102− Behavior on bottomMargin {
103− NumberAnimation{duration: hudButton.opacity < 0.01 ? 200 : 70; easing.type: Easing.OutQuart}
104− }
105−
106− Behavior on opacity {
107− NumberAnimation{duration: 200; easing.type: Easing.OutCubic}
108− }
109− }
110−
111− Connections {
112− target: theHud
113− onShownChanged: {
114− bottomBarVisibilityCommunicatorShell.forceHidden = theHud.shown
115− if (theHud.shown) {
116− bottombar.state = "hidden"
117− }
118− }
119− }
120−
121− EdgeDragArea {
122− id: dragArea
123− objectName: "hudDragArea"
124− width: parent.width
125− height: shell.edgeSize
126− anchors.bottom: parent.bottom
127−
128− distanceThreshold: units.gu(8)
129− enabled: !theHud.shown && bottombar.enabled && applicationIsOnForeground
130− direction: Direction.Upwards
131− maxSilenceTime: 2000
132−
133− property int previousStatus: -1
134− property real touchStartX: -1
135−
136− readonly property real distanceFromThreshold: (-distance) - distanceThreshold // distance is negative
137− readonly property real revealDistance: units.gu(2)
138− readonly property real commitDistance: units.gu(6)
139− readonly property real commitProgress: MathUtils.clamp(distanceFromThreshold / commitDistance, 0, 1)
140−
141− onStatusChanged: {
142− if (status === DirectionalDragArea.WaitingForTouch) {
143− if (previousStatus == DirectionalDragArea.Recognized) {
144− if (hudButton.mouseOver) {
145− hudButton.clicked()
146− }
147− }
148− } else if (status === DirectionalDragArea.Undecided) {
149− if (!hudButton.centeredHud) {
150− touchStartX = touchX
151− }
152− } else if (status === DirectionalDragArea.Recognized) {
153− bottombar.state = "hint"
154− }
155− previousStatus = status
156− }
157−
158− onDistanceChanged: {
159− if (status === DirectionalDragArea.Recognized) {
160− if (distanceFromThreshold > commitDistance)
161− bottombar.state = "shown"
162− else if (distanceFromThreshold > revealDistance)
163− bottombar.state = "reveal"
164− }
165− }
166− }
167−
168− Item {
169− id: dismissArea
170− anchors {
171− top: parent.top
172− left: parent.left
173− right: parent.right
174− }
175− height: parent.height - bottomBarVisibilityCommunicatorShell.position
176−
177− MouseArea {
178− anchors.fill: parent
179− enabled: bottombar.state == "shown"
180− onPressed: {
181− bottomBarVisibilityCommunicatorShell.forceHidden = true
182− bottombar.state = "hidden"
183− }
184− }
185−
186− InputFilterArea {
187− anchors.fill: parent
188− blockInput: (hudButton.opacity == 1)
189− }
190− }
191−
192− MouseArea {
193− anchors {
194− top: dismissArea.bottom
195− left: parent.left
196− right: parent.right
197− bottom: parent.bottom
198− }
199− enabled: bottombar.state == "shown" && bottomBarVisibilityCommunicatorShell.position > 0
200− onPressed: {
201− bottombar.state = "hidden"
202− }
203− }
204−
205− states: [
206− State {
207− name: "hidden"
208− PropertyChanges { target: hudButton; opacity: 0 }
209− PropertyChanges { target: hudButton; bottomMargin: units.gu(-2) }
210− },
211− State {
212− name: "hint"
213− extend: "hidden"
214− PropertyChanges { target: hudButton; opacity: 0.5 }
215− },
216− State {
217− name: "reveal"
218− extend: "hint"
219− PropertyChanges { target: hudButton; bottomMargin: units.gu(-2) + units.gu(2) * dragArea.commitProgress }
220− },
221− State {
222− name: "shown"
223− PropertyChanges { target: hudButton; opacity: 1 }
224− PropertyChanges { target: hudButton; bottomMargin: units.gu(0) }
225− }
226− ]
227−}
qml/Bottombar/HudButton.qmldeleted−64
@@ -1,64 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: item
22−
23− property bool mouseOver
24−
25− property int bottomMargin: units.gu(2)
26−
27− signal clicked()
28−
29− readonly property real scaleOnMouseOver: 1.2
30−
31− width: hudButton.width * scaleOnMouseOver
32− height: hudButton.height * scaleOnMouseOver
33−
34− Item {
35− id: hudButton
36−
37− anchors.centerIn: parent
38− height: units.gu(12)
39− width: height
40− opacity: item.mouseOver || abstractButton.pressed ? 1 : 0.7
41− scale: item.mouseOver || abstractButton.pressed ? scaleOnMouseOver : 1
42− Behavior on opacity {NumberAnimation{duration: 200; easing.type: Easing.OutQuart}}
43− Behavior on scale {NumberAnimation{duration: 200; easing.type: Easing.OutQuart}}
44−
45− AbstractButton {
46− id: abstractButton
47− anchors.fill: parent
48− style: Image {
49− anchors.fill: parent
50− source: "graphics/hud_invoke_button_active.png"
51− }
52−
53− onClicked: item.clicked()
54− }
55−
56− Image {
57− width: units.gu(4)
58− height: width
59− source: "graphics/hud.png"
60− anchors.centerIn: parent
61− fillMode: Image.PreserveAspectFit
62− }
63− }
64−}
qml/Bottombar/graphics/hud@20.pngdeleted

Binary file not shown.

qml/Bottombar/graphics/hud_invoke_button_active@20.pngdeleted

Binary file not shown.

qml/CMakeLists.txt−1
@@ -5,7 +5,6 @@ install(FILES ${QML_JS_FILES}
5 )
5 )
6
6
7set(QML_DIRS
7set(QML_DIRS
8− Bottombar
9 Components
8 Components
10 Dash
9 Dash
11 graphics
10 graphics
qml/Components/FilterGrid.qml+39−26
@@ -28,11 +28,6 @@ import "../Components"
28Item {
28Item {
29 id: root
29 id: root
30
30
31− /* If true, the number of elements displayed will be limited by collapsedRowCount.
32− If false, all elements will be displayed, effectively looking the same as a regular
33− ResponsiveGridView. */
34− property bool filter: true
35−
36 /* Whether, when collapsed, a button should be displayed enabling the user to expand
31 /* Whether, when collapsed, a button should be displayed enabling the user to expand
37 the grid to its full size. */
32 the grid to its full size. */
38 readonly property bool expandable: model.count > rowsWhenCollapsed * iconTileGrid.columns
33 readonly property bool expandable: model.count > rowsWhenCollapsed * iconTileGrid.columns
@@ -57,38 +52,56 @@ Item {
57 property alias delegate: iconTileGrid.delegate
52 property alias delegate: iconTileGrid.delegate
58 property alias cellWidth: iconTileGrid.cellWidth
53 property alias cellWidth: iconTileGrid.cellWidth
59 property alias cellHeight: iconTileGrid.cellHeight
54 property alias cellHeight: iconTileGrid.cellHeight
60− property alias delegateCreationBegin: iconTileGrid.delegateCreationBegin
55+ property alias displayMarginBeginning: iconTileGrid.displayMarginBeginning
61− property alias delegateCreationEnd: iconTileGrid.delegateCreationEnd
56+ property alias displayMarginEnd: iconTileGrid.displayMarginEnd
62 readonly property alias originY: iconTileGrid.originY
57 readonly property alias originY: iconTileGrid.originY
63 readonly property alias flicking: iconTileGrid.flicking
58 readonly property alias flicking: iconTileGrid.flicking
64 readonly property alias moving: iconTileGrid.moving
59 readonly property alias moving: iconTileGrid.moving
65 readonly property alias pressDelay: iconTileGrid.pressDelay
60 readonly property alias pressDelay: iconTileGrid.pressDelay
66 property alias highlightIndex: iconTileGrid.highlightIndex
61 property alias highlightIndex: iconTileGrid.highlightIndex
67 readonly property alias currentItem: iconTileGrid.currentItem
62 readonly property alias currentItem: iconTileGrid.currentItem
63+ readonly property alias filtered: d.filter
64+
65+ QtObject {
66+ id: d
67+ // We do have filter and collapsed properties because we need to decouple
68+ // the real filtering with the animation since the closing animation
69+ // i.e. setFilter(false. true) we still need to not be filtering until
70+ // the animation finishes otherwise we hide the items when the animation
71+ // is still running
72+ property bool filter: true
73+ property bool collapsed: true
74+ }
68
75
69− height: !filterAnimation.running ? childrenRect.height : height
76+ height: d.collapsed ? root.collapsedHeight : root.uncollapsedHeight
70 clip: filterAnimation.running
77 clip: filterAnimation.running
71
78
79+ Behavior on height {
80+ id: heightBehaviour
81+ enabled: false
72− NumberAnimation {
82+ NumberAnimation {
73− property bool filterEndValue
74− id: filterAnimation
83+ id: filterAnimation
75− target: root
76− property: "height"
77− to: filterEndValue ? root.collapsedHeight : root.uncollapsedHeight
78− // Duration and easing here match the ListViewWithPageHeader::m_contentYAnimation
84+ // Duration and easing here match the ListViewWithPageHeader::m_contentYAnimation
79− // otherwise since both animations can run at the same time you'll get
85+ // otherwise since both animations can run at the same time you'll get
80− // some visual weirdness.
86+ // some visual weirdness.
81− duration: 200
87+ duration: 200
82− easing.type: Easing.InOutQuad
88+ easing.type: Easing.InOutQuad
83− onStopped: {
89+ onRunningChanged: {
84− root.filter = filterEndValue;
90+ if (!running) {
91+ d.filter = d.collapsed;
92+ }
93+ heightBehaviour.enabled = false;
94+ }
85 }
95 }
86 }
96 }
87
97
88− function startFilterAnimation(filter) {
98+ function setFilter(filter, animate) {
89− filterAnimation.filterEndValue = filter
99+ heightBehaviour.enabled = animate;
90− filterAnimation.start();
100+ d.collapsed = filter;
101+ if (!animate || !filter) {
102+ d.filter = filter;
103+ }
91− }
104+ }
92
105
93 ResponsiveGridView {
106 ResponsiveGridView {
94 id: iconTileGrid
107 id: iconTileGrid
@@ -105,7 +118,7 @@ Item {
105
118
106 model: LimitProxyModel {
119 model: LimitProxyModel {
107 model: root.model
120 model: root.model
108− limit: (filter && !filterAnimation.running) ? rowsWhenCollapsed * iconTileGrid.columns : -1
121+ limit: d.filter ? rowsWhenCollapsed * iconTileGrid.columns : -1
109 }
122 }
110 }
123 }
111}
124}
qml/Components/LazyImage.qml+1
@@ -36,6 +36,7 @@ Item {
36 property alias cache: image.cache
36 property alias cache: image.cache
37 property alias horizontalAlignment: image.horizontalAlignment
37 property alias horizontalAlignment: image.horizontalAlignment
38 property alias verticalAlignment: image.verticalAlignment
38 property alias verticalAlignment: image.verticalAlignment
39+ property alias sourceImage: image
39
40
40 state: "default"
41 state: "default"
41
42
qml/Components/PageHeader.qml+1−1
@@ -25,7 +25,7 @@ Item {
25 property bool searchEntryEnabled: false
25 property bool searchEntryEnabled: false
26 property alias searchQuery: searchField.text
26 property alias searchQuery: searchField.text
27 property ListModel searchHistory
27 property ListModel searchHistory
28− property Scope scope
28+ property var scope: null
29 property alias childItem: itemContainer.children
29 property alias childItem: itemContainer.children
30 property alias showBackButton: backButton.visible
30 property alias showBackButton: backButton.visible
31
31
qml/Components/ResponsiveGridView.qml+3−3
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
15 */
16
16
17−import QtQuick 2.0
17+import QtQuick 2.3
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19
19
20/*
20/*
@@ -41,8 +41,8 @@ Item {
41 readonly property alias moving: gridView.moving
41 readonly property alias moving: gridView.moving
42 readonly property alias pressDelay: gridView.pressDelay
42 readonly property alias pressDelay: gridView.pressDelay
43 readonly property alias originY: gridView.originY
43 readonly property alias originY: gridView.originY
44− property alias delegateCreationBegin: gridView.delegateCreationBegin
44+ property alias displayMarginBeginning: gridView.displayMarginBeginning
45− property alias delegateCreationEnd: gridView.delegateCreationEnd
45+ property alias displayMarginEnd: gridView.displayMarginEnd
46 property alias highlightIndex: gridView.highlightIndex
46 property alias highlightIndex: gridView.highlightIndex
47 readonly property alias currentItem: gridView.currentItem
47 readonly property alias currentItem: gridView.currentItem
48
48
qml/Components/Revealer.qmldeleted−241
@@ -1,241 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: revealer
22−
23− property Showable target
24− property var hintingAnimation: hintingAnimation
25− property string boundProperty: orientation == Qt.Vertical ? "y" : "x"
26− property int orientation: Qt.Vertical
27− property int direction: Qt.LeftToRight
28− property real openedValue: orientation == Qt.Vertical ? y : x
29− property real closedValue: orientation == Qt.Vertical ? y + (direction == Qt.LeftToRight ? -height : height) : x + (direction == Qt.LeftToRight ? -width : width)
30− property real hintDisplacement: 0
31− property real handleSize: units.gu(2)
32− property real dragVelocity: draggingArea.dragVelocity != 0 ? Math.abs(draggingArea.dragVelocity) : -1
33− property real dragVelocityThreshold: units.gu(5)
34− property bool dragging: false
35− property bool pressed: draggingArea.pressed
36− property int lateralPosition: draggingArea.lateralPosition
37− property real dragPosition
38− property bool openOnPress: true
39−
40− signal openPressed(int mouseX, int mouseY)
41− signal openReleased(int mouseX, int mouseY)
42− signal closePressed
43− signal openClicked
44− signal closeClicked
45−
46− dragPosition: {
47− var value
48− if (orientation == Qt.Vertical) {
49− value = draggingArea.dragValue + draggingArea.y
50− if (direction == Qt.RightToLeft) {
51− value += draggingArea.height - height
52− }
53− } else {
54− value = draggingArea.dragValue + draggingArea.x
55− if (direction == Qt.RightToLeft) {
56− value += draggingArea.width - width
57− }
58− }
59− if (__opened) {
60− if (direction == Qt.LeftToRight) {
61− value += handleSize
62− } else {
63− value -= handleSize
64− }
65− } else if (dragging) {
66− if (direction == Qt.LeftToRight) {
67− value += hintDisplacement
68− } else {
69− value -= hintDisplacement
70− }
71− }
72−
73− return value
74− }
75− property var draggingArea: leftDraggingArea.enabled ? leftDraggingArea : rightDraggingArea
76−
77− property real __hintValue: closedValue + (direction == Qt.LeftToRight ? hintDisplacement : -hintDisplacement)
78−
79− function dragToValue(dragPosition) {
80− return dragPosition + closedValue
81− }
82−
83− property bool __opened: target.shown
84− enabled: target.available
85−
86− // Can be replaced with a fake implementation during tests
87− // property var __getCurrentTimeMs: function () { return new Date().getTime() }
88− property var __dateTime: new function() {
89− this.getCurrentTimeMs = function() {return new Date().getTime()}
90− }
91−
92− Component.onCompleted: target[boundProperty] = __opened ? openedValue : closedValue
93− onOpenedValueChanged: if (__opened && !dragging) target[boundProperty] = openedValue
94− onClosedValueChanged: if (!__opened && !dragging) target[boundProperty] = closedValue
95−
96− function __computeValue(dragPosition) {
97− return MathUtils.clamp(dragToValue(dragPosition), __hintValue, openedValue)
98− }
99−
100− function __open() {
101− hintingAnimation.stop()
102− target.show()
103− }
104−
105− function __close() {
106− hintingAnimation.stop()
107− target.hide()
108− }
109−
110− function __hint() {
111− target.showAnimation.stop()
112− target.hideAnimation.stop()
113− hintingAnimation.restart()
114− }
115−
116− function __settle() {
117− hintingAnimation.stop()
118− if (__opened) target.show()
119− else target.hide()
120− }
121−
122− function __startDragging() {
123− hintingAnimation.stop()
124− dragging = true
125− }
126−
127− function __endDragging(dragVelocity) {
128− dragging = false
129− if (revealer.direction == Qt.RightToLeft) {
130− dragVelocity = -dragVelocity
131− }
132− if (Math.abs(dragVelocity) >= dragVelocityThreshold) {
133− if (dragVelocity > 0) __open()
134− else __close()
135− } else {
136− __settle()
137− }
138− }
139−
140− Binding {
141− id: dragBinding
142−
143− target: revealer.target
144− property: revealer.boundProperty
145− value: __computeValue(dragPosition)
146− when: dragging
147− }
148−
149− SmoothedAnimation {
150− id: hintingAnimation
151−
152− target: revealer.target
153− property: revealer.boundProperty
154− duration: 150
155− to: revealer.__hintValue
156− }
157−
158− DraggingArea {
159− id: leftDraggingArea
160−
161− property bool isOpeningArea: revealer.direction == Qt.LeftToRight
162−
163− height: orientation == Qt.Vertical ? handleSize : parent.height
164− width: orientation == Qt.Horizontal ? handleSize : parent.width
165− orientation: revealer.orientation
166− enabled: isOpeningArea ? !revealer.__opened : revealer.__opened
167−
168− __dateTime: revealer.__dateTime
169−
170− onPressed: {
171− if (isOpeningArea) {
172− if (revealer.openOnPress) {
173− revealer.openPressed(mouseX, mouseY)
174− __hint()
175− }
176− } else {
177− revealer.closePressed()
178− }
179− }
180− onReleased: {
181− if (isOpeningArea && revealer.openOnPress) {
182− revealer.openReleased(mouseX, mouseY)
183− __settle()
184− }
185− }
186− onDragStart: __startDragging()
187− onDragEnd: __endDragging(dragVelocity)
188− onClicked: {
189− if (clickValidated) {
190− if (isOpeningArea) {
191− if (revealer.openOnPress) revealer.openClicked()
192− } else {
193− revealer.closeClicked()
194− }
195− }
196− }
197− }
198−
199− DraggingArea {
200− id: rightDraggingArea
201−
202− property bool isOpeningArea: revealer.direction == Qt.RightToLeft
203−
204− x: orientation == Qt.Vertical ? 0 : parent.width - width
205− y: orientation == Qt.Vertical ? parent.height - height : 0
206− height: orientation == Qt.Vertical ? handleSize : parent.height
207− width: orientation == Qt.Horizontal ? handleSize : parent.width
208− orientation: revealer.orientation
209− enabled: isOpeningArea ? !revealer.__opened : revealer.__opened
210−
211− __dateTime: revealer.__dateTime
212−
213− onPressed: {
214− if (isOpeningArea) {
215− if (revealer.openOnPress) {
216− revealer.openPressed(mouseX, mouseY)
217− __hint()
218− }
219− } else {
220− revealer.closePressed()
221− }
222− }
223− onReleased: {
224− if (isOpeningArea && revealer.openOnPress) {
225− revealer.openReleased(mouseX, mouseY)
226− __settle()
227− }
228− }
229− onDragStart: __startDragging()
230− onDragEnd: __endDragging(dragVelocity)
231− onClicked: {
232− if (clickValidated) {
233− if (isOpeningArea) {
234− if (revealer.openOnPress) revealer.openClicked()
235− } else {
236− revealer.closeClicked()
237− }
238− }
239− }
240− }
241−}
qml/Components/ZoomableImage.qmlnew file+153
@@ -0,0 +1,153 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import Ubuntu.Components 0.1
19+import "../Components"
20+
21+/*! \brief Zoomable for image.
22+
23+ This widget shows image contained in source,
24+ can be zoomable accordingly with zoomable.
25+ */
26+
27+Item {
28+ id: root
29+ property alias source: lazyImage.source
30+ property var zoomable: false
31+ property alias imageState: lazyImage.state
32+ property alias scaleTo: lazyImage.scaleTo
33+ property alias asynchronous: lazyImage.asynchronous
34+
35+ Flickable {
36+ id: flickable
37+ objectName: "flickable"
38+ clip: true
39+ contentHeight: imageContainer.height
40+ contentWidth: imageContainer.width
41+
42+ onHeightChanged: image.resetScale()
43+ onWidthChanged: image.resetScale()
44+ anchors.fill: parent
45+
46+ Item {
47+ id: imageContainer
48+ objectName: "imageContainer"
49+ width: Math.max(image.width * image.scale, flickable.width)
50+ height: Math.max(image.height * image.scale, flickable.height)
51+
52+ Item {
53+ id: image
54+ objectName: "image"
55+ property alias imageState: lazyImage.state
56+ property var prevScale
57+ anchors.centerIn: parent
58+
59+ signal imageReloaded
60+
61+ LazyImage {
62+ id: lazyImage
63+ objectName: "lazyImage"
64+ smooth: !flickable.movingVertically
65+ anchors.fill: parent
66+ fillMode: Image.PreserveAspectFit
67+ scaleTo: "fit"
68+
69+ onStateChanged: {
70+ if (state == "ready") {
71+ image.imageReloaded();
72+ }
73+ }
74+ }
75+
76+ onImageReloaded: {
77+ image.height = lazyImage.sourceImage.implicitHeight
78+ image.width = lazyImage.sourceImage.implicitWidth
79+ image.resetScale();
80+ }
81+
82+ function resetScale() {
83+ image.scale = Math.min(flickable.width / image.width, flickable.height / image.height);
84+ pinchArea.minScale = image.scale;
85+ prevScale = Math.min(image.scale, 1);
86+ }
87+
88+ onScaleChanged: {
89+ var currentWidth = width * scale
90+ var currentHeight = height * scale
91+ var scaleRatio = scale / prevScale
92+ if (currentWidth > flickable.width) {
93+ var xpos = flickable.width / 2 + flickable.contentX;
94+ var xoff = xpos * scaleRatio;
95+ flickable.contentX = xoff - flickable.width / 2;
96+ }
97+ if (currentHeight > flickable.height) {
98+ var ypos = flickable.height / 2 + flickable.contentY;
99+ var yoff = ypos * scaleRatio;
100+ flickable.contentY = yoff - flickable.height / 2;
101+ }
102+ prevScale = scale;
103+ }
104+ }
105+ }
106+
107+ PinchArea {
108+ id: pinchArea
109+ objectName: "pinchArea"
110+ property real minScale: 1.0
111+ anchors.fill: parent
112+ enabled: zoomable ? zoomable : false
113+
114+ pinch.target: image
115+ pinch.minimumScale: minScale
116+ pinch.maximumScale: 10
117+
118+ onPinchFinished: flickable.returnToBounds()
119+ }
120+
121+ MouseArea {
122+ id: mouseArea
123+ objectName: "mouseArea"
124+
125+ anchors.fill: parent
126+ enabled: zoomable ? zoomable : false
127+
128+ onWheel: {
129+ var startScale = image.scale;
130+ if (wheel.angleDelta.y > 0) {
131+ image.scale = startScale + 0.1;
132+ } else if (wheel.angleDelta.y < 0) {
133+ if (image.scale > 0.1 && image.scale > pinchArea.minScale) {
134+ image.scale = startScale - 0.1;
135+ }
136+ }
137+ wheel.accepted = true;
138+ }
139+
140+ onPressed: {
141+ mouse.accepted = false;
142+ }
143+
144+ onReleased: {
145+ mouse.accepted = false;
146+ }
147+
148+ onClicked: {
149+ mouse.accepted = false;
150+ }
151+ }
152+ }
153+}
qml/Dash/Card.qmldeleted−236
@@ -1,236 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−// For image://albumart and image://thumbnailer image providers
20−import Ubuntu.Thumbnailer 0.1
21−
22−AbstractButton {
23− id: root
24− property var template
25− property var components
26− property var cardData
27−
28− property real fontScale: 1.0
29− property int headerAlignment: Text.AlignLeft
30− readonly property int headerHeight: headerLoader.item ? headerLoader.item.height : 0
31− property int fixedHeaderHeight: -1
32− readonly property string title: cardData && cardData["title"] || ""
33−
34− property bool showHeader: true
35−
36− implicitWidth: childrenRect.width
37− implicitHeight: summary.y + summary.height + (summary.text && backgroundLoader.active ? units.gu(1) : 0)
38−
39− Loader {
40− id: backgroundLoader
41− objectName: "backgroundLoader"
42−
43− readonly property bool artAndSummary: components["art"]["field"] && components["summary"] || false
44− active: template["card-layout"] !== "horizontal" && (template["card-background"] || components["background"] || artAndSummary)
45− anchors.fill: parent
46−
47− sourceComponent: UbuntuShape {
48− objectName: "background"
49− radius: "medium"
50− color: getColor(0) || "white"
51− gradientColor: getColor(1) || color
52− anchors.fill: parent
53− image: backgroundImage.source ? backgroundImage : null
54−
55− property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b
56−
57− property Image backgroundImage: Image {
58− objectName: "backgroundImage"
59− source: {
60− if (cardData && typeof cardData["background"] === "string") return cardData["background"]
61− else if (template && typeof template["card-background"] === "string") return template["card-background"]
62− else return ""
63− }
64− }
65−
66− function getColor(index) {
67− if (cardData && typeof cardData["background"] === "object"
68− && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
69− return cardData["background"]["elements"][index];
70− } else if (template && typeof template["card-background"] === "object"
71− && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
72− return template["card-background"]["elements"][index];
73− } else return undefined;
74− }
75− }
76− }
77−
78− UbuntuShape {
79− id: artShape
80− radius: "medium"
81− objectName: "artShape"
82− anchors.horizontalCenter: template && template["card-layout"] === "horizontal" ? undefined : parent.horizontalCenter
83− anchors.left: template && template["card-layout"] === "horizontal" ? parent.left : undefined
84− visible: cardData && cardData["art"] || false
85−
86− readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1
87− readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect
88−
89− Component.onCompleted: updateWidthHeightBindings();
90− onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
91−
92− function updateWidthHeightBindings() {
93− if (aspectSmallerThanImageAspect) {
94− width = Qt.binding(function() { return !visible ? 0 : image.width });
95− height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect });
96− } else {
97− width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
98− height = Qt.binding(function() { return !visible ? 0 : image.height });
99− }
100− }
101−
102− image: Image {
103− objectName: "artImage"
104− source: cardData && cardData["art"] || ""
105− cache: true
106− // FIXME uncomment when having investigated / fixed the crash
107− //sourceSize.width: width > height ? width : 0
108− //sourceSize.height: height > width ? height : 0
109− fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop
110−
111− readonly property real aspect: implicitWidth / implicitHeight
112− readonly property bool isHorizontal: template && template["card-layout"] === "horizontal"
113−
114− Component.onCompleted: updateWidthHeightBindings();
115− onIsHorizontalChanged: updateWidthHeightBindings();
116−
117− function updateWidthHeightBindings() {
118− if (isHorizontal) {
119− width = Qt.binding(function() { return height * artShape.aspect });
120− height = Qt.binding(function() { return root.headerHeight });
121− } else {
122− width = Qt.binding(function() { return root.width });
123− height = Qt.binding(function() { return width / artShape.aspect });
124− }
125− }
126− }
127− }
128−
129− Loader {
130− id: overlayLoader
131− anchors {
132− left: artShape.left
133− right: artShape.right
134− bottom: artShape.bottom
135− }
136− active: template && template["overlay"] && artShape.visible && artShape.image.status === Image.Ready || false
137−
138− sourceComponent: ShaderEffect {
139− id: overlay
140−
141− height: headerLoader.item ? headerLoader.item.height : 0
142− opacity: headerLoader.item ? headerLoader.item.opacity * 0.6 : 0
143−
144− property var source: ShaderEffectSource {
145− id: shaderSource
146− sourceItem: artShape
147− onVisibleChanged: if (visible) scheduleUpdate()
148− live: false
149− sourceRect: Qt.rect(0, artShape.height - overlay.height, artShape.width, overlay.height)
150− }
151−
152− vertexShader: "
153− uniform highp mat4 qt_Matrix;
154− attribute highp vec4 qt_Vertex;
155− attribute highp vec2 qt_MultiTexCoord0;
156− varying highp vec2 coord;
157− void main() {
158− coord = qt_MultiTexCoord0;
159− gl_Position = qt_Matrix * qt_Vertex;
160− }"
161−
162− fragmentShader: "
163− varying highp vec2 coord;
164− uniform sampler2D source;
165− uniform lowp float qt_Opacity;
166− void main() {
167− lowp vec4 tex = texture2D(source, coord);
168− gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
169− }"
170− }
171− }
172−
173− Loader {
174− id: headerLoader
175− objectName: "cardHeaderLoader"
176−
177− anchors {
178− top: {
179− if (template) {
180− if (template["overlay"]) return overlayLoader.top;
181− if (template["card-layout"] === "horizontal") return artShape.top;
182− }
183− return artShape.bottom;
184− }
185− left: {
186− if (template) {
187− if (!template["overlay"] && template["card-layout"] === "horizontal") return artShape.right;
188− }
189− return parent.left;
190− }
191− right: parent.right
192− }
193− active: cardData && cardData["title"] || cardData && cardData["mascot"] || false
194−
195− sourceComponent: CardHeader {
196− id: header
197− objectName: "cardHeader"
198−
199− mascot: cardData && cardData["mascot"] || ""
200− title: root.title
201− subtitle: cardData && cardData["subtitle"] || ""
202−
203− titleWeight: components && components["subtitle"] ? Font.DemiBold : Font.Normal
204−
205− opacity: showHeader ? 1 : 0
206− inOverlay: root.template && root.template["overlay"] === true
207− fontColor: inOverlay ? "white" : summary.color
208− useMascotShape: !backgroundLoader.active && !inOverlay
209− headerAlignment: root.headerAlignment
210− height: root.fixedHeaderHeight != -1 ? root.fixedHeaderHeight : implicitHeight
211− fontScale: root.fontScale
212−
213− Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
214− }
215− }
216−
217− Label {
218− id: summary
219− objectName: "summaryLabel"
220− anchors {
221− top: headerLoader.active ? headerLoader.bottom : artShape.bottom
222− left: parent.left
223− right: parent.right
224− margins: backgroundLoader.active ? units.gu(1) : 0
225− topMargin: 0
226− }
227− wrapMode: Text.Wrap
228− maximumLineCount: 5
229− elide: Text.ElideRight
230− text: cardData && cardData["summary"] || ""
231− height: text ? implicitHeight : 0
232− fontSize: "small"
233− // TODO karni: Change "grey" to Ubuntu.Components.Palette color once updated.
234− color: backgroundLoader.active && backgroundLoader.item.luminance < 0.7 ? "white" : "grey"
235− }
236−}
qml/Dash/CardCarousel.qml+25−13
@@ -18,7 +18,6 @@ import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import "../Components"
19import "../Components"
20
20
21−
22DashRenderer {
21DashRenderer {
23 id: cardCarousel
22 id: cardCarousel
24
23
@@ -43,27 +42,40 @@ DashRenderer {
43 cacheBuffer: 1404 // 18px * 13gu * 6
42 cacheBuffer: 1404 // 18px * 13gu * 6
44 model: cardCarousel.model
43 model: cardCarousel.model
45
44
46− onClicked: cardCarousel.clicked(index, itemY)
45+ onClicked: cardCarousel.clicked(index, null)
47− onPressAndHold: cardCarousel.pressAndHold(index, itemY)
46+ onPressAndHold: cardCarousel.pressAndHold(index)
48
47
49 property real fontScale: 1 / selectedItemScaleFactor
48 property real fontScale: 1 / selectedItemScaleFactor
50 property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
49 property real headerHeight: cardTool.headerHeight / selectedItemScaleFactor
51
50
52− itemComponent: Card {
51+ itemComponent: Loader {
53− id: card
52+ id: loader
54− objectName: "carouselDelegate" + index
55− fixedHeaderHeight: carousel.headerHeight
56− cardData: model
57− template: cardTool.template
58− components: cardTool.components
59
53
60 property bool explicitlyScaled
54 property bool explicitlyScaled
61 property var model
55 property var model
62−
63 enabled: false
56 enabled: false
64− showHeader: explicitlyScaled
65
57
66− fontScale: carousel.fontScale
58+ sourceComponent: cardTool.cardComponent
59+ onLoaded: {
60+ item.objectName = "carouselDelegate" + index;
61+ item.fixedHeaderHeight = Qt.binding(function() { return carousel.headerHeight; });
62+ item.height = Qt.binding(function() { return cardTool.cardHeight; });
63+ item.cardData = Qt.binding(function() { return model; });
64+ item.template = Qt.binding(function() { return cardTool.template; });
65+ item.components = Qt.binding(function() { return cardTool.components; });
66+ item.fontScale = Qt.binding(function() { return carousel.fontScale; });
67+ item.showHeader = Qt.binding(function() { return loader.explicitlyScaled; });
68+ item.artShapeBorderSource = "none";
69+ }
70+
71+ BorderImage {
72+ anchors {
73+ fill: parent
74+ margins: -units.gu(1)
75+ }
76+ z: -1
77+ source: "graphics/carousel_dropshadow.sci"
78+ }
67 }
79 }
68 }
80 }
69}
81}
qml/Dash/CardFilterGrid.qml+24−26
@@ -28,9 +28,10 @@ DashRenderer {
28 verticalSpacing: units.gu(1)
28 verticalSpacing: units.gu(1)
29 currentItem: filterGrid.currentItem
29 currentItem: filterGrid.currentItem
30 height: filterGrid.height
30 height: filterGrid.height
31+ filtered: filterGrid.filtered
31
32
32− function startFilterAnimation(filter) {
33+ function setFilter(filter, animate) {
33− filterGrid.startFilterAnimation(filter)
34+ filterGrid.setFilter(filter, animate)
34 }
35 }
35
36
36 FilterGrid {
37 FilterGrid {
@@ -41,35 +42,32 @@ DashRenderer {
41 delegateHeight: cardTool.cardHeight
42 delegateHeight: cardTool.cardHeight
42 verticalSpacing: genericFilterGrid.verticalSpacing
43 verticalSpacing: genericFilterGrid.verticalSpacing
43 model: genericFilterGrid.model
44 model: genericFilterGrid.model
44− filter: genericFilterGrid.filter
45 collapsedRowCount: Math.min(2, cardTool && cardTool.template && cardTool.template["collapsed-rows"] || 2)
45 collapsedRowCount: Math.min(2, cardTool && cardTool.template && cardTool.template["collapsed-rows"] || 2)
46− delegateCreationBegin: genericFilterGrid.delegateCreationBegin
46+ displayMarginBeginning: genericFilterGrid.displayMarginBeginning
47− delegateCreationEnd: genericFilterGrid.delegateCreationEnd
47+ displayMarginEnd: genericFilterGrid.displayMarginEnd
48− delegate: Loader {
48+ delegate: Item {
49− asynchronous: true
50 width: filterGrid.cellWidth
49 width: filterGrid.cellWidth
51 height: filterGrid.cellHeight
50 height: filterGrid.cellHeight
52− Card {
51+ Loader {
53− id: card
52+ id: loader
54− width: cardTool.cardWidth
53+ sourceComponent: cardTool.cardComponent
55− height: cardTool.cardHeight
56− fixedHeaderHeight: cardTool.headerHeight
57 anchors.horizontalCenter: parent.horizontalCenter
54 anchors.horizontalCenter: parent.horizontalCenter
55+ onLoaded: {
58− objectName: "delegate" + index
56+ item.objectName = "delegate" + index;
57+ item.width = Qt.binding(function() { return cardTool.cardWidth; });
58+ item.height = Qt.binding(function() { return cardTool.cardHeight; });
59+ item.fixedArtShapeSize = Qt.binding(function() { return cardTool.artShapeSize; });
59− cardData: model
60+ item.cardData = Qt.binding(function() { return model; });
60− template: cardTool.template
61+ item.template = Qt.binding(function() { return cardTool.template; });
61− components: cardTool.components
62+ item.components = Qt.binding(function() { return cardTool.components; });
62−
63− headerAlignment: cardTool.headerAlignment
63+ item.headerAlignment = Qt.binding(function() { return cardTool.headerAlignment; });
64−
64+ }
65+ Connections {
66+ target: loader.item
65− onClicked: genericFilterGrid.clicked(index, card.y)
67+ onClicked: genericFilterGrid.clicked(index, result)
66− onPressAndHold: genericFilterGrid.pressAndHold(index, card.y)
68+ onPressAndHold: genericFilterGrid.pressAndHold(index)
69+ }
67 }
70 }
68 }
71 }
69−
70− onFilterChanged: {
71− genericFilterGrid.filter = filter
72− filter = Qt.binding(function() { return genericFilterGrid.filter })
73− }
74 }
72 }
75}
73}
qml/Dash/CardHeader.qmldeleted−126
@@ -1,126 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−
20−Item {
21− id: root
22− property url mascot: ""
23− property alias title: titleLabel.text
24− property var subtitle
25−
26− property alias titleWeight: titleLabel.font.weight
27− property alias titleSize: titleLabel.fontSize
28−
29− // FIXME: Saviq, used to scale fonts down in Carousel
30− property real fontScale: 1.0
31−
32− property alias headerAlignment: titleLabel.horizontalAlignment
33−
34− property bool inOverlay: false
35− property bool useMascotShape: true
36− property color fontColor: Theme.palette.selected.backgroundText
37−
38− visible: mascot != "" || title
39− implicitHeight: row.height > 0 ? row.height + row.margins * 2 : 0
40−
41− Row {
42− id: row
43− objectName: "outerRow"
44−
45− property real margins: units.gu(1)
46−
47− spacing: mascotShapeLoader.active || mascotImageLoader.active || inOverlay ? margins : 0
48− anchors {
49− top: parent.top; left: parent.left; right: parent.right
50− margins: margins
51− leftMargin: spacing
52− rightMargin: spacing
53− }
54−
55− Loader {
56− id: mascotShapeLoader
57− objectName: "mascotShapeLoader"
58−
59− active: useMascotShape && mascotImageLoader.item && mascotImageLoader.item.status === Image.Ready
60− visible: active
61− anchors.verticalCenter: parent.verticalCenter
62− // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
63− width: units.gu(6)
64− height: units.gu(5.625)
65− readonly property int maxSize: Math.max(width, height) * 4
66−
67− sourceComponent: UbuntuShape {
68− image: mascotImageLoader.item
69− }
70− }
71−
72− Loader {
73− id: mascotImageLoader
74− active: root.mascot != ""
75− visible: active && !useMascotShape && item.status === Image.Ready
76− anchors.verticalCenter: parent.verticalCenter
77− sourceComponent: Image {
78− objectName: "mascotImage"
79−
80− source: root.mascot
81− width: source ? mascotShapeLoader.width : 0
82− height: mascotShapeLoader.height
83−
84− sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
85− fillMode: Image.PreserveAspectCrop
86− horizontalAlignment: Image.AlignHCenter
87− verticalAlignment: Image.AlignVCenter
88− }
89− }
90−
91− Column {
92− objectName: "column"
93− width: parent.width - x
94− spacing: units.dp(2)
95− anchors.verticalCenter: parent.verticalCenter
96−
97− Label {
98− id: titleLabel
99− objectName: "titleLabel"
100− anchors { left: parent.left; right: parent.right }
101− elide: Text.ElideRight
102− font.weight: Font.Normal
103− fontSize: "small"
104− wrapMode: Text.Wrap
105− maximumLineCount: 2
106− font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
107− color: fontColor
108− }
109−
110− Loader {
111− active: titleLabel.text && root.subtitle
112− anchors { left: parent.left; right: parent.right }
113− sourceComponent: Label {
114− id: subtitleLabel
115− objectName: "subtitleLabel"
116− elide: Text.ElideRight
117− fontSize: "small"
118− font.weight: Font.Light
119− font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale)
120− color: fontColor
121− text: root.subtitle
122− }
123− }
124− }
125− }
126−}
qml/Dash/CardTool.qml+30−22
@@ -15,6 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18+import Dash 0.1
18
19
19/*!
20/*!
20 \brief Tool for introspecting Card properties.
21 \brief Tool for introspecting Card properties.
@@ -65,6 +66,8 @@ Item {
65 return layout;
66 return layout;
66 }
67 }
67
68
69+ property var cardComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components);
70+
68 // FIXME: Saviq
71 // FIXME: Saviq
69 // Only way for the card below to actually be laid out completely.
72 // Only way for the card below to actually be laid out completely.
70 // If invisible or in "data" array, some components are not taken into account.
73 // If invisible or in "data" array, some components are not taken into account.
@@ -108,7 +111,7 @@ Item {
108 if (template["card-size"] >= 12 && template["card-size"] <= 38) return units.gu(template["card-size"]);
111 if (template["card-size"] >= 12 && template["card-size"] <= 38) return units.gu(template["card-size"]);
109 return units.gu(18.5);
112 return units.gu(18.5);
110 case "grid":
113 case "grid":
111− return card.implicitHeight
114+ return cardLoader.item ? cardLoader.item.implicitHeight : 0
112 case "carousel":
115 case "carousel":
113 return cardWidth / (components ? components["art"]["aspect-ratio"] : 1)
116 return cardWidth / (components ? components["art"]["aspect-ratio"] : 1)
114 case undefined:
117 case undefined:
@@ -122,7 +125,8 @@ Item {
122 /*!
125 /*!
123 type:real \brief Height of the card's header.
126 type:real \brief Height of the card's header.
124 */
127 */
125− readonly property alias headerHeight: card.headerHeight
128+ readonly property int headerHeight: cardLoader.item ? cardLoader.item.headerHeight : 0
129+ readonly property size artShapeSize: cardLoader.item ? cardLoader.item.artShapeSize : 0
126
130
127 /*!
131 /*!
128 \brief Desired alignment of header components.
132 \brief Desired alignment of header components.
@@ -161,15 +165,8 @@ Item {
161 }
165 }
162 }
166 }
163
167
164− Card {
168+ Loader {
165− id: card
169+ id: cardLoader
166− objectName: "cardToolCard"
167− template: cardTool.template
168− components: cardTool.components
169−
170− width: cardTool.cardWidth || implicitWidth
171− height: cardTool.cardHeight || implicitHeight
172−
173 property var fields: ["art", "mascot", "title", "subtitle", "summary"]
170 property var fields: ["art", "mascot", "title", "subtitle", "summary"]
174 property var maxData: {
171 property var maxData: {
175 "art": Qt.resolvedUrl("graphics/checkers.png"),
172 "art": Qt.resolvedUrl("graphics/checkers.png"),
@@ -178,19 +175,30 @@ Item {
178 "subtitle": "—",
175 "subtitle": "—",
179 "summary": "—\n—\n—\n—\n—"
176 "summary": "—\n—\n—\n—\n—"
180 }
177 }
181−
178+ sourceComponent: cardTool.cardComponent
179+ onLoaded: {
180+ item.objectName = "cardToolCard";
181+ item.asynchronous = false;
182+ item.template = Qt.binding(function() { return cardTool.template; });
183+ item.components = Qt.binding(function() { return cardTool.components; });
184+ item.width = Qt.binding(function() { return cardTool.cardWidth || item.implicitWidth; });
185+ item.height = Qt.binding(function() { return cardTool.cardHeight || item.implicitHeight; });
186+ }
187+ Connections {
188+ target: cardLoader.item
182− onComponentsChanged: {
189+ onComponentsChanged: {
183− var data = {};
190+ var data = {};
184− for (var k in fields) {
191+ for (var k in cardLoader.fields) {
185− var component = components[fields[k]];
192+ var component = cardLoader.item.components[cardLoader.fields[k]];
186− var key = fields[k];
193+ var key = cardLoader.fields[k];
187− if ((typeof component === "string" && component.length > 0) ||
194+ if ((typeof component === "string" && component.length > 0) ||
188− (typeof component === "object" && component !== null
195+ (typeof component === "object" && component !== null
189− && typeof component["field"] === "string" && component["field"].length > 0)) {
196+ && typeof component["field"] === "string" && component["field"].length > 0)) {
190− data[key] = maxData[key];
197+ data[key] = cardLoader.maxData[key];
198+ }
191 }
199 }
200+ cardLoader.item.cardData = data;
192 }
201 }
193− cardData = data;
194 }
202 }
195 }
203 }
196}
204}
qml/Dash/DashContent.qml+19−11
@@ -17,6 +17,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import Unity 0.2
19import Unity 0.2
20+import Utils 0.1
20import "../Components"
21import "../Components"
21
22
22Item {
23Item {
@@ -137,7 +138,7 @@ Item {
137
138
138 readonly property bool moving: item ? item.moving : false
139 readonly property bool moving: item ? item.moving : false
139 readonly property var categoryView: item ? item.categoryView : null
140 readonly property var categoryView: item ? item.categoryView : null
140− readonly property Scope theScope: scope
141+ readonly property var theScope: scope
141
142
142 // these are needed for autopilot tests
143 // these are needed for autopilot tests
143 readonly property string scopeId: scope.id
144 readonly property string scopeId: scope.id
@@ -183,23 +184,30 @@ Item {
183 width: parent.width
184 width: parent.width
184 style: DashContentTabBarStyle {}
185 style: DashContentTabBarStyle {}
185
186
186− model: dashContentList.model
187+ SortFilterProxyModel {
188+ id: tabBarModel
187
189
190+ model: dashContentList.model
191+
192+ property int selectedIndex: -1
188− onSelectedIndexChanged: {
193+ onSelectedIndexChanged: {
189− if (dashContentList.currentIndex == -1 && tabBar.selectedIndex != -1) {
194+ if (dashContentList.currentIndex == -1 && tabBar.selectedIndex != -1) {
190− // TODO This together with the Timer below
195+ // TODO This together with the Timer below
191− // are a workaround for the first tab sometimes not showing the text.
196+ // are a workaround for the first tab sometimes not showing the text.
192− // But Tabs are going away in the future so not sure if makes
197+ // But Tabs are going away in the future so not sure if makes
193− // sense invetigating what's the problem at this stage
198+ // sense invetigating what's the problem at this stage
194− selectionModeTimer.restart();
199+ selectionModeTimer.restart();
200+ }
201+ dashContentList.currentIndex = selectedIndex;
195 }
202 }
196− dashContentList.currentIndex = selectedIndex;
197 }
203 }
198
204
205+ model: tabBarModel.count > 0 ? tabBarModel : null
206+
199 Connections {
207 Connections {
200 target: dashContentList
208 target: dashContentList
201 onCurrentIndexChanged: {
209 onCurrentIndexChanged: {
202− tabBar.selectedIndex = dashContentList.currentIndex
210+ tabBarModel.selectedIndex = dashContentList.currentIndex
203 }
211 }
204 }
212 }
205
213
qml/Dash/DashRenderer.qml+8−9
@@ -20,8 +20,8 @@ Item {
20 // Can the item be expanded?
20 // Can the item be expanded?
21 property bool expandable: false
21 property bool expandable: false
22
22
23− // In case it can be expanded, should we filter it
23+ // In case it can be expanded, is it filtered
24− property bool filter: true
24+ property bool filtered: true
25
25
26 property int collapsedHeight: height
26 property int collapsedHeight: height
27
27
@@ -29,9 +29,9 @@ Item {
29
29
30 property int uncollapsedHeight: height
30 property int uncollapsedHeight: height
31
31
32− property var delegateCreationBegin: undefined
32+ property int displayMarginBeginning: 0
33
33
34− property var delegateCreationEnd: undefined
34+ property int displayMarginEnd: 0
35
35
36 property real originY: 0
36 property real originY: 0
37
37
@@ -50,14 +50,13 @@ Item {
50
50
51 /// Emitted when the user clicked on an item
51 /// Emitted when the user clicked on an item
52 /// @param index is the index of the clicked item
52 /// @param index is the index of the clicked item
53− /// @param itemY is y of the clicked delegate
53+ /// @param result result model of the cliked item, used for activation
54− signal clicked(int index, real itemY)
54+ signal clicked(int index, var result)
55
55
56 /// Emitted when the user pressed and held on an item
56 /// Emitted when the user pressed and held on an item
57 /// @param index is the index of the held item
57 /// @param index is the index of the held item
58− /// @param itemY is y of the held delegate
59− signal pressAndHold(int index, real itemY)
58+ signal pressAndHold(int index)
60
59
61− function startFilterAnimation(filter) {
60+ function setFilter(filter, animate) {
62 }
61 }
63}
62}
qml/Dash/GenericScopeView.qml+24−25
@@ -25,7 +25,7 @@ import "../Components/ListItems" as ListItems
25FocusScope {
25FocusScope {
26 id: scopeView
26 id: scopeView
27
27
28− property Scope scope: null
28+ property var scope: null
29 property SortFilterProxyModel categories: categoryFilter
29 property SortFilterProxyModel categories: categoryFilter
30 property bool isCurrent: false
30 property bool isCurrent: false
31 property alias moving: categoryView.moving
31 property alias moving: categoryView.moving
@@ -122,7 +122,7 @@ FocusScope {
122 showDivider: false
122 showDivider: false
123
123
124 readonly property bool expandable: rendererLoader.item ? rendererLoader.item.expandable : false
124 readonly property bool expandable: rendererLoader.item ? rendererLoader.item.expandable : false
125− readonly property bool filtered: rendererLoader.item ? rendererLoader.item.filter : true
125+ readonly property bool filtered: rendererLoader.item ? rendererLoader.item.filtered : true
126 readonly property string category: categoryId
126 readonly property string category: categoryId
127 readonly property var item: rendererLoader.item
127 readonly property var item: rendererLoader.item
128
128
@@ -168,9 +168,7 @@ FocusScope {
168 item.objectName = Qt.binding(function() { return categoryId })
168 item.objectName = Qt.binding(function() { return categoryId })
169 if (item.expandable) {
169 if (item.expandable) {
170 var shouldFilter = categoryId != categoryView.expandedCategoryId;
170 var shouldFilter = categoryId != categoryView.expandedCategoryId;
171− if (shouldFilter != item.filter) {
171+ item.setFilter(shouldFilter, false /*animate*/);
172− item.filter = shouldFilter;
173− }
174 }
172 }
175 updateDelegateCreationRange();
173 updateDelegateCreationRange();
176 item.cardTool = cardTool;
174 item.cardTool = cardTool;
@@ -189,8 +187,7 @@ FocusScope {
189 // TODO Technically it is possible that calling activate() will make the scope emit
187 // TODO Technically it is possible that calling activate() will make the scope emit
190 // previewRequested so that we show a preview but there's no scope that does that yet
188 // previewRequested so that we show a preview but there's no scope that does that yet
191 // so it's not implemented
189 // so it's not implemented
192− var item = target.model.get(index);
193− scopeView.scope.activate(item.result)
190+ scopeView.scope.activate(result)
194 } else {
191 } else {
195 previewListView.model = target.model;
192 previewListView.model = target.model;
196 previewListView.currentIndex = -1
193 previewListView.currentIndex = -1
@@ -219,11 +216,8 @@ FocusScope {
219 var shrinkingVisible = shouldFilter && y + item.collapsedHeight < categoryView.height;
216 var shrinkingVisible = shouldFilter && y + item.collapsedHeight < categoryView.height;
220 var growingVisible = !shouldFilter && y + height < categoryView.height;
217 var growingVisible = !shouldFilter && y + height < categoryView.height;
221 if (!previewListView.open || !shouldFilter) {
218 if (!previewListView.open || !shouldFilter) {
222− if (shrinkingVisible || growingVisible) {
219+ var animate = shrinkingVisible || growingVisible;
223− item.startFilterAnimation(shouldFilter)
220+ item.setFilter(shouldFilter, animate)
224− } else {
225− item.filter = shouldFilter;
226− }
227 if (!shouldFilter && !previewListView.open) {
221 if (!shouldFilter && !previewListView.open) {
228 categoryView.maximizeVisibleArea(index, item.uncollapsedHeight);
222 categoryView.maximizeVisibleArea(index, item.uncollapsedHeight);
229 }
223 }
@@ -238,26 +232,31 @@ FocusScope {
238 }
232 }
239
233
240 function updateDelegateCreationRange() {
234 function updateDelegateCreationRange() {
235+ if (categoryView.moving) {
241− // Do not update the range if we are overshooting up or down, since we'll come back
236+ // Do not update the range if we are overshooting up or down, since we'll come back
242− // to the stable position and delete/create items without any reason
237+ // to the stable position and delete/create items without any reason
243− if (categoryView.contentY < categoryView.originY) {
238+ if (categoryView.contentY < categoryView.originY) {
244− return;
239+ return;
240+ } else if (categoryView.contentHeight - categoryView.originY > categoryView.height &&
245− } else if (categoryView.contentHeight > categoryView.height && categoryView.contentY + categoryView.height > categoryView.contentHeight) {
241+ categoryView.contentY + categoryView.height > categoryView.contentHeight) {
246− return;
242+ return;
243+ }
247 }
244 }
248
245
249− if (item && item.hasOwnProperty("delegateCreationBegin")) {
246+ if (item && item.hasOwnProperty("displayMarginBeginning")) {
247+ // TODO do we need item.originY here, test 1300302 once we have a silo
248+ // and we can run it on the phone
250 if (baseItem.y + baseItem.height <= 0) {
249 if (baseItem.y + baseItem.height <= 0) {
251 // Not visible (item at top of the list viewport)
250 // Not visible (item at top of the list viewport)
252− item.delegateCreationBegin = item.originY + baseItem.height
251+ item.displayMarginBeginning = -baseItem.height;
253− item.delegateCreationEnd = item.originY + baseItem.height
252+ item.displayMarginEnd = 0;
254 } else if (baseItem.y >= categoryView.height) {
253 } else if (baseItem.y >= categoryView.height) {
255 // Not visible (item at bottom of the list viewport)
254 // Not visible (item at bottom of the list viewport)
256− item.delegateCreationBegin = item.originY
255+ item.displayMarginBeginning = 0;
257− item.delegateCreationEnd = item.originY
256+ item.displayMarginEnd = -baseItem.height;
258 } else {
257 } else {
259− item.delegateCreationBegin = item.originY + Math.max(-baseItem.y, 0)
258+ item.displayMarginBeginning = -Math.max(-baseItem.y, 0);
260− item.delegateCreationEnd = item.originY + Math.min(categoryView.height + item.delegateCreationBegin, baseItem.height)
259+ item.displayMarginEnd = -Math.max(baseItem.height - categoryView.height + baseItem.y, 0)
261 }
260 }
262 }
261 }
263 }
262 }
qml/Dash/PreviewListView.qml+2−2
@@ -23,7 +23,7 @@ import "Previews" as Previews
23Item {
23Item {
24 id: root
24 id: root
25
25
26− property Scope scope: null
26+ property var scope: null
27 property var pageHeader: null
27 property var pageHeader: null
28
28
29 property alias open: previewListView.open
29 property alias open: previewListView.open
@@ -116,7 +116,7 @@ Item {
116
116
117 previewModel: {
117 previewModel: {
118 var previewStack = root.scope.preview(result);
118 var previewStack = root.scope.preview(result);
119− return previewStack.get(0);
119+ return previewStack.getPreviewModel(0);
120 }
120 }
121 }
121 }
122
122
qml/Dash/Previews/PreviewHeader.qml+86−9
@@ -15,9 +15,10 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18+import Ubuntu.Components 0.1
18import "../"
19import "../"
19
20
20−/*! This preview widget shows a header that is the same as the card header
21+/*! This preview widget shows a header
21 * The title comes in widgetData["title"]
22 * The title comes in widgetData["title"]
22 * The mascot comes in widgetData["mascot"]
23 * The mascot comes in widgetData["mascot"]
23 * The subtitle comes in widgetData["subtitle"]
24 * The subtitle comes in widgetData["subtitle"]
@@ -28,15 +29,91 @@ PreviewWidget {
28
29
29 height: childrenRect.height
30 height: childrenRect.height
30
31
31− CardHeader {
32+ Item {
33+ id: headerRoot
32− objectName: "cardHeader"
34+ objectName: "innerPreviewHeader"
33− mascot: root.widgetData["mascot"] || ""
35+ readonly property url mascot: root.widgetData["mascot"] || ""
34− title: root.widgetData["title"] || ""
36+ readonly property string title: root.widgetData["title"] || ""
35− subtitle: root.widgetData["subtitle"] || ""
37+ readonly property string subtitle: root.widgetData["subtitle"] || ""
38+ readonly property color fontColor: "grey"
39+
40+ implicitHeight: row.height + row.margins * 2
36 width: parent.width
41 width: parent.width
37
42
38− titleSize: "large"
43+ Row {
39− // TODO Change "grey" to Ubuntu.Components.Palette color once updated.
44+ id: row
45+ objectName: "outerRow"
46+
47+ property real margins: units.gu(1)
48+
49+ spacing: mascotShapeLoader.active ? margins : 0
50+ anchors {
51+ top: parent.top; left: parent.left; right: parent.right
52+ margins: margins
53+ leftMargin: spacing
54+ rightMargin: spacing
55+ }
56+
57+ Loader {
58+ id: mascotShapeLoader
59+
60+ anchors.verticalCenter: parent.verticalCenter
61+ // TODO karni: Icon aspect-ratio is 8:7.5. Revisit these values to avoid fraction of pixels.
62+ width: units.gu(6)
63+ height: units.gu(5.625)
64+ readonly property int maxSize: Math.max(width, height) * 4
65+ asynchronous: true
66+
67+ sourceComponent: UbuntuShape {
68+ objectName: "mascotShape"
69+ visible: image.status === Image.Ready
70+ image: Image {
71+ source: headerRoot.mascot
72+ width: source ? mascotShapeLoader.width : 0
73+ height: mascotShapeLoader.height
74+
75+ sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
76+ fillMode: Image.PreserveAspectCrop
77+ horizontalAlignment: Image.AlignHCenter
78+ verticalAlignment: Image.AlignVCenter
79+ }
80+ }
81+ }
82+
83+ Column {
84+ objectName: "column"
85+ width: parent.width - x
86+ spacing: units.dp(2)
87+ anchors.verticalCenter: parent.verticalCenter
88+
89+ Label {
90+ id: titleLabel
91+ objectName: "titleLabel"
92+ anchors { left: parent.left; right: parent.right }
93+ elide: Text.ElideRight
94+ font.weight: Font.Normal
95+ fontSize: "large"
96+ wrapMode: Text.Wrap
97+ maximumLineCount: 2
40− fontColor: "grey"
98+ color: headerRoot.fontColor
99+ text: headerRoot.title
100+ }
101+
102+ Loader {
103+ active: titleLabel.text && headerRoot.subtitle
104+ anchors { left: parent.left; right: parent.right }
105+ sourceComponent: Label {
106+ id: subtitleLabel
107+ objectName: "subtitleLabel"
108+ elide: Text.ElideRight
109+ fontSize: "small"
110+ font.weight: Font.Light
111+ color: headerRoot.fontColor
112+ text: headerRoot.subtitle
113+ }
114+ }
115+ }
116+ }
41 }
117 }
118+
42}
119}
qml/Dash/Previews/PreviewProgress.qml+3−2
@@ -34,11 +34,12 @@ PreviewWidget {
34 ProgressBar {
34 ProgressBar {
35 id: progressBar
35 id: progressBar
36 objectName: "progressBar"
36 objectName: "progressBar"
37+ anchors.right: parent.right
37 value: 0
38 value: 0
38 maximumValue: 100
39 maximumValue: 100
39− implicitHeight: units.gu(5)
40+ implicitHeight: units.gu(4)
40 height: parent.height
41 height: parent.height
41− width: parent.width
42+ width: (root.width - units.gu(1)) / 2
42
43
43 property var source: widgetData["source"]
44 property var source: widgetData["source"]
44 // TODO Eventually we will need to support more sources other
45 // TODO Eventually we will need to support more sources other
qml/Dash/Previews/PreviewRatingInput.qml+2−2
@@ -155,8 +155,8 @@ PreviewWidget {
155 objectName: "submitButton"
155 objectName: "submitButton"
156
156
157 readonly property bool readyToSubmit: {
157 readonly property bool readyToSubmit: {
158− if (reviewTextArea.text === "" ||
159− (widgetData["visible"] === "both" && rating.value < 0)) return false;
158+ if ((widgetData["required"] !== "review" && rating.value < 0) ||
159+ (widgetData["required"] !== "rating" && reviewTextArea.text === "")) return false;
160 else return true;
160 else return true;
161 }
161 }
162
162
qml/Dash/Previews/PreviewTextSummary.qml+4−2
@@ -37,6 +37,7 @@ PreviewWidget {
37 left: parent.left
37 left: parent.left
38 right: parent.right
38 right: parent.right
39 }
39 }
40+ height: visible ? implicitHeight : 0
40 fontSize: "large"
41 fontSize: "large"
41 // TODO karni: Yet another fix requiring Palette update.
42 // TODO karni: Yet another fix requiring Palette update.
42 color: "grey" //Theme.palette.selected.backgroundText
43 color: "grey" //Theme.palette.selected.backgroundText
@@ -68,7 +69,7 @@ PreviewWidget {
68 wrapMode: Text.Wrap
69 wrapMode: Text.Wrap
69
70
70 Behavior on height {
71 Behavior on height {
71− UbuntuNumberAnimation {}
72+ UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
72 }
73 }
73 }
74 }
74
75
@@ -79,8 +80,9 @@ PreviewWidget {
79 left: parent.left
80 left: parent.left
80 right: parent.right
81 right: parent.right
81 top: textLabel.bottom
82 top: textLabel.bottom
82− topMargin: units.gu(1)
83+ topMargin: visible ? units.gu(1) : 0
83 }
84 }
85+ height: visible ? implicitHeight : 0
84 visible: textLabel.lineCount > textLabel.maximumCollapsedLineCount
86 visible: textLabel.lineCount > textLabel.maximumCollapsedLineCount
85 }
87 }
86}
88}
qml/Dash/Previews/PreviewZoomableImage.qml+4−7
@@ -28,14 +28,11 @@ PreviewWidget {
28 id: root
28 id: root
29 implicitHeight: units.gu(22)
29 implicitHeight: units.gu(22)
30
30
31− LazyImage {
31+ ZoomableImage {
32+ id: image
32 objectName: "image"
33 objectName: "image"
33− anchors {
34− top: parent.top
35− bottom: parent.bottom
36− }
37− scaleTo: "height"
38 source: widgetData["source"]
34 source: widgetData["source"]
39− initialWidth: units.gu(13)
35+ zoomable: widgetData["zoomable"] ? widgetData["zoomable"] : false
36+ anchors.fill: parent
40 }
37 }
41}
38}
qml/Dash/ScopeListView.qml+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import DashViews 0.1
18+import Dash 0.1
19
19
20ListViewWithPageHeader {
20ListViewWithPageHeader {
21 maximumFlickVelocity: height * 10
21 maximumFlickVelocity: height * 10
qml/Dash/graphics/carousel_dropshadow@27.pngnew file

Binary file not shown.

qml/Dash/graphics/carousel_dropshadow@27.scinew file+5
@@ -0,0 +1,5 @@
1+border.left: 108
2+border.top: 108
3+border.bottom: 108
4+border.right: 108
5+source: carousel_dropshadow@27.png
qml/Greeter/Clock.qml+3−6
@@ -24,14 +24,11 @@ Item {
24 implicitWidth: childrenRect.width
24 implicitWidth: childrenRect.width
25 implicitHeight: childrenRect.height
25 implicitHeight: childrenRect.height
26
26
27− // Allows to set the current Date. Will be overwritten if active
27+ // Allows to set the current Date. Will be overwritten if visible
28 property date currentDate
28 property date currentDate
29
29
30− // If active, time will be updated through the indicators service
31− property bool active: clock.enabled && clock.visible
32−
33 Component.onCompleted: {
30 Component.onCompleted: {
34− if (active) {
31+ if (visible) {
35 currentDate = new Date()
32 currentDate = new Date()
36 }
33 }
37 }
34 }
@@ -42,7 +39,7 @@ Item {
42
39
43 busName: "com.canonical.indicator.datetime"
40 busName: "com.canonical.indicator.datetime"
44 actionsObjectPath: "/com/canonical/indicator/datetime"
41 actionsObjectPath: "/com/canonical/indicator/datetime"
45− menuObjectPath: clock.active ? "/com/canonical/indicator/datetime/phone" : ""
42+ menuObjectPath: clock.visible ? "/com/canonical/indicator/datetime/phone" : ""
46
43
47 Indicators.RootActionState {
44 Indicators.RootActionState {
48 menu: timeModel.model
45 menu: timeModel.model
qml/Greeter/Greeter.qml+115−42
@@ -28,10 +28,10 @@ Showable {
28 property url defaultBackground
28 property url defaultBackground
29
29
30 // 1 when fully shown and 0 when fully hidden
30 // 1 when fully shown and 0 when fully hidden
31− property real showProgress: MathUtils.clamp((width + x) / width, 0, 1)
31+ property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
32
32
33 showAnimation: StandardAnimation { property: "x"; to: 0 }
33 showAnimation: StandardAnimation { property: "x"; to: 0 }
34− hideAnimation: StandardAnimation { property: "x"; to: -width }
34+ hideAnimation: __leftHideAnimation
35
35
36 property alias dragHandleWidth: dragHandle.width
36 property alias dragHandleWidth: dragHandle.width
37 property alias model: greeterContentLoader.model
37 property alias model: greeterContentLoader.model
@@ -40,19 +40,81 @@ Showable {
40 readonly property bool narrowMode: !multiUser && height > width
40 readonly property bool narrowMode: !multiUser && height > width
41 readonly property bool multiUser: LightDM.Users.count > 1
41 readonly property bool multiUser: LightDM.Users.count > 1
42
42
43− readonly property bool leftTeaserPressed: greeterContentLoader.status == Loader.Ready &&
44− greeterContentLoader.item.leftTeaserPressed
45− readonly property bool rightTeaserPressed: greeterContentLoader.status == Loader.Ready &&
46− greeterContentLoader.item.rightTeaserPressed
47−
48 readonly property int currentIndex: greeterContentLoader.currentIndex
43 readonly property int currentIndex: greeterContentLoader.currentIndex
49
44
45+ property var __leftHideAnimation: StandardAnimation { property: "x"; to: -width }
46+ property var __rightHideAnimation: StandardAnimation { property: "x"; to: width }
47+
50 signal selected(int uid)
48 signal selected(int uid)
51 signal unlocked(int uid)
49 signal unlocked(int uid)
50+ signal tease()
51+
52+ function hideRight() {
53+ if (shown) {
54+ hideAnimation = __rightHideAnimation
55+ hide()
56+ }
57+ }
58+
59+ onRequiredChanged: {
60+ // Reset hide animation to default once we're finished with it
61+ if (!required) {
62+ // Put back on left for reliable show direction and so that
63+ // if normal hide() is called, we don't animate from right.
64+ x = -width
65+ hideAnimation = __leftHideAnimation
66+ }
67+ }
68+
69+ // Bi-directional revealer
70+ DraggingArea {
71+ id: dragHandle
72+ anchors.fill: parent
73+ enabled: greeter.narrowMode || !greeter.locked
74+ orientation: Qt.Horizontal
75+ propagateComposedEvents: true
76+
77+ Component.onCompleted: {
78+ // set evaluators to baseline of dragValue == 0
79+ leftEvaluator.reset()
80+ rightEvaluator.reset()
81+ }
82+
83+ function maybeTease() {
84+ if (!greeter.locked || greeter.narrowMode)
85+ greeter.tease();
86+ }
87+
88+ onClicked: maybeTease()
89+ onDragStart: maybeTease()
90+ onPressAndHold: {} // eat event, but no need to tease, as drag will cover it
91+
92+ onDragEnd: {
93+ if (rightEvaluator.shouldAutoComplete())
94+ greeter.hideRight()
95+ else if (leftEvaluator.shouldAutoComplete())
96+ greeter.hide();
97+ else
98+ greeter.show(); // undo drag
99+ }
100+
101+ onDragValueChanged: {
102+ // dragValue is kept as a "step" value since we do this x adjusting on the fly
103+ greeter.x += dragValue
104+ }
105+
106+ EdgeDragEvaluator {
107+ id: rightEvaluator
108+ trackedPosition: dragHandle.dragValue + greeter.x
109+ maxDragDistance: parent.width
110+ direction: Direction.Rightwards
111+ }
52
112
53− onRightTeaserPressedChanged: {
113+ EdgeDragEvaluator {
54− if (rightTeaserPressed && (!locked || narrowMode) && x == 0) {
114+ id: leftEvaluator
55− teasingTimer.start();
115+ trackedPosition: dragHandle.dragValue + greeter.x
116+ maxDragDistance: parent.width
117+ direction: Direction.Leftwards
56 }
118 }
57 }
119 }
58
120
@@ -82,45 +144,56 @@ Showable {
82 }
144 }
83 }
145 }
84
146
85− Timer {
147+ onTease: showLabelAnimation.start()
86− id: teasingTimer
87− interval: 200
88− }
89
148
90− states: [
149+ Label {
91− State {
150+ id: swipeHint
92− name: "teasing"
151+ visible: greeter.shown
152+ property real baseOpacity: 0.5
153+ opacity: 0.0
154+ anchors.horizontalCenter: parent.horizontalCenter
155+ anchors.bottom: parent.bottom
156+ anchors.bottomMargin: units.gu(5)
157+ text: i18n.tr("Swipe to unlock")
158+ color: "white"
159+ font.weight: Font.Light
160+
161+ SequentialAnimation on opacity {
162+ id: showLabelAnimation
93− when: teasingTimer.running
163+ running: false
94− PropertyChanges {
164+ loops: 2
95− target: greeter
165+
96− x: -dragHandle.hintDisplacement
166+ StandardAnimation {
167+ from: 0.0
168+ to: swipeHint.baseOpacity
169+ duration: UbuntuAnimation.SleepyDuration
97 }
170 }
98− }
171+ PauseAnimation { duration: UbuntuAnimation.BriskDuration }
99− ]
172+ StandardAnimation {
100− transitions: [
173+ from: swipeHint.baseOpacity
101− Transition {
102− from: "*"
103− to: "*"
174+ to: 0.0
104− NumberAnimation {
175+ duration: UbuntuAnimation.SleepyDuration
105− target: greeter
106− property: "x"
107− duration: 300
108− easing.type: Easing.OutCubic
109 }
176 }
110 }
177 }
111− ]
178+ }
112−
113− DragHandle {
114− id: dragHandle
115
179
180+ // right side shadow
181+ Image {
182+ anchors.left: parent.right
116 anchors.top: parent.top
183 anchors.top: parent.top
117 anchors.bottom: parent.bottom
184 anchors.bottom: parent.bottom
118− anchors.right: parent.right
185+ visible: parent.required
119−
186+ fillMode: Image.Tile
120− hintDisplacement: units.gu(2)
187+ source: "../graphics/dropshadow_right.png"
121−
188+ }
122− enabled: greeter.narrowMode || !greeter.locked
123
189
124− direction: Direction.Leftwards
190+ // left side shadow
191+ Image {
192+ anchors.right: parent.left
193+ anchors.top: parent.top
194+ anchors.bottom: parent.bottom
195+ visible: parent.required
196+ fillMode: Image.Tile
197+ source: "../graphics/dropshadow_left.png"
125 }
198 }
126}
199}
qml/Greeter/GreeterContent.qml+1−10
@@ -20,15 +20,11 @@ import Ubuntu.Components 0.1
20import LightDM 0.1 as LightDM
20import LightDM 0.1 as LightDM
21import "../Components"
21import "../Components"
22
22
23−MouseArea {
23+Item {
24 id: root
24 id: root
25 anchors.fill: parent
25 anchors.fill: parent
26
26
27 property bool ready: background.source == "" || background.status == Image.Ready || background.status == Image.Error
27 property bool ready: background.source == "" || background.status == Image.Ready || background.status == Image.Error
28− property bool leftTeaserPressed: teasingMouseArea.pressed &&
29− teasingMouseArea.mouseX < teasingMouseArea.width / 2
30− property bool rightTeaserPressed: teasingMouseArea.pressed &&
31− teasingMouseArea.mouseX > teasingMouseArea.width / 2
32
28
33 signal selected(int uid)
29 signal selected(int uid)
34 signal unlocked(int uid)
30 signal unlocked(int uid)
@@ -74,11 +70,6 @@ MouseArea {
74 opacity: 0.4
70 opacity: 0.4
75 }
71 }
76
72
77− MouseArea {
78− id: teasingMouseArea
79− anchors.fill: parent
80− }
81−
82 Loader {
73 Loader {
83 id: loginLoader
74 id: loginLoader
84 objectName: "loginLoader"
75 objectName: "loginLoader"
qml/Greeter/Infographics.qml+3
@@ -457,5 +457,8 @@ Item {
457 !circleGrowAnimTimer.running)
457 !circleGrowAnimTimer.running)
458 infographic.model.nextDataSource()
458 infographic.model.nextDataSource()
459 }
459 }
460+
461+ onClicked: mouse.accepted = false
462+ onPressed: mouse.accepted = false
460 }
463 }
461}
464}
qml/Hud/Hud.qml+1−1
@@ -491,6 +491,6 @@ Item {
491 anchors.top: hudContentClipper.top
491 anchors.top: hudContentClipper.top
492 anchors.bottom: hudContentClipper.bottom
492 anchors.bottom: hudContentClipper.bottom
493 fillMode: Image.Tile
493 fillMode: Image.Tile
494− source: "graphics/dropshadow_right.png"
494+ source: "../graphics/dropshadow_right.png"
495 }
495 }
496}
496}
qml/Notifications/Notifications.qml+11
@@ -16,6 +16,8 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19+import Unity.Notifications 1.0 as UnityNotifications
20+import Utils 0.1
19import "../Components"
21import "../Components"
20
22
21ListView {
23ListView {
@@ -25,6 +27,15 @@ ListView {
25 interactive: false
27 interactive: false
26
28
27 property real margin
29 property real margin
30+ property bool useModal: snapDecisionProxyModel.count > 0
31+
32+ SortFilterProxyModel {
33+ id: snapDecisionProxyModel
34+
35+ model: notificationList.model
36+ filterRole: UnityNotifications.ModelInterface.RoleType
37+ filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
38+ }
28 spacing: delegate.fullscreen ? 0 : units.gu(.5)
39 spacing: delegate.fullscreen ? 0 : units.gu(.5)
29
40
30 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
41 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
qml/ScopeTool.qml+1−1
@@ -74,7 +74,7 @@ Rectangle {
74
74
75 model: filteredScopes
75 model: filteredScopes
76 searchHistory: SearchHistoryModel { }
76 searchHistory: SearchHistoryModel { }
77− property Scope scope: scopes.get(currentIndex)
77+ property var scope: scopes.getScope(currentIndex)
78
78
79 anchors {
79 anchors {
80 top: parent.top
80 top: parent.top
qml/Shell.qml+79−92
@@ -28,9 +28,7 @@ import "Dash"
28import "Greeter"
28import "Greeter"
29import "Launcher"
29import "Launcher"
30import "Panel"
30import "Panel"
31−import "Hud"
32import "Components"
31import "Components"
33−import "Bottombar"
34import "Notifications"
32import "Notifications"
35import Unity.Notifications 1.0 as NotificationBackend
33import Unity.Notifications 1.0 as NotificationBackend
36
34
@@ -148,8 +146,8 @@ FocusScope {
148
146
149 available: !greeter.shown && !lockscreen.shown
147 available: !greeter.shown && !lockscreen.shown
150 hides: [stages, launcher, panel.indicators]
148 hides: [stages, launcher, panel.indicators]
151− shown: disappearingAnimationProgress !== 1.0
149+ shown: disappearingAnimationProgress !== 1.0 && greeterWrapper.showProgress !== 1.0
152− enabled: disappearingAnimationProgress === 0.0 && edgeDemo.dashEnabled
150+ enabled: disappearingAnimationProgress === 0.0 && greeterWrapper.showProgress === 0.0 && edgeDemo.dashEnabled
153
151
154 anchors {
152 anchors {
155 fill: parent
153 fill: parent
@@ -159,18 +157,14 @@ FocusScope {
159 contentScale: 1.0 - 0.2 * disappearingAnimationProgress
157 contentScale: 1.0 - 0.2 * disappearingAnimationProgress
160 opacity: 1.0 - disappearingAnimationProgress
158 opacity: 1.0 - disappearingAnimationProgress
161 property real disappearingAnimationProgress: {
159 property real disappearingAnimationProgress: {
162− if (greeter.shown) {
160+ if (stages.overlayMode) {
163− return greeter.showProgress;
161+ return 0;
164 } else {
162 } else {
165− if (stages.overlayMode) {
166− return 0;
167− }
168 return stages.showProgress
163 return stages.showProgress
169 }
164 }
170 }
165 }
171
166
172− // FIXME: only necessary because stages.showProgress and
167+ // FIXME: only necessary because stages.showProgress is not animated
173− // greeterRevealer.animatedProgress are not animated
174 Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
168 Behavior on disappearingAnimationProgress { SmoothedAnimation { velocity: 5 }}
175 }
169 }
176 }
170 }
@@ -312,7 +306,7 @@ FocusScope {
312
306
313 readonly property int backgroundTopMargin: -panel.panelHeight
307 readonly property int backgroundTopMargin: -panel.panelHeight
314
308
315− hides: [launcher, panel.indicators, hud]
309+ hides: [launcher, panel.indicators]
316 shown: false
310 shown: false
317 enabled: true
311 enabled: true
318 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
312 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
@@ -362,59 +356,73 @@ FocusScope {
362 }
356 }
363 }
357 }
364
358
365− Greeter {
359+ Rectangle {
366− id: greeter
360+ anchors.fill: parent
367− objectName: "greeter"
361+ color: "black"
368−
362+ opacity: greeterWrapper.showProgress * 0.8
369− available: true
363+ }
370− hides: [launcher, panel.indicators, hud]
371− shown: true
372−
373− defaultBackground: shell.background
374
364
365+ Item {
366+ // Just a tiny wrapper to adjust greeter's x without messing with its own dragging
367+ id: greeterWrapper
368+ x: launcher.progress
375 y: panel.panelHeight
369 y: panel.panelHeight
376 width: parent.width
370 width: parent.width
377 height: parent.height - panel.panelHeight
371 height: parent.height - panel.panelHeight
378
372
379− dragHandleWidth: shell.edgeSize
373+ Behavior on x {SmoothedAnimation{velocity: 600}}
380
374
375+ readonly property real showProgress: MathUtils.clamp((1 - x/width) + greeter.showProgress - 1, 0, 1)
376+
377+ Greeter {
378+ id: greeter
379+ objectName: "greeter"
380+
381+ available: true
382+ hides: [launcher, panel.indicators]
383+ shown: true
384+
385+ defaultBackground: shell.background
386+
387+ width: parent.width
388+ height: parent.height
389+
390+ dragHandleWidth: shell.edgeSize
391+
381− onShownChanged: {
392+ onShownChanged: {
382− if (shown) {
393+ if (shown) {
383− lockscreen.reset();
394+ lockscreen.reset();
384− // If there is only one user, we start authenticating with that one here.
395+ // If there is only one user, we start authenticating with that one here.
385− // If there are more users, the Greeter will handle that
396+ // If there are more users, the Greeter will handle that
386− if (LightDM.Users.count == 1) {
397+ if (LightDM.Users.count == 1) {
387− LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
398+ LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
399+ }
400+ greeter.forceActiveFocus();
388 }
401 }
389− greeter.forceActiveFocus();
390 }
402 }
391− }
392
403
393− onUnlocked: greeter.hide()
404+ onUnlocked: greeter.hide()
394− onSelected: {
405+ onSelected: {
395− // Update launcher items for new user
406+ // Update launcher items for new user
396− var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
407+ var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
397− AccountsService.user = user;
408+ AccountsService.user = user;
398− LauncherModel.setUser(user);
409+ LauncherModel.setUser(user);
399− }
400−
401− onLeftTeaserPressedChanged: {
402− if (leftTeaserPressed) {
403− launcher.tease();
404 }
410 }
405− }
406
411
412+ onTease: launcher.tease()
413+
407− Binding {
414+ Binding {
408− target: ApplicationManager
415+ target: ApplicationManager
409− property: "suspended"
416+ property: "suspended"
410− value: greeter.shown && greeter.showProgress == 1
417+ value: greeter.shown && greeterWrapper.showProgress == 1
418+ }
411 }
419 }
412 }
420 }
413
421
414 InputFilterArea {
422 InputFilterArea {
415 anchors.fill: parent
423 anchors.fill: parent
416 blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown
424 blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown
417− || panel.indicators.shown || hud.shown
425+ || panel.indicators.shown
418 }
426 }
419
427
420 Connections {
428 Connections {
@@ -478,47 +486,6 @@ FocusScope {
478 }
486 }
479 }
487 }
480
488
481− Hud {
482− id: hud
483−
484− width: parent.width > units.gu(60) ? units.gu(40) : parent.width
485− height: parent.height
486−
487− available: !greeter.shown && !panel.indicators.shown && !lockscreen.shown && edgeDemo.dashEnabled
488− shown: false
489− showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
490− hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }
491−
492− Connections {
493− target: ApplicationManager
494− onFocusedApplicationIdChanged: hud.hide()
495− }
496− }
497−
498− Revealer {
499− id: hudRevealer
500−
501− enabled: hud.shown
502− width: hud.width
503− anchors.left: hud.left
504− height: parent.height
505− target: hud.revealerTarget
506− closedValue: height
507− openedValue: 0
508− direction: Qt.RightToLeft
509− orientation: Qt.Vertical
510− handleSize: hud.handleHeight
511− onCloseClicked: target.hide()
512− }
513−
514− Bottombar {
515− id: bottombar
516− theHud: hud
517− anchors.fill: parent
518− enabled: hud.available
519− applicationIsOnForeground: ApplicationManager.focusedApplicationId
520− }
521−
522 InputFilterArea {
489 InputFilterArea {
523 blockInput: launcher.shown
490 blockInput: launcher.shown
524 anchors {
491 anchors {
@@ -538,7 +505,7 @@ FocusScope {
538 anchors.bottom: parent.bottom
505 anchors.bottom: parent.bottom
539 width: parent.width
506 width: parent.width
540 dragAreaWidth: shell.edgeSize
507 dragAreaWidth: shell.edgeSize
541− available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
508+ available: edgeDemo.launcherEnabled
542
509
543 onShowDashHome: {
510 onShowDashHome: {
544 if (edgeDemo.running)
511 if (edgeDemo.running)
@@ -553,6 +520,10 @@ FocusScope {
553 launcher.hide();
520 launcher.hide();
554 }
521 }
555 }
522 }
523+ if (greeter.shown) {
524+ greeter.hideRight();
525+ launcher.hide();
526+ }
556 }
527 }
557 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
528 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("clickscope", false, true)
558 onLauncherApplicationSelected: {
529 onLauncherApplicationSelected: {
@@ -562,12 +533,28 @@ FocusScope {
562 onShownChanged: {
533 onShownChanged: {
563 if (shown) {
534 if (shown) {
564 panel.indicators.hide()
535 panel.indicators.hide()
565− hud.hide()
566− bottombar.hide()
567 }
536 }
568 }
537 }
569 }
538 }
570
539
540+ Rectangle {
541+ id: modalNotificationBackground
542+
543+ visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
544+ color: "#000000"
545+ anchors.fill: parent
546+ opacity: 0.5
547+
548+ MouseArea {
549+ anchors.fill: parent
550+ }
551+
552+ InputFilterArea {
553+ anchors.fill: parent
554+ blockInput: modalNotificationBackground.visible
555+ }
556+ }
557+
571 Notifications {
558 Notifications {
572 id: notifications
559 id: notifications
573
560
qml/graphics/dropshadow_left@20.pngnew file

Binary file not shown.

qml/Hud/graphics/dropshadow_right@20.png → qml/graphics/dropshadow_right@20.pngrenamed

Binary file not shown.

run → run.shrenamed+1−1
@@ -78,6 +78,6 @@ else
78 echo "Unity8 is already running, please stop it first"
78 echo "Unity8 is already running, please stop it first"
79 exit 1
79 exit 1
80 fi
80 fi
81− /sbin/initctl start unity8 BINARY="`readlink -f $QML_PHONE_SHELL_PATH` $QML_PHONE_SHELL_ARGS $@"
81+ /sbin/initctl start unity8 BINARY="`readlink -f $QML_PHONE_SHELL_PATH` $QML_PHONE_SHELL_ARGS $@" QML2_IMPORT_PATH=$QML2_IMPORT_PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH
82 tailf -n 0 ~/.cache/upstart/unity8.log
82 tailf -n 0 ~/.cache/upstart/unity8.log
83fi
83fi
run_on_device → run_on_device.shrenamed+2−2
@@ -88,7 +88,7 @@ sync_code() {
88}
88}
89
89
90build() {
90build() {
91− exec_with_ssh PATH=/usr/lib/ccache:$PATH "cd $CODE_DIR/ && PATH=/usr/lib/ccache:$PATH ./build"
91+ exec_with_ssh PATH=/usr/lib/ccache:$PATH "cd $CODE_DIR/ && PATH=/usr/lib/ccache:$PATH ./build.sh"
92}
92}
93
93
94run() {
94run() {
@@ -105,7 +105,7 @@ run() {
105
105
106 exec_with_ssh "stop unity8"
106 exec_with_ssh "stop unity8"
107 exec_with_ssh "start maliit-server"
107 exec_with_ssh "start maliit-server"
108− exec_with_ssh "cd $CODE_DIR/ && ./run $ARGS -- $RUN_OPTIONS"
108+ exec_with_ssh "cd $CODE_DIR/ && ./run.sh $ARGS -- $RUN_OPTIONS"
109 exec_with_ssh "stop maliit-server"
109 exec_with_ssh "stop maliit-server"
110 exec_with_ssh "start unity8"
110 exec_with_ssh "start unity8"
111}
111}
src/ApplicationArguments.h+4−8
@@ -28,14 +28,10 @@ class ApplicationArguments : public QObject
28{
28{
29 Q_OBJECT
29 Q_OBJECT
30public:
30public:
31− ApplicationArguments(const QStringList& args) {
31+ // Not exposed to the app as setSize isn't invokable
32− if (args.contains(QLatin1String("-windowgeometry")) && args.size() > args.indexOf(QLatin1String("-windowgeometry")) + 1) {
32+ void setSize(int width, int height) {
33− QStringList geometryArg = args.at(args.indexOf(QLatin1String("-windowgeometry")) + 1).split('x');
34− if (geometryArg.size() == 2) {
35− m_size.rwidth() = geometryArg.at(0).toInt();
33+ m_size.rwidth() = width;
36− m_size.rheight() = geometryArg.at(1).toInt();
34+ m_size.rheight() = height;
37− }
38− }
39 }
35 }
40
36
41 Q_INVOKABLE bool hasGeometry() const { return m_size.isValid(); }
37 Q_INVOKABLE bool hasGeometry() const { return m_size.isValid(); }
src/main.cpp+43−6
@@ -18,6 +18,7 @@
18 */
18 */
19
19
20// Qt
20// Qt
21+#include <QCommandLineParser>
21#include <QtQuick/QQuickView>
22#include <QtQuick/QQuickView>
22#include <QtGui/QGuiApplication>
23#include <QtGui/QGuiApplication>
23#include <QtQml/QQmlEngine>
24#include <QtQml/QQmlEngine>
@@ -43,6 +44,32 @@ int startShell(int argc, const char** argv, void* server)
43
44
44 QGuiApplication::setApplicationName("Unity 8");
45 QGuiApplication::setApplicationName("Unity 8");
45 QGuiApplication *application;
46 QGuiApplication *application;
47+
48+ QCommandLineParser parser;
49+ parser.setApplicationDescription("Description: Unity 8 Shell");
50+ parser.addHelpOption();
51+
52+ QCommandLineOption fullscreenOption("fullscreen",
53+ "Run in fullscreen");
54+ parser.addOption(fullscreenOption);
55+
56+ QCommandLineOption framelessOption("frameless",
57+ "Run without window borders");
58+ parser.addOption(framelessOption);
59+
60+ QCommandLineOption mousetouchOption("mousetouch",
61+ "Allow the mouse to provide touch input");
62+ parser.addOption(mousetouchOption);
63+
64+ QCommandLineOption windowGeometryOption(QStringList() << "windowgeometry",
65+ "Specify the window geometry as [<width>x<height>]", "windowgeometry", "1");
66+ parser.addOption(windowGeometryOption);
67+
68+ QCommandLineOption testabilityOption("testability",
69+ "DISCOURAGED: Please set QT_LOAD_TESTABILITY instead. \n \
70+Load the testability driver");
71+ parser.addOption(testabilityOption);
72+
46 if (isUbuntuMirServer) {
73 if (isUbuntuMirServer) {
47 QLibrary unityMir("unity-mir", 1);
74 QLibrary unityMir("unity-mir", 1);
48 unityMir.load();
75 unityMir.load();
@@ -59,17 +86,27 @@ int startShell(int argc, const char** argv, void* server)
59 application = new QGuiApplication(argc, (char**)argv);
86 application = new QGuiApplication(argc, (char**)argv);
60 }
87 }
61
88
89+ // Treat args with single dashes the same as arguments with two dashes
90+ // Ex: -fullscreen == --fullscreen
91+ parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions);
92+ parser.process(*application);
93+
62 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
94 QString indicatorProfile = qgetenv("UNITY_INDICATOR_PROFILE");
63 if (indicatorProfile.isEmpty()) {
95 if (indicatorProfile.isEmpty()) {
64 indicatorProfile = "phone";
96 indicatorProfile = "phone";
65 }
97 }
66
98
67− QStringList args = application->arguments();
99+ ApplicationArguments qmlArgs;
68− ApplicationArguments qmlArgs(args);
100+ if (parser.isSet(windowGeometryOption) &&
101+ parser.value(windowGeometryOption).split('x').size() == 2)
102+ {
103+ QStringList geom = parser.value(windowGeometryOption).split('x');
104+ qmlArgs.setSize(geom.at(0).toInt(), geom.at(1).toInt());
105+ }
69
106
70 // The testability driver is only loaded by QApplication but not by QGuiApplication.
107 // The testability driver is only loaded by QApplication but not by QGuiApplication.
71 // However, QApplication depends on QWidget which would add some unneeded overhead => Let's load the testability driver on our own.
108 // However, QApplication depends on QWidget which would add some unneeded overhead => Let's load the testability driver on our own.
72− if (args.contains(QLatin1String("-testability")) || getenv("QT_LOAD_TESTABILITY")) {
109+ if (parser.isSet(testabilityOption) || getenv("QT_LOAD_TESTABILITY")) {
73 QLibrary testLib(QLatin1String("qttestability"));
110 QLibrary testLib(QLatin1String("qttestability"));
74 if (testLib.load()) {
111 if (testLib.load()) {
75 typedef void (*TasInitialize)(void);
112 typedef void (*TasInitialize)(void);
@@ -92,14 +129,14 @@ int startShell(int argc, const char** argv, void* server)
92 view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
129 view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
93 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
130 view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
94 view->rootContext()->setContextProperty("indicatorProfile", indicatorProfile);
131 view->rootContext()->setContextProperty("indicatorProfile", indicatorProfile);
95− if (args.contains(QLatin1String("-frameless"))) {
132+ if (parser.isSet(framelessOption)) {
96 view->setFlags(Qt::FramelessWindowHint);
133 view->setFlags(Qt::FramelessWindowHint);
97 }
134 }
98
135
99 // You will need this if you want to interact with touch-only components using a mouse
136 // You will need this if you want to interact with touch-only components using a mouse
100 // Needed only when manually testing on a desktop.
137 // Needed only when manually testing on a desktop.
101 MouseTouchAdaptor *mouseTouchAdaptor = 0;
138 MouseTouchAdaptor *mouseTouchAdaptor = 0;
102− if (args.contains(QLatin1String("-mousetouch"))) {
139+ if (parser.isSet(mousetouchOption)) {
103 mouseTouchAdaptor = new MouseTouchAdaptor;
140 mouseTouchAdaptor = new MouseTouchAdaptor;
104 application->installNativeEventFilter(mouseTouchAdaptor);
141 application->installNativeEventFilter(mouseTouchAdaptor);
105 }
142 }
@@ -123,7 +160,7 @@ int startShell(int argc, const char** argv, void* server)
123 view->setSource(source);
160 view->setSource(source);
124 view->setColor("transparent");
161 view->setColor("transparent");
125
162
126− if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || args.contains(QLatin1String("-fullscreen"))) {
163+ if (qgetenv("QT_QPA_PLATFORM") == "ubuntu" || isUbuntuMirServer || parser.isSet(fullscreenOption)) {
127 view->showFullScreen();
164 view->showFullScreen();
128 } else {
165 } else {
129 view->show();
166 view->show();
tests/autopilot/unity8/process_helpers.py+11−4
@@ -17,12 +17,19 @@
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
18#
19
19
20−from autopilot.introspection import (
21− get_proxy_object_for_existing_process,
22− ProcessSearchError,
23−)
24import logging
20import logging
25import subprocess
21import subprocess
22+import sys
23+
24+# This has to work in both python 3 (ap 1.5) and py2 (ap legacy 1.4.1) so we
25+# pick the correct location in each case. Remove the py2 branch once we no
26+# longer need to support python 2.
27+if sys.version >= '3':
28+ from autopilot.exceptions import ProcessSearchError
29+else:
30+ from autopilot.introspection import ProcessSearchError
31+from autopilot.introspection import get_proxy_object_for_existing_process
32+
26from unity8.shell import emulators
33from unity8.shell import emulators
27from unity8.shell.emulators import main_window as main_window_emulator
34from unity8.shell.emulators import main_window as main_window_emulator
28
35
tests/autopilot/unity8/shell/__init__.py+50−1
@@ -21,8 +21,9 @@
21
21
22from time import sleep
22from time import sleep
23from functools import wraps
23from functools import wraps
24−import logging
24+from gi.repository import Notify
25
25
26+import logging
26
27
27logger = logging.getLogger(__name__)
28logger = logging.getLogger(__name__)
28
29
@@ -48,6 +49,7 @@ def disable_qml_mocking(fn):
48 return fn(*args, **kwargs)
49 return fn(*args, **kwargs)
49 return wrapper
50 return wrapper
50
51
52+
51class DragMixin(object):
53class DragMixin(object):
52 def _drag(self, x1, y1, x2, y2):
54 def _drag(self, x1, y1, x2, y2):
53 # XXX This ugly code is here just temporarily, waiting for drag
55 # XXX This ugly code is here just temporarily, waiting for drag
@@ -69,3 +71,50 @@ class DragMixin(object):
69 self.touch._finger_move(int(x2), int(y2))
71 self.touch._finger_move(int(x2), int(y2))
70 except AttributeError:
72 except AttributeError:
71 self.touch._device.finger_move(int(x2), int(y2))
73 self.touch._device.finger_move(int(x2), int(y2))
74+
75+
76+def create_ephemeral_notification(
77+ summary='',
78+ body='',
79+ icon=None,
80+ hints=[],
81+ urgency='NORMAL'
82+):
83+ """Create an ephemeral (non-interactive) notification
84+
85+ :param summary: Summary text for the notification
86+ :param body: Body text to display in the notification
87+ :param icon: Path string to the icon to use
88+ :param hint_strings: List of tuples containing the 'name' and value
89+ for setting the hint strings for the notification
90+ :param urgency: Urgency string for the noticiation, either: 'LOW',
91+ 'NORMAL', 'CRITICAL'
92+ """
93+ Notify.init('Unity8')
94+
95+ logger.info(
96+ "Creating ephemeral: summary(%s), body(%s), urgency(%r) "
97+ "and Icon(%s)",
98+ summary,
99+ body,
100+ urgency,
101+ icon
102+ )
103+
104+ notification = Notify.Notification.new(summary, body, icon)
105+
106+ for hint in hints:
107+ key, value = hint
108+ notification.set_hint_string(key, value)
109+ logger.info("Adding hint to notification: (%s, %s)", key, value)
110+ notification.set_urgency(_get_urgency(urgency))
111+
112+ return notification
113+
114+
115+def _get_urgency(urgency):
116+ """Translates urgency string to enum."""
117+ _urgency_enums = {'LOW': Notify.Urgency.LOW,
118+ 'NORMAL': Notify.Urgency.NORMAL,
119+ 'CRITICAL': Notify.Urgency.CRITICAL}
120+ return _urgency_enums.get(urgency.upper())
tests/autopilot/unity8/shell/emulators/dash.py+3−4
@@ -161,7 +161,7 @@ class GenericScopeView(emulators.UnityEmulatorBase):
161
161
162 """
162 """
163 category_element = self._get_category_element(category)
163 category_element = self._get_category_element(category)
164− icon = category_element.select_single('Card', title=app_name)
164+ icon = category_element.select_single('AbstractButton', title=app_name)
165 # FIXME some categories need a long press in order to see the preview.
165 # FIXME some categories need a long press in order to see the preview.
166 # Some categories do not show previews, like recent apps.
166 # Some categories do not show previews, like recent apps.
167 # --elopio - 2014-1-14
167 # --elopio - 2014-1-14
@@ -191,7 +191,7 @@ class DashApps(GenericScopeView):
191
191
192 """
192 """
193 category_element = self._get_category_element(category)
193 category_element = self._get_category_element(category)
194− application_cards = category_element.select_many('Card')
194+ application_cards = category_element.select_many('AbstractButton')
195
195
196 # sort by y, x
196 # sort by y, x
197 application_cards = sorted(
197 application_cards = sorted(
@@ -201,8 +201,7 @@ class DashApps(GenericScopeView):
201 result = []
201 result = []
202 for card in application_cards:
202 for card in application_cards:
203 if card.objectName != 'cardToolCard':
203 if card.objectName != 'cardToolCard':
204− card_header = card.select_single('CardHeader')
205− result.append(card_header.title)
204+ result.append(card.title)
206 return result
205 return result
207
206
208
207
tests/autopilot/unity8/shell/tests/test_emulators.py+1−1
@@ -196,7 +196,7 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
196 category)
196 category)
197 grid = category_element.select_single('CardFilterGrid')
197 grid = category_element.select_single('CardFilterGrid')
198 filtergrid = grid.select_single('FilterGrid')
198 filtergrid = grid.select_single('FilterGrid')
199− if (grid.filter):
199+ if (grid.filtered):
200 return filtergrid.collapsedRowCount * filtergrid.columns
200 return filtergrid.collapsedRowCount * filtergrid.columns
201 else:
201 else:
202 return filtergrid.uncollapsedRowCount * filtergrid.columns
202 return filtergrid.uncollapsedRowCount * filtergrid.columns
tests/autopilot/unity8/shell/tests/test_notifications.py+97−57
@@ -21,6 +21,7 @@
21
21
22from __future__ import absolute_import
22from __future__ import absolute_import
23
23
24+from unity8 import shell
24from unity8.process_helpers import unlock_unity
25from unity8.process_helpers import unlock_unity
25from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
26from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
26
27
@@ -64,7 +65,8 @@ class NotificationsBase(UnityTestCase):
64 if os.path.abspath(__file__).startswith('/usr/'):
65 if os.path.abspath(__file__).startswith('/usr/'):
65 return '/usr/share/unity8/graphics/' + icon_name
66 return '/usr/share/unity8/graphics/' + icon_name
66 else:
67 else:
67− return os.path.dirname(__file__) + "/../../../../../qml/graphics/" + icon_name
68+ return os.path.dirname(__file__) + (
69+ "/../../../../../qml/graphics/" + icon_name)
68
70
69 def _get_notifications_list(self):
71 def _get_notifications_list(self):
70 return self.main_window.select_single(
72 return self.main_window.select_single(
@@ -209,6 +211,89 @@ class InteractiveNotificationBase(NotificationsBase):
209 self.touch.tap_object(notification.select_single(objectName="button4"))
211 self.touch.tap_object(notification.select_single(objectName="button4"))
210 self.assert_notification_action_id_was_called("action_decline_4")
212 self.assert_notification_action_id_was_called("action_decline_4")
211
213
214+ def test_modal_sd_without_greeter (self):
215+ """A snap-decision on a phone should block input to shell beneath it when there's no greeter."""
216+ unity_proxy = self.launch_unity()
217+ unlock_unity(unity_proxy)
218+
219+ summary = "Incoming file"
220+ body = "Frank would like to send you the file: essay.pdf"
221+ icon_path = "sync-idle"
222+ hints = [
223+ ("x-canonical-snap-decisions", "true"),
224+ ("x-canonical-non-shaped-icon", "true"),
225+ ]
226+
227+ actions = [
228+ ('action_accept', 'Accept'),
229+ ('action_decline_1', 'Decline'),
230+ ]
231+
232+ self._create_interactive_notification(
233+ summary,
234+ body,
235+ icon_path,
236+ "NORMAL",
237+ actions,
238+ hints
239+ )
240+
241+ # verify that we cannot reveal the launcher (no longer interact with the shell)
242+ time.sleep(1)
243+ self.main_window.show_dash_swiping()
244+ launcher = self.main_window.get_launcher()
245+ self.assertThat(launcher.shown, Eventually(Equals(False)))
246+
247+ # verify and interact with the triggered snap-decision notification
248+ notify_list = self._get_notifications_list()
249+ get_notification = lambda: notify_list.wait_select_single(
250+ 'Notification', objectName='notification1')
251+ notification = get_notification()
252+ self._assert_notification(notification, summary, body, True, False, 1.0)
253+ self.touch.tap_object(notification.select_single(objectName="button0"))
254+ self.assert_notification_action_id_was_called("action_accept")
255+
256+ def test_modal_sd_with_greeter (self):
257+ """A snap-decision on a phone should not block input to the greeter beneath it."""
258+ unity_proxy = self.launch_unity()
259+
260+ summary = "Incoming file"
261+ body = "Frank would like to send you the file: essay.pdf"
262+ icon_path = "sync-idle"
263+ hints = [
264+ ("x-canonical-snap-decisions", "true"),
265+ ("x-canonical-non-shaped-icon", "true"),
266+ ]
267+
268+ actions = [
269+ ('action_accept', 'Accept'),
270+ ('action_decline_1', 'Decline'),
271+ ]
272+
273+ self._create_interactive_notification(
274+ summary,
275+ body,
276+ icon_path,
277+ "NORMAL",
278+ actions,
279+ hints
280+ )
281+
282+ # verify that we can swipe away the greeter (interact with the "shell")
283+ time.sleep(1)
284+ self.main_window.show_dash_swiping()
285+ greeter = self.main_window.get_greeter()
286+ self.assertThat(greeter.shown, Eventually(Equals(False)))
287+
288+ # verify and interact with the triggered snap-decision notification
289+ notify_list = self._get_notifications_list()
290+ get_notification = lambda: notify_list.wait_select_single(
291+ 'Notification', objectName='notification1')
292+ notification = get_notification()
293+ self._assert_notification(notification, summary, body, True, False, 1.0)
294+ self.touch.tap_object(notification.select_single(objectName="button0"))
295+ self.assert_notification_action_id_was_called("action_accept")
296+
212 def _create_interactive_notification(
297 def _create_interactive_notification(
213 self,
298 self,
214 summary="",
299 summary="",
@@ -354,7 +439,7 @@ class EphemeralNotificationsTests(NotificationsBase):
354 )
439 )
355 ]
440 ]
356
441
357− notification = self._create_ephemeral_notification(
442+ notification = shell.create_ephemeral_notification(
358 summary,
443 summary,
359 body,
444 body,
360 icon_path,
445 icon_path,
@@ -391,7 +476,7 @@ class EphemeralNotificationsTests(NotificationsBase):
391 )
476 )
392 ]
477 ]
393
478
394− notification = self._create_ephemeral_notification(
479+ notification = shell.create_ephemeral_notification(
395 summary,
480 summary,
396 None,
481 None,
397 None,
482 None,
@@ -433,7 +518,7 @@ class EphemeralNotificationsTests(NotificationsBase):
433 body_critical = 'Dude, this is so urgent you have no idea :)'
518 body_critical = 'Dude, this is so urgent you have no idea :)'
434 icon_path_critical = self._get_icon_path('avatars/anna_olsson.png')
519 icon_path_critical = self._get_icon_path('avatars/anna_olsson.png')
435
520
436− notification_normal = self._create_ephemeral_notification(
521+ notification_normal = shell.create_ephemeral_notification(
437 summary_normal,
522 summary_normal,
438 body_normal,
523 body_normal,
439 icon_path_normal,
524 icon_path_normal,
@@ -441,7 +526,7 @@ class EphemeralNotificationsTests(NotificationsBase):
441 )
526 )
442 notification_normal.show()
527 notification_normal.show()
443
528
444− notification_low = self._create_ephemeral_notification(
529+ notification_low = shell.create_ephemeral_notification(
445 summary_low,
530 summary_low,
446 body_low,
531 body_low,
447 icon_path_low,
532 icon_path_low,
@@ -449,7 +534,7 @@ class EphemeralNotificationsTests(NotificationsBase):
449 )
534 )
450 notification_low.show()
535 notification_low.show()
451
536
452− notification_critical = self._create_ephemeral_notification(
537+ notification_critical = shell.create_ephemeral_notification(
453 summary_critical,
538 summary_critical,
454 body_critical,
539 body_critical,
455 icon_path_critical,
540 icon_path_critical,
@@ -510,7 +595,7 @@ class EphemeralNotificationsTests(NotificationsBase):
510 summary = 'Summary-Body'
595 summary = 'Summary-Body'
511 body = 'This is a superfluous notification'
596 body = 'This is a superfluous notification'
512
597
513− notification = self._create_ephemeral_notification(summary, body)
598+ notification = shell.create_ephemeral_notification(summary, body)
514 notification.show()
599 notification.show()
515
600
516 notification = notify_list.wait_select_single(
601 notification = notify_list.wait_select_single(
@@ -534,7 +619,7 @@ class EphemeralNotificationsTests(NotificationsBase):
534
619
535 summary = 'Summary-Only'
620 summary = 'Summary-Only'
536
621
537− notification = self._create_ephemeral_notification(summary)
622+ notification = shell.create_ephemeral_notification(summary)
538 notification.show()
623 notification.show()
539
624
540 notification = notify_list.wait_select_single(
625 notification = notify_list.wait_select_single(
@@ -554,7 +639,7 @@ class EphemeralNotificationsTests(NotificationsBase):
554 body = 'This is the original content of this notification-bubble.'
639 body = 'This is the original content of this notification-bubble.'
555 icon_path = self._get_icon_path('avatars/funky.png')
640 icon_path = self._get_icon_path('avatars/funky.png')
556
641
557− notification = self._create_ephemeral_notification(
642+ notification = shell.create_ephemeral_notification(
558 summary,
643 summary,
559 body,
644 body,
560 icon_path
645 icon_path
@@ -594,7 +679,7 @@ class EphemeralNotificationsTests(NotificationsBase):
594 icon_path = self._get_icon_path('avatars/anna_olsson.png')
679 icon_path = self._get_icon_path('avatars/anna_olsson.png')
595 hint_icon = self._get_icon_path('applicationIcons/phone-app.png')
680 hint_icon = self._get_icon_path('applicationIcons/phone-app.png')
596
681
597− notification = self._create_ephemeral_notification(
682+ notification = shell.create_ephemeral_notification(
598 summary,
683 summary,
599 body,
684 body,
600 icon_path
685 icon_path
@@ -638,7 +723,7 @@ class EphemeralNotificationsTests(NotificationsBase):
638 body = 'Hey Bro Coly!'
723 body = 'Hey Bro Coly!'
639 icon_path = self._get_icon_path('avatars/amanda.png')
724 icon_path = self._get_icon_path('avatars/amanda.png')
640 body_sum = body
725 body_sum = body
641− notification = self._create_ephemeral_notification(
726+ notification = shell.create_ephemeral_notification(
642 summary,
727 summary,
643 body,
728 body,
644 icon_path,
729 icon_path,
@@ -674,7 +759,7 @@ class EphemeralNotificationsTests(NotificationsBase):
674 for new_body in bodies:
759 for new_body in bodies:
675 body = new_body
760 body = new_body
676 body_sum += '\n' + body
761 body_sum += '\n' + body
677− notification = self._create_ephemeral_notification(
762+ notification = shell.create_ephemeral_notification(
678 summary,
763 summary,
679 body,
764 body,
680 icon_path,
765 icon_path,
@@ -695,48 +780,3 @@ class EphemeralNotificationsTests(NotificationsBase):
695 False,
780 False,
696 1.0
781 1.0
697 )
782 )
698−
699− def _create_ephemeral_notification(
700− self,
701− summary="",
702− body="",
703− icon=None,
704− hints=[],
705− urgency="NORMAL"
706− ):
707− """Create an ephemeral (non-interactive) notification
708−
709− :param summary: Summary text for the notification
710− :param body: Body text to display in the notification
711− :param icon: Path string to the icon to use
712− :param hint_strings: List of tuples containing the 'name' and value
713− for setting the hint strings for the notification
714− :param urgency: Urgency string for the noticiation, either: 'LOW',
715− 'NORMAL', 'CRITICAL'
716−
717− """
718− logger.info(
719− "Creating ephemeral: summary(%s), body(%s), urgency(%r) "
720− "and Icon(%s)",
721− summary,
722− body,
723− urgency,
724− icon
725− )
726−
727− n = Notify.Notification.new(summary, body, icon)
728−
729− for hint in hints:
730− key, value = hint
731− n.set_hint_string(key, value)
732− logger.info("Adding hint to notification: (%s, %s)", key, value)
733− n.set_urgency(self._get_urgency(urgency))
734−
735− return n
736−
737− def _get_urgency(self, urgency):
738− """Translates urgency string to enum."""
739− _urgency_enums = {'LOW': Notify.Urgency.LOW,
740− 'NORMAL': Notify.Urgency.NORMAL,
741− 'CRITICAL': Notify.Urgency.CRITICAL}
742− return _urgency_enums.get(urgency.upper())
tests/autopilot/unity8/shell/tests/test_upstart.py+2−2
@@ -82,7 +82,7 @@ class UpstartIntegrationTests(UnityTestCase):
82 ))
82 ))
83
83
84 def test_no_sigstop(self):
84 def test_no_sigstop(self):
85− self.patch_environment("UPSTART_JOB", "foo")
85+ self.patch_environment("UNITY_MIR_EMITS_SIGSTOP", "")
86 self._launch_unity()
86 self._launch_unity()
87 self._set_proxy()
87 self._set_proxy()
88
88
@@ -91,7 +91,7 @@ class UpstartIntegrationTests(UnityTestCase):
91 logger.debug("Unity loaded and ready.")
91 logger.debug("Unity loaded and ready.")
92
92
93 def test_expect_sigstop(self):
93 def test_expect_sigstop(self):
94− self.patch_environment("UPSTART_JOB", "unity8")
94+ self.patch_environment("UNITY_MIR_EMITS_SIGSTOP", "1")
95 self._launch_unity()
95 self._launch_unity()
96 self.assertThat(lambda: os.WIFSTOPPED(self._get_status()), Eventually(Equals(True)), "Unity8 should raise SIGSTOP when ready")
96 self.assertThat(lambda: os.WIFSTOPPED(self._get_status()), Eventually(Equals(True)), "Unity8 should raise SIGSTOP when ready")
97
97
tests/mocks/AccountsService/CMakeLists.txt+1−12
@@ -7,15 +7,4 @@ add_library(MockAccountsService-qml MODULE
7
7
8qt5_use_modules(MockAccountsService-qml DBus Qml)
8qt5_use_modules(MockAccountsService-qml DBus Qml)
9
9
10−# copy files into build directory for shadow builds
11−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
12− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
13− )
14−
15−install(TARGETS MockAccountsService-qml
10+add_unity8_mock(AccountsService 0.1 AccountsService TARGETS MockAccountsService-qml)
16− DESTINATION ${SHELL_INSTALL_QML}/mocks/AccountsService
17− )
18−
19−install(FILES qmldir
20− DESTINATION ${SHELL_INSTALL_QML}/mocks/AccountsService
21− )
tests/mocks/AccountsService/qmldir+1
@@ -1,2 +1,3 @@
1module AccountsService
1module AccountsService
2plugin MockAccountsService-qml
2plugin MockAccountsService-qml
3+typeinfo AccountsService.qmltypes
tests/mocks/CMakeLists.txt+30
@@ -1,3 +1,33 @@
1+include(QmlPlugins)
2+
3+# Set up and optionally install a mock plugin for unity8.
4+#
5+# add_unity8_mock(plugin version path
6+# [PREFIX string] # Install the plugin to the specified prefix under unity8 private plugin directory
7+# [...] # See export_qmlfiles and export_qmlplugin documentation for more options
8+# )
9+
10+macro(add_unity8_mock PLUGIN VERSION PATH)
11+ set(single PREFIX)
12+ cmake_parse_arguments(MOCK "" "${single}" "" ${ARGN})
13+
14+ if(MOCK_PREFIX)
15+ export_qmlfiles(${PLUGIN} ${PATH}
16+ DESTINATION ${SHELL_INSTALL_QML}/${MOCK_PREFIX}
17+ TARGET_PREFIX ${MOCK_PREFIX}-Mock
18+ ${MOCK_UNPARSED_ARGUMENTS}
19+ )
20+ export_qmlplugin(${PLUGIN} ${VERSION} ${PATH}
21+ DESTINATION ${SHELL_INSTALL_QML}/${MOCK_PREFIX}
22+ TARGET_PREFIX ${MOCK_PREFIX}-Mock
23+ ${MOCK_UNPARSED_ARGUMENTS}
24+ )
25+ else()
26+ export_qmlfiles(${PLUGIN} ${PATH} TARGET_PREFIX Mock ${MOCK_UNPARSED_ARGUMENTS})
27+ export_qmlplugin(${PLUGIN} ${VERSION} ${PATH} TARGET_PREFIX Mock ${MOCK_UNPARSED_ARGUMENTS})
28+ endif()
29+endmacro()
30+
1add_subdirectory(AccountsService)
31add_subdirectory(AccountsService)
2add_subdirectory(GSettings.1.0)
32add_subdirectory(GSettings.1.0)
3add_subdirectory(HudClient)
33add_subdirectory(HudClient)
tests/mocks/GSettings.1.0/CMakeLists.txt+1−4
@@ -17,7 +17,4 @@ target_link_libraries(FakeGSettingsQml
17
17
18qt5_use_modules(FakeGSettingsQml Qml)
18qt5_use_modules(FakeGSettingsQml Qml)
19
19
20−# copy qmldir file into build directory for shadow builds
20+add_unity8_mock(GSettings 1.0 GSettings.1.0 TARGETS FakeGSettingsQml)
21−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
22− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
23− )
tests/mocks/GSettings.1.0/qmldir+1
@@ -1,2 +1,3 @@
1module GSettings
1module GSettings
2plugin FakeGSettingsQml
2plugin FakeGSettingsQml
3+typeinfo GSettings.qmltypes
tests/mocks/HudClient/CMakeLists.txt+1−4
@@ -35,7 +35,4 @@ target_link_libraries(FakeHudClientQml
35
35
36qt5_use_modules(FakeHudClientQml Qml)
36qt5_use_modules(FakeHudClientQml Qml)
37
37
38−# copy qmldir file into build directory for shadow builds
38+add_unity8_mock(HudClient 0.1 HudClient TARGETS FakeHudClientQml)
39−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
40− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
41− )
tests/mocks/HudClient/qmldir+2
@@ -1 +1,3 @@
1+module HudClient
1plugin FakeHudClientQml
2plugin FakeHudClientQml
3+typeinfo HudClient.qmltypes
tests/mocks/LightDM/CMakeLists.txt+5−12
@@ -43,15 +43,8 @@ target_link_libraries(MockLightDM-qml
43
43
44qt5_use_modules(MockLightDM-qml DBus Gui Qml)
44qt5_use_modules(MockLightDM-qml DBus Gui Qml)
45
45
46−# copy qmldir file into build directory for shadow builds
46+add_unity8_mock(LightDM 0.1 LightDM
47−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
47+ PREFIX mocks
48− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
49− )
50−
51−install(TARGETS MockLightDM-qml
48+ TARGETS MockLightDM-qml
52− DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM
49+ ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/full"
53− )
54−
55−install(FILES qmldir
56− DESTINATION ${SHELL_INSTALL_QML}/mocks/LightDM
57− )
50+)
tests/mocks/LightDM/qmldir+1
@@ -1,2 +1,3 @@
1module LightDM
1module LightDM
2plugin MockLightDM-qml
2plugin MockLightDM-qml
3+typeinfo LightDM.qmltypes
tests/mocks/Powerd/CMakeLists.txt+1−12
@@ -7,15 +7,4 @@ add_library(MockPowerd-qml MODULE
7
7
8qt5_use_modules(MockPowerd-qml Qml)
8qt5_use_modules(MockPowerd-qml Qml)
9
9
10−# copy qmldir file into build directory for shadow builds
11−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
12− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
13− )
14−
15−install(TARGETS MockPowerd-qml
10+add_unity8_mock(Powerd 0.1 Powerd TARGETS MockPowerd-qml)
16− DESTINATION ${SHELL_INSTALL_QML}/mocks/Powerd
17− )
18−
19−install(FILES qmldir
20− DESTINATION ${SHELL_INSTALL_QML}/mocks/Powerd
21− )
tests/mocks/Powerd/qmldir+1
@@ -1,2 +1,3 @@
1module Powerd
1module Powerd
2plugin MockPowerd-qml
2plugin MockPowerd-qml
3+typeinfo Powerd.qmltypes
tests/mocks/QMenuModel/CMakeLists.txt+2−12
@@ -1,15 +1,3 @@
1−file(GLOB QMLFILES
2− *.qml
3− *.js
4− qmldir
5−)
6−
7−# copy files into build directory for shadow builds
8−add_custom_target(QMenuModelQmlFiles ALL
9− COMMAND cp ${QMLFILES} ${CMAKE_CURRENT_BINARY_DIR}
10− DEPENDS ${QMLFILES}
11−)
12−
13include_directories(
1include_directories(
14 ${Qt5Core_INCLUDE_DIRS}
2 ${Qt5Core_INCLUDE_DIRS}
15 ${Qt5Quick_INCLUDE_DIRS}
3 ${Qt5Quick_INCLUDE_DIRS}
@@ -32,3 +20,5 @@ qt5_use_modules(QMenuModelQml Core Quick)
32set_target_properties(QMenuModelQml PROPERTIES
20set_target_properties(QMenuModelQml PROPERTIES
33 OUTPUT_NAME qmenumodel
21 OUTPUT_NAME qmenumodel
34 VERSION 0)
22 VERSION 0)
23+
24+add_unity8_mock(QMenuModel 0.1 QMenuModel TARGETS QMenuModelQml)
tests/mocks/QMenuModel/qmldir+1
@@ -1,5 +1,6 @@
1module QMenuModel
1module QMenuModel
2plugin qmenumodel
2plugin qmenumodel
3+typeinfo QMenuModel.qmltypes
3
4
4QDBusActionGroup 0.1 QDBusActionGroup.qml
5QDBusActionGroup 0.1 QDBusActionGroup.qml
5UnityMenuAction 0.1 UnityMenuAction.qml
6UnityMenuAction 0.1 UnityMenuAction.qml
tests/mocks/QtMultimedia/CMakeLists.txt+1−12
@@ -5,15 +5,4 @@ add_library(QtMultimedia-qml MODULE
5
5
6qt5_use_modules(QtMultimedia-qml Qml)
6qt5_use_modules(QtMultimedia-qml Qml)
7
7
8−# copy qmldir file into build directory for shadow builds
9−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
10− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
11− )
12−
13−install(TARGETS QtMultimedia-qml
8+add_unity8_mock(QtMultimedia 5.0 QtMultimedia TARGETS QtMultimedia-qml)
14− DESTINATION ${SHELL_INSTALL_QML}/mocks/QtMultimedia
15− )
16−
17−install(FILES qmldir
18− DESTINATION ${SHELL_INSTALL_QML}/mocks/QtMultimedia
19− )
tests/mocks/QtMultimedia/qmldir+1
@@ -1,2 +1,3 @@
1module QtMultimedia
1module QtMultimedia
2plugin QtMultimedia-qml
2plugin QtMultimedia-qml
3+typeinfo QtMultimedia.qmltypes
tests/mocks/Ubuntu/DownloadDaemonListener/CMakeLists.txt+1−9
@@ -7,12 +7,4 @@ add_library(FakeUbuntuDownloadDaemonListenerQml MODULE ${FakeUbuntuDownloadDaemo
7
7
8qt5_use_modules(FakeUbuntuDownloadDaemonListenerQml Core Quick)
8qt5_use_modules(FakeUbuntuDownloadDaemonListenerQml Core Quick)
9
9
10−# copy files into build directory for shadow builds
11−add_custom_target(UbuntuDownloadQmlDirFile ALL
12− COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/qmldir" ${CMAKE_CURRENT_BINARY_DIR}
13− DEPENDS qmldir
14−)
15−
16−install(TARGETS FakeUbuntuDownloadDaemonListenerQml
10+add_unity8_mock(Ubuntu.DownloadDaemonListener 0.1 Ubuntu/DownloadDaemonListener TARGETS FakeUbuntuDownloadDaemonListenerQml)
17− DESTINATION ${SHELL_INSTALL_QML}/mocks/Ubuntu/DownloadDaemonListener
18− )
tests/mocks/Ubuntu/DownloadDaemonListener/qmldir+1
@@ -1,2 +1,3 @@
1module Ubuntu.DownloadDaemonListener
1module Ubuntu.DownloadDaemonListener
2plugin FakeUbuntuDownloadDaemonListenerQml
2plugin FakeUbuntuDownloadDaemonListenerQml
3+typeinfo DownloadDaemonListener.qmltypes
tests/mocks/Ubuntu/Thumbnailer/CMakeLists.txt+1−7
@@ -1,7 +1 @@
1−# copy files into build directory for shadow builds
1+add_unity8_mock(Ubuntu.Thumbnailer 0.1 Ubuntu/Thumbnailer)
2−add_custom_target(UbuntuThumbnailerQmlDirFile ALL
3− COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/qmldir" ${CMAKE_CURRENT_BINARY_DIR}
4− DEPENDS qmldir
5−)
6−
7−install(FILES qmldir DESTINATION ${SHELL_INSTALL_QML}/mocks/Ubuntu/Thumbnailer)
tests/mocks/Ubuntu/Thumbnailer/qmldir+2
@@ -1,2 +1,4 @@
1module Ubuntu.Thumbnailer
1module Ubuntu.Thumbnailer
2+typeinfo Thumbnailer.qmltypes
3+
2Dummy 0.1 Dummy.qml
4Dummy 0.1 Dummy.qml
tests/mocks/Unity/Application/CMakeLists.txt+9−35
@@ -12,40 +12,14 @@ set(FakeUnityApplicationQml_SOURCES
12
12
13add_library(FakeUnityApplicationQml MODULE ${FakeUnityApplicationQml_SOURCES})
13add_library(FakeUnityApplicationQml MODULE ${FakeUnityApplicationQml_SOURCES})
14
14
15−qt5_use_modules(FakeUnityApplicationQml Core Quick)
15+add_library(NonMirUnityApplicationQml MODULE ${FakeUnityApplicationQml_SOURCES})
16−
16+set_target_properties(NonMirUnityApplicationQml PROPERTIES OUTPUT_NAME FakeUnityApplicationQml)
17−# copy files into build directory for shadow builds
18−add_custom_target(UnityAppQmlDirFile ALL
19− COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/qmldir" ${CMAKE_CURRENT_BINARY_DIR}
20− DEPENDS qmldir
21−)
22−add_custom_target(InputFilterAreaQmlFile ALL
23− COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/InputFilterArea.qml" ${CMAKE_CURRENT_BINARY_DIR}
24− DEPENDS InputFilterArea.qml
25−)
26−add_custom_target(OSKControllerQmlFile ALL
27− COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/OSKController.qml" ${CMAKE_CURRENT_BINARY_DIR}
28− DEPENDS OSKController.qml
29−)
30
17
31−install(TARGETS FakeUnityApplicationQml
18+qt5_use_modules(FakeUnityApplicationQml Core Quick)
32− DESTINATION ${SHELL_INSTALL_QML}/mocks/Unity/Application
19+qt5_use_modules(NonMirUnityApplicationQml Core Quick)
33− )
34−
35−install(FILES qmldir InputFilterArea.qml OSKController.qml
36− DESTINATION ${SHELL_INSTALL_QML}/mocks/Unity/Application
37− )
38−
39−# Duplicate the mock to nonmirplugins
40−# In shadow builds we just link it, in real installs we also install it to the other path
41−add_custom_target(OSKControllerQmlFile2 ALL
42− COMMAND mkdir -p ${CMAKE_BINARY_DIR}/nonmirplugins/Unity && rm -f ${CMAKE_BINARY_DIR}/nonmirplugins/Unity/Application && ln -s ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}/nonmirplugins/Unity
43− DEPENDS qmldir
44−)
45−install(TARGETS FakeUnityApplicationQml
46− DESTINATION ${SHELL_INSTALL_QML}/nonmirplugins/Unity/Application
47− )
48
20
49−install(FILES qmldir InputFilterArea.qml OSKController.qml
21+add_unity8_mock(Unity.Application 0.1 Unity/Application PREFIX mocks TARGETS FakeUnityApplicationQml)
50− DESTINATION ${SHELL_INSTALL_QML}/nonmirplugins/Unity/Application
22+add_unity8_mock(Unity.Application 0.1 Unity/Application
51− )
23+ PREFIX nonmirplugins
24+ TARGETS NonMirUnityApplicationQml
25+ BINARY_DIR ${CMAKE_BINARY_DIR}/nonmirplugins)
tests/mocks/Unity/Application/qmldir+2
@@ -1,4 +1,6 @@
1module Unity.Application
1module Unity.Application
2plugin FakeUnityApplicationQml
2plugin FakeUnityApplicationQml
3+typeinfo Application.qmltypes
4+
3InputFilterArea 0.1 InputFilterArea.qml
5InputFilterArea 0.1 InputFilterArea.qml
4OSKController 0.1 OSKController.qml
6OSKController 0.1 OSKController.qml
tests/mocks/Unity/CMakeLists.txt+9−12
@@ -6,6 +6,7 @@ add_subdirectory(Notifications)
6pkg_search_module(DEE dee-1.0 REQUIRED)
6pkg_search_module(DEE dee-1.0 REQUIRED)
7pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
7pkg_search_module(GOBJECT gobject-2.0 REQUIRED)
8pkg_search_module(DEEQT libdee-qt5 REQUIRED)
8pkg_search_module(DEEQT libdee-qt5 REQUIRED)
9+pkg_check_modules(SCOPES_API REQUIRED unity-shell-scopes=1)
9
10
10include_directories(
11include_directories(
11 ${CMAKE_CURRENT_BINARY_DIR}
12 ${CMAKE_CURRENT_BINARY_DIR}
@@ -27,6 +28,13 @@ set(UnityQML_SOURCES
27 fake_previewstack.cpp
28 fake_previewstack.cpp
28 fake_previewwidgetmodel.cpp
29 fake_previewwidgetmodel.cpp
29 fake_unity_plugin.cpp
30 fake_unity_plugin.cpp
31+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/CategoriesInterface.h
32+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/PreviewModelInterface.h
33+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/PreviewStackInterface.h
34+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/PreviewWidgetModelInterface.h
35+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/ResultsModelInterface.h
36+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/ScopeInterface.h
37+ ${SCOPES_API_INCLUDEDIR}/unity/shell/scopes/ScopesInterface.h
30)
38)
31
39
32add_library(FakeUnityQml MODULE ${UnityQML_SOURCES})
40add_library(FakeUnityQml MODULE ${UnityQML_SOURCES})
@@ -39,15 +47,4 @@ target_link_libraries(FakeUnityQml
39
47
40qt5_use_modules(FakeUnityQml Qml)
48qt5_use_modules(FakeUnityQml Qml)
41
49
42−# copy qmldir file into build directory for shadow builds
43−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
44− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
45− )
46−
47−install(TARGETS FakeUnityQml
50+add_unity8_mock(Unity 0.2 Unity PREFIX scopefakes TARGETS FakeUnityQml)
48− DESTINATION ${SHELL_INSTALL_QML}/scopefakes/Unity
49− )
50−
51−install(FILES qmldir
52− DESTINATION ${SHELL_INSTALL_QML}/scopefakes/Unity
53− )
tests/mocks/Unity/Indicators/CMakeLists.txt+1−14
@@ -37,17 +37,4 @@ target_link_libraries(IndicatorsFakeQml)
37
37
38qt5_use_modules(IndicatorsFakeQml Core Qml Quick)
38qt5_use_modules(IndicatorsFakeQml Core Qml Quick)
39
39
40−file(GLOB IndicatorsFake_QMLFILES
40+add_unity8_mock(Unity.Indicators 0.1 Unity/Indicators TARGETS IndicatorsFakeQml)
41− *.qml
42− qml/FakeMenuPage.qml
43−)
44−
45−# copy qmldir file into build directory for shadow builds
46−file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
47− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
48−)
49−
50−# copy qmldir file into build directory for shadow builds
51−file(COPY ${IndicatorsFake_QMLFILES}
52− DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
53−)
tests/mocks/Unity/Indicators/qml/FakeMenuPage.qml → tests/mocks/Unity/Indicators/FakeMenuPage.qmlrenamed

The content is the same.

tests/mocks/Unity/Indicators/qmldir+1
@@ -1,5 +1,6 @@
1module Unity.Indicators
1module Unity.Indicators
2plugin IndicatorsFakeQml
2plugin IndicatorsFakeQml
3+typeinfo Indicators.qmltypes
3
4
4CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
5CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
5IndicatorBase 0.1 IndicatorBase.qml
6IndicatorBase 0.1 IndicatorBase.qml
tests/mocks/Unity/Launcher/CMakeLists.txt+1−5
@@ -20,8 +20,4 @@ add_library(MockLauncherPlugin MODULE ${MockLauncherModel_SOURCES})
20
20
21qt5_use_modules(MockLauncherPlugin Core Quick)
21qt5_use_modules(MockLauncherPlugin Core Quick)
22
22
23−# copy files into build directory for shadow builds
23+add_unity8_mock(Unity.Launcher 0.1 Unity/Launcher TARGETS MockLauncherPlugin)
24−add_custom_target(LauncherPluginQmlDirFile ALL
25− COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/qmldir" ${CMAKE_CURRENT_BINARY_DIR}
26− DEPENDS qmldir
27−)
tests/mocks/Unity/Launcher/qmldir+1
@@ -1,2 +1,3 @@
1module Unity.Launcher
1module Unity.Launcher
2plugin MockLauncherPlugin
2plugin MockLauncherPlugin
3+typeinfo Launcher.qmltypes
tests/mocks/Unity/Notifications/CMakeLists.txt+1−11
@@ -1,11 +1 @@
1−file(GLOB QMLFILES
1+add_unity8_mock(Unity.Notifications 1.0 Unity/Notifications)
2− *.qml
3− *.js
4− qmldir
5−)
6−
7−# copy files into build directory for shadow builds
8−add_custom_target(NotificationsQmlFiles ALL
9− COMMAND cp ${QMLFILES} ${CMAKE_CURRENT_BINARY_DIR}
10− DEPENDS ${QMLFILES}
11−)
tests/mocks/Unity/Notifications/qmldir+1
@@ -1,2 +1,3 @@
1module Unity.Notifications
1module Unity.Notifications
2Notification 1.0 notification.js
2Notification 1.0 notification.js
3+typeinfo Notifications.qmltypes
tests/mocks/Unity/fake_categories.cpp+21−24
@@ -22,24 +22,9 @@
22#include "fake_resultsmodel.h"
22#include "fake_resultsmodel.h"
23
23
24Categories::Categories(int category_count, QObject* parent)
24Categories::Categories(int category_count, QObject* parent)
25− : QAbstractListModel(parent)
25+ : unity::shell::scopes::CategoriesInterface(parent)
26 , m_category_count(category_count)
26 , m_category_count(category_count)
27{
27{
28− m_roles[Categories::RoleCategoryId] = "categoryId";
29− m_roles[Categories::RoleName] = "name";
30− m_roles[Categories::RoleIcon] = "icon";
31− m_roles[Categories::RoleRawRendererTemplate] = "rawRendererTemplate";
32− m_roles[Categories::RoleRenderer] = "renderer";
33− m_roles[Categories::RoleComponents] = "components";
34− m_roles[Categories::RoleProgressSource] = "progressSource";
35− m_roles[Categories::RoleResults] = "results";
36− m_roles[Categories::RoleCount] = "count";
37−}
38−
39−QHash<int, QByteArray>
40−Categories::roleNames() const
41−{
42− return m_roles;
43}
28}
44
29
45int Categories::rowCount(const QModelIndex& /*parent*/) const
30int Categories::rowCount(const QModelIndex& /*parent*/) const
@@ -65,6 +50,11 @@ void Categories::addSpecialCategory(QString const& categoryId, QString const& na
65 }
50 }
66}
51}
67
52
53+bool Categories::overrideCategoryJson(QString const& categoryId, QString const& json)
54+{
55+ qFatal("Using un-implemented Categories::overrideCategoryJson");
56+}
57+
68void Categories::countChanged()
58void Categories::countChanged()
69{
59{
70 QObject* countObject = sender();
60 QObject* countObject = sender();
@@ -108,7 +98,12 @@ Categories::data(const QModelIndex& index, int role) const
108 case RoleRenderer:
98 case RoleRenderer:
109 {
99 {
110 QVariantMap map;
100 QVariantMap map;
111− map["category-layout"] = index.row() % 2 == 0 ? "grid" : "carousel";
101+ if (index.row() % 2 == 0) {
102+ map["category-layout"] = "grid";
103+ } else {
104+ map["category-layout"] = "carousel";
105+ map["overlay"] = true;
106+ }
112 map["card-size"] = "small";
107 map["card-size"] = "small";
113 return map;
108 return map;
114 }
109 }
@@ -121,9 +116,6 @@ Categories::data(const QModelIndex& index, int role) const
121 map["title"] = "HOLA";
116 map["title"] = "HOLA";
122 return map;
117 return map;
123 }
118 }
124− case RoleProgressSource:
125− qFatal("Using un-implemented RoleProgressSource Categories role");
126− return QVariant();
127 case RoleResults:
119 case RoleResults:
128 return QVariant();
120 return QVariant();
129 case RoleCount:
121 case RoleCount:
@@ -146,7 +138,14 @@ Categories::data(const QModelIndex& index, int role) const
146 case RoleRenderer:
138 case RoleRenderer:
147 {
139 {
148 QVariantMap map;
140 QVariantMap map;
149− map["category-layout"] = index.row() % 2 == 0 ? "grid" : "carousel";
141+ if (index.row() % 2 == 0) {
142+ map["category-layout"] = "grid";
143+ } else {
144+ map["category-layout"] = "carousel";
145+ map["card-size"] = "medium";
146+ map["collapsed-rows"] = 2;
147+ map["overlay"] = true;
148+ }
150 map["card-size"] = "small";
149 map["card-size"] = "small";
151 return map;
150 return map;
152 }
151 }
@@ -157,11 +156,9 @@ Categories::data(const QModelIndex& index, int role) const
157 artMap["field"] = "art";
156 artMap["field"] = "art";
158 map["art"] = artMap;
157 map["art"] = artMap;
159 map["title"] = "HOLA";
158 map["title"] = "HOLA";
159+ map["subtitle"] = "HOLA";
160 return map;
160 return map;
161 }
161 }
162− case RoleProgressSource:
163− qFatal("Using un-implemented RoleProgressSource Categories role");
164− return QVariant();
165 case RoleResults:
162 case RoleResults:
166 return QVariant::fromValue(resultsModel);
163 return QVariant::fromValue(resultsModel);
167 case RoleCount:
164 case RoleCount:
tests/mocks/Unity/fake_categories.h+5−18
@@ -17,44 +17,31 @@
17#ifndef FAKE_CATEGORIES_H
17#ifndef FAKE_CATEGORIES_H
18#define FAKE_CATEGORIES_H
18#define FAKE_CATEGORIES_H
19
19
20+#include <unity/shell/scopes/CategoriesInterface.h>
21+
20// Qt
22// Qt
21−#include <QAbstractListModel>
22#include <QList>
23#include <QList>
23
24
24class ResultsModel;
25class ResultsModel;
25
26
26−class Categories : public QAbstractListModel
27+class Categories : public unity::shell::scopes::CategoriesInterface
27{
28{
28 Q_OBJECT
29 Q_OBJECT
29
30
30− Q_ENUMS(Roles)
31−
32public:
31public:
33 Categories(int category_count, QObject* parent = 0);
32 Categories(int category_count, QObject* parent = 0);
34− enum Roles {
35− RoleCategoryId,
36− RoleName,
37− RoleIcon,
38− RoleRawRendererTemplate,
39− RoleRenderer,
40− RoleComponents,
41− RoleProgressSource, // maybe
42− RoleResults,
43− RoleCount
44− };
45
33
46 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
34 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
47− QHash<int, QByteArray> roleNames() const override;
48 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
35 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
49
36
50− Q_INVOKABLE void addSpecialCategory(QString const& categoryId, QString const& name, QString const& icon, QString const& rawTemplate, QObject* countObject);
37+ Q_INVOKABLE void addSpecialCategory(QString const& categoryId, QString const& name, QString const& icon, QString const& rawTemplate, QObject* countObject) override;
38+ Q_INVOKABLE bool overrideCategoryJson(QString const& categoryId, QString const& json) override;
51
39
52private Q_SLOTS:
40private Q_SLOTS:
53 void countChanged();
41 void countChanged();
54
42
55private:
43private:
56 mutable QHash<int, ResultsModel*> m_resultsModels;
44 mutable QHash<int, ResultsModel*> m_resultsModels;
57− QHash<int, QByteArray> m_roles;
58 int m_category_count;
45 int m_category_count;
59
46
60 struct CategoryData {
47 struct CategoryData {
tests/mocks/Unity/fake_previewmodel.cpp+2−15
@@ -27,22 +27,14 @@
27// Qt
27// Qt
28#include <QDebug>
28#include <QDebug>
29
29
30−PreviewModel::PreviewModel(QObject* parent) : QAbstractListModel(parent)
30+PreviewModel::PreviewModel(QObject* parent)
31+ : unity::shell::scopes::PreviewModelInterface(parent)
31{
32{
32 // we have one column by default
33 // we have one column by default
33 PreviewWidgetModel* columnModel = new PreviewWidgetModel(this);
34 PreviewWidgetModel* columnModel = new PreviewWidgetModel(this);
34 m_previewWidgetModels.append(columnModel);
35 m_previewWidgetModels.append(columnModel);
35}
36}
36
37
37−QHash<int, QByteArray> PreviewModel::roleNames() const
38−{
39− QHash<int, QByteArray> roles;
40−
41− roles[Roles::RoleColumnModel] = "columnModel";
42−
43− return roles;
44−}
45−
46void PreviewModel::setWidgetColumnCount(int count)
38void PreviewModel::setWidgetColumnCount(int count)
47{
39{
48 if (count != 1) {
40 if (count != 1) {
@@ -65,11 +57,6 @@ bool PreviewModel::processingAction() const
65 return false;
57 return false;
66}
58}
67
59
68−void PreviewModel::setProcessingAction(bool /*processing*/)
69−{
70− qFatal("PreviewModel::setProcessingAction not implemented");
71−}
72−
73int PreviewModel::rowCount(const QModelIndex&) const
60int PreviewModel::rowCount(const QModelIndex&) const
74{
61{
75 return m_previewWidgetModels.size();
62 return m_previewWidgetModels.size();
tests/mocks/Unity/fake_previewmodel.h+7−25
@@ -18,47 +18,29 @@
18#ifndef FAKE_PREVIEWMODEL_H
18#ifndef FAKE_PREVIEWMODEL_H
19#define FAKE_PREVIEWMODEL_H
19#define FAKE_PREVIEWMODEL_H
20
20
21−#include <QAbstractListModel>
21+#include <unity/shell/scopes/PreviewModelInterface.h>
22+
22#include <QSharedPointer>
23#include <QSharedPointer>
23#include <QVariantMap>
24#include <QVariantMap>
24
25
25class PreviewWidgetModel;
26class PreviewWidgetModel;
26
27
27−class PreviewModel : public QAbstractListModel
28+class PreviewModel : public unity::shell::scopes::PreviewModelInterface
28{
29{
29 Q_OBJECT
30 Q_OBJECT
30
31
31− Q_ENUMS(Roles)
32−
33− Q_PROPERTY(int widgetColumnCount READ widgetColumnCount WRITE setWidgetColumnCount NOTIFY widgetColumnCountChanged)
34− Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
35− Q_PROPERTY(bool processingAction READ processingAction NOTIFY processingActionChanged)
36−
37public:
32public:
38 explicit PreviewModel(QObject* parent = 0);
33 explicit PreviewModel(QObject* parent = 0);
39
34
40− enum Roles {
41− RoleColumnModel
42− };
43−
44 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
35 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
45− QHash<int, QByteArray> roleNames() const override;
46 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
36 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
47
37
48− void setWidgetColumnCount(int count);
38+ void setWidgetColumnCount(int count) override;
49− int widgetColumnCount() const;
39+ int widgetColumnCount() const override;
50− bool loaded() const;
40+ bool loaded() const override;
51− bool processingAction() const;
41+ bool processingAction() const override;
52− void setProcessingAction(bool processing);
53−
54−Q_SIGNALS:
55− void widgetColumnCountChanged();
56− void loadedChanged();
57− void processingActionChanged();
58− void triggered(QString const&, QString const&, QVariantMap const&);
59
42
60private:
43private:
61− QHash<int, QByteArray> m_roles;
62 QList<PreviewWidgetModel*> m_previewWidgetModels;
44 QList<PreviewWidgetModel*> m_previewWidgetModels;
63};
45};
64
46
tests/mocks/Unity/fake_previewstack.cpp+3−11
@@ -21,7 +21,8 @@
21#include "fake_previewmodel.h"
21#include "fake_previewmodel.h"
22#include "fake_scope.h"
22#include "fake_scope.h"
23
23
24−PreviewStack::PreviewStack(QObject* parent) : QAbstractListModel(parent)
24+PreviewStack::PreviewStack(QObject* parent)
25+ : unity::shell::scopes::PreviewStackInterface(parent)
25{
26{
26 m_previews << new PreviewModel(this);
27 m_previews << new PreviewModel(this);
27}
28}
@@ -30,15 +31,6 @@ PreviewStack::~PreviewStack()
30{
31{
31}
32}
32
33
33−QHash<int, QByteArray> PreviewStack::roleNames() const
34−{
35− QHash<int, QByteArray> roles;
36−
37− roles[Roles::RolePreviewModel] = "previewModel";
38−
39− return roles;
40−}
41−
42void PreviewStack::setWidgetColumnCount(int columnCount)
34void PreviewStack::setWidgetColumnCount(int columnCount)
43{
35{
44 if (columnCount != 1) {
36 if (columnCount != 1) {
@@ -56,7 +48,7 @@ int PreviewStack::rowCount(const QModelIndex&) const
56 return m_previews.size();
48 return m_previews.size();
57}
49}
58
50
59−PreviewModel* PreviewStack::get(int index) const
51+unity::shell::scopes::PreviewModelInterface* PreviewStack::getPreviewModel(int index) const
60{
52{
61 if (index >= m_previews.size()) {
53 if (index >= m_previews.size()) {
62 return nullptr;
54 return nullptr;
tests/mocks/Unity/fake_previewstack.h+6−17
@@ -18,39 +18,28 @@
18#ifndef FAKE_PREVIEWSTACK_H
18#ifndef FAKE_PREVIEWSTACK_H
19#define FAKE_PREVIEWSTACK_H
19#define FAKE_PREVIEWSTACK_H
20
20
21−#include <QAbstractListModel>
21+#include <unity/shell/scopes/PreviewStackInterface.h>
22+
22#include <QSharedPointer>
23#include <QSharedPointer>
23#include <QVariantMap>
24#include <QVariantMap>
24
25
25class PreviewModel;
26class PreviewModel;
26
27
27−class PreviewStack : public QAbstractListModel
28+class PreviewStack : public unity::shell::scopes::PreviewStackInterface
28{
29{
29 Q_OBJECT
30 Q_OBJECT
30
31
31− Q_ENUMS(Roles)
32−
33− Q_PROPERTY(int widgetColumnCount READ widgetColumnCount WRITE setWidgetColumnCount NOTIFY widgetColumnCountChanged)
34−
35public:
32public:
36 explicit PreviewStack(QObject* parent = 0);
33 explicit PreviewStack(QObject* parent = 0);
37 virtual ~PreviewStack();
34 virtual ~PreviewStack();
38
35
39− enum Roles {
40− RolePreviewModel
41− };
42−
43 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
36 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
44− QHash<int, QByteArray> roleNames() const override;
45 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
37 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
46
38
47− Q_INVOKABLE PreviewModel* get(int index) const;
39+ Q_INVOKABLE unity::shell::scopes::PreviewModelInterface* getPreviewModel(int index) const override;
48−
49− void setWidgetColumnCount(int columnCount);
50− int widgetColumnCount() const;
51
40
52−Q_SIGNALS:
41+ void setWidgetColumnCount(int columnCount) override;
53− void widgetColumnCountChanged();
42+ int widgetColumnCount() const override;
54
43
55private:
44private:
56 QList<PreviewModel*> m_previews;
45 QList<PreviewModel*> m_previews;
tests/mocks/Unity/fake_previewwidgetmodel.cpp+2−10
@@ -35,12 +35,9 @@ struct PreviewData
35 }
35 }
36};
36};
37
37
38−PreviewWidgetModel::PreviewWidgetModel(QObject* parent) : QAbstractListModel(parent)
38+PreviewWidgetModel::PreviewWidgetModel(QObject* parent)
39+ : unity::shell::scopes::PreviewWidgetModelInterface(parent)
39{
40{
40− m_roles[Roles::RoleWidgetId] = "widgetId";
41− m_roles[Roles::RoleType] = "type";
42− m_roles[Roles::RoleProperties] = "properties";
43−
44 populateWidgets();
41 populateWidgets();
45}
42}
46
43
@@ -60,11 +57,6 @@ void PreviewWidgetModel::populateWidgets()
60
57
61}
58}
62
59
63−QHash<int, QByteArray> PreviewWidgetModel::roleNames() const
64−{
65− return m_roles;
66−}
67−
68int PreviewWidgetModel::rowCount(const QModelIndex&) const
60int PreviewWidgetModel::rowCount(const QModelIndex&) const
69{
61{
70 return m_previewWidgets.size();
62 return m_previewWidgets.size();
tests/mocks/Unity/fake_previewwidgetmodel.h+3−12
@@ -18,33 +18,24 @@
18#ifndef FAKE_PREVIEWWIDGETMODEL_H
18#ifndef FAKE_PREVIEWWIDGETMODEL_H
19#define FAKE_PREVIEWWIDGETMODEL_H
19#define FAKE_PREVIEWWIDGETMODEL_H
20
20
21−#include <QAbstractListModel>
21+#include <unity/shell/scopes/PreviewWidgetModelInterface.h>
22+
22#include <QSharedPointer>
23#include <QSharedPointer>
23#include <QVariantMap>
24#include <QVariantMap>
24
25
25class PreviewData;
26class PreviewData;
26
27
27−class PreviewWidgetModel : public QAbstractListModel
28+class PreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface
28{
29{
29 Q_OBJECT
30 Q_OBJECT
30
31
31− Q_ENUMS(Roles)
32−
33public:
32public:
34 explicit PreviewWidgetModel(QObject* parent = 0);
33 explicit PreviewWidgetModel(QObject* parent = 0);
35
34
36− enum Roles {
37− RoleWidgetId,
38− RoleType,
39− RoleProperties
40− };
41−
42 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
35 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
43− QHash<int, QByteArray> roleNames() const override;
44 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
36 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
45
37
46private:
38private:
47− QHash<int, QByteArray> m_roles;
48 QList<QSharedPointer<PreviewData>> m_previewWidgets;
39 QList<QSharedPointer<PreviewData>> m_previewWidgets;
49
40
50 void populateWidgets();
41 void populateWidgets();
tests/mocks/Unity/fake_resultsmodel.cpp+2−44
@@ -23,25 +23,10 @@
23#include <paths.h>
23#include <paths.h>
24
24
25ResultsModel::ResultsModel(int result_count, int categoryId, QObject* parent)
25ResultsModel::ResultsModel(int result_count, int categoryId, QObject* parent)
26− : QAbstractListModel(parent)
26+ : unity::shell::scopes::ResultsModelInterface(parent)
27 , m_result_count(result_count)
27 , m_result_count(result_count)
28 , m_categoryId(categoryId)
28 , m_categoryId(categoryId)
29{
29{
30− m_roles[ResultsModel::RoleUri] = "uri";
31− m_roles[ResultsModel::RoleCategoryId] = "categoryId";
32− m_roles[ResultsModel::RoleDndUri] = "dndUri";
33− m_roles[ResultsModel::RoleResult] = "result";
34− m_roles[ResultsModel::RoleTitle] = "title";
35− m_roles[ResultsModel::RoleArt] = "art";
36− m_roles[ResultsModel::RoleSubtitle] = "subtitle";
37− m_roles[ResultsModel::RoleMascot] = "mascot";
38− m_roles[ResultsModel::RoleEmblem] = "emblem";
39− m_roles[ResultsModel::RoleOldPrice] = "oldPrice";
40− m_roles[ResultsModel::RolePrice] = "price";
41− m_roles[ResultsModel::RoleAltPrice] = "altPrice";
42− m_roles[ResultsModel::RoleRating] = "rating";
43− m_roles[ResultsModel::RoleAltRating] = "altRating";
44− m_roles[ResultsModel::RoleSummary] = "summary";
45}
30}
46
31
47QString ResultsModel::categoryId() const
32QString ResultsModel::categoryId() const
@@ -54,12 +39,6 @@ void ResultsModel::setCategoryId(QString const& /*id*/)
54 qFatal("Calling un-implemented ResultsModel::setCategoryId");
39 qFatal("Calling un-implemented ResultsModel::setCategoryId");
55}
40}
56
41
57−QHash<int, QByteArray>
58−ResultsModel::roleNames() const
59−{
60− return m_roles;
61−}
62−
63int ResultsModel::rowCount(const QModelIndex& parent) const
42int ResultsModel::rowCount(const QModelIndex& parent) const
64{
43{
65 Q_UNUSED(parent);
44 Q_UNUSED(parent);
@@ -72,23 +51,6 @@ int ResultsModel::count() const
72 return rowCount();
51 return rowCount();
73}
52}
74
53
75−QVariant ResultsModel::get(int row) const
76−{
77− if (row >= m_result_count || row < 0) return QVariantMap();
78−
79− QVariantMap result;
80− QModelIndex modelIndex(index(row));
81− QHashIterator<int, QByteArray> it(roleNames());
82− while (it.hasNext()) {
83− it.next();
84− QVariant val(data(modelIndex, it.key()));
85− if (val.isNull()) continue;
86− result[it.value()] = val;
87− }
88−
89− return result;
90−}
91−
92QVariant
54QVariant
93ResultsModel::data(const QModelIndex& index, int role) const
55ResultsModel::data(const QModelIndex& index, int role) const
94{
56{
@@ -103,13 +65,9 @@ ResultsModel::data(const QModelIndex& index, int role) const
103 case RoleArt:
65 case RoleArt:
104 return qmlDirectory() + "graphics/applicationIcons/dash.png";
66 return qmlDirectory() + "graphics/applicationIcons/dash.png";
105 case RoleSubtitle:
67 case RoleSubtitle:
68+ return QString("Subtitle.%1.%2").arg(m_categoryId).arg(index.row());
106 case RoleMascot:
69 case RoleMascot:
107 case RoleEmblem:
70 case RoleEmblem:
108− case RoleOldPrice:
109− case RolePrice:
110− case RoleAltPrice:
111− case RoleRating:
112− case RoleAltRating:
113 case RoleSummary:
71 case RoleSummary:
114 default:
72 default:
115 return QVariant();
73 return QVariant();
tests/mocks/Unity/fake_resultsmodel.h+5−37
@@ -21,58 +21,26 @@
21#ifndef FAKE_RESULTS_MODEL_H
21#ifndef FAKE_RESULTS_MODEL_H
22#define FAKE_RESULTS_MODEL_H
22#define FAKE_RESULTS_MODEL_H
23
23
24−#include <QAbstractListModel>
24+#include <unity/shell/scopes/ResultsModelInterface.h>
25
25
26−class ResultsModel : public QAbstractListModel
26+class ResultsModel : public unity::shell::scopes::ResultsModelInterface
27{
27{
28 Q_OBJECT
28 Q_OBJECT
29
29
30− Q_ENUMS(Roles)
31−
32− Q_PROPERTY(QString categoryId READ categoryId WRITE setCategoryId NOTIFY categoryIdChanged)
33− Q_PROPERTY(int count READ count NOTIFY countChanged)
34−
35public:
30public:
36 explicit ResultsModel(int result_count, int categoryId, QObject* parent = 0);
31 explicit ResultsModel(int result_count, int categoryId, QObject* parent = 0);
37
32
38− enum Roles {
39− RoleUri,
40− RoleCategoryId,
41− RoleDndUri,
42− RoleResult,
43− // card components
44− RoleTitle,
45− RoleArt,
46− RoleSubtitle,
47− RoleMascot,
48− RoleEmblem,
49− RoleOldPrice,
50− RolePrice,
51− RoleAltPrice,
52− RoleRating,
53− RoleAltRating,
54− RoleSummary
55− };
56−
57 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
33 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
58− QHash<int, QByteArray> roleNames() const override;
59 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
34 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
60
35
61− Q_INVOKABLE QVariant get(int row) const;
62−
63 /* getters */
36 /* getters */
64− QString categoryId() const;
37+ QString categoryId() const override;
65− int count() const;
38+ int count() const override;
66
39
67 /* setters */
40 /* setters */
68− void setCategoryId(QString const& id);
41+ void setCategoryId(QString const& id) override;
69−
70−Q_SIGNALS:
71− void categoryIdChanged();
72− void countChanged();
73
42
74private:
43private:
75− QHash<int, QByteArray> m_roles;
76 int m_result_count;
44 int m_result_count;
77 int m_categoryId;
45 int m_categoryId;
78};
46};
tests/mocks/Unity/fake_scope.cpp+3−14
@@ -22,7 +22,7 @@ Scope::Scope(QObject* parent) : Scope(QString(), QString(), false, parent)
22}
22}
23
23
24Scope::Scope(QString const& id, QString const& name, bool visible, QObject* parent)
24Scope::Scope(QString const& id, QString const& name, bool visible, QObject* parent)
25− : QObject(parent)
25+ : unity::shell::scopes::ScopeInterface(parent)
26 , m_id(id)
26 , m_id(id)
27 , m_name(name)
27 , m_name(name)
28 , m_visible(visible)
28 , m_visible(visible)
@@ -61,15 +61,11 @@ QString Scope::shortcut() const {
61 return QString("");
61 return QString("");
62}
62}
63
63
64−bool Scope::connected() const {
65− return true;
66−}
67−
68bool Scope::searchInProgress() const {
64bool Scope::searchInProgress() const {
69 return m_searching;
65 return m_searching;
70}
66}
71
67
72−Categories* Scope::categories() const {
68+unity::shell::scopes::CategoriesInterface* Scope::categories() const {
73 return m_categories;
69 return m_categories;
74}
70}
75
71
@@ -89,13 +85,6 @@ bool Scope::isActive() const {
89 return m_isActive;
85 return m_isActive;
90}
86}
91
87
92−void Scope::setName(const QString &str) {
93− if (str != m_name) {
94− m_name = str;
95− Q_EMIT nameChanged(m_name);
96− }
97−}
98−
99void Scope::setSearchQuery(const QString &str) {
88void Scope::setSearchQuery(const QString &str) {
100 if (str != m_searchQuery) {
89 if (str != m_searchQuery) {
101 m_searchQuery = str;
90 m_searchQuery = str;
@@ -149,7 +138,7 @@ void Scope::cancelActivation()
149{
138{
150}
139}
151
140
152−void Scope::closeScope(Scope* /*scope*/)
141+void Scope::closeScope(unity::shell::scopes::ScopeInterface* /*scope*/)
153{
142{
154 qFatal("Scope::closeScope is not implemented");
143 qFatal("Scope::closeScope is not implemented");
155}
144}
tests/mocks/Unity/fake_scope.h+26−72
@@ -17,93 +17,47 @@
17#ifndef FAKE_SCOPE_H
17#ifndef FAKE_SCOPE_H
18#define FAKE_SCOPE_H
18#define FAKE_SCOPE_H
19
19
20+#include <unity/shell/scopes/ScopeInterface.h>
21+
20#include "fake_categories.h"
22#include "fake_categories.h"
21#include "fake_previewstack.h"
23#include "fake_previewstack.h"
22
24
23−#include <QObject>
24#include <QTimer>
25#include <QTimer>
25
26
26−class Preview;
27+class Scope : public unity::shell::scopes::ScopeInterface
27−
28−class Scope : public QObject
29{
28{
30 Q_OBJECT
29 Q_OBJECT
31
30
32− Q_PROPERTY(QString id READ id NOTIFY idChanged)
33− Q_PROPERTY(QString name READ name NOTIFY nameChanged)
34− Q_PROPERTY(QString iconHint READ iconHint NOTIFY iconHintChanged)
35− Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
36− Q_PROPERTY(QString searchHint READ searchHint NOTIFY searchHintChanged)
37− Q_PROPERTY(bool searchInProgress READ searchInProgress WRITE setSearchInProgress NOTIFY searchInProgressChanged)
38− Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged)
39− Q_PROPERTY(QString shortcut READ shortcut NOTIFY shortcutChanged)
40− Q_PROPERTY(Categories* categories READ categories NOTIFY categoriesChanged)
41− //Q_PROPERTY(Filters* filters READ filters NOTIFY filtersChanged)
42−
43− Q_PROPERTY(QString searchQuery READ searchQuery WRITE setSearchQuery NOTIFY searchQueryChanged)
44− Q_PROPERTY(QString noResultsHint READ noResultsHint WRITE setNoResultsHint NOTIFY noResultsHintChanged)
45− Q_PROPERTY(QString formFactor READ formFactor WRITE setFormFactor NOTIFY formFactorChanged)
46− Q_PROPERTY(bool isActive READ isActive WRITE setActive NOTIFY isActiveChanged)
47−
48public:
31public:
49 Scope(QObject* parent = 0);
32 Scope(QObject* parent = 0);
50 Scope(QString const& id, QString const& name, bool visible, QObject* parent = 0);
33 Scope(QString const& id, QString const& name, bool visible, QObject* parent = 0);
51
34
52 /* getters */
35 /* getters */
53− QString id() const;
36+ QString id() const override;
54− QString name() const;
37+ QString name() const override;
55− QString iconHint() const;
38+ QString iconHint() const override;
56− QString description() const;
39+ QString description() const override;
57− QString searchHint() const;
40+ QString searchHint() const override;
58− bool visible() const;
41+ bool visible() const override;
59− QString shortcut() const;
42+ QString shortcut() const override;
60− bool connected() const;
61− bool searchInProgress() const;
43+ bool searchInProgress() const override;
62− Categories* categories() const;
44+ unity::shell::scopes::CategoriesInterface* categories() const override;
63− QString searchQuery() const;
45+ QString searchQuery() const override;
64− QString noResultsHint() const;
46+ QString noResultsHint() const override;
65− QString formFactor() const;
47+ QString formFactor() const override;
66− bool isActive() const;
48+ bool isActive() const override;
67
49
68 /* setters */
50 /* setters */
69− void setName(const QString& name);
70− void setSearchQuery(const QString& search_query);
51+ void setSearchQuery(const QString& search_query) override;
71− void setNoResultsHint(const QString& hint);
52+ void setNoResultsHint(const QString& hint) override;
72− void setFormFactor(const QString& form_factor);
53+ void setFormFactor(const QString& form_factor) override;
73− void setActive(const bool);
54+ void setActive(const bool) override;
74− void setSearchInProgress(const bool inProg);
55+ Q_INVOKABLE void setSearchInProgress(const bool inProg); // This is not invokable in the Interface, here for testing benefits
75−
56+
76− Q_INVOKABLE void activate(QVariant const& result);
57+ Q_INVOKABLE void activate(QVariant const& result) override;
77− Q_INVOKABLE PreviewStack* preview(QVariant const& result);
58+ Q_INVOKABLE PreviewStack* preview(QVariant const& result) override;
78− Q_INVOKABLE void cancelActivation();
59+ Q_INVOKABLE void cancelActivation() override;
79− Q_INVOKABLE void closeScope(Scope* scope);
60+ Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;
80−
81−Q_SIGNALS:
82− void idChanged();
83− void nameChanged(const QString&);
84− void iconHintChanged(const QString&);
85− void descriptionChanged(const QString&);
86− void searchHintChanged(const QString&);
87− void searchInProgressChanged();
88− void visibleChanged(bool);
89− void shortcutChanged(const QString&);
90− void categoriesChanged();
91− //void filtersChanged();
92− void searchQueryChanged();
93− void noResultsHintChanged();
94− void formFactorChanged();
95− void isActiveChanged(bool);
96−
97− // signals triggered by activate(..) or preview(..) requests.
98− void showDash();
99− void hideDash();
100− void gotoUri(const QString &uri);
101− void activated();
102− void previewRequested(QVariant const& result);
103− void gotoScope(QString const& scopeId);
104− void openScope(Scope* scope);
105−
106− void activateApplication(const QString &desktop);
107
61
108protected:
62protected:
109
63
tests/mocks/Unity/fake_scopes.cpp+11−22
@@ -25,15 +25,10 @@
25#include <QTimer>
25#include <QTimer>
26
26
27Scopes::Scopes(QObject *parent)
27Scopes::Scopes(QObject *parent)
28−: QAbstractListModel(parent)
28+ : unity::shell::scopes::ScopesInterface(parent)
29−, m_loaded(false)
29+ , m_loaded(false)
30−, timer(this)
30+ , timer(this)
31{
31{
32− m_roles[Scopes::RoleScope] = "scope";
33− m_roles[Scopes::RoleId] = "id";
34− m_roles[Scopes::RoleVisible] = "visible";
35− m_roles[Scopes::RoleTitle] = "title";
36−
37 QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
32 QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
38 QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
33 QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), this, SIGNAL(countChanged()));
39 QObject::connect(this, SIGNAL(modelReset()), this, SIGNAL(countChanged()));
34 QObject::connect(this, SIGNAL(modelReset()), this, SIGNAL(countChanged()));
@@ -83,11 +78,6 @@ void Scopes::load()
83 timer.start();
78 timer.start();
84}
79}
85
80
86−QHash<int, QByteArray> Scopes::roleNames() const
87−{
88− return m_roles;
89−}
90−
91int Scopes::rowCount(const QModelIndex&) const
81int Scopes::rowCount(const QModelIndex&) const
92{
82{
93 return m_scopes.count();
83 return m_scopes.count();
@@ -114,14 +104,18 @@ QVariant Scopes::data(const QModelIndex& index, int role) const
114 }
104 }
115}
105}
116
106
117−QVariant Scopes::get(int row) const
107+unity::shell::scopes::ScopeInterface* Scopes::getScope(int row) const
118{
108{
119− return data(QAbstractListModel::index(row), 0);
109+ if (row < 0 || row >= m_scopes.size()) {
110+ return nullptr;
111+ }
112+
113+ return m_scopes[row];
120}
114}
121
115
122−QVariant Scopes::get(QString const&) const
116+unity::shell::scopes::ScopeInterface* Scopes::getScope(QString const&) const
123{
117{
124− return QVariant();
118+ return nullptr;
125}
119}
126
120
127QModelIndex Scopes::parent(const QModelIndex&) const
121QModelIndex Scopes::parent(const QModelIndex&) const
@@ -134,11 +128,6 @@ bool Scopes::loaded() const
134 return m_loaded;
128 return m_loaded;
135}
129}
136
130
137−int Scopes::count() const
138−{
139− return rowCount();
140−}
141−
142void Scopes::addScope(Scope* scope)
131void Scopes::addScope(Scope* scope)
143{
132{
144 int index = rowCount();
133 int index = rowCount();
tests/mocks/Unity/fake_scopes.h+7−24
@@ -19,36 +19,27 @@
19#ifndef FAKE_SCOPES_H
19#ifndef FAKE_SCOPES_H
20#define FAKE_SCOPES_H
20#define FAKE_SCOPES_H
21
21
22+#include <unity/shell/scopes/ScopesInterface.h>
23+
22// Local
24// Local
23#include "fake_scope.h"
25#include "fake_scope.h"
24
26
25// Qt
27// Qt
26−#include <QAbstractListModel>
27#include <QList>
28#include <QList>
28#include <QTimer>
29#include <QTimer>
29
30
30−class Scopes : public QAbstractListModel
31+class Scopes : public unity::shell::scopes::ScopesInterface
31{
32{
32 Q_OBJECT
33 Q_OBJECT
33− Q_ENUMS(Roles)
34− Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
35− Q_PROPERTY(int count READ count NOTIFY countChanged)
36
34
37public:
35public:
38 explicit Scopes(QObject *parent = 0);
36 explicit Scopes(QObject *parent = 0);
39 ~Scopes();
37 ~Scopes();
40
38
41− enum Roles {
42− RoleScope,
43− RoleId,
44− RoleVisible,
45− RoleTitle
46− };
47−
48− Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const;
39+ Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const override;
49
40
50− Q_INVOKABLE QVariant get(int row) const;
41+ Q_INVOKABLE unity::shell::scopes::ScopeInterface* getScope(int row) const override;
51− Q_INVOKABLE QVariant get(const QString& scope_id) const;
42+ Q_INVOKABLE unity::shell::scopes::ScopeInterface* getScope(const QString& scope_id) const override;
52
43
53 Q_INVOKABLE void addScope(Scope* scope);
44 Q_INVOKABLE void addScope(Scope* scope);
54
45
@@ -56,23 +47,15 @@ public:
56 Q_INVOKABLE void load();
47 Q_INVOKABLE void load();
57
48
58 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
49 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
59− QHash<int, QByteArray> roleNames() const;
60 QModelIndex parent ( const QModelIndex & index ) const;
50 QModelIndex parent ( const QModelIndex & index ) const;
61
51
62− bool loaded() const;
52+ bool loaded() const override;
63− int count() const;
64−
65−Q_SIGNALS:
66− void activateScopeRequested(const QString& scope_id);
67− void loadedChanged(bool);
68− void countChanged();
69
53
70private Q_SLOTS:
54private Q_SLOTS:
71 void updateScopes();
55 void updateScopes();
72
56
73private:
57private:
74 QList<Scope*> m_scopes;
58 QList<Scope*> m_scopes;
75− QHash<int, QByteArray> m_roles;
76 bool m_loaded;
59 bool m_loaded;
77 QTimer timer;
60 QTimer timer;
78};
61};
tests/mocks/Unity/fake_unity_plugin.cpp+3−2
@@ -40,8 +40,9 @@ void FakeUnityPlugin::registerTypes(const char *uri)
40 Q_ASSERT(uri == QLatin1String("Unity"));
40 Q_ASSERT(uri == QLatin1String("Unity"));
41
41
42 qmlRegisterType<Scopes>(uri, 0, 2, "Scopes");
42 qmlRegisterType<Scopes>(uri, 0, 2, "Scopes");
43− qmlRegisterType<Scope>(uri, 0, 2, "Scope");
43+ qmlRegisterType<Scope>(uri, 0, 2, "MockScope");
44+ qmlRegisterUncreatableType<unity::shell::scopes::ScopeInterface>(uri, 0, 2, "Scope", "Can't create Scope object in QML.");
44− qmlRegisterUncreatableType<Categories>(uri, 0, 2, "Categories", "Can't create Categories object in QML.");
45+ qmlRegisterUncreatableType<unity::shell::scopes::CategoriesInterface>(uri, 0, 2, "Categories", "Can't create Categories object in QML.");
45 qmlRegisterUncreatableType<ResultsModel>(uri, 0, 2, "ResultsModel", "Can't create ResultsModel object in QML.");
46 qmlRegisterUncreatableType<ResultsModel>(uri, 0, 2, "ResultsModel", "Can't create ResultsModel object in QML.");
46 qmlRegisterType<PreviewModel>(uri, 0, 2, "FakePreviewModel");
47 qmlRegisterType<PreviewModel>(uri, 0, 2, "FakePreviewModel");
47 qmlRegisterUncreatableType<PreviewWidgetModel>(uri, 0, 2, "PreviewWidgetModel", "Can't create new PreviewWidgetModel in QML. Get them from PreviewModel instance.");
48 qmlRegisterUncreatableType<PreviewWidgetModel>(uri, 0, 2, "PreviewWidgetModel", "Can't create new PreviewWidgetModel in QML. Get them from PreviewModel instance.");
tests/mocks/Unity/qmldir+1
@@ -1,2 +1,3 @@
1module Unity
1module Unity
2plugin FakeUnityQml
2plugin FakeUnityQml
3+typeinfo Unity.qmltypes
tests/plugins/CMakeLists.txt+1−1
@@ -1,6 +1,6 @@
1add_subdirectory(AccountsService)
1add_subdirectory(AccountsService)
2add_subdirectory(LightDM)
2add_subdirectory(LightDM)
3−add_subdirectory(DashViews)
3+add_subdirectory(Dash)
4add_subdirectory(Ubuntu)
4add_subdirectory(Ubuntu)
5add_subdirectory(Unity)
5add_subdirectory(Unity)
6add_subdirectory(Utils)
6add_subdirectory(Utils)
tests/plugins/Dash/CMakeLists.txtnew file+79
@@ -0,0 +1,79 @@
1+# add_qml_test macro
2+include(QmlTest)
3+
4+# There's no cmake var for v8 include path :-/
5+# so create one
6+LIST(GET Qt5Core_INCLUDE_DIRS 0 QtCoreDir0)
7+if(${Qt5Core_VERSION_STRING} VERSION_LESS "5.1.0")
8+ SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/../QtV8/${Qt5Core_VERSION_STRING}/QtV8)
9+else()
10+ SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/QtV8/${Qt5Core_VERSION_STRING}/QtV8)
11+endif()
12+
13+
14+include_directories(
15+ ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
16+ ${Qt5Quick_INCLUDE_DIRS}
17+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
18+ ${Qt5V8_PRIVATE_INCLUDE_DIR}
19+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash
20+ ${CMAKE_CURRENT_BINARY_DIR}
21+ )
22+
23+remove_definitions(-DQT_NO_KEYWORDS)
24+
25+add_definitions(-DDASHVIEWSTEST_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
26+add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
27+
28+macro(add_lvwph_test FILENAME TESTNAME)
29+ add_executable(${TESTNAME}TestExec
30+ ${FILENAME}test.cpp
31+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/listviewwithpageheader.cpp)
32+ qt5_use_modules(${TESTNAME}TestExec Test Core Qml)
33+ target_link_libraries(${TESTNAME}TestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
34+
35+ add_binary_qml_test(${TESTNAME} "" "Dash-qml")
36+endmacro()
37+
38+add_lvwph_test(listviewwithpageheader ListViewWithPageHeader)
39+add_lvwph_test(listviewwithpageheadersection ListViewWithPageHeaderSection)
40+add_lvwph_test(listviewwithpageheadersectionexternalmodel ListViewWithPageHeaderSectionExternalModel)
41+
42+macro(add_dashview_try_test FILENAME TESTNAME)
43+ add_executable(${TESTNAME}TestExec
44+ ${FILENAME}test.cpp
45+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/${FILENAME}.cpp
46+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/abstractdashview.cpp
47+ )
48+ qt5_use_modules(${TESTNAME}TestExec Test Core Qml)
49+ target_link_libraries(${TESTNAME}TestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
50+
51+ add_binary_qml_test(${TESTNAME} "" "Dash-qml")
52+
53+ add_executable(${TESTNAME}tryExec
54+ ${FILENAME}try.cpp
55+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/${FILENAME}.cpp
56+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/Dash/abstractdashview.cpp
57+ )
58+ qt5_use_modules(${TESTNAME}tryExec Test Core Qml)
59+ target_link_libraries(${TESTNAME}tryExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
60+ add_custom_target(try${TESTNAME}
61+ ${CMAKE_CURRENT_BINARY_DIR}/${TESTNAME}tryExec
62+ DEPENDS ${TESTNAME}tryExec Dash-qml
63+ )
64+endmacro()
65+
66+add_dashview_try_test(verticaljournal VerticalJournal)
67+add_dashview_try_test(horizontaljournal HorizontalJournal)
68+add_dashview_try_test(organicgrid OrganicGrid)
69+
70+# CardCreator test
71+add_executable(CardCreatorTestExec cardcreatortest.cpp)
72+qt5_use_modules(CardCreatorTestExec Test Core Qml)
73+target_link_libraries(CardCreatorTestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
74+add_binary_qml_test(CardCreator "" "Dash-qml")
75+
76+# plain qml test
77+set(qmltest_DEFAULT_TARGETS qmluitests)
78+set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
79+add_qml_test(. ListViewWithPageHeaderQML IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
tests/plugins/Dash/cardcreator/1.resnew file+79
@@ -0,0 +1,79 @@
1+AbstractButton {
2+ id: root;
3+ property var template;
4+ property var components;
5+ property var cardData;
6+ property var artShapeBorderSource;
7+ property real fontScale: 1.0;
8+ property int headerAlignment: Text.AlignLeft;
9+ property int fixedHeaderHeight: -1;
10+ property size fixedArtShapeSize: Qt.size(-1, -1);
11+ readonly property string title: cardData && cardData["title"] || "";
12+ property bool asynchronous: true;
13+ property bool showHeader: true;
14+ implicitWidth: childrenRect.width;
15+readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
16+Item {
17+ id: artShapeHolder;
18+ height: root.fixedArtShapeSize.height != -1 ? root.fixedArtShapeSize.height : artShapeLoader.height;
19+ width: root.fixedArtShapeSize.width != -1 ? root.fixedArtShapeSize.width : artShapeLoader.width;
20+ anchors { horizontalCenter: parent.horizontalCenter; }
21+ Loader {
22+ id: artShapeLoader;
23+ objectName: "artShapeLoader";
24+ active: cardData && cardData["art"] || false;
25+ asynchronous: root.asynchronous;
26+ visible: status == Loader.Ready;
27+ sourceComponent: UbuntuShape {
28+ id: artShape;
29+ objectName: "artShape";
30+ radius: "medium";
31+ readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1;
32+ readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
33+ Component.onCompleted: updateWidthHeightBindings();
34+ onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
35+ visible: image.status == Image.Ready;
36+ borderSource: artShapeBorderSource;
37+ function updateWidthHeightBindings() {
38+ if (aspectSmallerThanImageAspect) {
39+ width = Qt.binding(function() { return !visible ? 0 : image.width });
40+ height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect });
41+ } else {
42+ width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
43+ height = Qt.binding(function() { return !visible ? 0 : image.height });
44+ }
45+ }
46+ image: Image {
47+ objectName: "artImage";
48+ source: cardData && cardData["art"] || "";
49+ cache: true;
50+ asynchronous: root.asynchronous;
51+ fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
52+ readonly property real aspect: implicitWidth / implicitHeight;
53+ width: root.width;
54+ height: width / artShape.aspect;
55+ }
56+ }
57+ }
58+ }
59+readonly property int headerHeight: titleLabel.height + titleLabel.anchors.topMargin * 2;
60+Label {
61+ id: titleLabel;
62+ objectName: "titleLabel";
63+ anchors { right: parent.right;left: parent.left;
64+top: artShapeHolder.bottom;
65+ topMargin: units.gu(1);
66+ }
67+ elide: Text.ElideRight;
68+ fontSize: "small";
69+ wrapMode: Text.Wrap;
70+ maximumLineCount: 2;
71+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72+ color: "grey";
73+ visible: showHeader ;
74+ text: root.title;
75+ font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
76+ horizontalAlignment: root.headerAlignment;
77+ }
78+implicitHeight: titleLabel.y + titleLabel.height + units.gu(1);
79+}
tests/plugins/Dash/cardcreator/1.tstnew file+3
@@ -0,0 +1,3 @@
1+template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2}
2+components: {"art":{"aspect-ratio":1.6,"field":"art","fill-mode":"fit"},"title":{"field":"title"}}
3+result: 1.res
tests/plugins/Dash/cardcreator/2.resnew file+116
@@ -0,0 +1,116 @@
1+AbstractButton {
2+ id: root;
3+ property var template;
4+ property var components;
5+ property var cardData;
6+ property var artShapeBorderSource;
7+ property real fontScale: 1.0;
8+ property int headerAlignment: Text.AlignLeft;
9+ property int fixedHeaderHeight: -1;
10+ property size fixedArtShapeSize: Qt.size(-1, -1);
11+ readonly property string title: cardData && cardData["title"] || "";
12+ property bool asynchronous: true;
13+ property bool showHeader: true;
14+ implicitWidth: childrenRect.width;
15+Loader {
16+ id: backgroundLoader;
17+ objectName: "backgroundLoader";
18+ anchors.fill: parent;
19+ asynchronous: root.asynchronous;
20+ visible: status == Loader.Ready;
21+ sourceComponent: UbuntuShape {
22+ objectName: "background";
23+ radius: "medium";
24+ color: getColor(0) || "white";
25+ gradientColor: getColor(1) || color;
26+ anchors.fill: parent;
27+ image: backgroundImage.source ? backgroundImage : null;
28+ property real luminance: 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b;
29+ property Image backgroundImage: Image {
30+ objectName: "backgroundImage";
31+ source: {
32+ if (cardData && typeof cardData["background"] === "string") return cardData["background"];
33+ else if (template && typeof template["card-background"] === "string") return template["card-background"];
34+ else return "";
35+ }
36+ }
37+ function getColor(index) {
38+ if (cardData && typeof cardData["background"] === "object"
39+ && (cardData["background"]["type"] === "color" || cardData["background"]["type"] === "gradient")) {
40+ return cardData["background"]["elements"][index];
41+ } else if (template && typeof template["card-background"] === "object"
42+ && (template["card-background"]["type"] === "color" || template["card-background"]["type"] === "gradient")) {
43+ return template["card-background"]["elements"][index];
44+ } else return undefined;
45+ }
46+ }
47+ }
48+readonly property size artShapeSize: Qt.size(-1, -1);
49+readonly property int headerHeight: row.height + row.margins * 2;
50+Row {
51+ id: row;
52+ objectName: "outerRow";
53+ property real margins: units.gu(1);
54+ spacing: margins;
55+ anchors { top: parent.top;
56+ topMargin: units.gu(1);
57+ left: parent.left;
58+}
59+ anchors.right: parent.right;
60+ anchors.margins: margins;
61+data: [ Image {
62+ id: mascotImage;
63+ objectName: "mascotImage";
64+ anchors { verticalCenter: parent.verticalCenter; }
65+ readonly property int maxSize: Math.max(width, height) * 4;
66+ source: cardData && cardData["mascot"];
67+ width: units.gu(6);
68+ height: units.gu(5.625);
69+ sourceSize { width: maxSize; height: maxSize }
70+ fillMode: Image.PreserveAspectCrop;
71+ horizontalAlignment: Image.AlignHCenter;
72+ verticalAlignment: Image.AlignVCenter;
73+ visible: showHeader;
74+ }
75+,
76+Column {
77+ anchors.verticalCenter: parent.verticalCenter;
78+ spacing: units.dp(2);
79+ width: parent.width - x;
80+ data: [
81+Label {
82+ id: titleLabel;
83+ objectName: "titleLabel";
84+ anchors { left: parent.left; right: parent.right }
85+ elide: Text.ElideRight;
86+ fontSize: "small";
87+ wrapMode: Text.Wrap;
88+ maximumLineCount: 2;
89+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
90+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey";
91+ visible: showHeader ;
92+ text: root.title;
93+ font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
94+ horizontalAlignment: root.headerAlignment;
95+ }
96+,
97+Label {
98+ id: subtitleLabel;
99+ objectName: "subtitleLabel";
100+ anchors { left: parent.left; right: parent.right }
101+
102+ elide: Text.ElideRight;
103+ fontSize: "small";
104+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
105+ color: backgroundLoader.active && backgroundLoader.item && backgroundLoader.item.luminance < 0.7 ? "white" : "grey";
106+ visible: titleLabel.visible && titleLabel.text;
107+ text: cardData && cardData["subtitle"] || "";
108+ font.weight: Font.Light;
109+ horizontalAlignment: root.headerAlignment;
110+ }
111+]
112+}
113+]
114+}
115+implicitHeight: row.y + row.height + units.gu(1);
116+}
tests/plugins/Dash/cardcreator/2.tstnew file+3
@@ -0,0 +1,3 @@
1+template: {"card-background":{"elements":["#E9E9E9"],"type":"color"},"card-layout":"vertical","card-size":"medium","category-layout":"grid","collapsed-rows":2}
2+components: {"art":{"aspect-ratio":1,"fill-mode":"crop"},"background":{"field":"background"},"mascot":{"field":"icon"},"subtitle":{"field":"author"},"title":{"field":"title"}}
3+result: 2.res
tests/plugins/Dash/cardcreator/3.resnew file+96
@@ -0,0 +1,96 @@
1+AbstractButton {
2+ id: root;
3+ property var template;
4+ property var components;
5+ property var cardData;
6+ property var artShapeBorderSource;
7+ property real fontScale: 1.0;
8+ property int headerAlignment: Text.AlignLeft;
9+ property int fixedHeaderHeight: -1;
10+ property size fixedArtShapeSize: Qt.size(-1, -1);
11+ readonly property string title: cardData && cardData["title"] || "";
12+ property bool asynchronous: true;
13+ property bool showHeader: true;
14+ implicitWidth: childrenRect.width;
15+readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
16+Item {
17+ id: artShapeHolder;
18+ height: root.fixedArtShapeSize.height != -1 ? root.fixedArtShapeSize.height : artShapeLoader.height;
19+ width: root.fixedArtShapeSize.width != -1 ? root.fixedArtShapeSize.width : artShapeLoader.width;
20+ anchors { horizontalCenter: parent.horizontalCenter; }
21+ Loader {
22+ id: artShapeLoader;
23+ objectName: "artShapeLoader";
24+ active: cardData && cardData["art"] || false;
25+ asynchronous: root.asynchronous;
26+ visible: status == Loader.Ready;
27+ sourceComponent: UbuntuShape {
28+ id: artShape;
29+ objectName: "artShape";
30+ radius: "medium";
31+ readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1;
32+ readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
33+ Component.onCompleted: updateWidthHeightBindings();
34+ onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
35+ visible: image.status == Image.Ready;
36+ borderSource: artShapeBorderSource;
37+ function updateWidthHeightBindings() {
38+ if (aspectSmallerThanImageAspect) {
39+ width = Qt.binding(function() { return !visible ? 0 : image.width });
40+ height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect });
41+ } else {
42+ width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
43+ height = Qt.binding(function() { return !visible ? 0 : image.height });
44+ }
45+ }
46+ image: Image {
47+ objectName: "artImage";
48+ source: cardData && cardData["art"] || "";
49+ cache: true;
50+ asynchronous: root.asynchronous;
51+ fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
52+ readonly property real aspect: implicitWidth / implicitHeight;
53+ width: root.width;
54+ height: width / artShape.aspect;
55+ }
56+ }
57+ }
58+ }
59+readonly property int headerHeight: titleLabel.height + titleLabel.anchors.topMargin * 2 + subtitleLabel.height + subtitleLabel.anchors.topMargin;
60+Label {
61+ id: titleLabel;
62+ objectName: "titleLabel";
63+ anchors { right: parent.right;left: parent.left;
64+top: artShapeHolder.bottom;
65+ topMargin: units.gu(1);
66+}
67+ elide: Text.ElideRight;
68+ fontSize: "small";
69+ wrapMode: Text.Wrap;
70+ maximumLineCount: 2;
71+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
72+ color: "grey";
73+ visible: showHeader ;
74+ text: root.title;
75+ font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
76+ horizontalAlignment: root.headerAlignment;
77+ }
78+Label {
79+ id: subtitleLabel;
80+ objectName: "subtitleLabel";
81+ anchors { left: titleLabel.left;
82+ leftMargin: titleLabel.leftMargin;
83+ right: titleLabel.right;
84+ top: titleLabel.bottom;
85+ topMargin: units.dp(2); }
86+ elide: Text.ElideRight;
87+ fontSize: "small";
88+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
89+ color: "grey";
90+ visible: titleLabel.visible && titleLabel.text;
91+ text: cardData && cardData["subtitle"] || "";
92+ font.weight: Font.Light;
93+ horizontalAlignment: root.headerAlignment;
94+ }
95+implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
96+}
tests/plugins/Dash/cardcreator/3.tstnew file+3
@@ -0,0 +1,3 @@
1+template: {"card-layout":"vertical","card-size":"small","category-layout":"grid","collapsed-rows":2}
2+components: {"art":{"aspect-ratio":0.75,"field":"art","fill-mode":"crop"},"subtitle":{"field":"price"},"title":{"field":"title"}}
3+result: 3.res
tests/plugins/Dash/cardcreator/4.resnew file+96
@@ -0,0 +1,96 @@
1+AbstractButton {
2+ id: root;
3+ property var template;
4+ property var components;
5+ property var cardData;
6+ property var artShapeBorderSource;
7+ property real fontScale: 1.0;
8+ property int headerAlignment: Text.AlignLeft;
9+ property int fixedHeaderHeight: -1;
10+ property size fixedArtShapeSize: Qt.size(-1, -1);
11+ readonly property string title: cardData && cardData["title"] || "";
12+ property bool asynchronous: true;
13+ property bool showHeader: true;
14+ implicitWidth: childrenRect.width;
15+readonly property size artShapeSize: Qt.size(-1, -1);
16+readonly property int headerHeight: row.height + row.margins * 2;
17+Row {
18+ id: row;
19+ objectName: "outerRow";
20+ property real margins: units.gu(1);
21+ spacing: margins;
22+ anchors { top: parent.top;
23+ topMargin: units.gu(1);
24+ left: parent.left;
25+}
26+ anchors.right: parent.right;
27+ anchors.margins: margins;
28+data: [ Loader {
29+ id: mascotShapeLoader;
30+ objectName: "mascotShapeLoader";
31+ asynchronous: root.asynchronous;
32+ active: mascotImage.status === Image.Ready;
33+ visible: showHeader && active && status == Loader.Ready;
34+ width: units.gu(6);
35+ height: units.gu(5.625);
36+ sourceComponent: UbuntuShape { image: mascotImage }
37+ anchors { verticalCenter: parent.verticalCenter; }
38+ }
39+
40+,
41+Image {
42+ id: mascotImage;
43+ objectName: "mascotImage";
44+ anchors { verticalCenter: parent.verticalCenter; }
45+ readonly property int maxSize: Math.max(width, height) * 4;
46+ source: cardData && cardData["mascot"];
47+ width: units.gu(6);
48+ height: units.gu(5.625);
49+ sourceSize { width: maxSize; height: maxSize }
50+ fillMode: Image.PreserveAspectCrop;
51+ horizontalAlignment: Image.AlignHCenter;
52+ verticalAlignment: Image.AlignVCenter;
53+ visible: false;
54+ }
55+
56+,
57+Column {
58+ anchors.verticalCenter: parent.verticalCenter;
59+ spacing: units.dp(2);
60+ width: parent.width - x;
61+data: [ Label {
62+ id: titleLabel;
63+ objectName: "titleLabel";
64+ anchors { left: parent.left; right: parent.right }
65+ elide: Text.ElideRight;
66+ fontSize: "small";
67+ wrapMode: Text.Wrap;
68+ maximumLineCount: 2;
69+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
70+ color: "grey";
71+ visible: showHeader ;
72+ text: root.title;
73+ font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
74+ horizontalAlignment: root.headerAlignment;
75+ }
76+,
77+Label {
78+ id: subtitleLabel;
79+ objectName: "subtitleLabel";
80+ anchors { left: parent.left; right: parent.right }
81+
82+ elide: Text.ElideRight;
83+ fontSize: "small";
84+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
85+ color: "grey";
86+ visible: titleLabel.visible && titleLabel.text;
87+ text: cardData && cardData["subtitle"] || "";
88+ font.weight: Font.Light;
89+ horizontalAlignment: root.headerAlignment;
90+ }
91+]
92+}
93+]
94+}
95+implicitHeight: row.y + row.height + units.gu(1);
96+}
tests/plugins/Dash/cardcreator/4.tstnew file+3
@@ -0,0 +1,3 @@
1+template: {"card-layout":"horizontal","card-size":"large","category-layout":"grid","collapsed-rows":2}
2+components: {"art":{"aspect-ratio":1,"fill-mode":"crop"},"mascot":{"field":"mascot"},"subtitle":{"field":"domain"},"title":{"field":"title"}}
3+result: 4.res
tests/plugins/Dash/cardcreator/5.resnew file+139
@@ -0,0 +1,139 @@
1+AbstractButton {
2+ id: root;
3+ property var template;
4+ property var components;
5+ property var cardData;
6+ property var artShapeBorderSource;
7+ property real fontScale: 1.0;
8+ property int headerAlignment: Text.AlignLeft;
9+ property int fixedHeaderHeight: -1;
10+ property size fixedArtShapeSize: Qt.size(-1, -1);
11+ readonly property string title: cardData && cardData["title"] || "";
12+ property bool asynchronous: true;
13+ property bool showHeader: true;
14+ implicitWidth: childrenRect.width;
15+readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);
16+Item {
17+ id: artShapeHolder;
18+ height: root.fixedArtShapeSize.height != -1 ? root.fixedArtShapeSize.height : artShapeLoader.height;
19+ width: root.fixedArtShapeSize.width != -1 ? root.fixedArtShapeSize.width : artShapeLoader.width;
20+ anchors { horizontalCenter: parent.horizontalCenter; }
21+ Loader {
22+ id: artShapeLoader;
23+ objectName: "artShapeLoader";
24+ active: cardData && cardData["art"] || false;
25+ asynchronous: root.asynchronous;
26+ visible: status == Loader.Ready;
27+ sourceComponent: UbuntuShape {
28+ id: artShape;
29+ objectName: "artShape";
30+ radius: "medium";
31+ readonly property real aspect: components !== undefined ? components["art"]["aspect-ratio"] : 1;
32+ readonly property bool aspectSmallerThanImageAspect: aspect < image.aspect;
33+ Component.onCompleted: updateWidthHeightBindings();
34+ onAspectSmallerThanImageAspectChanged: updateWidthHeightBindings();
35+ visible: image.status == Image.Ready;
36+ borderSource: artShapeBorderSource;
37+ function updateWidthHeightBindings() {
38+ if (aspectSmallerThanImageAspect) {
39+ width = Qt.binding(function() { return !visible ? 0 : image.width });
40+ height = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.height : width / image.aspect });
41+ } else {
42+ width = Qt.binding(function() { return !visible ? 0 : image.fillMode === Image.PreserveAspectCrop ? image.width : height * image.aspect });
43+ height = Qt.binding(function() { return !visible ? 0 : image.height });
44+ }
45+ }
46+ image: Image {
47+ objectName: "artImage";
48+ source: cardData && cardData["art"] || "";
49+ cache: true;
50+ asynchronous: root.asynchronous;
51+ fillMode: components && components["art"]["fill-mode"] === "fit" ? Image.PreserveAspectFit: Image.PreserveAspectCrop;
52+ readonly property real aspect: implicitWidth / implicitHeight;
53+ width: root.width;
54+ height: width / artShape.aspect;
55+ }
56+ }
57+ }
58+ }
59+Loader {
60+ id: overlayLoader;
61+ anchors {
62+ left: artShapeHolder.left;
63+ right: artShapeHolder.right;
64+ bottom: artShapeHolder.bottom;
65+ }
66+ active: artShapeLoader.active && artShapeLoader.item && artShapeLoader.item.image.status === Image.Ready || false;
67+ asynchronous: root.asynchronous;
68+ visible: showHeader && status == Loader.Ready;
69+ sourceComponent: ShaderEffect {
70+ id: overlay;
71+ height: fixedHeaderHeight != -1 ? fixedHeaderHeight : headerHeight;
72+ opacity: 0.6;
73+ property var source: ShaderEffectSource {
74+ id: shaderSource;
75+ sourceItem: artShapeLoader.item;
76+ onVisibleChanged: if (visible) scheduleUpdate();
77+ live: false;
78+ sourceRect: Qt.rect(0, artShapeLoader.height - overlay.height, artShapeLoader.width, overlay.height);
79+ }
80+ vertexShader: "
81+ uniform highp mat4 qt_Matrix;
82+ attribute highp vec4 qt_Vertex;
83+ attribute highp vec2 qt_MultiTexCoord0;
84+ varying highp vec2 coord;
85+ void main() {
86+ coord = qt_MultiTexCoord0;
87+ gl_Position = qt_Matrix * qt_Vertex;
88+ }";
89+ fragmentShader: "
90+ varying highp vec2 coord;
91+ uniform sampler2D source;
92+ uniform lowp float qt_Opacity;
93+ void main() {
94+ lowp vec4 tex = texture2D(source, coord);
95+ gl_FragColor = vec4(0, 0, 0, tex.a) * qt_Opacity;
96+ }";
97+ }
98+ }
99+readonly property int headerHeight: titleLabel.height + titleLabel.anchors.topMargin * 2 + subtitleLabel.height + subtitleLabel.anchors.topMargin;
100+Label {
101+ id: titleLabel;
102+ objectName: "titleLabel";
103+ anchors { left: parent.left;
104+ leftMargin: units.gu(1);
105+ right: parent.right;
106+ top: overlayLoader.top;
107+ topMargin: units.gu(1);
108+}
109+ elide: Text.ElideRight;
110+ fontSize: "small";
111+ wrapMode: Text.Wrap;
112+ maximumLineCount: 2;
113+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
114+ color: "white";
115+ visible: showHeader && overlayLoader.active;
116+ text: root.title;
117+ font.weight: components && components["subtitle"] ? Font.DemiBold : Font.Normal;
118+ horizontalAlignment: root.headerAlignment;
119+ }
120+Label {
121+ id: subtitleLabel;
122+ objectName: "subtitleLabel";
123+ anchors { left: titleLabel.left;
124+ leftMargin: titleLabel.leftMargin;
125+ right: titleLabel.right;
126+ top: titleLabel.bottom;
127+ topMargin: units.dp(2);
128+ }
129+ elide: Text.ElideRight;
130+ fontSize: "small";
131+ font.pixelSize: Math.round(FontUtils.sizeToPixels(fontSize) * fontScale);
132+ color: "white";
133+ visible: titleLabel.visible && titleLabel.text;
134+ text: cardData && cardData["subtitle"] || "";
135+ font.weight: Font.Light;
136+ horizontalAlignment: root.headerAlignment;
137+ }
138+implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);
139+}
tests/plugins/Dash/cardcreator/5.tstnew file+3
@@ -0,0 +1,3 @@
1+template: {"card-layout":"vertical","card-size":"medium","category-layout":"carousel","collapsed-rows":2,"overlay":true}
2+components: {"art":{"aspect-ratio":1,"field":"art","fill-mode":"crop"},"subtitle":{"field":"artist"},"title":{"field":"title"}}
3+result: 5.res
tests/plugins/Dash/cardcreatortest.cppnew file+91
@@ -0,0 +1,91 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+#include <QDir>
18+#include <QQmlEngine>
19+#include <QQuickItem>
20+#include <QQuickView>
21+#include <QtTestGui>
22+
23+class CardCreatorTest : public QObject
24+{
25+ Q_OBJECT
26+
27+private Q_SLOTS:
28+
29+ void initTestCase()
30+ {
31+ }
32+
33+ void init()
34+ {
35+ view = new QQuickView();
36+ view->engine()->addImportPath(BUILT_PLUGINS_DIR);
37+ view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/cardcreatortest.qml"));
38+ view->show();
39+ QTest::qWaitForWindowExposed(view);
40+ }
41+
42+ void cleanup()
43+ {
44+ delete view;
45+ }
46+
47+ void testKnownCases()
48+ {
49+ const QString templateString("template: ");
50+ const QString componentsString("components: ");
51+ const QString resultString("result: ");
52+
53+ const QString testDirPath = DASHVIEWSTEST_FOLDER "/cardcreator/";
54+ QDir d(testDirPath);
55+ const QStringList testFiles = d.entryList(QStringList() << "*.tst");
56+ foreach(const QString &testFileName, testFiles) {
57+ qDebug() << testFileName;
58+ QFile testFile(testDirPath + testFileName);
59+ QVERIFY(testFile.open(QIODevice::ReadOnly));
60+ QTextStream ts(&testFile);
61+ const QStringList lines = ts.readAll().split("\n");
62+
63+ QVERIFY(lines[0].startsWith(templateString));
64+ QVERIFY(lines[1].startsWith(componentsString));
65+ QVERIFY(lines[2].startsWith(resultString));
66+ const QString templateJSON = lines[0].mid(templateString.length());
67+ const QString componentsJSON = lines[1].mid(componentsString.length());
68+ const QString resultFileName = lines[2].mid(resultString.length());
69+
70+ QVariant cardStringResult;
71+ QMetaObject::invokeMethod(view->rootObject(), "cardString", Q_RETURN_ARG(QVariant, cardStringResult), Q_ARG(QVariant, templateJSON), Q_ARG(QVariant, componentsJSON));
72+
73+ QFile testResultFile(testDirPath + resultFileName);
74+ QVERIFY(testResultFile.open(QIODevice::ReadOnly));
75+ QTextStream ts2(&testResultFile);
76+ const QString expectedResult = ts2.readAll();
77+ QCOMPARE(cardStringResult.toString().simplified(), expectedResult.simplified());
78+
79+ QVariant createCardComponentResult;
80+ QMetaObject::invokeMethod(view->rootObject(), "createCardComponent", Q_RETURN_ARG(QVariant, createCardComponentResult), Q_ARG(QVariant, templateJSON), Q_ARG(QVariant, componentsJSON));
81+ QVERIFY(createCardComponentResult.toBool());
82+ }
83+ }
84+
85+private:
86+ QQuickView *view;
87+};
88+
89+QTEST_MAIN(CardCreatorTest)
90+
91+#include "cardcreatortest.moc"
tests/plugins/Dash/cardcreatortest.qmlnew file+29
@@ -0,0 +1,29 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.2
18+import "../../../plugins/Dash/CardCreator.js" as CardCreator
19+
20+Item {
21+ id: root
22+ function cardString(template, components) {
23+ return CardCreator.cardString(JSON.parse(template), JSON.parse(components));
24+ }
25+
26+ function createCardComponent(template, components) {
27+ return CardCreator.createCardComponent(root, JSON.parse(template), JSON.parse(components)) !== null;
28+ }
29+}
tests/plugins/DashViews/horizontaljournaltest.cpp → tests/plugins/Dash/horizontaljournaltest.cpprenamed+6−6
@@ -258,8 +258,8 @@ private Q_SLOTS:
258
258
259 void testDelegateCreationRanges()
259 void testDelegateCreationRanges()
260 {
260 {
261− hj->setDelegateCreationBegin(300);
261+ hj->setDisplayMarginBeginning(-300);
262− hj->setDelegateCreationEnd(view->height());
262+ hj->setDisplayMarginEnd(-(hj->height() - view->height()));
263
263
264 QTRY_COMPARE(hj->m_firstVisibleIndex, 6);
264 QTRY_COMPARE(hj->m_firstVisibleIndex, 6);
265 QTRY_COMPARE(hj->m_visibleItems.count(), 7);
265 QTRY_COMPARE(hj->m_visibleItems.count(), 7);
@@ -274,8 +274,8 @@ private Q_SLOTS:
274 QTRY_COMPARE(hj->m_lastInRowIndexPosition[ 7], 210.);
274 QTRY_COMPARE(hj->m_lastInRowIndexPosition[ 7], 210.);
275 QTRY_COMPARE(hj->m_lastInRowIndexPosition[12], 305.);
275 QTRY_COMPARE(hj->m_lastInRowIndexPosition[12], 305.);
276
276
277− hj->resetDelegateCreationBegin();
277+ hj->setDisplayMarginBeginning(0);
278− hj->resetDelegateCreationEnd();
278+ hj->setDisplayMarginEnd(0);
279
279
280 // This is exactly the same block as the first again
280 // This is exactly the same block as the first again
281 checkInitialPositions();
281 checkInitialPositions();
@@ -469,8 +469,8 @@ private Q_SLOTS:
469
469
470 void testNegativeDelegateCreationRange()
470 void testNegativeDelegateCreationRange()
471 {
471 {
472− hj->setDelegateCreationBegin(0);
472+ hj->setDisplayMarginBeginning(0);
473− hj->setDelegateCreationEnd(-100);
473+ hj->setDisplayMarginEnd(-(hj->height() + 100));
474
474
475 QStringList widthList;
475 QStringList widthList;
476 widthList << "100" << "50" << "50" << "30";
476 widthList << "100" << "50" << "50" << "30";
tests/plugins/DashViews/horizontaljournaltest.qml → tests/plugins/Dash/horizontaljournaltest.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.1
17import QtQuick 2.1
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Item {
20Item {
21
21
tests/plugins/DashViews/horizontaljournaltry.cpp → tests/plugins/Dash/horizontaljournaltry.cpprenamed

The content is the same.

tests/plugins/DashViews/horizontaljournaltry.qml → tests/plugins/Dash/horizontaljournaltry.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.1
17import QtQuick 2.1
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Item {
20Item {
21 id: root
21 id: root
tests/plugins/DashViews/listviewwithpageheadertestsectionexternalmodel.cpp → tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpprenamed+1−5
@@ -24,11 +24,7 @@
24#include <QtTestGui>
24#include <QtTestGui>
25#pragma GCC diagnostic push
25#pragma GCC diagnostic push
26#pragma GCC diagnostic ignored "-pedantic"
26#pragma GCC diagnostic ignored "-pedantic"
27−#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
28−#include <private/qquicklistmodel_p.h>
29−#else
30#include <private/qqmllistmodel_p.h>
27#include <private/qqmllistmodel_p.h>
31−#endif
32#include <private/qquickanimation_p.h>
28#include <private/qquickanimation_p.h>
33#include <private/qquickitem_p.h>
29#include <private/qquickitem_p.h>
34#pragma GCC diagnostic pop
30#pragma GCC diagnostic pop
@@ -248,4 +244,4 @@ private:
248
244
249QTEST_MAIN(ListViewWithPageHeaderTestSection)
245QTEST_MAIN(ListViewWithPageHeaderTestSection)
250
246
251−#include "listviewwithpageheadertestsectionexternalmodel.moc"
247+#include "listviewwithpageheadersectionexternalmodeltest.moc"
tests/plugins/DashViews/listviewwithpageheadertestsection.cpp → tests/plugins/Dash/listviewwithpageheadersectiontest.cpprenamed+1−13
@@ -23,11 +23,7 @@
23#include <QtTestGui>
23#include <QtTestGui>
24#pragma GCC diagnostic push
24#pragma GCC diagnostic push
25#pragma GCC diagnostic ignored "-pedantic"
25#pragma GCC diagnostic ignored "-pedantic"
26−#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
27−#include <private/qquicklistmodel_p.h>
28−#else
29#include <private/qqmllistmodel_p.h>
26#include <private/qqmllistmodel_p.h>
30−#endif
31#include <private/qquickanimation_p.h>
27#include <private/qquickanimation_p.h>
32#include <private/qquickitem_p.h>
28#include <private/qquickitem_p.h>
33#pragma GCC diagnostic pop
29#pragma GCC diagnostic pop
@@ -135,11 +131,7 @@ private Q_SLOTS:
135 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
131 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
136 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsection.qml"));
132 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertestsection.qml"));
137 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
133 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
138−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
139− model = view->rootObject()->findChild<QQuickListModel*>();
140−#else
141 model = view->rootObject()->findChild<QQmlListModel*>();
134 model = view->rootObject()->findChild<QQmlListModel*>();
142−#endif
143 otherDelegate = view->rootObject()->findChild<QQmlComponent*>();
135 otherDelegate = view->rootObject()->findChild<QQmlComponent*>();
144 QVERIFY(lvwph);
136 QVERIFY(lvwph);
145 QVERIFY(model);
137 QVERIFY(model);
@@ -2156,14 +2148,10 @@ private Q_SLOTS:
2156private:
2148private:
2157 QQuickView *view;
2149 QQuickView *view;
2158 ListViewWithPageHeader *lvwph;
2150 ListViewWithPageHeader *lvwph;
2159−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
2160− QQuickListModel *model;
2161−#else
2162 QQmlListModel *model;
2151 QQmlListModel *model;
2163−#endif
2164 QQmlComponent *otherDelegate;
2152 QQmlComponent *otherDelegate;
2165};
2153};
2166
2154
2167QTEST_MAIN(ListViewWithPageHeaderTestSection)
2155QTEST_MAIN(ListViewWithPageHeaderTestSection)
2168
2156
2169−#include "listviewwithpageheadertestsection.moc"
2157+#include "listviewwithpageheadersectiontest.moc"
tests/plugins/DashViews/listviewwithpageheadertest.cpp → tests/plugins/Dash/listviewwithpageheadertest.cpprenamed−15
@@ -23,11 +23,7 @@
23#include <QtTestGui>
23#include <QtTestGui>
24#pragma GCC diagnostic push
24#pragma GCC diagnostic push
25#pragma GCC diagnostic ignored "-pedantic"
25#pragma GCC diagnostic ignored "-pedantic"
26−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
27−#include <private/qquicklistmodel_p.h>
28−#else
29#include <private/qqmllistmodel_p.h>
26#include <private/qqmllistmodel_p.h>
30−#endif
31#include <private/qquickanimation_p.h>
27#include <private/qquickanimation_p.h>
32#include <private/qquickitem_p.h>
28#include <private/qquickitem_p.h>
33#pragma GCC diagnostic pop
29#pragma GCC diagnostic pop
@@ -124,11 +120,7 @@ private Q_SLOTS:
124 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
120 view->engine()->addImportPath(BUILT_PLUGINS_DIR);
125 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertest.qml"));
121 view->setSource(QUrl::fromLocalFile(DASHVIEWSTEST_FOLDER "/listviewwithpageheadertest.qml"));
126 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
122 lvwph = dynamic_cast<ListViewWithPageHeader*>(view->rootObject()->findChild<QQuickFlickable*>());
127−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
128− model = view->rootObject()->findChild<QQuickListModel*>();
129−#else
130 model = view->rootObject()->findChild<QQmlListModel*>();
123 model = view->rootObject()->findChild<QQmlListModel*>();
131−#endif
132 otherDelegate = view->rootObject()->findChild<QQmlComponent*>();
124 otherDelegate = view->rootObject()->findChild<QQmlComponent*>();
133 QVERIFY(lvwph);
125 QVERIFY(lvwph);
134 QVERIFY(model);
126 QVERIFY(model);
@@ -1747,9 +1739,6 @@ private Q_SLOTS:
1747
1739
1748 void testMaximizeVisibleAreaMoveUpAndShowHeader()
1740 void testMaximizeVisibleAreaMoveUpAndShowHeader()
1749 {
1741 {
1750−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
1751− QSKIP("This test is extremely unstable in 5.0.x");
1752−#endif
1753 model->setProperty(0, "size", 800);
1742 model->setProperty(0, "size", 800);
1754 verifyItem(0, 50., 800., false);
1743 verifyItem(0, 50., 800., false);
1755
1744
@@ -1913,11 +1902,7 @@ private Q_SLOTS:
1913private:
1902private:
1914 QQuickView *view;
1903 QQuickView *view;
1915 ListViewWithPageHeader *lvwph;
1904 ListViewWithPageHeader *lvwph;
1916−#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
1917− QQuickListModel *model;
1918−#else
1919 QQmlListModel *model;
1905 QQmlListModel *model;
1920−#endif
1921 QQmlComponent *otherDelegate;
1906 QQmlComponent *otherDelegate;
1922};
1907};
1923
1908
tests/plugins/DashViews/listviewwithpageheadertest.qml → tests/plugins/Dash/listviewwithpageheadertest.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Rectangle {
20Rectangle {
21 width: 300
21 width: 300
tests/plugins/DashViews/listviewwithpageheadertestsection.qml → tests/plugins/Dash/listviewwithpageheadertestsection.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Rectangle {
20Rectangle {
21 width: 300
21 width: 300
tests/plugins/DashViews/listviewwithpageheadertestsectionexternalmodel.qml → tests/plugins/Dash/listviewwithpageheadertestsectionexternalmodel.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Rectangle {
20Rectangle {
21 width: 300
21 width: 300
tests/plugins/DashViews/organicgridtest.cpp → tests/plugins/Dash/organicgridtest.cpprenamed+2−5
@@ -499,17 +499,14 @@ private Q_SLOTS:
499 QTRY_COMPARE(grid->m_firstVisibleIndex, 0);
499 QTRY_COMPARE(grid->m_firstVisibleIndex, 0);
500 QTRY_COMPARE(grid->m_visibleItems.count(), 198);
500 QTRY_COMPARE(grid->m_visibleItems.count(), 198);
501
501
502− grid->setDelegateCreationBegin(300);
502+ grid->setDisplayMarginBeginning(-300);
503− grid->setDelegateCreationEnd(400);
503+ grid->setDisplayMarginEnd(-(grid->height() - 400));
504 checkImplicitHeight(2290);
504 checkImplicitHeight(2290);
505
505
506 QTRY_COMPARE(grid->m_firstVisibleIndex, 36);
506 QTRY_COMPARE(grid->m_firstVisibleIndex, 36);
507 QTRY_COMPARE(grid->m_visibleItems.count(), 54);
507 QTRY_COMPARE(grid->m_visibleItems.count(), 54);
508 checkImplicitHeight(2290);
508 checkImplicitHeight(2290);
509
509
510− grid->resetDelegateCreationBegin();
511− grid->resetDelegateCreationEnd();
512−
513 view->resize(470, 470);
510 view->resize(470, 470);
514
511
515 grid->setSmallDelegateSize(QSizeF(90, 90));
512 grid->setSmallDelegateSize(QSizeF(90, 90));
tests/plugins/DashViews/organicgridtest.qml → tests/plugins/Dash/organicgridtest.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.1
17import QtQuick 2.1
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Item {
20Item {
21
21
tests/plugins/DashViews/organicgridtry.cpp → tests/plugins/Dash/organicgridtry.cpprenamed

The content is the same.

tests/plugins/DashViews/organicgridtry.qml → tests/plugins/Dash/organicgridtry.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.1
17import QtQuick 2.1
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Item {
20Item {
21 id: root
21 id: root
tests/plugins/DashViews/tst_listviewwithpageheaderqml.qml → tests/plugins/Dash/tst_ListViewWithPageHeaderQML.qmlrenamed+1−1
@@ -16,7 +16,7 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import QtTest 1.0
18import QtTest 1.0
19−import DashViews 0.1
19+import Dash 0.1
20
20
21Rectangle {
21Rectangle {
22 width: 300
22 width: 300
tests/plugins/DashViews/verticaljournaltest.cpp → tests/plugins/Dash/verticaljournaltest.cpprenamed+6−6
@@ -263,8 +263,8 @@ private Q_SLOTS:
263
263
264 void testDelegateCreationRanges()
264 void testDelegateCreationRanges()
265 {
265 {
266− vj->setDelegateCreationBegin(200);
266+ vj->setDisplayMarginBeginning(-200);
267− vj->setDelegateCreationEnd(view->height());
267+ vj->setDisplayMarginEnd(-(vj->height() - view->height()));
268
268
269 QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
269 QTRY_COMPARE(vj->m_columnVisibleItems.count(), 3);
270 QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 4);
270 QTRY_COMPARE(vj->m_columnVisibleItems[0].count(), 4);
@@ -286,8 +286,8 @@ private Q_SLOTS:
286 verifyItem(vj->m_columnVisibleItems[1][3], 15, 160, 430, false);
286 verifyItem(vj->m_columnVisibleItems[1][3], 15, 160, 430, false);
287 QCOMPARE(vj->implicitHeight(), 690. + 4. * 690. / 16.);
287 QCOMPARE(vj->implicitHeight(), 690. + 4. * 690. / 16.);
288
288
289− vj->resetDelegateCreationBegin();
289+ vj->setDisplayMarginBeginning(0);
290− vj->resetDelegateCreationEnd();
290+ vj->setDisplayMarginEnd(0);
291
291
292 // This is exactly the same block as the first again
292 // This is exactly the same block as the first again
293 checkInitialPositions();
293 checkInitialPositions();
@@ -478,8 +478,8 @@ private Q_SLOTS:
478
478
479 void testNegativeDelegateCreationRange()
479 void testNegativeDelegateCreationRange()
480 {
480 {
481− vj->setDelegateCreationBegin(0);
481+ vj->setDisplayMarginBeginning(0);
482− vj->setDelegateCreationEnd(-100);
482+ vj->setDisplayMarginEnd(-(vj->height() + 100));
483
483
484 QStringList heightList;
484 QStringList heightList;
485 heightList << "100" << "50" << "50" << "30";
485 heightList << "100" << "50" << "50" << "30";
tests/plugins/DashViews/verticaljournaltest.qml → tests/plugins/Dash/verticaljournaltest.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.1
17import QtQuick 2.1
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Item {
20Item {
21
21
tests/plugins/DashViews/verticaljournaltry.cpp → tests/plugins/Dash/verticaljournaltry.cpprenamed

The content is the same.

tests/plugins/DashViews/verticaljournaltry.qml → tests/plugins/Dash/verticaljournaltry.qmlrenamed+1−1
@@ -15,7 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.1
17import QtQuick 2.1
18−import DashViews 0.1
18+import Dash 0.1
19
19
20Item {
20Item {
21 id: root
21 id: root
tests/plugins/DashViews/CMakeLists.txtdeleted−84
@@ -1,84 +0,0 @@
1−# add_qml_test macro
2−include(QmlTest)
3−
4−# There's no cmake var for v8 include path :-/
5−# so create one
6−LIST(GET Qt5Core_INCLUDE_DIRS 0 QtCoreDir0)
7−if(${Qt5Core_VERSION_STRING} VERSION_LESS "5.1.0")
8− SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/../QtV8/${Qt5Core_VERSION_STRING}/QtV8)
9−else()
10− SET(Qt5V8_PRIVATE_INCLUDE_DIR ${QtCoreDir0}/QtV8/${Qt5Core_VERSION_STRING}/QtV8)
11−endif()
12−
13−
14−include_directories(
15− ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
16− ${Qt5Quick_INCLUDE_DIRS}
17− ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
18− ${Qt5V8_PRIVATE_INCLUDE_DIR}
19− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews
20− ${CMAKE_CURRENT_BINARY_DIR}
21− )
22−
23−remove_definitions(-DQT_NO_KEYWORDS)
24−
25−add_definitions(-DDASHVIEWSTEST_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
26−add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
27−
28−add_executable(listviewwithpageheadertestExec listviewwithpageheadertest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/listviewwithpageheader.cpp)
29−qt5_use_modules(listviewwithpageheadertestExec Test Core Qml)
30−target_link_libraries(listviewwithpageheadertestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
31−add_custom_target(testlistviewwithpageheader ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestExec -o ${CMAKE_BINARY_DIR}/testlistviewwithpageheader.xml,xunitxml -o -,txt)
32−
33−add_executable(listviewwithpageheadertestsectionExec listviewwithpageheadertestsection.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/listviewwithpageheader.cpp)
34−qt5_use_modules(listviewwithpageheadertestsectionExec Test Core Qml)
35−target_link_libraries(listviewwithpageheadertestsectionExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
36−add_custom_target(testlistviewwithpageheadersection ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestsectionExec -o ${CMAKE_BINARY_DIR}/testlistviewwithpageheadersection.xml,xunitxml -o -,txt)
37−
38−add_executable(listviewwithpageheadertestsectionexternalmodelExec listviewwithpageheadertestsectionexternalmodel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/listviewwithpageheader.cpp)
39−qt5_use_modules(listviewwithpageheadertestsectionexternalmodelExec Test Core Qml)
40−target_link_libraries(listviewwithpageheadertestsectionexternalmodelExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
41−add_custom_target(testlistviewwithpageheadersectionexternalmodel ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestsectionexternalmodelExec -o ${CMAKE_BINARY_DIR}/testlistviewwithpageheadersectionexternalmodel.xml,xunitxml -o -,txt)
42−
43−macro(add_dashview_try_test FILENAME TESTNAME)
44− add_executable(${FILENAME}testExec
45− ${FILENAME}test.cpp
46− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/${FILENAME}.cpp
47− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/abstractdashview.cpp
48− )
49− qt5_use_modules(${FILENAME}testExec Test Core Qml)
50− target_link_libraries(${FILENAME}testExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
51− add_custom_target(test${TESTNAME}
52− ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}testExec
53− -o ${CMAKE_BINARY_DIR}/test${TESTNAME}.xml,xunitxml
54− -o -,txt
55− DEPENDS ${FILENAME}testExec DashViews-qml
56− )
57−
58− add_executable(${FILENAME}tryExec
59− ${FILENAME}try.cpp
60− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/${FILENAME}.cpp
61− ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/DashViews/abstractdashview.cpp
62− )
63− qt5_use_modules(${FILENAME}tryExec Test Core Qml)
64− target_link_libraries(${FILENAME}tryExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})
65− add_custom_target(try${TESTNAME}
66− ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}tryExec
67− DEPENDS ${FILENAME}tryExec DashViews-qml
68− )
69−endmacro()
70−
71−add_dashview_try_test(verticaljournal VerticalJournal)
72−add_dashview_try_test(horizontaljournal HorizontalJournal)
73−add_dashview_try_test(organicgrid OrganicGrid)
74−
75−set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
76−add_qml_test(. listviewwithpageheaderqml IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
77−
78−add_dependencies(qmluitests testlistviewwithpageheader)
79−add_dependencies(qmluitests testlistviewwithpageheadersection)
80−add_dependencies(qmluitests testlistviewwithpageheadersectionexternalmodel)
81−add_dependencies(qmluitests testlistviewwithpageheaderqml)
82−add_dependencies(qmluitests testVerticalJournal)
83−add_dependencies(qmluitests testHorizontalJournal)
84−add_dependencies(qmluitests testOrganicGrid)
tests/plugins/Ubuntu/Gestures/CMakeLists.txt+1
@@ -20,6 +20,7 @@ macro(add_gesture_ui_test CLASSNAME)
20 target_link_libraries(${CLASSNAME}TestExec UbuntuGestureQml)
20 target_link_libraries(${CLASSNAME}TestExec UbuntuGestureQml)
21
21
22 add_binary_qml_test(${CLASSNAME} ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures UbuntuGesturesTestQmlFiles)
22 add_binary_qml_test(${CLASSNAME} ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures UbuntuGesturesTestQmlFiles)
23+ add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
23endmacro(add_gesture_ui_test)
24endmacro(add_gesture_ui_test)
24
25
25macro(add_gesture_test CLASSNAME)
26macro(add_gesture_test CLASSNAME)
tests/plugins/Unity/Indicators/rootactionstatetest.cpp+37
@@ -21,6 +21,7 @@
21
21
22#include <unitymenumodel.h>
22#include <unitymenumodel.h>
23#include <QtTest>
23#include <QtTest>
24+#include <gio/gio.h>
24
25
25class RootActionStateTest : public QObject
26class RootActionStateTest : public QObject
26{
27{
@@ -52,6 +53,42 @@ private Q_SLOTS:
52 QVERIFY(rootState->menu() == NULL);
53 QVERIFY(rootState->menu() == NULL);
53 delete rootState;
54 delete rootState;
54 }
55 }
56+
57+ void testToQVariantIcons()
58+ {
59+ GVariantBuilder builderIcons;
60+ g_variant_builder_init(&builderIcons, G_VARIANT_TYPE("av"));
61+ for (int i = 0; i < 3; i ++) {
62+
63+ GIcon* icon = NULL;
64+ icon = g_icon_new_for_string (QString("testIcon%1").arg(i).toUtf8().constData(), NULL);
65+
66+ g_variant_builder_add(&builderIcons,
67+ "v",
68+ g_icon_serialize (icon));
69+ g_object_unref(icon);
70+ }
71+
72+ GVariantBuilder builderParams;
73+ g_variant_builder_init(&builderParams, G_VARIANT_TYPE_ARRAY);
74+ GVariant* icons = g_variant_builder_end (&builderIcons);
75+ g_variant_ref_sink (icons);
76+ g_variant_builder_add (&builderParams, "{sv}", g_strdup ("icons"), icons, NULL);
77+
78+ GVariant* params = g_variant_builder_end (&builderParams);
79+
80+ RootActionState rootState;
81+ QVariant result = rootState.toQVariant(params);
82+ g_variant_unref(params);
83+
84+ QVariantMap paramResult = result.toMap();
85+ QVERIFY(paramResult.contains("icons"));
86+
87+ QStringList serializedIcons = paramResult["icons"].toStringList();
88+ QVERIFY(serializedIcons[0] == "image://theme/testIcon0");
89+ QVERIFY(serializedIcons[1] == "image://theme/testIcon1");
90+ QVERIFY(serializedIcons[2] == "image://theme/testIcon2");
91+ }
55};
92};
56
93
57QTEST_GUILESS_MAIN(RootActionStateTest)
94QTEST_GUILESS_MAIN(RootActionStateTest)
tests/plugins/Unity/Launcher/CMakeLists.txt+3−3
@@ -15,9 +15,9 @@ add_definitions(-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
15add_definitions(-DLAUNCHER_TESTING)
15add_definitions(-DLAUNCHER_TESTING)
16
16
17### LauncherBackendTest
17### LauncherBackendTest
18−set(testBackendCommand ${CMAKE_CURRENT_BINARY_DIR}/launcherbackendtestExec
18+set(testBackendCommand dbus-test-runner --task ${CMAKE_CURRENT_BINARY_DIR}/launcherbackendtestExec
19− -o ${CMAKE_BINARY_DIR}/launcherbackendtest.xml,xunitxml
19+ --parameter -o --parameter ${CMAKE_BINARY_DIR}/launcherbackendtest.xml,xunitxml
20− -o -,txt)
20+ --parameter -o --parameter -,txt)
21add_test(NAME launcherbackendtest COMMAND ${testBackendCommand})
21add_test(NAME launcherbackendtest COMMAND ${testBackendCommand})
22add_custom_target(launcherbackendtest ${testBackendCommand})
22add_custom_target(launcherbackendtest ${testBackendCommand})
23add_executable(launcherbackendtestExec
23add_executable(launcherbackendtestExec
tests/plugins/Unity/Launcher/launcherbackendtest.cpp+167
@@ -20,6 +20,10 @@
20#include "launcherbackend.h"
20#include "launcherbackend.h"
21
21
22#include <QtTest>
22#include <QtTest>
23+#include <QDBusConnection>
24+#include <QDBusMessage>
25+#include <QDBusVariant>
26+
23
27
24class LauncherBackendTest : public QObject
28class LauncherBackendTest : public QObject
25{
29{
@@ -66,6 +70,169 @@ private Q_SLOTS:
66
70
67 QCOMPARE(backend.icon(appId), expectedIcon);
71 QCOMPARE(backend.icon(appId), expectedIcon);
68 }
72 }
73+
74+ void testGetItem_data() {
75+ QTest::addColumn<QString>("appId");
76+ QTest::addColumn<bool>("exists");
77+
78+ QTest::newRow("Exists") << "rel-icon" << true;
79+ QTest::newRow("Doesn't Exist") << "does-not-exist" << false;
80+ }
81+
82+ void testGetItem() {
83+ QFETCH(QString, appId);
84+ QFETCH(bool, exists);
85+
86+ LauncherBackend backend;
87+ auto item = backend.getItem(appId);
88+
89+ if (exists) {
90+ QVERIFY(item != nullptr);
91+ } else {
92+ QVERIFY(item == nullptr);
93+ }
94+ }
95+
96+ void testCount_data() {
97+ QTest::addColumn<QString>("appId");
98+ QTest::addColumn<bool>("setCount");
99+ QTest::addColumn<int>("inCount");
100+ QTest::addColumn<bool>("countVisible");
101+ QTest::addColumn<int>("expectedCount");
102+
103+ /* Get baseline data on things working */
104+ QTest::newRow("Baseline") << "rel-icon" << false << 0 << false << -1;
105+
106+ /* Valid count, but not visible */
107+ QTest::newRow("Not visible") << "rel-icon" << true << 42 << false << -1;
108+
109+ /* Turn it on */
110+ QTest::newRow("Visible Count") << "rel-icon" << true << 42 << true << 42;
111+
112+ /* Invalide app to load */
113+ QTest::newRow("Invalid App ID") << "this-app-doesnt-exist" << true << 42 << true << -1;
114+ }
115+
116+ void testCount() {
117+ QFETCH(QString, appId);
118+ QFETCH(bool, setCount);
119+ QFETCH(int, inCount);
120+ QFETCH(bool, countVisible);
121+ QFETCH(int, expectedCount);
122+
123+ LauncherBackend backend;
124+
125+ if (setCount)
126+ backend.setCount(appId, inCount);
127+ backend.setCountVisible(appId, countVisible);
128+
129+ QCOMPARE(backend.count(appId), expectedCount);
130+ }
131+
132+ void testDbusName_data() {
133+ QTest::addColumn<QString>("decoded");
134+ QTest::addColumn<QString>("encoded");
135+
136+ /* Passthrough test */
137+ QTest::newRow("Passthrough") << "fine" << "fine";
138+
139+ /* Number as first characeter */
140+ QTest::newRow("Number first") << "31337" << "_331337";
141+
142+ /* Underscore test */
143+ QTest::newRow("Underscore test") << "this_is_c_style_namespacing" << "this_5Fis_5Fc_5Fstyle_5Fnamespacing";
144+
145+ /* Hyphen test */
146+ QTest::newRow("Hyphen test") << "typical-application" << "typical_2Dapplication";
147+
148+ /* Japanese test */
149+ QTest::newRow("日本語 test") << "日本語" << "_E6_97_A5_E6_9C_AC_E8_AA_9E";
150+ }
151+
152+ void testDbusName() {
153+ QFETCH(QString, decoded);
154+ QFETCH(QString, encoded);
155+
156+ QString encodeOut = LauncherBackend::encodeAppId(decoded);
157+ QCOMPARE(encoded, encodeOut);
158+
159+ QString decodeOut = LauncherBackend::decodeAppId(encoded);
160+ QCOMPARE(decoded, decodeOut);
161+ }
162+
163+ void testDbusIface_data() {
164+ QTest::addColumn<QString>("appId");
165+ QTest::addColumn<bool>("setCount");
166+ QTest::addColumn<int>("inCount");
167+ QTest::addColumn<bool>("countVisible");
168+ QTest::addColumn<int>("expectedCount");
169+
170+ /* Get baseline data on things working */
171+ QTest::newRow("Baseline") << "rel-icon" << false << 0 << false << -1;
172+
173+ /* Turn it on */
174+ QTest::newRow("Visible Count") << "rel-icon" << true << 42 << true << 42;
175+
176+ /* Invalide app to load */
177+ QTest::newRow("Invalid App ID") << "this-app-doesnt-exist" << true << 42 << true << -1;
178+ }
179+
180+ void testDbusIface() {
181+ QFETCH(QString, appId);
182+ QFETCH(bool, setCount);
183+ QFETCH(int, inCount);
184+ QFETCH(bool, countVisible);
185+ QFETCH(int, expectedCount);
186+
187+ QDBusConnection con = QDBusConnection::sessionBus();
188+ QDBusMessage message;
189+ QDBusMessage reply;
190+
191+ LauncherBackend backend;
192+
193+ if (setCount) {
194+ message = QDBusMessage::createMethodCall("com.canonical.Unity.Launcher",
195+ "/com/canonical/Unity/Launcher/" + LauncherBackend::encodeAppId(appId),
196+ "org.freedesktop.DBus.Properties",
197+ "Set");
198+ QVariantList cargs;
199+ cargs.append(QString("com.canonical.Unity.Launcher.Item"));
200+ cargs.append(QString("count"));
201+ cargs.append(QVariant::fromValue(QDBusVariant(inCount)));
202+
203+ message.setArguments(cargs);
204+ reply = con.call(message);
205+ QCOMPARE(reply.type(), QDBusMessage::ReplyMessage);
206+ }
207+
208+ /* Set countVisible */
209+ message = QDBusMessage::createMethodCall("com.canonical.Unity.Launcher",
210+ "/com/canonical/Unity/Launcher/" + LauncherBackend::encodeAppId(appId),
211+ "org.freedesktop.DBus.Properties",
212+ "Set");
213+ QVariantList cvargs;
214+ cvargs.append(QString("com.canonical.Unity.Launcher.Item"));
215+ cvargs.append(QString("countVisible"));
216+ cvargs.append(QVariant::fromValue(QDBusVariant(countVisible)));
217+
218+ message.setArguments(cvargs);
219+ reply = con.call(message);
220+ QCOMPARE(reply.type(), QDBusMessage::ReplyMessage);
221+
222+ /* Get value */
223+ message = QDBusMessage::createMethodCall("com.canonical.Unity.Launcher",
224+ "/com/canonical/Unity/Launcher/" + LauncherBackend::encodeAppId(appId),
225+ "org.freedesktop.DBus.Properties",
226+ "Get");
227+ QVariantList getargs;
228+ getargs.append(QString("com.canonical.Unity.Launcher.Item"));
229+ getargs.append(QString("count"));
230+
231+ message.setArguments(getargs);
232+ reply = con.call(message);
233+ QCOMPARE(reply.type(), QDBusMessage::ReplyMessage);
234+ QCOMPARE(reply.arguments()[0].value<QDBusVariant>().variant().toInt(), expectedCount);
235+ }
69};
236};
70
237
71QTEST_GUILESS_MAIN(LauncherBackendTest)
238QTEST_GUILESS_MAIN(LauncherBackendTest)
tests/plugins/Utils/CMakeLists.txt+2−1
@@ -11,7 +11,8 @@ macro(run_tests)
11 -o ${CMAKE_BINARY_DIR}/${_test}.xml,xunitxml
11 -o ${CMAKE_BINARY_DIR}/${_test}.xml,xunitxml
12 -o -,txt)
12 -o -,txt)
13 add_test(NAME ${_test} COMMAND ${testCommand})
13 add_test(NAME ${_test} COMMAND ${testCommand})
14+ set_tests_properties(${_test} PROPERTIES ENVIRONMENT "LC_ALL=C")
14− add_custom_target(${_test} ${testCommand})
15+ add_custom_target(${_test} env "LC_ALL=C" ${testCommand})
15 add_executable(${_test}Exec ${_test}.cpp modeltest.cpp)
16 add_executable(${_test}Exec ${_test}.cpp modeltest.cpp)
16 qt5_use_modules(${_test}Exec Test Core Qml)
17 qt5_use_modules(${_test}Exec Test Core Qml)
17 target_link_libraries(${_test}Exec
18 target_link_libraries(${_test}Exec
tests/qmltests/CMakeLists.txt+5−5
@@ -16,7 +16,7 @@ add_qml_test(utils/Unity/Test UnityTest)
16
16
17set(qmltest_DEFAULT_TARGETS qmluitests)
17set(qmltest_DEFAULT_TARGETS qmluitests)
18set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
18set(qmltest_DEFAULT_NO_ADD_TEST TRUE)
19−set(qmltest_DEFAULT_PROPERTIES "")
19+set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C")
20
20
21add_qml_test(. Shell IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks
21add_qml_test(. Shell IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks
22 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
22 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
@@ -28,16 +28,16 @@ add_qml_test(Components LazyImage)
28add_qml_test(Components Rating)
28add_qml_test(Components Rating)
29add_qml_test(Components ResponsiveFlowView)
29add_qml_test(Components ResponsiveFlowView)
30add_qml_test(Components ResponsiveGridView)
30add_qml_test(Components ResponsiveGridView)
31−add_qml_test(Components Revealer)
32add_qml_test(Components SeeMore)
31add_qml_test(Components SeeMore)
33add_qml_test(Components Showable)
32add_qml_test(Components Showable)
34add_qml_test(Components PageHeaderLabel)
33add_qml_test(Components PageHeaderLabel)
34+add_qml_test(Components ZoomableImage)
35add_qml_test(Dash Dash IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
35add_qml_test(Dash Dash IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
36add_qml_test(Dash DashContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
36add_qml_test(Dash DashContent IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
37−add_qml_test(Dash Card)
37+add_qml_test(Dash Card IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
38−add_qml_benchmark(Dash CardBenchmark 1000)
38+add_qml_benchmark(Dash CardBenchmark 1000 IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
39add_qml_test(Dash CardHeader)
39add_qml_test(Dash CardHeader)
40−add_qml_test(Dash CardTool)
40+add_qml_test(Dash CardTool IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
41add_qml_test(Dash GenericScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
41add_qml_test(Dash GenericScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
42add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS}
42add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS}
43 ${CMAKE_BINARY_DIR}/tests/mocks
43 ${CMAKE_BINARY_DIR}/tests/mocks
tests/qmltests/Components/CMakeLists.txt+1
@@ -11,6 +11,7 @@ qt5_use_modules(DragHandleTestExec Test Core Qml Gui Quick)
11target_link_libraries(DragHandleTestExec UbuntuGestureQml)
11target_link_libraries(DragHandleTestExec UbuntuGestureQml)
12
12
13add_binary_qml_test(DragHandle ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures "")
13add_binary_qml_test(DragHandle ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures "")
14+add_manual_qml_test(. DragHandle IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
14
15
15add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
16add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
16add_definitions(-DTEST_DIR="${CMAKE_CURRENT_LIST_DIR}")
17add_definitions(-DTEST_DIR="${CMAKE_CURRENT_LIST_DIR}")
tests/qmltests/Components/RevealingRectangle.qmldeleted−78
@@ -1,78 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import Ubuntu.Components 0.1
19−import "../../../qml/Components"
20−
21−Item {
22− id: revealingRectangle
23−
24− property int orientation: Qt.Vertical
25− property int direction: Qt.LeftToRight
26− property Revealer revealer: __revealer
27− property Showable showable: __showable
28−
29− Revealer {
30− id: __revealer
31−
32− target: __showable
33− width: target.width
34− height: target.height
35− x: orientation == Qt.Vertical ? 0 : direction == Qt.LeftToRight ? 0 : parent.width - width
36− y: orientation == Qt.Horizontal ? 0 : direction == Qt.LeftToRight ? 0 : parent.height - height
37− handleSize: orientation == Qt.Vertical ? handle.height : handle.width
38− hintDisplacement: handleSize
39− orientation: revealingRectangle.orientation
40− direction: revealingRectangle.direction
41− }
42−
43− Showable {
44− id: __showable
45−
46− width: orientation == Qt.Horizontal ? units.gu(24) : parent.width
47− height: orientation == Qt.Vertical ? units.gu(24) : parent.height
48−
49− shown: false
50− showAnimation: SmoothedAnimation {
51− property: orientation == Qt.Horizontal ? "x" : "y"
52− velocity: __revealer.dragVelocity
53− duration: 200
54− to: __revealer.openedValue
55− }
56− hideAnimation: SmoothedAnimation {
57− property: orientation == Qt.Horizontal ? "x" : "y"
58− velocity: __revealer.dragVelocity
59− duration: 200
60− to: __revealer.closedValue
61− }
62−
63− Rectangle {
64− anchors.fill: parent
65− color: "red"
66− }
67−
68− Rectangle {
69− id: handle
70−
71− x: orientation == Qt.Vertical ? 0 : direction == Qt.LeftToRight ? parent.width - width : 0
72− y: orientation == Qt.Horizontal ? 0 : direction == Qt.LeftToRight ? parent.height - height : 0
73− width: orientation == Qt.Horizontal ? units.gu(2) : parent.width
74− height: orientation == Qt.Vertical ? units.gu(2) : parent.height
75− color: "black"
76− }
77− }
78−}
tests/qmltests/Components/tst_FilterGrid.qml+1−1
@@ -50,6 +50,7 @@ Rectangle {
50 CheckBox {
50 CheckBox {
51 id: filterCheckBox
51 id: filterCheckBox
52 checked: true
52 checked: true
53+ onCheckedChanged: filterGrid.setFilter(checked, false /*animate*/)
53 }
54 }
54 }
55 }
55 }
56 }
@@ -99,7 +100,6 @@ Rectangle {
99 maximumNumberOfColumns: 3
100 maximumNumberOfColumns: 3
100 collapsedRowCount:
101 collapsedRowCount:
101 collapsedRowCountSelector.values[collapsedRowCountSelector.selectedIndex]
102 collapsedRowCountSelector.values[collapsedRowCountSelector.selectedIndex]
102− filter: filterCheckBox.checked
103 minimumHorizontalSpacing: units.gu(1)
103 minimumHorizontalSpacing: units.gu(1)
104 delegateWidth: units.gu(6)
104 delegateWidth: units.gu(6)
105 delegateHeight: units.gu(6)
105 delegateHeight: units.gu(6)
tests/qmltests/Components/tst_PageHeaderLabel.qml+4−4
@@ -26,7 +26,7 @@ Item {
26 width: units.gu(110)
26 width: units.gu(110)
27 height: units.gu(30)
27 height: units.gu(30)
28
28
29− Scope {
29+ MockScope {
30 id: scopeMock
30 id: scopeMock
31 }
31 }
32
32
@@ -148,17 +148,17 @@ Item {
148
148
149 pageHeader.triggerSearch()
149 pageHeader.triggerSearch()
150
150
151− scopeMock.searchInProgress = false
151+ scopeMock.setSearchInProgress(false);
152 compare(searchIndicator.running, false, "Search indicator is running.")
152 compare(searchIndicator.running, false, "Search indicator is running.")
153 tryCompare(primaryImage, "visible", true)
153 tryCompare(primaryImage, "visible", true)
154
154
155− scopeMock.searchInProgress = true
155+ scopeMock.setSearchInProgress(true);
156 compare(searchIndicator.running, true, "Search indicator isn't running.")
156 compare(searchIndicator.running, true, "Search indicator isn't running.")
157 tryCompare(primaryImage, "visible", false)
157 tryCompare(primaryImage, "visible", false)
158 }
158 }
159
159
160 function cleanup() {
160 function cleanup() {
161− scopeMock.searchInProgress = false;
161+ scopeMock.setSearchInProgress(false);
162 pageHeader.resetSearch();
162 pageHeader.resetSearch();
163 }
163 }
164
164
tests/qmltests/Components/tst_Revealer.qmldeleted−262
@@ -1,262 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import QtTest 1.0
19−import Unity.Test 0.1 as UT
20−import ".."
21−
22−/*
23− There's a revealer on each window edge. If you press and hold any edge you
24− should see a black bar appearing from that edge. If you them slide the
25− pointer/finger towards the opposite edge, that black bar should follow
26− the movement up to around the center of the window. Next to the black bar,
27− which represents the "handle" area of the Revealer, You should see a red rectangle,
28− which is the main body of the Showable concrolled by the Revealer (Showable = red
29− + black rects).
30− */
31−Item {
32− width: units.gu(75)
33− height: units.gu(50)
34−
35− RevealingRectangle {
36− id: topRevealingRectangle
37− anchors.fill: parent
38− orientation: Qt.Vertical
39− direction: Qt.LeftToRight
40− }
41−
42− RevealingRectangle {
43− id: bottomRevealingRectangle
44− anchors.fill: parent
45− orientation: Qt.Vertical
46− direction: Qt.RightToLeft
47− }
48−
49− RevealingRectangle {
50− id: leftRevealingRectangle
51− anchors.fill: parent
52− orientation: Qt.Horizontal
53− direction: Qt.LeftToRight
54− }
55−
56− RevealingRectangle {
57− id: rightRevealingRectangle
58− anchors.fill: parent
59− orientation: Qt.Horizontal
60− direction: Qt.RightToLeft
61− }
62−
63− UT.UnityTestCase {
64− name: "Revealer"
65− when: windowShown
66−
67− /*
68− A bit of the showable should be displayed when you press over the
69− handle area of the Revealer.
70−
71− Once released, it should go out of sight again.
72− */
73− function test_showHintOnPress() {
74− var revealer = topRevealingRectangle.revealer
75− var showable = topRevealingRectangle.showable
76−
77− // It starts out of sight
78− compare(showable.y, -showable.height)
79−
80− // (item, x, y, button, modifiers, delay)
81− mousePress(revealer,
82− revealer.width/2,
83− revealer.handleSize/2,
84− Qt.LeftButton, Qt.NoModifier, 0);
85−
86− tryCompare(showable, "y", -showable.height + revealer.handleSize)
87−
88− // (item, x, y, button, modifiers, delay)
89− mouseRelease(revealer,
90− revealer.width/2,
91− revealer.handleSize/2,
92− Qt.LeftButton, Qt.NoModifier, 0);
93−
94− tryCompare(showable, "y", -showable.height)
95− }
96−
97− /*
98− Press over the handle area of the Revealer and drag it to pull
99− its target Showable. Release it half-way and the Showable will
100− continue moving by itself until it's completely shown.
101−
102−
103− Press over the handle area and drag it back to hide the Showable.
104− Release it half-way and it will continue moving by itself until it's
105− completely hidden again.
106− */
107− function test_dragToRevealAndDragBackToHide_top() {
108− var revealer = topRevealingRectangle.revealer
109− var showable = topRevealingRectangle.showable
110− revealer.__dateTime = fakeDateTime
111−
112− // It starts out of sight
113− compare(showable.y, -showable.height)
114−
115− mouseFlick(revealer,
116− revealer.width/2, // from_x
117− revealer.handleSize/2, // from_y
118− revealer.width/2, // to_x
119− showable.height/2); // to_y
120−
121− // Should eventually get fully extended
122− tryCompare(showable, "y", 0)
123−
124− // Now drag it back to get it hidden
125−
126− mouseFlick(revealer,
127− revealer.width/2,
128− showable.height - (revealer.handleSize/2),
129− revealer.width/2,
130− showable.height/2)
131−
132− // Should eventually be completely out of sight
133− tryCompare(showable, "y", -showable.height)
134− }
135−
136− function test_dragToRevealAndDragBackToHide_bottom() {
137− var revealer = bottomRevealingRectangle.revealer
138− var showable = bottomRevealingRectangle.showable
139− var revRect = bottomRevealingRectangle
140− revealer.__dateTime = fakeDateTime
141−
142− // It starts out of sight
143− compare(showable.y, revRect.height)
144−
145− mouseFlick(revealer,
146− revealer.width/2, // from_x
147− revealer.height - revealer.handleSize/2, // from_y
148− revealer.width/2, // to_x
149− revealer.height - showable.height/2); // to_y
150−
151− // Should eventually get fully extended
152− tryCompare(showable, "y", revRect.height - showable.height)
153−
154− // Now drag it back to get it hidden
155−
156− mouseFlick(revealer,
157− revealer.width/2,
158− revealer.handleSize/2,
159− revealer.width/2,
160− revealer.height - showable.height/2)
161−
162− // Should eventually be completely out of sight
163− tryCompare(showable, "y", revRect.height)
164− }
165−
166− function test_dragToRevealAndDragBackToHide_left() {
167− var revealer = leftRevealingRectangle.revealer
168− var showable = leftRevealingRectangle.showable
169− revealer.__dateTime = fakeDateTime
170−
171− // It starts out of sight
172− compare(showable.x, -showable.width)
173−
174− mouseFlick(revealer,
175− revealer.handleSize/2, // from_x
176− revealer.height/2, // from_y
177− showable.width/2, // to_x
178− revealer.height/2) // to_y
179−
180− // Should eventually get fully extended
181− tryCompare(showable, "x", 0)
182−
183− // Now drag it back to get it hidden
184−
185− mouseFlick(revealer,
186− showable.width - (revealer.handleSize/2),
187− revealer.height/2,
188− showable.width/2,
189− revealer.height/2)
190−
191− // Should eventually be completely out of sight
192− tryCompare(showable, "x", -showable.width)
193− }
194−
195− function test_dragToRevealAndDragBackToHide_right() {
196− var revealer = rightRevealingRectangle.revealer
197− var showable = rightRevealingRectangle.showable
198− var revRect = rightRevealingRectangle
199− revealer.__dateTime = fakeDateTime
200−
201− // It starts out of sight
202− compare(showable.x, revRect.width)
203−
204− mouseFlick(revealer,
205− revealer.width - revealer.handleSize/2, // from_x
206− revealer.height/2, // from_y
207− revealer.width - showable.width/2, // to_x
208− revealer.height/2) // to_y
209−
210− // Should eventually get fully extended
211− tryCompare(showable, "x", revRect.width - showable.width)
212−
213− // Now drag it back to get it hidden
214−
215− mouseFlick(revealer,
216− revealer.handleSize/2,
217− revealer.height/2,
218− revealer.width - showable.width/2,
219− revealer.height/2)
220−
221− // Should eventually be completely out of sight
222− tryCompare(showable, "x", revRect.width)
223− }
224−
225− /*
226− Start dragging down (pulling the showable into view) and then,
227− midway, drag a bit upwards and release it.
228− The showable should keep moving away, ending up hidden again.
229− */
230− function test_dragForthAndBackReturnsOriginalState() {
231− var revealer = topRevealingRectangle.revealer
232− var showable = topRevealingRectangle.showable
233− revealer.__dateTime = fakeDateTime
234−
235− // It starts out of sight
236− compare(showable.y, -showable.height)
237−
238− mouseFlick(revealer,
239− revealer.width/2, // from_x
240− revealer.handleSize/2, // from_y
241− revealer.width/2, // to_x
242− showable.height/2, // to_y
243− true /* do press */, false /* don't release */);
244−
245− // Should be about half-extended
246− verify(showable.y > -showable.height*3/4)
247− verify(showable.y < -showable.height*1/4)
248−
249−
250− // Now drag it back a bit
251− mouseFlick(revealer,
252− revealer.width/2, // from_x
253− showable.height/2, // from_y
254− revealer.width/2, // to_x
255− showable.height/4, // to_y
256− false /* don't press */, true /* do release */);
257−
258− // Should eventually be completely out of sight again
259− tryCompare(showable, "y", -showable.height)
260− }
261− }
262−}
tests/qmltests/Components/tst_ZoomableImage.qmlnew file+192
@@ -0,0 +1,192 @@
1+/*
2+ * Copyright 2014 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtTest 1.0
19+import "../../../qml/Components"
20+import Unity.Test 0.1 as UT
21+
22+Rectangle {
23+ id: root
24+ width: units.gu(30)
25+ height: units.gu(60)
26+ color: "lightgrey"
27+
28+ property var widgetData0: {
29+ "source": "",
30+ "zoomable": false
31+ }
32+
33+ property var widgetData1: {
34+ "source": "../../../qml/graphics/phone_background.jpg",
35+ "zoomable": false
36+ }
37+
38+ property var widgetData2: {
39+ "source": "../../../qml/Dash/graphics/phone/screenshots/gallery@12.png",
40+ "zoomable": true
41+ }
42+
43+ ZoomableImage {
44+ id: zoomableImage
45+ width: parent.width
46+ anchors.fill: parent
47+ asynchronous: false
48+ }
49+
50+ SignalSpy {
51+ id: signalSpy
52+ }
53+
54+ UT.UnityTestCase {
55+ name: "ZoomableImageTest"
56+ when: windowShown
57+
58+ function test_loadImage() {
59+ var lazyImage = findChild(zoomableImage, "lazyImage");
60+
61+ zoomableImage.source = widgetData0["source"];
62+ zoomableImage.zoomable = widgetData0["zoomable"];
63+ waitForRendering(zoomableImage);
64+ tryCompare(zoomableImage, "imageState", "default");
65+
66+ signalSpy.signalName = "onStateChanged";
67+ signalSpy.target = lazyImage;
68+ signalSpy.clear();
69+
70+ zoomableImage.source = widgetData1["source"];
71+ zoomableImage.zoomable = widgetData1["zoomable"];
72+ waitForRendering(lazyImage);
73+ tryCompareFunction(function() { return get_filename(lazyImage.source.toString()) === get_filename(widgetData1["source"]); }, true);
74+ waitForRendering(zoomableImage);
75+ tryCompare(zoomableImage, "imageState", "ready");
76+ compare (signalSpy.count, 1);
77+ }
78+
79+ function get_filename(a) {
80+ var wordsA = a.split("/");
81+ var filenameA = wordsA[wordsA.length-1];
82+ return filenameA;
83+ }
84+
85+ function test_mousewheel() {
86+ var image = findChild(zoomableImage, "image");
87+ var lazyImage = findChild(zoomableImage, "lazyImage");
88+ var flickable = findChild(zoomableImage, "flickable");
89+
90+ zoomableImage.source = widgetData2["source"];
91+ zoomableImage.zoomable = true;
92+ waitForRendering(zoomableImage);
93+
94+ tryCompare(zoomableImage, "imageState", "ready");
95+ tryCompareFunction(function() { return get_filename(lazyImage.source.toString()) === get_filename(widgetData2["source"]); }, true);
96+ waitForRendering(image);
97+
98+ // move mouse to center
99+ mouseMove(zoomableImage, zoomableImage.width / 2, zoomableImage.height / 2);
100+
101+ // Test Zoom-in Zoom-out twice.
102+ for (var c=0; c<2; c++) {
103+ // zoom in
104+ for (var i=0; i<10; i++) {
105+ mouseWheel(zoomableImage, zoomableImage.width / 2, zoomableImage.height / 2, 0, 10);
106+ tryCompare(image, "scale", 1.0 + (i + 1) * 0.1);
107+ compare(flickable.contentWidth, lazyImage.width * image.scale);
108+ compare(flickable.contentHeight, lazyImage.height * image.scale);
109+ }
110+
111+ // zoom out
112+ for (var i=0; i<10; i++) {
113+ mouseWheel(zoomableImage, zoomableImage.width / 2, zoomableImage.height / 2, 0, -10);
114+ tryCompare(image, "scale", 2.0 - (i + 1) * 0.1);
115+ compare(flickable.contentWidth, lazyImage.width * image.scale);
116+ compare(flickable.contentHeight, lazyImage.height * image.scale);
117+ }
118+ }
119+ }
120+
121+ function test_pinch_data() {
122+ return [ { source:widgetData2["source"],
123+ zoomable:false,
124+ answer1: true,
125+ answer2: false,
126+ answer3: true,
127+ answer4: 1.0,
128+ answer5: 1.0 },
129+ { source:widgetData2["source"],
130+ zoomable:true,
131+ answer1: false,
132+ answer2: true,
133+ answer3: false,
134+ answer4: 1.7740461882048026,
135+ answer5: 1.0 }
136+ ]
137+ }
138+
139+ function test_pinch(data) {
140+ var image = findChild(zoomableImage, "image");
141+ var lazyImage = findChild(zoomableImage, "lazyImage");
142+ var flickable = findChild(zoomableImage, "flickable");
143+
144+ signalSpy.signalName = "onScaleChanged";
145+ signalSpy.target = image;
146+ signalSpy.clear();
147+
148+ zoomableImage.source = data.source;
149+ zoomableImage.zoomable = data.zoomable;
150+ waitForRendering(zoomableImage);
151+
152+ tryCompare(zoomableImage, "imageState", "ready");
153+ tryCompareFunction(function() { return get_filename(lazyImage.source.toString()) === get_filename(data.source); }, true);
154+ waitForRendering(image);
155+
156+ var x1Start = zoomableImage.width * 2 / 6;
157+ var y1Start = zoomableImage.height * 2 / 6;
158+ var x1End = zoomableImage.width * 1 / 6;
159+ var y1End = zoomableImage.height * 1 / 6;
160+ var x2Start = zoomableImage.width * 4 / 6;
161+ var y2Start = zoomableImage.height * 4 / 6;
162+ var x2End = zoomableImage.width * 5 / 6;
163+ var y2End = zoomableImage.height * 5 / 6;
164+
165+ var oldScale = image.scale;
166+
167+ // move mouse to center
168+ mouseMove(zoomableImage, zoomableImage.width / 2, zoomableImage.height / 2);
169+
170+ // Test Zoom-in Zoom-out twice.
171+ for (var c=0; c<2; c++) {
172+ wait(3000); // have to delay between two consequent pinch event.
173+ // pinch zoom-in
174+ touchPinch(zoomableImage, x1Start, y1Start, x1End, y1End, x2Start, y2Start, x2End, y2End);
175+
176+ tryCompare(image, "scale", data.answer4);
177+ var newScale = image.scale;
178+ compare(newScale == oldScale, data.answer1, "scale factor not equal: "+ oldScale + "=?" + newScale);
179+ compare(newScale > oldScale, data.answer2, "scale factor didn't changed");
180+ compare(signalSpy.count == 0, data.answer3, "scale signal count error");
181+ compare(newScale, data.answer4, "scale factor error");
182+ compare(flickable.contentWidth, lazyImage.width * image.scale);
183+ compare(flickable.contentHeight, lazyImage.height * image.scale);
184+
185+ wait(3000); // have to delay between two consequent pinch event.
186+ // pinch zoom-out
187+ touchPinch(zoomableImage, x1End, y1End, x1Start, y1Start, x2End, y2End, x2Start, y2Start);
188+ tryCompare(image, "scale", data.answer5);
189+ }
190+ }
191+ }
192+}
tests/qmltests/Dash/Previews/tst_Preview.qml+1−1
@@ -23,7 +23,7 @@ import Unity 0.2 as Unity
23Rectangle {
23Rectangle {
24 id: root
24 id: root
25 width: units.gu(60)
25 width: units.gu(60)
26− height: units.gu(80)
26+ height: units.gu(60)
27 color: Theme.palette.selected.background
27 color: Theme.palette.selected.background
28
28
29 Item {
29 Item {
tests/qmltests/Dash/Previews/tst_PreviewHeader.qml+66−4
@@ -24,6 +24,12 @@ Rectangle {
24 width: units.gu(60)
24 width: units.gu(60)
25 height: units.gu(80)
25 height: units.gu(80)
26
26
27+ property var origHeaderjson: {
28+ "title": "THE TITLE",
29+ "subtitle": "Something catchy",
30+ "mascot": "../graphics/play_button.png"
31+ }
32+
27 property var headerjson: {
33 property var headerjson: {
28 "title": "THE TITLE",
34 "title": "THE TITLE",
29 "subtitle": "Something catchy",
35 "subtitle": "Something catchy",
@@ -43,14 +49,70 @@ Rectangle {
43 }
49 }
44
50
45 UT.UnityTestCase {
51 UT.UnityTestCase {
52+ id: testCase
46 name: "PreviewHeaderTest"
53 name: "PreviewHeaderTest"
47 when: windowShown
54 when: windowShown
48
55
56+ property Item mascot: findChild(previewHeader, "mascotShape")
57+ property Item outerRow: findChild(previewHeader, "outerRow")
58+ property Item column: findChild(previewHeader, "column")
59+
60+ function initTestCase() {
61+ verify(typeof testCase.mascot === "object", "Couldn't find mascot object.");
62+ verify(typeof testCase.outerRow === "object", "Couldn't find outerRow object.");
63+ verify(typeof testCase.column === "object", "Couldn't find column object.");
64+
65+ headerjson.mascot = "";
66+ headerjson.title = "";
67+ headerjson.subtitle = "";
68+ previewHeader.widgetData = headerjson;
69+ }
70+
71+ function test_mascot_data() {
72+ return [
73+ { tag: "Empty", source: "", visible: false },
74+ { tag: "Invalid", source: "bad_path", visible: false },
75+ { tag: "Valid", source: "../graphics/play_button.png", visible: true },
76+ ]
77+ }
78+
79+ function test_mascot(data) {
80+ headerjson.mascot = data.source;
81+ previewHeader.widgetData = headerjson;
82+
83+ tryCompare(testCase.mascot, "visible", data.visible);
84+ }
85+
86+ function test_dimensions_data() {
87+ return [
88+ { tag: "Column width with mascot", object: column, width: previewHeader.width - mascot.width - outerRow.margins * 3, mascot: "artwork/avatar.png" },
89+ { tag: "Header height", object: previewHeader, height: function() { return outerRow.height + outerRow.margins * 2 } },
90+ ]
91+ }
92+
93+ function test_dimensions(data) {
94+ if (data.hasOwnProperty("mascot")) {
95+ headerjson.mascot = data.mascot;
96+ }
97+ previewHeader.widgetData = headerjson;
98+
99+ if (data.hasOwnProperty("width")) {
100+ tryCompare(data.object, "width", data.width);
101+ }
102+
103+ if (data.hasOwnProperty("height")) {
104+ tryCompareFunction(function() { return data.object.height === data.height() }, true);
105+ }
106+ }
107+
49 function test_json() {
108 function test_json() {
109+ headerjson = origHeaderjson;
110+ previewHeader.widgetData = headerjson;
111+
50− var cardHeader = findChild(previewHeader, "cardHeader");
112+ var innerPreviewHeader = findChild(previewHeader, "innerPreviewHeader");
51− compare(cardHeader.title, "THE TITLE");
113+ compare(innerPreviewHeader.title, "THE TITLE");
52− compare(cardHeader.subtitle, "Something catchy");
114+ compare(innerPreviewHeader.subtitle, "Something catchy");
53− compare(cardHeader.mascot.toString().slice(-24), "graphics/play_button.png");
115+ compare(innerPreviewHeader.mascot.toString().slice(-24), "graphics/play_button.png");
54 }
116 }
55 }
117 }
56}
118}
tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qml+21−2
@@ -36,6 +36,8 @@ Rectangle {
36 property var triggeredDataReviewOnly: { "rating": invalidInputRating, "review": validInputText, "author": null }
36 property var triggeredDataReviewOnly: { "rating": invalidInputRating, "review": validInputText, "author": null }
37
37
38 property var widgetDataBoth: { "visible": "both", "required": "both" }
38 property var widgetDataBoth: { "visible": "both", "required": "both" }
39+ property var widgetDataBothRequireRating: { "visible": "both", "required": "rating" }
40+ property var widgetDataBothRequireReview: { "visible": "both", "required": "review" }
39 property var widgetDataRating: { "visible": "rating", "required": "rating" }
41 property var widgetDataRating: { "visible": "rating", "required": "rating" }
40 property var widgetDataRatingBroken: { "visible": "rating", "required": "review" }
42 property var widgetDataRatingBroken: { "visible": "rating", "required": "review" }
41 property var widgetDataReview: { "visible": "review", "required": "review" }
43 property var widgetDataReview: { "visible": "review", "required": "review" }
@@ -85,6 +87,14 @@ Rectangle {
85 {tag: "both, rating-only review", widgetData: widgetDataBoth, inputRating: validInputRating, inputText: invalidInputText, emitted: false},
87 {tag: "both, rating-only review", widgetData: widgetDataBoth, inputRating: validInputRating, inputText: invalidInputText, emitted: false},
86 {tag: "both, review-only review", widgetData: widgetDataBoth, inputRating: invalidInputRating, inputText: validInputText, emitted: false},
88 {tag: "both, review-only review", widgetData: widgetDataBoth, inputRating: invalidInputRating, inputText: validInputText, emitted: false},
87 {tag: "both, complete review", widgetData: widgetDataBoth, inputRating: validInputRating, inputText: validInputText, emitted: true},
89 {tag: "both, complete review", widgetData: widgetDataBoth, inputRating: validInputRating, inputText: validInputText, emitted: true},
90+ {tag: "both require rating, null review", widgetData: widgetDataBothRequireRating, inputRating: invalidInputRating, inputText: invalidInputText, emitted: false},
91+ {tag: "both require rating, rating-only review", widgetData: widgetDataBothRequireRating, inputRating: validInputRating, inputText: invalidInputText, emitted: true},
92+ {tag: "both require rating, review-only review", widgetData: widgetDataBothRequireRating, inputRating: invalidInputRating, inputText: validInputText, emitted: false},
93+ {tag: "both require rating, complete review", widgetData: widgetDataBothRequireRating, inputRating: validInputRating, inputText: validInputText, emitted: true},
94+ {tag: "both require review, null review", widgetData: widgetDataBothRequireReview, inputRating: invalidInputRating, inputText: invalidInputText, emitted: false},
95+ {tag: "both require review, rating-only review", widgetData: widgetDataBothRequireReview, inputRating: validInputRating, inputText: invalidInputText, emitted: false},
96+ {tag: "both require review, review-only review", widgetData: widgetDataBothRequireReview, inputRating: invalidInputRating, inputText: validInputText, emitted: true},
97+ {tag: "both require review, complete review", widgetData: widgetDataBothRequireReview, inputRating: validInputRating, inputText: validInputText, emitted: true},
88 {tag: "rating, null review", widgetData: widgetDataRating, inputRating: invalidInputRating, inputText: invalidInputText, emitted: false},
98 {tag: "rating, null review", widgetData: widgetDataRating, inputRating: invalidInputRating, inputText: invalidInputText, emitted: false},
89 {tag: "rating, rating-only review", widgetData: widgetDataRating, inputRating: validInputRating, inputText: invalidInputText, emitted: true},
99 {tag: "rating, rating-only review", widgetData: widgetDataRating, inputRating: validInputRating, inputText: invalidInputText, emitted: true},
90 {tag: "rating, review-only review", widgetData: widgetDataRating, inputRating: invalidInputRating, inputText: validInputText, emitted: false},
100 {tag: "rating, review-only review", widgetData: widgetDataRating, inputRating: invalidInputRating, inputText: validInputText, emitted: false},
@@ -114,7 +124,9 @@ Rectangle {
114 verify(rating.visible === true);
124 verify(rating.visible === true);
115
125
116 rating.value = data.inputRating;
126 rating.value = data.inputRating;
117− if (data.widgetData["required"] !== "rating" || data.inputRating < 0) {
127+ if (data.widgetData["required"] !== "rating" ||
128+ data.widgetData["visible"] !== "rating" ||
129+ data.inputRating < 0) {
118 compare(spy.count, 0);
130 compare(spy.count, 0);
119 } else {
131 } else {
120 compare(spy.count, 1);
132 compare(spy.count, 1);
@@ -129,7 +141,14 @@ Rectangle {
129 reviewTextArea.text = data.inputText;
141 reviewTextArea.text = data.inputText;
130 mouseClick(submitButton, submitButton.width / 2, submitButton.height / 2);
142 mouseClick(submitButton, submitButton.width / 2, submitButton.height / 2);
131 switch (data.widgetData["required"]) {
143 switch (data.widgetData["required"]) {
144+ case "rating": {
145+ if (rating.visible === false || data.inputRating < 0) {
132− case "rating": compare(spy.count, 0); break;
146+ compare(spy.count, 0);
147+ } else {
148+ compare(spy.count, 1);
149+ }
150+ break;
151+ }
133 case "both":
152 case "both":
134 default: {
153 default: {
135 if (data.inputRating < 0 || data.inputText === "") {
154 if (data.inputRating < 0 || data.inputText === "") {
tests/qmltests/Dash/Previews/tst_PreviewTextSummary.qml+5−5
@@ -42,7 +42,7 @@ Rectangle {
42
42
43 PreviewTextSummary {
43 PreviewTextSummary {
44 id: previewTextSummary
44 id: previewTextSummary
45− anchors.fill: parent
45+ anchors { left: parent.left; right: parent.right }
46 widgetData: widgetDataComplete
46 widgetData: widgetDataComplete
47 }
47 }
48
48
@@ -51,6 +51,7 @@ Rectangle {
51 when: windowShown
51 when: windowShown
52
52
53 property var textLabel: findChild(previewTextSummary, "textLabel")
53 property var textLabel: findChild(previewTextSummary, "textLabel")
54+ property var titleLabel: findChild(previewTextSummary, "titleLabel")
54
55
55 function init() {
56 function init() {
56 verify(typeof textLabel === "object", "TextLabel object could not be found.")
57 verify(typeof textLabel === "object", "TextLabel object could not be found.")
@@ -61,16 +62,14 @@ Rectangle {
61 }
62 }
62
63
63 function test_optional_title() {
64 function test_optional_title() {
64− var titleLabel = findChild(previewTextSummary, "titleLabel")
65−
66 // verify titleLabel is visible and textLabel is anchored below it
65 // verify titleLabel is visible and textLabel is anchored below it
67 compare(titleLabel.visible, true)
66 compare(titleLabel.visible, true)
68− compare(textLabel.y, titleLabel.height)
67+ tryCompare(textLabel, "y", titleLabel.height)
69
68
70 // verify titleLabel disappears and textLabel moves up
69 // verify titleLabel disappears and textLabel moves up
71 previewTextSummary.widgetData = widgetDataNoTitle
70 previewTextSummary.widgetData = widgetDataNoTitle
72 compare(titleLabel.visible, false)
71 compare(titleLabel.visible, false)
73− compare(textLabel.y, 0)
72+ tryCompare(textLabel, "y", 0)
74 }
73 }
75
74
76 function test_see_more() {
75 function test_see_more() {
@@ -96,6 +95,7 @@ Rectangle {
96 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
95 verify(textLabel.lineCount <= textLabel.maximumCollapsedLineCount)
97 compare(seeMore.visible, false)
96 compare(seeMore.visible, false)
98 tryCompare(textLabel, "height", textLabel.contentHeight)
97 tryCompare(textLabel, "height", textLabel.contentHeight)
98+ tryCompare(previewTextSummary, "height", titleLabel.height + textLabel.height)
99 }
99 }
100 }
100 }
101}
101}
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml+6−3
@@ -36,7 +36,8 @@ Rectangle {
36
36
37 PreviewZoomableImage {
37 PreviewZoomableImage {
38 id: zoomableImage
38 id: zoomableImage
39− width: parent.width
39+ anchors.fill: parent
40+ widgetData: widgetData1
40 }
41 }
41
42
42 UT.UnityTestCase {
43 UT.UnityTestCase {
@@ -47,10 +48,12 @@ Rectangle {
47 var image = findChild(zoomableImage, "image");
48 var image = findChild(zoomableImage, "image");
48
49
49 zoomableImage.widgetData = widgetData0;
50 zoomableImage.widgetData = widgetData0;
51+ waitForRendering(zoomableImage);
50− tryCompare(image, "state", "default");
52+ tryCompare(image, "imageState", "default");
51
53
52 zoomableImage.widgetData = widgetData1;
54 zoomableImage.widgetData = widgetData1;
55+ waitForRendering(zoomableImage);
53− tryCompare(image, "state", "ready");
56+ tryCompare(image, "imageState", "ready");
54 }
57 }
55 }
58 }
56}
59}
tests/qmltests/Dash/tst_Card.qml+78−92
@@ -29,8 +29,8 @@ Rectangle {
29
29
30 property string cardData: '
30 property string cardData: '
31 {
31 {
32− "art": "../../tests/qmltests/Dash/artwork/music-player-design.png",
32+ "art": "../../../tests/qmltests/Dash/artwork/music-player-design.png",
33− "mascot": "../../tests/qmltests/Dash/artwork/avatar.png",
33+ "mascot": "../../../tests/qmltests/Dash/artwork/avatar.png",
34 "title": "foo",
34 "title": "foo",
35 "subtitle": "bar",
35 "subtitle": "bar",
36 "summary": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
36 "summary": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
@@ -98,21 +98,26 @@ Rectangle {
98
98
99 CardTool {
99 CardTool {
100 id: cardTool
100 id: cardTool
101− template: card.template
101+ template: Helpers.update(JSON.parse(Helpers.defaultLayout), Helpers.tryParse(layoutArea.text, layoutError))['template'];
102− components: card.components
102+ components: Helpers.update(JSON.parse(Helpers.defaultLayout), Helpers.tryParse(layoutArea.text, layoutError))['components'];
103 viewWidth: units.gu(48)
103 viewWidth: units.gu(48)
104 }
104 }
105
105
106− Card {
106+ readonly property var card: loader.item
107− id: card
108− anchors { top: parent.top; left: parent.left; margins: units.gu(1) }
109
107
110− width: cardTool.cardWidth || implicitWidth
108+ Loader {
111− height: cardTool.cardHeight || implicitHeight
109+ id: loader
110+ anchors { top: parent.top; left: parent.left; margins: units.gu(1) }
112
111
113− template: Helpers.update(JSON.parse(Helpers.defaultLayout), Helpers.tryParse(layoutArea.text, layoutError))['template'];
112+ sourceComponent: cardTool.cardComponent
114− components: Helpers.update(JSON.parse(Helpers.defaultLayout), Helpers.tryParse(layoutArea.text, layoutError))['components'];
113+ onLoaded: {
114+ item.template = Qt.binding(function() { return cardTool.template; });
115+ item.components = Qt.binding(function() { return cardTool.components; });
115− cardData: Helpers.mapData(dataArea.text, components, dataError)
116+ item.cardData = Qt.binding(function() { return Helpers.mapData(dataArea.text, cardTool.components, dataError); });
117+ item.width = Qt.binding(function() { return cardTool.cardWidth || item.implicitWidth; });
118+ item.height = Qt.binding(function() { return cardTool.cardHeight || item.implicitHeight; });
119+ item.fixedHeaderHeight = Qt.binding(function() { return cardTool.headerHeight; });
120+ }
116 }
121 }
117
122
118 Rectangle {
123 Rectangle {
@@ -181,60 +186,45 @@ Rectangle {
181
186
182 when: windowShown
187 when: windowShown
183
188
184− property Item header: findChild(card, "cardHeader")
185− property Item headerLoader: findChild(card, "cardHeaderLoader")
186− property Item title: findChild(header, "titleLabel")
189+ property Item title: findChild(card, "titleLabel")
190+ property Item subtitle: findChild(card, "subtitleLabel")
191+ property var headerRow: findChild(card, "outerRow")
187− property Item art: findChild(card, "artShape")
192+ property var art: findChild(card, "artShape")
188 property Item artImage: findChild(card, "artImage")
193 property Item artImage: findChild(card, "artImage")
189 property Item summary: findChild(card, "summaryLabel")
194 property Item summary: findChild(card, "summaryLabel")
190 property Item background: findChild(card, "background")
195 property Item background: findChild(card, "background")
191 property Item backgroundLoader: findChild(card, "backgroundLoader")
196 property Item backgroundLoader: findChild(card, "backgroundLoader")
192 property Item backgroundImage: findChild(card, "backgroundImage")
197 property Item backgroundImage: findChild(card, "backgroundImage")
193−
198+ property Item mascotImage: findChild(card, "mascotImage");
194− function initTestCase() {
195− verify(typeof testCase.header === "object", "Couldn't find header object.");
196− verify(typeof testCase.art === "object", "Couldn't find art object.");
197− verify(typeof testCase.artImage === "object", "Couldn't find artImage object.");
198− verify(typeof testCase.summary === "object", "Couldn't find summary object.");
199− verify(typeof testCase.artImage === "object", "Couldn't find background object.");
200− verify(typeof testCase.summary === "object", "Couldn't find backgroundImage object.");
201− }
202
199
203 function cleanup() {
200 function cleanup() {
204 selector.selectedIndex = -1;
201 selector.selectedIndex = -1;
205 }
202 }
206
203
207−
208− function test_header_binding_data() {
209− return [
210− { tag: "Mascot", property: "mascot", value: Qt.resolvedUrl("artwork/avatar.png"), index: 0 },
211− { tag: "Title", property: "title", value: "foo", index: 0 },
212− { tag: "Subtitle", property: "subtitle", value: "bar", index: 0 },
213− ];
214− }
215−
216− function test_header_binding(data) {
217− selector.selectedIndex = data.index;
218− tryCompare(testCase.header, data.property, data.value);
219− }
220−
221 function test_card_binding_data() {
204 function test_card_binding_data() {
222 return [
205 return [
223− { tag: "Art", object: artImage, property: "source", value: Qt.resolvedUrl("artwork/music-player-design.png"), index: 0 },
206+ { tag: "Art", object: "artImage", property: "source", value: Qt.resolvedUrl("artwork/music-player-design.png"), index: 0 },
224− { tag: "Summary", object: summary, property: "text", field: "summary", index: 0 },
207+ { tag: "Summary", object: "summary", property: "text", field: "summary", index: 0 },
225− { tag: "Fit", object: art, fill: Image.PreserveAspectFit, index: 4 },
208+ { tag: "Fit", object: "art", fill: Image.PreserveAspectFit, index: 4 },
209+ { tag: "Mascot", object: "mascotImage", property: "source", value: Qt.resolvedUrl("artwork/avatar.png"), index: 0 },
210+ { tag: "Title", object: "title", property: "text", value: "foo", index: 0 },
211+ { tag: "Subtitle", object: "subtitle", property: "text", value: "bar", index: 0 },
226 ];
212 ];
227 }
213 }
228
214
229 function test_card_binding(data) {
215 function test_card_binding(data) {
230 selector.selectedIndex = data.index;
216 selector.selectedIndex = data.index;
217+ waitForRendering(card);
218+
219+ tryCompareFunction(function() { return testCase[data.object] !== null }, true);
220+ var object = testCase[data.object];
231
221
232 if (data.hasOwnProperty('value')) {
222 if (data.hasOwnProperty('value')) {
233− tryCompare(data.object, data.property, data.value);
223+ tryCompare(object, data.property, data.value);
234 }
224 }
235
225
236 if (data.hasOwnProperty('field')) {
226 if (data.hasOwnProperty('field')) {
237− tryCompare(data.object, data.property, card.cardData[data.field]);
227+ tryCompare(object, data.property, card.cardData[data.field]);
238 }
228 }
239 }
229 }
240
230
@@ -243,31 +233,21 @@ Rectangle {
243 { tag: "Medium", width: units.gu(18.5), index: 0 },
233 { tag: "Medium", width: units.gu(18.5), index: 0 },
244 { tag: "Small", width: units.gu(12), index: 1 },
234 { tag: "Small", width: units.gu(12), index: 1 },
245 { tag: "Large", width: units.gu(38), index: 2 },
235 { tag: "Large", width: units.gu(38), index: 2 },
246− { tag: "Wide", width: units.gu(18.5), aspect: 0.5, index: 0 },
236+ { tag: "Wide", width: units.gu(18.5), index: 0 },
247 { tag: "Horizontal", width: units.gu(38), index: 5 },
237 { tag: "Horizontal", width: units.gu(38), index: 5 },
248 // Make sure card ends with header when there's no summary
238 // Make sure card ends with header when there's no summary
249− { tag: "NoSummary", height: function() { return headerLoader.y + headerLoader.height }, index: 6 },
239+ { tag: "NoSummary", height: function() { var cardToolRow = findChild(cardTool, "outerRow");
240+ return cardToolRow.y + cardToolRow.height + units.gu(1) }, index: 6 },
250− { tag: "HorizontalNoSummary", height: function() { return headerLoader.height }, card_layout: "horizontal", index: 6 },
241+ { tag: "HorizontalNoSummary", height: function() { return headerRow.height + units.gu(2) }, card_layout: "horizontal", index: 6 },
251 ]
242 ]
252 }
243 }
253
244
254 function test_card_size(data) {
245 function test_card_size(data) {
255− waitForRendering(card);
256 selector.selectedIndex = data.index;
246 selector.selectedIndex = data.index;
257
247
258− if (data.hasOwnProperty("size")) {
259− card.template['card-size'] = data.size;
260− card.templateChanged();
261− }
262−
263 if (data.hasOwnProperty("card_layout")) {
248 if (data.hasOwnProperty("card_layout")) {
264− card.template['card-layout'] = data.card_layout;
249+ cardTool.template['card-layout'] = data.card_layout;
265− card.templateChanged();
250+ cardTool.templateChanged();
266− }
267−
268− if (data.hasOwnProperty("aspect")) {
269− card.components['art']['aspect-ratio'] = data.aspect;
270− card.componentsChanged();
271 }
251 }
272
252
273 if (data.hasOwnProperty("width")) {
253 if (data.hasOwnProperty("width")) {
@@ -288,25 +268,26 @@ Rectangle {
288 { tag: "Large", width: units.gu(38), index: 2 },
268 { tag: "Large", width: units.gu(38), index: 2 },
289 { tag: "Wide", height: units.gu(19), size: "large", index: 3 },
269 { tag: "Wide", height: units.gu(19), size: "large", index: 3 },
290 { tag: "Fit", height: units.gu(38), size: "large", width: units.gu(19), index: 4 },
270 { tag: "Fit", height: units.gu(38), size: "large", width: units.gu(19), index: 4 },
291− { tag: "VerticalWidth", width: function() { return header.width }, index: 0 },
271+ { tag: "VerticalWidth", width: function() { return headerRow.width + units.gu(1) * 2 }, index: 0 },
292− { tag: "HorizontalHeight", height: function() { return header.height }, index: 5 },
272+ { tag: "HorizontalHeight", height: function() { return headerRow.height + units.gu(1) * 2 }, index: 5 },
293− { tag: "HorizontalWidth", width: function() { return headerLoader.x }, index: 5 },
273+ { tag: "HorizontalWidth", width: function() { return headerRow.x - units.gu(1) }, index: 5 },
294 ]
274 ]
295 }
275 }
296
276
297 function test_art_size(data) {
277 function test_art_size(data) {
298 selector.selectedIndex = data.index;
278 selector.selectedIndex = data.index;
299−
300 if (data.hasOwnProperty("size")) {
279 if (data.hasOwnProperty("size")) {
301− card.template['card-size'] = data.size;
280+ cardTool.template['card-size'] = data.size;
302− card.templateChanged();
281+ cardTool.templateChanged();
303 }
282 }
304
283
305 if (data.hasOwnProperty("aspect")) {
284 if (data.hasOwnProperty("aspect")) {
306− card.components['art']['aspect-ratio'] = data.aspect;
285+ cardTool.components['art']['aspect-ratio'] = data.aspect;
307− card.componentsChanged();
286+ cardTool.componentsChanged();
308 }
287 }
309
288
289+ waitForRendering(card);
290+
310 if (data.hasOwnProperty("width")) {
291 if (data.hasOwnProperty("width")) {
311 if (typeof data.width === "function") {
292 if (typeof data.width === "function") {
312 tryCompareFunction(function() { return art.width === data.width() }, true);
293 tryCompareFunction(function() { return art.width === data.width() }, true);
@@ -326,38 +307,40 @@ Rectangle {
326
307
327 function test_art_layout_data() {
308 function test_art_layout_data() {
328 return [
309 return [
329− { tag: "Vertical", left: function() { return 0 }, index: 0},
310+ { tag: "Vertical", left: function() { return units.gu(1); }, index: 0},
330− { tag: "Horizontal", left: function() { return art.width }, index: 5 },
311+ { tag: "Horizontal", left: function() { return art.width + units.gu(1); }, index: 5 },
331 ];
312 ];
332 }
313 }
333
314
334 function test_art_layout(data) {
315 function test_art_layout(data) {
335 selector.selectedIndex = data.index;
316 selector.selectedIndex = data.index;
317+ waitForRendering(card);
336
318
337− tryCompare(testCase.headerLoader, "x", data.left());
319+ tryCompare(headerRow, "x", data.left());
338 }
320 }
339
321
340 function test_header_layout_data() {
322 function test_header_layout_data() {
341 return [
323 return [
342− { tag: "Vertical", top: function() { return art.y + art.height },
324+ { tag: "Vertical", top: function() { return art.y + art.height + units.gu(1) },
343− left: function() { return art.x }, index: 0 },
325+ left: function() { return art.x + units.gu(1) }, index: 0 },
344− { tag: "Horizontal", top: function() { return art.y },
326+ { tag: "Horizontal", top: function() { return art.y + units.gu(1) },
345− left: function() { return art.x + art.width }, index: 5 },
327+ left: function() { return art.x + art.width + units.gu(1) }, index: 5 },
346− { tag: "Overlay", top: function() { return art.y + art.height - header.height },
328+ { tag: "Overlay", top: function() { return art.y + art.height - headerRow.height - units.gu(1) },
347− left: function() { return art.x }, index: 9 },
329+ left: function() { return art.x + units.gu(1) }, index: 9 },
348 ]
330 ]
349 }
331 }
350
332
351 function test_header_layout(data) {
333 function test_header_layout(data) {
352 selector.selectedIndex = data.index;
334 selector.selectedIndex = data.index;
335+ waitForRendering(card);
353
336
354− tryCompareFunction(function() { return testCase.headerLoader.y === data.top() }, true);
337+ tryCompareFunction(function() { return testCase.headerRow.y === data.top() }, true);
355− tryCompareFunction(function() { return testCase.headerLoader.x === data.left() }, true);
338+ tryCompareFunction(function() { return testCase.headerRow.x === data.left() }, true);
356 }
339 }
357
340
358 function test_summary_layout_data() {
341 function test_summary_layout_data() {
359 return [
342 return [
360− { tag: "With header", top: function() { return headerLoader.y + headerLoader.height }, index: 0 },
343+ { tag: "With header", top: function() { return headerRow.y + headerRow.height + units.gu(1); }, index: 0 },
361 { tag: "Without header", top: function() { return art.y + art.height }, index: 7 },
344 { tag: "Without header", top: function() { return art.y + art.height }, index: 7 },
362 ]
345 ]
363 }
346 }
@@ -365,16 +348,16 @@ Rectangle {
365 function test_summary_layout(data) {
348 function test_summary_layout(data) {
366 selector.selectedIndex = data.index;
349 selector.selectedIndex = data.index;
367
350
351+ waitForRendering(card);
352+
368 tryCompareFunction(function() { return testCase.summary.y === data.top() }, true);
353 tryCompareFunction(function() { return testCase.summary.y === data.top() }, true);
369 }
354 }
370
355
371 function test_art_visibility() {
356 function test_art_visibility() {
372 selector.selectedIndex = 8;
357 selector.selectedIndex = 8;
373
358
374− tryCompare(testCase.artImage, "source", "");
359+ compare(testCase.artImage, null);
375− compare(testCase.art.visible, false);
360+ compare(testCase.art, null);
376− compare(testCase.art.height, 0);
377− compare(testCase.art.width, 0);
378 }
361 }
379
362
380 function test_background_data() {
363 function test_background_data() {
@@ -402,7 +385,11 @@ Rectangle {
402
385
403 waitForRendering(card);
386 waitForRendering(card);
404
387
405− tryCompare(backgroundLoader, "active", data.visible);
388+ if (data.visible) {
389+ tryCompare(backgroundLoader, "active", true);
390+ } else {
391+ compare(backgroundLoader, null);
392+ }
406
393
407 if (data.hasOwnProperty("color")) {
394 if (data.hasOwnProperty("color")) {
408 tryCompare(background, "color", data.color);
395 tryCompare(background, "color", data.color);
@@ -449,13 +436,15 @@ Rectangle {
449
436
450 function test_fontColor(data) {
437 function test_fontColor(data) {
451 selector.selectedIndex = 10;
438 selector.selectedIndex = 10;
439+ waitForRendering(card);
452
440
453 background.color = data.tag;
441 background.color = data.tag;
454
442
455 var fontColor = data.dark ? "grey" : "white";
443 var fontColor = data.dark ? "grey" : "white";
456
444
457 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
445 tryCompareFunction(function() { return Qt.colorEqual(summary.color, fontColor); }, true);
458− tryCompareFunction(function() { return Qt.colorEqual(header.fontColor, fontColor); }, true);
446+ tryCompareFunction(function() { return Qt.colorEqual(title.color, fontColor); }, true);
447+ tryCompareFunction(function() { return Qt.colorEqual(subtitle.color, fontColor); }, true);
459 }
448 }
460
449
461 function test_mascotShape_data() {
450 function test_mascotShape_data() {
@@ -468,15 +457,12 @@ Rectangle {
468
457
469 function test_mascotShape(data) {
458 function test_mascotShape(data) {
470 selector.selectedIndex = data.index;
459 selector.selectedIndex = data.index;
460+ waitForRendering(card);
471
461
472 var shape = findChild(card, "mascotShapeLoader");
462 var shape = findChild(card, "mascotShapeLoader");
473− var image = findChild(card, "mascotImage");
474−
475− verify(shape, "Could not find shape.");
476− verify(image, "Could not find image.");
477
463
478− tryCompare(shape, "active", data.shape);
464+ compare(shape !== null, data.shape);
479− tryCompare(image, "visible", !data.shape);
465+ tryCompare(mascotImage, "visible", !data.shape);
480 }
466 }
481 }
467 }
482}
468}
tests/qmltests/Dash/tst_CardBenchmark.qml+10−7
@@ -54,13 +54,16 @@ Rectangle {
54 Repeater {
54 Repeater {
55 id: cardRepeater
55 id: cardRepeater
56 model: 0
56 model: 0
57− Card {
57+ Loader {
58+ sourceComponent: cardTool.cardComponent
59+ onLoaded: {
60+ item.objectName = "delegate" + index;
58− width: cardTool.cardWidth || implicitWidth
61+ item.width = Qt.binding(function() { return cardTool.cardWidth || implicitWidth; });
59− height: cardTool.cardHeight || implicitHeight
62+ item.height = Qt.binding(function() { return cardTool.cardHeight || implicitHeight; });
60−
61− template: cardTool.template
62− components: cardTool.components
63− cardData: Helpers.mapData(root.cardData, components)
63+ item.cardData = Qt.binding(function() { return Helpers.mapData(root.cardData, cardTool.components); });
64+ item.template = Qt.binding(function() { return cardTool.template; });
65+ item.components = Qt.binding(function() { return cardTool.components; });
66+ }
64 }
67 }
65 }
68 }
66
69
tests/qmltests/Dash/tst_CardHeader.qmldeleted−116
@@ -1,116 +0,0 @@
1−/*
2− * Copyright (C) 2013 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.0
18−import QtTest 1.0
19−import Ubuntu.Components 0.1
20−import Unity.Test 0.1 as UT
21−import "../../../qml/Dash"
22−
23−
24−Rectangle {
25− width: units.gu(40)
26− height: units.gu(72)
27− color: "lightgrey"
28−
29− CardHeader {
30− id: cardHeader
31− anchors { left: parent.left; right: parent.right }
32− }
33−
34− Rectangle {
35− anchors.fill: cardHeader
36− color: "lightblue"
37− opacity: 0.5
38− }
39−
40− UT.UnityTestCase {
41− id: testCase
42− name: "CardHeader"
43−
44− when: windowShown
45−
46− property Item mascot: findChild(cardHeader, "mascotShapeLoader")
47− property Item titleLabel: findChild(cardHeader, "titleLabel")
48− property Item subtitleLabel: findChild(cardHeader, "subtitleLabel")
49− property Item oldPriceLabel: findChild(cardHeader, "oldPriceLabel")
50− property Item outerRow: findChild(cardHeader, "outerRow")
51− property Item column: findChild(cardHeader, "column")
52−
53− function initTestCase() {
54− verify(typeof testCase.mascot === "object", "Couldn't find mascot object.");
55− verify(typeof testCase.titleLabel === "object", "Couldn't find titleLabel object.");
56− verify(typeof testCase.subtitleLabel === "object", "Couldn't find subtitleLabel object.");
57− verify(typeof testCase.oldPriceLabel === "object", "Couldn't find oldPriceLabel object.");
58− }
59−
60− function cleanup() {
61− cardHeader.mascot = "";
62− cardHeader.title = "";
63− cardHeader.subtitle = "";
64− }
65−
66− function test_mascot_data() {
67− return [
68− { tag: "Empty", source: "", visible: false },
69− { tag: "Invalid", source: "bad_path", visible: false },
70− { tag: "Valid", source: Qt.resolvedUrl("artwork/avatar.png"), visible: true },
71− ]
72− }
73−
74− function test_mascot(data) {
75− cardHeader.mascot = data.source;
76− tryCompare(testCase.mascot, "visible", data.visible);
77− }
78−
79− function test_labels_data() {
80− return [
81− { tag: "Empty", visible: false },
82− { tag: "Title only", title: "Foo", visible: true },
83− { tag: "Subtitle only", subtitle: "Bar", visible: false },
84− { tag: "Both", title: "Foo", subtitle: "Bar", visible: true },
85− ]
86− }
87−
88− function test_labels(data) {
89− cardHeader.title = data.title !== undefined ? data.title : "";
90− cardHeader.subtitle = data.subtitle !== undefined ? data.subtitle : "";
91− tryCompare(cardHeader, "visible", data.visible);
92− }
93−
94− function test_dimensions_data() {
95− return [
96− { tag: "Column width", object: column, width: cardHeader.width },
97− { tag: "Column width with mascot", object: column, width: cardHeader.width - mascot.width - outerRow.margins * 3, mascot: "artwork/avatar.png" },
98− { tag: "Header height", object: cardHeader, height: function() { return outerRow.height + outerRow.margins * 2 } },
99− ]
100− }
101−
102− function test_dimensions(data) {
103− if (data.hasOwnProperty("mascot")) {
104− cardHeader.mascot = data.mascot;
105− }
106−
107− if (data.hasOwnProperty("width")) {
108− tryCompare(data.object, "width", data.width);
109− }
110−
111− if (data.hasOwnProperty("height")) {
112− tryCompareFunction(function() { return data.object.height === data.height() }, true);
113− }
114− }
115− }
116−}
tests/qmltests/Dash/tst_CardTool.qml+11−31
@@ -127,26 +127,6 @@ Rectangle {
127 }
127 }
128 }
128 }
129 }
129 }
130−
131− Card {
132− id: card
133− template: cardTool.template;
134− components: cardTool.components;
135− cardData: Helpers.mapData(dataArea.text, components, dataError)
136−
137− width: cardTool.cardWidth || implicitWidth
138− height: cardTool.cardHeight || implicitHeight
139−
140− clip: true
141− headerAlignment: cardTool.headerAlignment
142−
143− Rectangle {
144− anchors.fill: parent
145− color: "transparent"
146− border.width: 1
147− border.color: "green"
148− }
149− }
150 }
130 }
151
131
152 Rectangle {
132 Rectangle {
@@ -257,7 +237,7 @@ Rectangle {
257 id: testCase
237 id: testCase
258 name: "Card"
238 name: "Card"
259
239
260− property Card internalCard: findChild(cardTool, "cardToolCard")
240+ property var internalCard: findChild(cardTool, "cardToolCard")
261
241
262 when: windowShown
242 when: windowShown
263
243
@@ -272,16 +252,16 @@ Rectangle {
272
252
273 function test_card_size_data() {
253 function test_card_size_data() {
274 return [
254 return [
275− { tag: "Medium", width: units.gu(18.5), height: function() { return card.height }, index: 0 },
255+ { tag: "Medium", width: units.gu(18.5), height: function() { return internalCard ? internalCard.height : 0 }, index: 0 },
276− { tag: "No art", width: units.gu(18.5), height: function() { return card.height }, index: 1 },
256+ { tag: "No art", width: units.gu(18.5), height: function() { return internalCard ? internalCard.height : 0 }, index: 1 },
277− { tag: "No summary", width: units.gu(18.5), height: function() { return card.height }, index: 2 },
257+ { tag: "No summary", width: units.gu(18.5), height: function() { return internalCard ? internalCard.height : 0 }, index: 2 },
278− { tag: "Just header", width: units.gu(18.5), height: function() { return card.height }, index: 3 },
258+ { tag: "Just header", width: units.gu(18.5), height: function() { return internalCard ? internalCard.height : 0 }, index: 3 },
279− { tag: "Just title", width: units.gu(18.5), height: function() { return card.height }, index: 4 },
259+ { tag: "Just title", width: units.gu(18.5), height: function() { return internalCard ? internalCard.height : 0 }, index: 4 },
280− { tag: "Title and subtitle", width: units.gu(18.5), height: function() { return card.height }, index: 5 },
260+ { tag: "Title and subtitle", width: units.gu(18.5), height: function() { return internalCard ? internalCard.height : 0 }, index: 5 },
281− { tag: "Title and mascot", width: units.gu(18.5), height: function() { return card.height }, index: 6 },
261+ { tag: "Title and mascot", width: units.gu(18.5), height: function() { return internalCard ? internalCard.height : 0 }, index: 6 },
282− { tag: "Small", width: units.gu(12), height: function() { return card.height }, index: 7 },
262+ { tag: "Small", width: units.gu(12), height: function() { return internalCard ? internalCard.height : 0 }, index: 7 },
283− { tag: "Large", width: units.gu(38), height: function() { return card.height }, index: 8 },
263+ { tag: "Large", width: units.gu(38), height: function() { return internalCard ? internalCard.height : 0 }, index: 8 },
284− { tag: "Horizontal", width: units.gu(38), height: function() { return card.height }, index: 9 },
264+ { tag: "Horizontal", width: units.gu(38), height: function() { return internalCard ? internalCard.height : 0 }, index: 9 },
285 { tag: "OrganicGrid", width: undefined, height: undefined, index: 0, layout_index: 1},
265 { tag: "OrganicGrid", width: undefined, height: undefined, index: 0, layout_index: 1},
286 { tag: "Journal", width: undefined, height: units.gu(20), size: 20, index: 0, layout_index: 2 },
266 { tag: "Journal", width: undefined, height: units.gu(20), size: 20, index: 0, layout_index: 2 },
287 { tag: "OversizedJournal", width: undefined, height: units.gu(18.5), size: 40, index: 0, layout_index: 2 },
267 { tag: "OversizedJournal", width: undefined, height: units.gu(18.5), size: 40, index: 0, layout_index: 2 },
tests/qmltests/Dash/tst_Dash.qml+1−1
@@ -127,7 +127,7 @@ Item {
127 var dashContent = findChild(dash, "dashContent");
127 var dashContent = findChild(dash, "dashContent");
128 var current_index = dashContent.currentIndex;
128 var current_index = dashContent.currentIndex;
129
129
130− tabbar.selectedIndex = data.visualIndex;
130+ tabbar.model.selectedIndex = data.visualIndex;
131 compare(dashContent.currentIndex, data.shouldBeVisible ? data.visualIndex : current_index);
131 compare(dashContent.currentIndex, data.shouldBeVisible ? data.visualIndex : current_index);
132 }
132 }
133 }
133 }
tests/qmltests/Dash/tst_DashContent.qml+5−5
@@ -166,7 +166,7 @@ Item {
166
166
167 // test greater than scope count.
167 // test greater than scope count.
168 var currentScopeIndex = dashContent.currentIndex;
168 var currentScopeIndex = dashContent.currentIndex;
169− dashContent.setCurrentScopeAtIndex(scopesModel.count, true, false);
169+ dashContent.setCurrentScopeAtIndex(8, true, false);
170 compare(dashContent.currentIndex, currentScopeIndex, "Scope should not change if changing to greater index than count");
170 compare(dashContent.currentIndex, currentScopeIndex, "Scope should not change if changing to greater index than count");
171 }
171 }
172
172
@@ -195,7 +195,7 @@ Item {
195 dashContent.setCurrentScopeAtIndex(data.index, true, false);
195 dashContent.setCurrentScopeAtIndex(data.index, true, false);
196 tryCompareFunction(get_current_item_object_name, data.objectName)
196 tryCompareFunction(get_current_item_object_name, data.objectName)
197 var pageHeader = findChild(dashContent, "pageHeader");
197 var pageHeader = findChild(dashContent, "pageHeader");
198− compare(pageHeader.scope, scopesModel.get(data.index));
198+ compare(pageHeader.scope, scopesModel.getScope(data.index));
199 }
199 }
200
200
201 function test_is_active_data() {
201 function test_is_active_data() {
@@ -212,9 +212,9 @@ Item {
212 dashContent.setCurrentScopeAtIndex(data.select, true, false);
212 dashContent.setCurrentScopeAtIndex(data.select, true, false);
213 dashContent.visible = data.visible;
213 dashContent.visible = data.visible;
214
214
215− tryCompare(scopesModel.get(0), "isActive", data.active0);
215+ tryCompare(scopesModel.getScope(0), "isActive", data.active0);
216− tryCompare(scopesModel.get(1), "isActive", data.active1);
216+ tryCompare(scopesModel.getScope(1), "isActive", data.active1);
217− tryCompare(scopesModel.get(2), "isActive", data.active2);
217+ tryCompare(scopesModel.getScope(2), "isActive", data.active2);
218 }
218 }
219
219
220 function doFindMusicButton(parent) {
220 function doFindMusicButton(parent) {
tests/qmltests/Dash/tst_GenericScopeView.qml+14−14
@@ -39,7 +39,7 @@ Item {
39 id: scopes
39 id: scopes
40
40
41 onLoadedChanged: {
41 onLoadedChanged: {
42− genericScopeView.scope = scopes.get(2)
42+ genericScopeView.scope = scopes.getScope(2)
43 }
43 }
44 }
44 }
45
45
@@ -67,7 +67,7 @@ Item {
67 when: scopes.loaded && windowShown
67 when: scopes.loaded && windowShown
68
68
69 function init() {
69 function init() {
70− genericScopeView.scope = scopes.get(2)
70+ genericScopeView.scope = scopes.getScope(2)
71 shell.width = units.gu(120)
71 shell.width = units.gu(120)
72 genericScopeView.categoryView.positionAtBeginning();
72 genericScopeView.categoryView.positionAtBeginning();
73 tryCompare(genericScopeView.categoryView, "contentY", 0)
73 tryCompare(genericScopeView.categoryView, "contentY", 0)
@@ -96,31 +96,31 @@ Item {
96
96
97 function test_showDash() {
97 function test_showDash() {
98 previewListView.open = true;
98 previewListView.open = true;
99− scopes.get(2).showDash();
99+ scopes.getScope(2).showDash();
100 tryCompare(previewListView, "open", false);
100 tryCompare(previewListView, "open", false);
101 }
101 }
102
102
103 function test_hideDash() {
103 function test_hideDash() {
104 previewListView.open = true;
104 previewListView.open = true;
105− scopes.get(2).hideDash();
105+ scopes.getScope(2).hideDash();
106 tryCompare(previewListView, "open", false);
106 tryCompare(previewListView, "open", false);
107 }
107 }
108
108
109 function test_searchQuery() {
109 function test_searchQuery() {
110− genericScopeView.scope = scopes.get(0);
110+ genericScopeView.scope = scopes.getScope(0);
111 genericScopeView.scope.searchQuery = "test";
111 genericScopeView.scope.searchQuery = "test";
112− genericScopeView.scope = scopes.get(1);
112+ genericScopeView.scope = scopes.getScope(1);
113 genericScopeView.scope.searchQuery = "test2";
113 genericScopeView.scope.searchQuery = "test2";
114− genericScopeView.scope = scopes.get(0);
114+ genericScopeView.scope = scopes.getScope(0);
115 tryCompare(genericScopeView.scope, "searchQuery", "test");
115 tryCompare(genericScopeView.scope, "searchQuery", "test");
116− genericScopeView.scope = scopes.get(1);
116+ genericScopeView.scope = scopes.getScope(1);
117 tryCompare(genericScopeView.scope, "searchQuery", "test2");
117 tryCompare(genericScopeView.scope, "searchQuery", "test2");
118 }
118 }
119
119
120 function test_changeScope() {
120 function test_changeScope() {
121 genericScopeView.scope.searchQuery = "test"
121 genericScopeView.scope.searchQuery = "test"
122− genericScopeView.scope = scopes.get(1)
122+ genericScopeView.scope = scopes.getScope(1)
123− genericScopeView.scope = scopes.get(2)
123+ genericScopeView.scope = scopes.getScope(2)
124 tryCompare(genericScopeView.scope, "searchQuery", "test")
124 tryCompare(genericScopeView.scope, "searchQuery", "test")
125 }
125 }
126
126
@@ -140,7 +140,7 @@ Item {
140 mouseClick(header, header.width / 2, header.height / 2);
140 mouseClick(header, header.width / 2, header.height / 2);
141 tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
141 tryCompareFunction(function() { middleHeight = category.height; return category.height > initialHeight; }, true);
142 tryCompare(category, "filtered", false);
142 tryCompare(category, "filtered", false);
143− verify(category.height > middleHeight);
143+ tryCompareFunction(function() { return category.height > middleHeight; }, true);
144
144
145 mouseClick(header, header.width / 2, header.height / 2);
145 mouseClick(header, header.width / 2, header.height / 2);
146 verify(category.expandable);
146 verify(category.expandable);
@@ -165,7 +165,7 @@ Item {
165
165
166 mouseClick(header2, header2.width / 2, header2.height / 2);
166 mouseClick(header2, header2.width / 2, header2.height / 2);
167 tryCompare(category2, "filtered", false);
167 tryCompare(category2, "filtered", false);
168− tryCompare(category2FilterGrid, "filter", false);
168+ tryCompare(category2FilterGrid, "filtered", false);
169
169
170 categoryListView.positionAtBeginning();
170 categoryListView.positionAtBeginning();
171
171
@@ -182,7 +182,7 @@ Item {
182 mouseClick(header0, header0.width / 2, header0.height / 2);
182 mouseClick(header0, header0.width / 2, header0.height / 2);
183 tryCompare(category0, "filtered", false);
183 tryCompare(category0, "filtered", false);
184 tryCompare(category2, "filtered", true);
184 tryCompare(category2, "filtered", true);
185− tryCompare(category2FilterGrid, "filter", true);
185+ tryCompare(category2FilterGrid, "filtered", true);
186 mouseClick(header0, header0.width / 2, header0.height / 2);
186 mouseClick(header0, header0.width / 2, header0.height / 2);
187 tryCompare(category0, "filtered", true);
187 tryCompare(category0, "filtered", true);
188 tryCompare(category2, "filtered", true);
188 tryCompare(category2, "filtered", true);
@@ -199,7 +199,7 @@ Item {
199 var header0 = findChild(genericScopeView, "dashSectionHeader0")
199 var header0 = findChild(genericScopeView, "dashSectionHeader0")
200 mouseClick(header0, header0.width / 2, header0.height / 2);
200 mouseClick(header0, header0.width / 2, header0.height / 2);
201 tryCompare(category, "filtered", false);
201 tryCompare(category, "filtered", false);
202− tryCompare(category.item, "delegateCreationEnd", category.item.delegateCreationBegin + genericScopeView.height);
202+ tryCompareFunction(function() { return category.item.height == genericScopeView.height - category.item.displayMarginBeginning - category.item.displayMarginEnd; }, true);
203 mouseClick(header0, header0.width / 2, header0.height / 2);
203 mouseClick(header0, header0.width / 2, header0.height / 2);
204 tryCompare(category, "filtered", true);
204 tryCompare(category, "filtered", true);
205 }
205 }
tests/qmltests/Greeter/tst_Clock.qml+3−3
@@ -71,10 +71,10 @@ Rectangle {
71 var dateString = Qt.formatDate(dateObj, Qt.DefaultLocaleLongDate)
71 var dateString = Qt.formatDate(dateObj, Qt.DefaultLocaleLongDate)
72 var timeString = Qt.formatTime(dateObj)
72 var timeString = Qt.formatTime(dateObj)
73
73
74− clock.enabled = false
74+ clock.visible = false
75 var timeModel = findInvisibleChild(clock, "timeModel")
75 var timeModel = findInvisibleChild(clock, "timeModel")
76
76
77− compare(timeModel.menuObjectPath, "", "Clock shouldn't be connected to Indicators when not active.")
77+ compare(timeModel.menuObjectPath, "", "Clock shouldn't be connected to Indicators when not visible.")
78
78
79 clock.currentDate = dateObj
79 clock.currentDate = dateObj
80
80
@@ -83,7 +83,7 @@ Rectangle {
83 var timeLabel = findChild(clock, "timeLabel")
83 var timeLabel = findChild(clock, "timeLabel")
84 compare(timeLabel.text, timeString, "Not the expected time")
84 compare(timeLabel.text, timeString, "Not the expected time")
85
85
86− clock.enabled = true
86+ clock.visible = true
87
87
88 verify(timeModel.menuObjectPath != "", "Should be connected to Indicators.")
88 verify(timeModel.menuObjectPath != "", "Should be connected to Indicators.")
89 }
89 }
tests/qmltests/Greeter/tst_Phone.qml+10−50
@@ -61,6 +61,12 @@ Item {
61 signalName: "unlocked"
61 signalName: "unlocked"
62 }
62 }
63
63
64+ SignalSpy {
65+ id: teaseSpy
66+ target: greeter
67+ signalName: "tease"
68+ }
69+
64 UT.UnityTestCase {
70 UT.UnityTestCase {
65 name: "Greeter"
71 name: "Greeter"
66 when: windowShown
72 when: windowShown
@@ -82,56 +88,10 @@ Item {
82 }
88 }
83
89
84 function test_teasingArea(data) {
90 function test_teasingArea(data) {
85− tryCompare(greeter, "leftTeaserPressed", false)
91+ teaseSpy.clear()
86− tryCompare(greeter, "rightTeaserPressed", false)
87− mousePress(greeter, data.posX, greeter.height - units.gu(1))
88− tryCompare(greeter, "leftTeaserPressed", data.leftPressed)
89− tryCompare(greeter, "rightTeaserPressed", data.rightPressed)
90− mouseRelease(greeter, data.posX, greeter.height - units.gu(1))
91− tryCompare(greeter, "leftTeaserPressed", false)
92− tryCompare(greeter, "rightTeaserPressed", false)
93− }
94−
95− function test_teaseLockedUnlocked_data() {
96− return [
97− {tag: "unlocked", locked: false, moved: false},
98− {tag: "locked", locked: true, moved: false},
99− {tag: "moved", locked: false, moved: true}
100− ];
101− }
102−
103− function test_teaseLockedUnlocked(data) {
104− tryCompare(greeter, "rightTeaserPressed", false);
105− tryCompare(greeter, "x", 0);
106− greeter.locked = data.locked;
107−
108− // simulate greeter being in the middle of a swipe
109− if (data.moved) {
110− greeter.x = -units.gu(4);
111− tryCompare(greeter, "x", -units.gu(4));
112− }
113−
114− mouseClick(greeter, greeter.width - units.gu(5), greeter.height - units.gu(1));
92+ mouseClick(greeter, data.posX, greeter.height - units.gu(1))
115− greeter.minX = 0; // This is needed because the transition actually makes x jump once before animating
116−
117− if (!data.moved) {
118− // Check if it has been moved over by 2 GUs. Give it a 2 pixel grace area
119− // because animation duration and teaseTimer are the same duration and
120− // might cause slight offsets
121− tryCompareFunction(function() { return greeter.minX <= -units.gu(2) + 2}, true);
122− } else {
123− // waiting 100ms to make sure nothing moves
124− wait(100);
93+ teaseSpy.wait()
125− compare(greeter.minX, 0, "Greeter teasing not disabled even though it's locked or moving.");
94+ tryCompare(teaseSpy, "count", 1)
126− }
127−
128− // Restore position in case we moved it for the test
129− if (data.moved) {
130− greeter.x = 0;
131− }
132−
133− // Wait until we're back to 0
134− tryCompareFunction(function() { return greeter.x;}, 0);
135 }
95 }
136
96
137 function test_statsWelcomeScreen() {
97 function test_statsWelcomeScreen() {
tests/qmltests/Greeter/tst_Tablet.qml+36−8
@@ -54,6 +54,12 @@ Item {
54 signalName: "selected"
54 signalName: "selected"
55 }
55 }
56
56
57+ SignalSpy {
58+ id: teaseSpy
59+ target: greeter
60+ signalName: "tease"
61+ }
62+
57 UT.UnityTestCase {
63 UT.UnityTestCase {
58 name: "Greeter"
64 name: "Greeter"
59 when: windowShown
65 when: windowShown
@@ -325,14 +331,36 @@ Item {
325 }
331 }
326
332
327 function test_teasingArea(data) {
333 function test_teasingArea(data) {
328− tryCompare(greeter, "leftTeaserPressed", false)
334+ teaseSpy.clear()
329− tryCompare(greeter, "rightTeaserPressed", false)
330− mousePress(greeter, data.posX, greeter.height - units.gu(1))
335+ mouseClick(greeter, data.posX, greeter.height - units.gu(1))
331− tryCompare(greeter, "leftTeaserPressed", data.leftPressed)
336+ teaseSpy.wait()
332− tryCompare(greeter, "rightTeaserPressed", data.rightPressed)
337+ tryCompare(teaseSpy, "count", 1)
338+ }
339+
340+ function test_teaseLockedUnlocked_data() {
341+ return [
342+ {tag: "unlocked", locked: false, narrow: false},
343+ {tag: "locked", locked: true, narrow: false},
344+ ];
345+ }
346+
347+ function test_teaseLockedUnlocked(data) {
348+ teaseSpy.clear()
349+ greeter.locked = data.locked;
350+
333− mouseRelease(greeter, data.posX, greeter.height - units.gu(1))
351+ mouseClick(greeter, greeter.width - units.gu(5), greeter.height - units.gu(1));
334− tryCompare(greeter, "leftTeaserPressed", false)
352+
335− tryCompare(greeter, "rightTeaserPressed", false)
353+ if (!data.locked || data.narrow) {
354+ teaseSpy.wait()
355+ tryCompare(teaseSpy, "count", 1);
356+ } else {
357+ // waiting 100ms to make sure nothing happens
358+ wait(100);
359+ compare(teaseSpy.count, 0, "Greeter teasing not disabled even though it's locked.");
360+ }
361+
362+ // Reset value
363+ greeter.locked = false;
336 }
364 }
337
365
338 function test_dbus_set_active_entry() {
366 function test_dbus_set_active_entry() {
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+29−4
@@ -19,6 +19,7 @@ import QtTest 1.0
19import Unity.Test 0.1 as UT
19import Unity.Test 0.1 as UT
20import QMenuModel 0.1
20import QMenuModel 0.1
21import Unity.Indicators 0.1 as Indicators
21import Unity.Indicators 0.1 as Indicators
22+import Utils 0.1 as Utils
22
23
23Item {
24Item {
24 id: testView
25 id: testView
@@ -42,6 +43,10 @@ Item {
42 }
43 }
43 }
44 }
44
45
46+ Utils.GDateTimeFormatter {
47+ id: timeFormatter
48+ }
49+
45 UT.UnityTestCase {
50 UT.UnityTestCase {
46 name: "MenuItemFactory"
51 name: "MenuItemFactory"
47 when: windowShown
52 when: windowShown
@@ -358,8 +363,10 @@ Item {
358
363
359 function test_create_alarmMenu_data() {
364 function test_create_alarmMenu_data() {
360 return [
365 return [
361− {label: "testLabel1", enabled: true, icon: "file:///testIcon1" },
366+ {label: "testLabel1", enabled: true, icon: "file:///testIcon1", color: Qt.rgba(0, 0, 0, 0),
367+ time: new Date(2014, 04, 14).getTime()*1000, timeFormat: "%a %d %b %l:%M %p"},
362− {label: "testLabel2", enabled: false, icon: "file:///testIcon2" },
368+ {label: "testLabel2", enabled: false, icon: "file:///testIcon2", color: Qt.rgba(1, 0, 0, 0),
369+ time: new Date(2015, 12, 31).getTime()*1000, timeFormat: "%A" },
363 ];
370 ];
364 }
371 }
365
372
@@ -368,6 +375,12 @@ Item {
368 menuData.label = data.label;
375 menuData.label = data.label;
369 menuData.sensitive = data.enabled;
376 menuData.sensitive = data.enabled;
370 menuData.icon = data.icon;
377 menuData.icon = data.icon;
378+ menuData.ext = {
379+ 'xCanonicalTime': data.time,
380+ 'xCanonicalTimeFormat': data.timeFormat
381+ };
382+ timeFormatter.format = data.timeFormat;
383+ timeFormatter.time = data.time;
371
384
372 loader.data = menuData;
385 loader.data = menuData;
373 loader.sourceComponent = factory.load(menuData);
386 loader.sourceComponent = factory.load(menuData);
@@ -376,13 +389,16 @@ Item {
376
389
377 compare(loader.item.text, data.label, "Label does not match data");
390 compare(loader.item.text, data.label, "Label does not match data");
378 compare(loader.item.iconSource, data.icon, "Icon does not match data");
391 compare(loader.item.iconSource, data.icon, "Icon does not match data");
392+ compare(loader.item.time, timeFormatter.timeString, "Time does not match data");
379 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
393 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
380 }
394 }
381
395
382 function test_create_appointmentMenu_data() {
396 function test_create_appointmentMenu_data() {
383 return [
397 return [
384− {label: "testLabel1", enabled: true, icon: "file:///testIcon1" },
398+ {label: "testLabel1", enabled: true, icon: "file:///testIcon1", color: Qt.rgba(0, 0, 0, 0),
399+ time: new Date(2014, 04, 14).getTime()*1000, timeFormat: "%a %d %b %l:%M %p"},
385− {label: "testLabel2", enabled: false, icon: "file:///testIcon2" },
400+ {label: "testLabel2", enabled: false, icon: "file:///testIcon2", color: Qt.rgba(1, 0, 0, 0),
401+ time: new Date(2015, 12, 31).getTime()*1000, timeFormat: "%A" },
386 ];
402 ];
387 }
403 }
388
404
@@ -391,6 +407,13 @@ Item {
391 menuData.label = data.label;
407 menuData.label = data.label;
392 menuData.sensitive = data.enabled;
408 menuData.sensitive = data.enabled;
393 menuData.icon = data.icon;
409 menuData.icon = data.icon;
410+ menuData.ext = {
411+ 'xCanonicalColor': data.colour,
412+ 'xCanonicalTime': data.time,
413+ 'xCanonicalTimeFormat': data.timeFormat
414+ };
415+ timeFormatter.format = data.timeFormat;
416+ timeFormatter.time = data.time;
394
417
395 loader.data = menuData;
418 loader.data = menuData;
396 loader.sourceComponent = factory.load(menuData);
419 loader.sourceComponent = factory.load(menuData);
@@ -399,6 +422,8 @@ Item {
399
422
400 compare(loader.item.text, data.label, "Label does not match data");
423 compare(loader.item.text, data.label, "Label does not match data");
401 compare(loader.item.iconSource, data.icon, "Icon does not match data");
424 compare(loader.item.iconSource, data.icon, "Icon does not match data");
425+ compare(loader.item.time, timeFormatter.timeString, "Time does not match data");
426+ compare(loader.item.eventColor, data.color, "Colour does not match data");
402 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
427 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
403 }
428 }
404
429
tests/utils/modules/Unity/Test/CMakeLists.txt+4−7
@@ -1,3 +1,5 @@
1+include(QmlPlugins)
2+
1add_definitions(-DQT_NO_KEYWORDS)
3add_definitions(-DQT_NO_KEYWORDS)
2
4
3include_directories(
5include_directories(
@@ -14,10 +16,5 @@ add_library(UnityTestQml MODULE ${UnityTestQML_SOURCES})
14
16
15qt5_use_modules(UnityTestQml Core Quick Test)
17qt5_use_modules(UnityTestQml Core Quick Test)
16
18
17−# copy qml files into build directory for shadow builds
19+export_qmlfiles(Unity.Test Unity/Test)
18−file(GLOB QML_JS_FILES *.js *.qml qmldir)
20+export_qmlplugin(Unity.Test 0.1 Unity/Test TARGETS UnityTestQml)
19−
20−add_custom_target(UnityTestQmlJsFiles ALL
21− COMMAND cp ${QML_JS_FILES} ${CMAKE_CURRENT_BINARY_DIR}
22− DEPENDS ${QML_JS_FILES}
23−)
tests/utils/modules/Unity/Test/UnityTestCase.qml+26
@@ -260,6 +260,32 @@ TestCase {
260 }
260 }
261 }
261 }
262
262
263+ function touchPinch(item, x1Start, y1Start, x1End, y1End, x2Start, y2Start, x2End, y2End) {
264+ // Make sure the item is rendered
265+ waitForRendering(item);
266+
267+ var event1 = touchEvent();
268+ // first finger
269+ event1.press(0, x1Start, y1Start);
270+ event1.commit();
271+ // second finger
272+ event1.stationary(0);
273+ event1.press(1, x2Start, y2Start);
274+ event1.commit();
275+
276+ // pinch
277+ for (var i = 0.0; i < 1.0; i += 0.02) {
278+ event1.move(0, x1Start + (x1End - x1Start) * i, y1Start + (y1End - y1Start) * i);
279+ event1.move(1, x2Start + (x2End - x2Start) * i, y2Start + (y2End - y2Start) * i);
280+ event1.commit();
281+ }
282+
283+ // release
284+ event1.release(0, x1End, y1End);
285+ event1.release(1, x2End, y2End);
286+ event1.commit();
287+ }
288+
263 function fetchRootItem(item) {
289 function fetchRootItem(item) {
264 if (item.parent)
290 if (item.parent)
265 return fetchRootItem(item.parent)
291 return fetchRootItem(item.parent)
tests/utils/modules/Unity/Test/qmldir+2
@@ -1,3 +1,5 @@
1module Unity.Test
1module Unity.Test
2plugin UnityTestQml
2plugin UnityTestQml
3+typeinfo Test.qmltypes
4+
3UnityTestCase 0.1 UnityTestCase.qml
5UnityTestCase 0.1 UnityTestCase.qml
tools/registry-tracker.cpp+33−26
@@ -49,58 +49,66 @@ RegistryTracker::~RegistryTracker()
49"Registry.Identity = Registry\n" \
49"Registry.Identity = Registry\n" \
50"Registry.ConfigFile = %1\n" \
50"Registry.ConfigFile = %1\n" \
51"Default.Middleware = Zmq\n" \
51"Default.Middleware = Zmq\n" \
52−"Zmq.ConfigFile = %2\n"
52+"Zmq.ConfigFile = %2\n" \
53+"Smartscopes.Registry.Identity = %3\n"
53
54
54#define REGISTRY_CONFIG \
55#define REGISTRY_CONFIG \
55"[Registry]\n" \
56"[Registry]\n" \
56"Middleware = Zmq\n" \
57"Middleware = Zmq\n" \
57−"Zmq.Endpoint = ipc://%1/Registry\n" \
58+"Zmq.ConfigFile = %1\n" \
58−"Zmq.EndpointDir = %2\n" \
59−"Zmq.ConfigFile = %3\n" \
60−"Scope.InstallDir = %4\n" \
59+"Scope.InstallDir = %2\n" \
61−"Scoperunner.Path = %5\n" \
60+"Scoperunner.Path = %3\n"
62−"%6"
63
61
64#define MW_CONFIG \
62#define MW_CONFIG \
65"[Zmq]\n" \
63"[Zmq]\n" \
66−"EndpointDir.Public = %1\n" \
64+"EndpointDir = %1\n"
67−"EndpointDir.Private = %2\n"
68
65
69void RegistryTracker::runRegistry()
66void RegistryTracker::runRegistry()
70{
67{
71 QDir tmp(QDir::temp());
68 QDir tmp(QDir::temp());
72− m_runtime_config.setFileTemplate(tmp.filePath("Runtime.ini.XXXXXX"));
69+ m_runtime_config.setFileTemplate(tmp.filePath("Runtime.XXXXXX.ini"));
73− m_registry_config.setFileTemplate(tmp.filePath("Registry.ini.XXXXXX"));
70+ m_registry_config.setFileTemplate(tmp.filePath("Registry.XXXXXX.ini"));
74− m_mw_config.setFileTemplate(tmp.filePath("Zmq.ini.XXXXXX"));
71+ m_mw_config.setFileTemplate(tmp.filePath("Zmq.XXXXXX.ini"));
75
72
76 if (!m_runtime_config.open() || !m_registry_config.open() || !m_mw_config.open() || !m_endpoints_dir.isValid()) {
73 if (!m_runtime_config.open() || !m_registry_config.open() || !m_mw_config.open() || !m_endpoints_dir.isValid()) {
77 qWarning("Unable to open temporary files!");
74 qWarning("Unable to open temporary files!");
78 return;
75 return;
79 }
76 }
80
77
81− QString scopesLibdir;
78+ QString scopeInstallDir;
79+ QString scopeRegistryBin;
80+ QString scopeRunnerBin;
82 {
81 {
83 QProcess pkg_config;
82 QProcess pkg_config;
83+ QByteArray output;
84 QStringList arguments;
84 QStringList arguments;
85− arguments << "--variable=libdir";
85+ arguments << "--variable=scopesdir";
86 arguments << "libunity-scopes";
86 arguments << "libunity-scopes";
87 pkg_config.start("pkg-config", arguments);
87 pkg_config.start("pkg-config", arguments);
88 pkg_config.waitForFinished();
88 pkg_config.waitForFinished();
89− QByteArray libdir = pkg_config.readAllStandardOutput();
89+ output = pkg_config.readAllStandardOutput();
90− scopesLibdir = QDir(QString::fromLocal8Bit(libdir)).path().trimmed();
90+ scopeInstallDir = QDir(QString::fromLocal8Bit(output)).path().trimmed();
91+
92+ arguments[0] = "--variable=scoperegistry_bin";
93+ pkg_config.start("pkg-config", arguments);
94+ pkg_config.waitForFinished();
95+ output = pkg_config.readAllStandardOutput();
96+ scopeRegistryBin = QString::fromLocal8Bit(output).trimmed();
97+
98+ arguments[0] = "--variable=scoperunner_bin";
99+ pkg_config.start("pkg-config", arguments);
100+ pkg_config.waitForFinished();
101+ output = pkg_config.readAllStandardOutput();
102+ scopeRunnerBin = QString::fromLocal8Bit(output).trimmed();
91 }
103 }
92
104
93− if (scopesLibdir.size() == 0) {
105+ if (scopeInstallDir.isEmpty() || scopeRegistryBin.isEmpty() || scopeRunnerBin.isEmpty()) {
94 qWarning("Unable to find libunity-scopes package config file");
106 qWarning("Unable to find libunity-scopes package config file");
95 return;
107 return;
96 }
108 }
97
109
98− QString scopeRunnerPath = QDir(scopesLibdir).filePath("scoperunner/scoperunner");
99−
100− QString runtime_ini = QString(RUNTIME_CONFIG).arg(m_registry_config.fileName()).arg(m_mw_config.fileName());
101 // FIXME: keep in sync with the SSRegistry config
110 // FIXME: keep in sync with the SSRegistry config
102− QString serverRegistryConfig(m_serverScopes ? "SS.Registry.Identity = SSRegistry\nSS.Registry.Endpoint = ipc:///tmp/SSRegistry" : "");
111+ QString runtime_ini = QString(RUNTIME_CONFIG).arg(m_registry_config.fileName()).arg(m_mw_config.fileName()).arg(m_serverScopes ? "SSRegistry" : "");
103− QString scopeInstallDir(scopesLibdir + "/unity-scopes");
104 if (!m_systemScopes) {
112 if (!m_systemScopes) {
105 m_scopeInstallDir.reset(new QTemporaryDir(tmp.filePath("scopes.XXXXXX")));
113 m_scopeInstallDir.reset(new QTemporaryDir(tmp.filePath("scopes.XXXXXX")));
106 if (!m_scopeInstallDir->isValid()) {
114 if (!m_scopeInstallDir->isValid()) {
@@ -108,8 +116,8 @@ void RegistryTracker::runRegistry()
108 }
116 }
109 scopeInstallDir = m_scopeInstallDir->path();
117 scopeInstallDir = m_scopeInstallDir->path();
110 }
118 }
111− QString registry_ini = QString(REGISTRY_CONFIG).arg(m_endpoints_dir.path()).arg(m_endpoints_dir.path()).arg(m_mw_config.fileName()).arg(scopeInstallDir).arg(scopeRunnerPath).arg(serverRegistryConfig);
119+ QString registry_ini = QString(REGISTRY_CONFIG).arg(m_mw_config.fileName()).arg(scopeInstallDir).arg(scopeRunnerBin);
112− QString mw_ini = QString(MW_CONFIG).arg(m_endpoints_dir.path()).arg(m_endpoints_dir.path());
120+ QString mw_ini = QString(MW_CONFIG).arg(m_endpoints_dir.path());
113
121
114 m_runtime_config.write(runtime_ini.toUtf8());
122 m_runtime_config.write(runtime_ini.toUtf8());
115 m_registry_config.write(registry_ini.toUtf8());
123 m_registry_config.write(registry_ini.toUtf8());
@@ -121,11 +129,10 @@ void RegistryTracker::runRegistry()
121
129
122 qputenv("UNITY_SCOPES_RUNTIME_PATH", m_runtime_config.fileName().toLocal8Bit());
130 qputenv("UNITY_SCOPES_RUNTIME_PATH", m_runtime_config.fileName().toLocal8Bit());
123
131
124− QString registryBin(QDir(scopesLibdir).filePath("scoperegistry/scoperegistry"));
125 QStringList arguments;
132 QStringList arguments;
126 arguments << m_runtime_config.fileName();
133 arguments << m_runtime_config.fileName();
127 arguments << m_scopes;
134 arguments << m_scopes;
128
135
129 m_registry.setProcessChannelMode(QProcess::ForwardedChannels);
136 m_registry.setProcessChannelMode(QProcess::ForwardedChannels);
130− m_registry.start(registryBin, arguments);
137+ m_registry.start(scopeRegistryBin, arguments);
131}
138}
tools/unlock-device+2−4
@@ -4,7 +4,7 @@
4# Our goal here is to get an Ubuntu Touch device into a testable unlocked state.
4# Our goal here is to get an Ubuntu Touch device into a testable unlocked state.
5# This will include a reboot.
5# This will include a reboot.
6
6
7−WAIT_COMMAND="sleep 20"
7+WAIT_COMMAND="adb reboot; sleep 5; adb wait-for-device; sleep 20"
8
8
9while getopts s:w: opt; do
9while getopts s:w: opt; do
10 case $opt in
10 case $opt in
@@ -28,10 +28,8 @@ bus.clearSysState(cookie, dbus_interface="com.canonical.powerd");
28helpers.unlock_unity()
28helpers.unlock_unity()
29'
29'
30
30
31−adb reboot
32−sleep 5
33−adb "wait-for-device"
34eval "$WAIT_COMMAND"
31eval "$WAIT_COMMAND"
32+
35UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)
33UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)
36if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
34if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
37 echo "I: Unlock passed"
35 echo "I: Unlock passed"