Merge lp:~fboucault/unity-2d/colors_from_icon_in_plugin into lp:unity-2d/3.0
- colors_from_icon_in_plugin
- Merge into natty
Proposed by
Florian Boucault
Status: | Superseded |
---|---|
Proposed branch: | lp:~fboucault/unity-2d/colors_from_icon_in_plugin |
Merge into: | lp:unity-2d/3.0 |
Diff against target: |
1108 lines (+283/-327) 29 files modified
debian/changelog (+11/-1) debian/control (+0/-2) debian/unity-2d-launcher.install (+0/-4) launcher/CMakeLists.txt (+0/-1) launcher/Launcher.qml (+0/-1) launcher/LauncherItem.qml (+5/-1) launcher/LauncherList.qml (+0/-1) launcher/UnityApplications/CMakeLists.txt (+0/-106) launcher/UnityApplications/plugin.cpp (+0/-64) launcher/UnityApplications/plugin.h (+0/-32) launcher/UnityApplications/qmldir (+0/-1) launcher/app/launcher.cpp (+1/-1) launcher/app/launcherview.cpp (+0/-51) launcher/app/launcherview.h (+0/-1) launcher/tests/CMakeLists.txt (+0/-3) libunity-2d-private/Unity2d/CMakeLists.txt (+57/-1) libunity-2d-private/Unity2d/iconutilities.cpp (+82/-0) libunity-2d-private/Unity2d/iconutilities.h (+35/-0) libunity-2d-private/Unity2d/plugin.cpp (+42/-4) libunity-2d-private/tests/CMakeLists.txt (+3/-0) places/Home.qml (+1/-2) places/HomeButtonApplication.qml (+1/-1) places/HomeShortcuts.qml (+1/-1) places/RendererGrid.qml (+1/-1) places/app/places.cpp (+0/-3) places/dash.qml (+1/-2) po/unity-2d.pot (+41/-37) spread/Windows.qml (+0/-1) spread/app/spread.cpp (+1/-4) |
To merge this branch: | bzr merge lp:~fboucault/unity-2d/colors_from_icon_in_plugin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ugo Riboni | Pending | ||
Review via email: mp+63785@code.launchpad.net |
Commit message
Description of the change
Moved LauncherView:
To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote : | # |
- 592. By Florian Boucault
-
Merged from trunk
- 593. By Florian Boucault
-
Properly credited libunity-
2d-private/ Unity2d/ iconutilities. cpp - 594. By Florian Boucault
-
Merged from trunk
- 595. By Florian Boucault
-
Pass the QDeclarativeEngine to IconUtilities thus avoiding the instantiation of IconUtilities from QML.
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2011-06-07 15:47:41 +0000 |
3 | +++ debian/changelog 2011-06-07 22:59:36 +0000 |
4 | @@ -1,5 +1,6 @@ |
5 | unity-2d (3.8.6-0ubuntu2) UNRELEASED; urgency=low |
6 | |
7 | + [ Didier Roche ] |
8 | * debian/control: |
9 | - unity-2d-panel recommends the indicator, not unity-2d |
10 | - appmenu-gtk and appmenu-qt are already provided by indicator-appmenu |
11 | @@ -7,7 +8,16 @@ |
12 | * debian/libunity-2d-private0.install: |
13 | - install everything in Unity2d private directory |
14 | |
15 | - -- Didier Roche <didrocks@ubuntu.com> Fri, 27 May 2011 11:14:21 +0200 |
16 | + [ Florian Boucault ] |
17 | + * debian/unity-2d-launcher.install: |
18 | + - do not install usr/lib/qt4/imports/UnityApplications/ anylonger as all of |
19 | + UnityApplications features have been moved to the Unity2d QML plugin |
20 | + installed by libunity-2d-private0 |
21 | + * debian/control: |
22 | + - unity-2d-places and unity-2d-spread do not depend on unity-2d-launcher. |
23 | + All they need is now in libunity-2d-private0. |
24 | + |
25 | + -- Florian Boucault <florian.boucault@canonical.com> Tue, 07 Jun 2011 18:53:52 +0200 |
26 | |
27 | unity-2d (3.8.6-0ubuntu1) natty; urgency=low |
28 | |
29 | |
30 | === modified file 'debian/control' |
31 | --- debian/control 2011-05-27 09:34:01 +0000 |
32 | +++ debian/control 2011-06-07 22:59:36 +0000 |
33 | @@ -84,7 +84,6 @@ |
34 | Architecture: any |
35 | Depends: ${shlibs:Depends}, |
36 | ${misc:Depends}, |
37 | - unity-2d-launcher, |
38 | libunity-2d-private0, |
39 | libqt4-svg |
40 | Description: Unity 2D Places |
41 | @@ -96,7 +95,6 @@ |
42 | Architecture: any |
43 | Depends: ${shlibs:Depends}, |
44 | ${misc:Depends}, |
45 | - unity-2d-launcher, |
46 | libunity-2d-private0, |
47 | libqt4-svg |
48 | Description: Unity 2D Spread |
49 | |
50 | === modified file 'debian/unity-2d-launcher.install' |
51 | --- debian/unity-2d-launcher.install 2011-03-10 14:41:46 +0000 |
52 | +++ debian/unity-2d-launcher.install 2011-06-07 22:59:36 +0000 |
53 | @@ -4,7 +4,3 @@ |
54 | usr/share/unity-2d/launcher/*.qml |
55 | usr/share/unity-2d/launcher/launchermenu.css |
56 | usr/share/unity-2d/launcher/artwork |
57 | -usr/lib/qt4/imports/UnityApplications/libUnityApplications.so.1 |
58 | -usr/lib/qt4/imports/UnityApplications/libUnityApplications.so.1.0.0 |
59 | -usr/lib/qt4/imports/UnityApplications/qmldir |
60 | -usr/lib/qt4/imports/UnityApplications/libUnityApplications.so |
61 | |
62 | === modified file 'launcher/CMakeLists.txt' |
63 | --- launcher/CMakeLists.txt 2011-03-10 14:41:46 +0000 |
64 | +++ launcher/CMakeLists.txt 2011-06-07 22:59:36 +0000 |
65 | @@ -5,7 +5,6 @@ |
66 | ) |
67 | |
68 | # Source |
69 | -add_subdirectory(UnityApplications) |
70 | add_subdirectory(app) |
71 | add_subdirectory(tests) |
72 | |
73 | |
74 | === modified file 'launcher/Launcher.qml' |
75 | --- launcher/Launcher.qml 2011-05-31 11:41:34 +0000 |
76 | +++ launcher/Launcher.qml 2011-06-07 22:59:36 +0000 |
77 | @@ -17,7 +17,6 @@ |
78 | */ |
79 | |
80 | import Qt 4.7 |
81 | -import UnityApplications 1.0 |
82 | import Unity2d 1.0 /* required for drag’n’drop handling */ |
83 | |
84 | DropItem { |
85 | |
86 | === modified file 'launcher/LauncherItem.qml' |
87 | --- launcher/LauncherItem.qml 2011-04-28 13:15:50 +0000 |
88 | +++ launcher/LauncherItem.qml 2011-06-07 22:59:36 +0000 |
89 | @@ -97,6 +97,10 @@ |
90 | signal entered |
91 | signal exited |
92 | |
93 | + IconUtilities { |
94 | + id: iconUtilities |
95 | + } |
96 | + |
97 | Item { |
98 | /* The actual item, reparented so its y coordinate can be animated. */ |
99 | id: looseItem |
100 | @@ -247,7 +251,7 @@ |
101 | function updateColors() { |
102 | if (!item.backgroundFromIcon) return; |
103 | |
104 | - var colors = launcherView.getColorsFromIcon(icon.source, icon.sourceSize) |
105 | + var colors = iconUtilities.getColorsFromIcon(icon.source, icon.sourceSize) |
106 | if (colors && colors.length > 0) tileBackground.color = colors[0] |
107 | } |
108 | } |
109 | |
110 | === modified file 'launcher/LauncherList.qml' |
111 | --- launcher/LauncherList.qml 2011-05-02 16:25:49 +0000 |
112 | +++ launcher/LauncherList.qml 2011-06-07 22:59:36 +0000 |
113 | @@ -17,7 +17,6 @@ |
114 | */ |
115 | |
116 | import Qt 4.7 |
117 | -import UnityApplications 1.0 |
118 | import Unity2d 1.0 /* required for drag’n’drop handling */ |
119 | |
120 | AutoScrollingListView { |
121 | |
122 | === removed directory 'launcher/UnityApplications' |
123 | === removed file 'launcher/UnityApplications/CMakeLists.txt' |
124 | --- launcher/UnityApplications/CMakeLists.txt 2011-05-19 12:21:03 +0000 |
125 | +++ launcher/UnityApplications/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
126 | @@ -1,106 +0,0 @@ |
127 | -# Dependencies |
128 | -pkg_check_modules(QTBAMF REQUIRED libqtbamf) |
129 | -pkg_check_modules(QTGCONF REQUIRED libqtgconf) |
130 | -pkg_check_modules(QTDEE REQUIRED libqtdee) |
131 | -pkg_check_modules(DBUSMENUQT REQUIRED dbusmenu-qt) |
132 | -pkg_check_modules(GLIB REQUIRED glib-2.0) |
133 | -pkg_check_modules(GDK REQUIRED gdk-2.0) |
134 | -pkg_check_modules(GIO REQUIRED gio-2.0) |
135 | -pkg_check_modules(WNCK REQUIRED libwnck-1.0) |
136 | -pkg_check_modules(STARTUPNOTIFICATION REQUIRED libstartup-notification-1.0) |
137 | -pkg_check_modules(INDICATOR REQUIRED indicator) |
138 | - |
139 | -# Sources |
140 | -set(UnityApplications_SRCS |
141 | - iconimageprovider.cpp |
142 | - listaggregatormodel.cpp |
143 | - launcheritem.cpp |
144 | - launcherapplication.cpp |
145 | - launcherapplicationslist.cpp |
146 | - launcherapplicationslistdbus.cpp |
147 | - launcherdevice.cpp |
148 | - launcherdeviceslist.cpp |
149 | - launcherutility.cpp |
150 | - placeentry.cpp |
151 | - place.cpp |
152 | - launcherplaceslist.cpp |
153 | - trash.cpp |
154 | - launchermenu.cpp |
155 | - webfavorite.cpp |
156 | - plugin.cpp |
157 | - workspaces.cpp |
158 | - ) |
159 | - |
160 | -set(UnityApplications_MOC_HDRS |
161 | - listaggregatormodel.h |
162 | - launcheritem.h |
163 | - launcherapplication.h |
164 | - launcherapplicationslist.h |
165 | - launcherapplicationslistdbus.h |
166 | - launcherdevice.h |
167 | - launcherdeviceslist.h |
168 | - launcherutility.h |
169 | - placeentry.h |
170 | - place.h |
171 | - launcherplaceslist.h |
172 | - trash.h |
173 | - launchermenu.h |
174 | - webfavorite.h |
175 | - plugin.h |
176 | - workspaces.h |
177 | - ) |
178 | - |
179 | -qt4_wrap_cpp(UnityApplications_MOC_SRCS ${UnityApplications_MOC_HDRS}) |
180 | - |
181 | -# Build |
182 | -add_definitions(-DWNCK_I_KNOW_THIS_IS_UNSTABLE -DSN_API_NOT_YET_FROZEN) |
183 | - |
184 | -add_library(UnityApplications SHARED ${UnityApplications_SRCS} ${UnityApplications_MOC_SRCS}) |
185 | - |
186 | -set_target_properties(UnityApplications PROPERTIES |
187 | - SOVERSION 1 |
188 | - VERSION 1.0.0 |
189 | - ) |
190 | - |
191 | -include_directories( |
192 | - ${CMAKE_CURRENT_BINARY_DIR} |
193 | - ${QTBAMF_INCLUDE_DIRS} |
194 | - ${QTGCONF_INCLUDE_DIRS} |
195 | - ${QTDEE_INCLUDE_DIRS} |
196 | - ${DBUSMENUQT_INCLUDE_DIRS} |
197 | - ${GLIB_INCLUDE_DIRS} |
198 | - ${GDK_INCLUDE_DIRS} |
199 | - ${GIO_INCLUDE_DIRS} |
200 | - ${WNCK_INCLUDE_DIRS} |
201 | - ${STARTUPNOTIFICATION_INCLUDE_DIRS} |
202 | - ${INDICATOR_INCLUDE_DIRS} |
203 | - ) |
204 | - |
205 | -target_link_libraries(UnityApplications |
206 | - ${QT_QTCORE_LIBRARIES} |
207 | - ${QT_QTGUI_LIBRARIES} |
208 | - ${QT_QTNETWORK_LIBRARIES} |
209 | - ${QT_QTDECLARATIVE_LIBRARIES} |
210 | - ${QTBAMF_LDFLAGS} |
211 | - ${QTGCONF_LDFLAGS} |
212 | - ${QTDEE_LDFLAGS} |
213 | - ${DBUSMENUQT_LDFLAGS} |
214 | - ${GLIB_LDFLAGS} |
215 | - ${GDK_LDFLAGS} |
216 | - ${GIO_LDFLAGS} |
217 | - ${WNCK_LDFLAGS} |
218 | - ${STARTUPNOTIFICATION_LDFLAGS} |
219 | - ${INDICATOR_LDFLAGS} |
220 | - ) |
221 | - |
222 | -# Install |
223 | -set(IMPORT_INSTALL_DIR lib/qt4/imports/UnityApplications) |
224 | - |
225 | -install(TARGETS UnityApplications |
226 | - LIBRARY DESTINATION ${IMPORT_INSTALL_DIR} |
227 | - ) |
228 | - |
229 | -install(FILES qmldir |
230 | - DESTINATION ${IMPORT_INSTALL_DIR} |
231 | - ) |
232 | - |
233 | |
234 | === removed file 'launcher/UnityApplications/plugin.cpp' |
235 | --- launcher/UnityApplications/plugin.cpp 2011-01-26 15:28:25 +0000 |
236 | +++ launcher/UnityApplications/plugin.cpp 1970-01-01 00:00:00 +0000 |
237 | @@ -1,64 +0,0 @@ |
238 | -/* |
239 | - * Copyright (C) 2010-2011 Canonical, Ltd. |
240 | - * |
241 | - * This program is free software; you can redistribute it and/or modify |
242 | - * it under the terms of the GNU General Public License as published by |
243 | - * the Free Software Foundation; version 3. |
244 | - * |
245 | - * This program is distributed in the hope that it will be useful, |
246 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
247 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
248 | - * GNU General Public License for more details. |
249 | - * |
250 | - * You should have received a copy of the GNU General Public License |
251 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
252 | - */ |
253 | - |
254 | -#include "launcherapplication.h" |
255 | -#include "place.h" |
256 | -#include "placeentry.h" |
257 | -#include "launcherdevice.h" |
258 | -#include "trash.h" |
259 | -#include "workspaces.h" |
260 | -#include "listaggregatormodel.h" |
261 | -#include "launcherapplicationslist.h" |
262 | -#include "launcherdeviceslist.h" |
263 | -#include "launcherplaceslist.h" |
264 | -#include "iconimageprovider.h" |
265 | -#include "plugin.h" |
266 | -#include <QtDeclarative/qdeclarative.h> |
267 | -#include <QDeclarativeEngine> |
268 | -#include <QDeclarativeContext> |
269 | -#include <QAbstractListModel> |
270 | - |
271 | -void UnityApplicationsPlugin::registerTypes(const char *uri) |
272 | -{ |
273 | - qmlRegisterType<ListAggregatorModel>(uri, 0, 1, "ListAggregatorModel"); |
274 | - |
275 | - qmlRegisterType<LauncherApplicationsList>(uri, 0, 1, "LauncherApplicationsList"); |
276 | - qmlRegisterType<LauncherApplication>(uri, 0, 1, "LauncherApplication"); |
277 | - |
278 | - qmlRegisterType<LauncherPlacesList>(uri, 0, 1, "LauncherPlacesList"); |
279 | - qmlRegisterType<Place>(uri, 0, 1, "Place"); |
280 | - qmlRegisterType<PlaceEntry>(uri, 0, 1, "PlaceEntry"); |
281 | - /* DeeListModel is exposed to QML by PlaceEntry */ |
282 | - qmlRegisterType<DeeListModel>(uri, 0, 1, "DeeListModel"); |
283 | - |
284 | - qmlRegisterType<LauncherDevicesList>(uri, 0, 1, "LauncherDevicesList"); |
285 | - qmlRegisterType<LauncherDevice>(uri, 0, 1, "LauncherDevice"); |
286 | - |
287 | - qmlRegisterType<Trashes>(uri, 0, 1, "Trashes"); |
288 | - qmlRegisterType<Trash>(uri, 0, 1, "Trash"); |
289 | - |
290 | - qmlRegisterType<WorkspacesList>(uri, 0, 1, "WorkspacesList"); |
291 | - qmlRegisterType<Workspaces>(uri, 0, 1, "Workspaces"); |
292 | -} |
293 | - |
294 | -void UnityApplicationsPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri) |
295 | -{ |
296 | - Q_UNUSED(uri); |
297 | - |
298 | - engine->addImageProvider(QString("icons"), new IconImageProvider); |
299 | -} |
300 | - |
301 | -Q_EXPORT_PLUGIN2(UnityApplications, UnityApplicationsPlugin); |
302 | |
303 | === removed file 'launcher/UnityApplications/plugin.h' |
304 | --- launcher/UnityApplications/plugin.h 2011-03-09 13:23:04 +0000 |
305 | +++ launcher/UnityApplications/plugin.h 1970-01-01 00:00:00 +0000 |
306 | @@ -1,32 +0,0 @@ |
307 | -/* |
308 | - * Copyright (C) 2010-2011 Canonical, Ltd. |
309 | - * |
310 | - * This program is free software; you can redistribute it and/or modify |
311 | - * it under the terms of the GNU General Public License as published by |
312 | - * the Free Software Foundation; version 3. |
313 | - * |
314 | - * This program is distributed in the hope that it will be useful, |
315 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
316 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
317 | - * GNU General Public License for more details. |
318 | - * |
319 | - * You should have received a copy of the GNU General Public License |
320 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
321 | - */ |
322 | - |
323 | -#ifndef UNITYAPPLICATIONSPLUGIN_H |
324 | -#define UNITYAPPLICATIONSPLUGIN_H |
325 | - |
326 | -#include <QtDeclarative/QDeclarativeExtensionPlugin> |
327 | - |
328 | -class UnityApplicationsPlugin : public QDeclarativeExtensionPlugin |
329 | -{ |
330 | - Q_OBJECT |
331 | - |
332 | -public: |
333 | - void registerTypes(const char *uri); |
334 | - void initializeEngine(QDeclarativeEngine *engine, const char *uri); |
335 | -}; |
336 | - |
337 | - |
338 | -#endif // UNITYAPPLICATIONSPLUGIN_H |
339 | |
340 | === removed file 'launcher/UnityApplications/qmldir' |
341 | --- launcher/UnityApplications/qmldir 2010-09-02 13:59:13 +0000 |
342 | +++ launcher/UnityApplications/qmldir 1970-01-01 00:00:00 +0000 |
343 | @@ -1,1 +0,0 @@ |
344 | -plugin UnityApplications |
345 | |
346 | === modified file 'launcher/app/launcher.cpp' |
347 | --- launcher/app/launcher.cpp 2011-06-07 13:46:38 +0000 |
348 | +++ launcher/app/launcher.cpp 2011-06-07 22:59:36 +0000 |
349 | @@ -74,7 +74,7 @@ |
350 | |
351 | int main(int argc, char *argv[]) |
352 | { |
353 | - /* UnityApplications plugin uses GTK APIs to retrieve theme icons |
354 | + /* Unity2d plugin uses GTK APIs to retrieve theme icons |
355 | (gtk_icon_theme_get_default) and requires a call to gtk_init */ |
356 | gtk_init(&argc, &argv); |
357 | |
358 | |
359 | === modified file 'launcher/app/launcherview.cpp' |
360 | --- launcher/app/launcherview.cpp 2011-06-07 13:46:38 +0000 |
361 | +++ launcher/app/launcherview.cpp 2011-06-07 22:59:36 +0000 |
362 | @@ -285,57 +285,6 @@ |
363 | } |
364 | } |
365 | |
366 | -/* Calculates both the background color and the glow color of a launcher tile |
367 | - based on the colors in the specified icon (using the same algorithm as Unity). |
368 | - The values are returned as list where the first item is the background color |
369 | - and the second one is the glow color. |
370 | -*/ |
371 | -QList<QVariant> |
372 | -LauncherView::getColorsFromIcon(QUrl source, QSize size) const |
373 | -{ |
374 | - QList<QVariant> colors; |
375 | - |
376 | - // FIXME: we should find a way to avoid reloading the icon |
377 | - QImage icon = engine()->imageProvider("icons")->requestImage(source.path().mid(1), &size, size); |
378 | - if (icon.width() == 0 || icon.height() == 0) { |
379 | - UQ_WARNING << "Unable to load icon in getColorsFromIcon from" << source; |
380 | - return colors; |
381 | - } |
382 | - |
383 | - long int rtotal = 0, gtotal = 0, btotal = 0; |
384 | - float total = 0.0f; |
385 | - |
386 | - for (int y = 0; y < icon.height(); ++y) { |
387 | - for (int x = 0; x < icon.width(); ++x) { |
388 | - QColor color = QColor::fromRgba(icon.pixel(x, y)); |
389 | - |
390 | - float saturation = (qMax (color.red(), qMax (color.green(), color.blue())) - |
391 | - qMin (color.red(), qMin (color.green(), color.blue()))) / 255.0f; |
392 | - float relevance = .1 + .9 * (color.alpha() / 255.0f) * saturation; |
393 | - |
394 | - rtotal += (unsigned char) (color.red() * relevance); |
395 | - gtotal += (unsigned char) (color.green() * relevance); |
396 | - btotal += (unsigned char) (color.blue() * relevance); |
397 | - |
398 | - total += relevance * 255; |
399 | - } |
400 | - } |
401 | - |
402 | - QColor hsv = QColor::fromRgbF(rtotal / total, gtotal / total, btotal / total).toHsv(); |
403 | - |
404 | - /* Background color is the base color with 0.90f HSV value */ |
405 | - hsv.setHsvF(hsv.hueF(), |
406 | - (hsv.saturationF() > .15f) ? 0.65f : hsv.saturationF(), |
407 | - 0.90f); |
408 | - colors.append(QVariant::fromValue(hsv.toRgb())); |
409 | - |
410 | - /* Glow color is the base color with 1.0f HSV value */ |
411 | - hsv.setHsvF(hsv.hueF(), hsv.saturationF(), 1.0f); |
412 | - colors.append(QVariant::fromValue(hsv.toRgb())); |
413 | - |
414 | - return colors; |
415 | -} |
416 | - |
417 | void |
418 | LauncherView::showCommandsPlace() |
419 | { |
420 | |
421 | === modified file 'launcher/app/launcherview.h' |
422 | --- launcher/app/launcherview.h 2011-05-08 13:48:10 +0000 |
423 | +++ launcher/app/launcherview.h 2011-06-07 22:59:36 +0000 |
424 | @@ -40,7 +40,6 @@ |
425 | |
426 | public: |
427 | explicit LauncherView(QWidget* parent = NULL); |
428 | - Q_INVOKABLE QList<QVariant> getColorsFromIcon(QUrl source, QSize size) const; |
429 | Q_INVOKABLE void onDragEnter(DeclarativeDragDropEvent* event); |
430 | Q_INVOKABLE void onDrop(DeclarativeDragDropEvent* event); |
431 | |
432 | |
433 | === modified file 'launcher/tests/CMakeLists.txt' |
434 | --- launcher/tests/CMakeLists.txt 2011-02-23 17:03:50 +0000 |
435 | +++ launcher/tests/CMakeLists.txt 2011-06-07 22:59:36 +0000 |
436 | @@ -7,7 +7,6 @@ |
437 | target_link_libraries(${_test} |
438 | ${QT_QTTEST_LIBRARIES} |
439 | uqlauncher |
440 | - UnityApplications |
441 | ) |
442 | set(_test_list "${_test_list};${_test}") |
443 | endforeach(_test) |
444 | @@ -19,7 +18,6 @@ |
445 | |
446 | include_directories( |
447 | ${CMAKE_CURRENT_SOURCE_DIR}/../app |
448 | - ${CMAKE_CURRENT_SOURCE_DIR}/../UnityApplications |
449 | ${CMAKE_CURRENT_BINARY_DIR} |
450 | ${QT_QTTEST_INCLUDE_DIR} |
451 | ${QTGCONF_INCLUDE_DIRS} |
452 | @@ -28,7 +26,6 @@ |
453 | enable_testing() |
454 | |
455 | launcher_tests( |
456 | - launchermenutest |
457 | launcherviewtest |
458 | ) |
459 | |
460 | |
461 | === modified file 'libunity-2d-private/Unity2d/CMakeLists.txt' |
462 | --- libunity-2d-private/Unity2d/CMakeLists.txt 2011-06-07 13:46:38 +0000 |
463 | +++ libunity-2d-private/Unity2d/CMakeLists.txt 2011-06-07 22:59:36 +0000 |
464 | @@ -2,6 +2,13 @@ |
465 | pkg_check_modules(WNCK REQUIRED libwnck-1.0) |
466 | pkg_check_modules(QTBAMF REQUIRED libqtbamf) |
467 | pkg_check_modules(QTGCONF REQUIRED libqtgconf) |
468 | +pkg_check_modules(QTDEE REQUIRED libqtdee) |
469 | +pkg_check_modules(DBUSMENUQT REQUIRED dbusmenu-qt) |
470 | +pkg_check_modules(GLIB REQUIRED glib-2.0) |
471 | +pkg_check_modules(GDK REQUIRED gdk-2.0) |
472 | +pkg_check_modules(GIO REQUIRED gio-2.0) |
473 | +pkg_check_modules(STARTUPNOTIFICATION REQUIRED libstartup-notification-1.0) |
474 | +pkg_check_modules(INDICATOR REQUIRED indicator) |
475 | |
476 | # Sources |
477 | set(unity-2d-private-qml_SRCS |
478 | @@ -18,6 +25,23 @@ |
479 | dragitem.cpp |
480 | dragitemwithurl.cpp |
481 | dropitem.cpp |
482 | + iconimageprovider.cpp |
483 | + listaggregatormodel.cpp |
484 | + launcheritem.cpp |
485 | + launcherapplication.cpp |
486 | + launcherapplicationslist.cpp |
487 | + launcherapplicationslistdbus.cpp |
488 | + launcherdevice.cpp |
489 | + launcherdeviceslist.cpp |
490 | + launcherutility.cpp |
491 | + placeentry.cpp |
492 | + place.cpp |
493 | + launcherplaceslist.cpp |
494 | + trash.cpp |
495 | + launchermenu.cpp |
496 | + webfavorite.cpp |
497 | + workspaces.cpp |
498 | + iconutilities.cpp |
499 | ) |
500 | |
501 | set(unity-2d-private-qml_MOC_HDRS |
502 | @@ -32,6 +56,22 @@ |
503 | dragitem.h |
504 | dragitemwithurl.h |
505 | dropitem.h |
506 | + listaggregatormodel.h |
507 | + launcheritem.h |
508 | + launcherapplication.h |
509 | + launcherapplicationslist.h |
510 | + launcherapplicationslistdbus.h |
511 | + launcherdevice.h |
512 | + launcherdeviceslist.h |
513 | + launcherutility.h |
514 | + placeentry.h |
515 | + place.h |
516 | + launcherplaceslist.h |
517 | + trash.h |
518 | + launchermenu.h |
519 | + webfavorite.h |
520 | + workspaces.h |
521 | + iconutilities.h |
522 | ) |
523 | |
524 | file(GLOB unity-2d-private-qml_QML *.qml) |
525 | @@ -40,13 +80,20 @@ |
526 | |
527 | # Build |
528 | add_library(unity-2d-private-qml SHARED ${unity-2d-private-qml_SRCS} ${unity-2d-private-qml_MOC_SRCS}) |
529 | -add_definitions(-DWNCK_I_KNOW_THIS_IS_UNSTABLE) |
530 | +add_definitions(-DWNCK_I_KNOW_THIS_IS_UNSTABLE -DSN_API_NOT_YET_FROZEN) |
531 | |
532 | include_directories( |
533 | ${CMAKE_CURRENT_BINARY_DIR} |
534 | ${WNCK_INCLUDE_DIRS} |
535 | ${QTBAMF_INCLUDE_DIRS} |
536 | ${QTGCONF_INCLUDE_DIRS} |
537 | + ${QTDEE_INCLUDE_DIRS} |
538 | + ${DBUSMENUQT_INCLUDE_DIRS} |
539 | + ${GLIB_INCLUDE_DIRS} |
540 | + ${GDK_INCLUDE_DIRS} |
541 | + ${GIO_INCLUDE_DIRS} |
542 | + ${STARTUPNOTIFICATION_INCLUDE_DIRS} |
543 | + ${INDICATOR_INCLUDE_DIRS} |
544 | ${libunity-2d-private_SOURCE_DIR}/src |
545 | ) |
546 | |
547 | @@ -54,9 +101,18 @@ |
548 | ${QT_QTCORE_LIBRARIES} |
549 | ${QT_QTDBUS_LIBRARIES} |
550 | ${QT_QTDECLARATIVE_LIBRARIES} |
551 | + ${QT_QTGUI_LIBRARIES} |
552 | + ${QT_QTNETWORK_LIBRARIES} |
553 | ${WNCK_LDFLAGS} |
554 | ${QTBAMF_LDFLAGS} |
555 | ${QTGCONF_LDFLAGS} |
556 | + ${QTDEE_LDFLAGS} |
557 | + ${DBUSMENUQT_LDFLAGS} |
558 | + ${GLIB_LDFLAGS} |
559 | + ${GDK_LDFLAGS} |
560 | + ${GIO_LDFLAGS} |
561 | + ${STARTUPNOTIFICATION_LDFLAGS} |
562 | + ${INDICATOR_LDFLAGS} |
563 | unity-2d-private |
564 | ) |
565 | |
566 | |
567 | === renamed file 'launcher/UnityApplications/iconimageprovider.cpp' => 'libunity-2d-private/Unity2d/iconimageprovider.cpp' |
568 | === renamed file 'launcher/UnityApplications/iconimageprovider.h' => 'libunity-2d-private/Unity2d/iconimageprovider.h' |
569 | === added file 'libunity-2d-private/Unity2d/iconutilities.cpp' |
570 | --- libunity-2d-private/Unity2d/iconutilities.cpp 1970-01-01 00:00:00 +0000 |
571 | +++ libunity-2d-private/Unity2d/iconutilities.cpp 2011-06-07 22:59:36 +0000 |
572 | @@ -0,0 +1,82 @@ |
573 | +/* |
574 | + * Copyright (C) 2011 Canonical, Ltd. |
575 | + * |
576 | + * This program is free software; you can redistribute it and/or modify |
577 | + * it under the terms of the GNU General Public License as published by |
578 | + * the Free Software Foundation; version 3. |
579 | + * |
580 | + * This program is distributed in the hope that it will be useful, |
581 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
582 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
583 | + * GNU General Public License for more details. |
584 | + * |
585 | + * You should have received a copy of the GNU General Public License |
586 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
587 | + */ |
588 | + |
589 | +#include "iconutilities.h" |
590 | + |
591 | +// libunity-2d |
592 | +#include <debug_p.h> |
593 | + |
594 | +// Qt |
595 | +#include <QImage> |
596 | +#include <QDeclarativeEngine> |
597 | +#include <QDeclarativeContext> |
598 | +#include <QDeclarativeImageProvider> |
599 | + |
600 | +IconUtilities::IconUtilities(QObject *parent) : QObject(parent) |
601 | +{ |
602 | +} |
603 | + |
604 | +/* Calculates both the background color and the glow color of a launcher tile |
605 | + based on the colors in the specified icon (using the same algorithm as Unity). |
606 | + The values are returned as list where the first item is the background color |
607 | + and the second one is the glow color. |
608 | +*/ |
609 | +QList<QVariant> |
610 | +IconUtilities::getColorsFromIcon(QUrl source, QSize size) const |
611 | +{ |
612 | + QList<QVariant> colors; |
613 | + |
614 | + // FIXME: we should find a way to avoid reloading the icon |
615 | + QDeclarativeEngine *engine = QDeclarativeEngine::contextForObject(this)->engine(); |
616 | + QImage icon = engine->imageProvider("icons")->requestImage(source.path().mid(1), &size, size); |
617 | + if (icon.width() == 0 || icon.height() == 0) { |
618 | + UQ_WARNING << "Unable to load icon in getColorsFromIcon from" << source; |
619 | + return colors; |
620 | + } |
621 | + |
622 | + long int rtotal = 0, gtotal = 0, btotal = 0; |
623 | + float total = 0.0f; |
624 | + |
625 | + for (int y = 0; y < icon.height(); ++y) { |
626 | + for (int x = 0; x < icon.width(); ++x) { |
627 | + QColor color = QColor::fromRgba(icon.pixel(x, y)); |
628 | + |
629 | + float saturation = (qMax (color.red(), qMax (color.green(), color.blue())) - |
630 | + qMin (color.red(), qMin (color.green(), color.blue()))) / 255.0f; |
631 | + float relevance = .1 + .9 * (color.alpha() / 255.0f) * saturation; |
632 | + |
633 | + rtotal += (unsigned char) (color.red() * relevance); |
634 | + gtotal += (unsigned char) (color.green() * relevance); |
635 | + btotal += (unsigned char) (color.blue() * relevance); |
636 | + |
637 | + total += relevance * 255; |
638 | + } |
639 | + } |
640 | + |
641 | + QColor hsv = QColor::fromRgbF(rtotal / total, gtotal / total, btotal / total).toHsv(); |
642 | + |
643 | + /* Background color is the base color with 0.90f HSV value */ |
644 | + hsv.setHsvF(hsv.hueF(), |
645 | + (hsv.saturationF() > .15f) ? 0.65f : hsv.saturationF(), |
646 | + 0.90f); |
647 | + colors.append(QVariant::fromValue(hsv.toRgb())); |
648 | + |
649 | + /* Glow color is the base color with 1.0f HSV value */ |
650 | + hsv.setHsvF(hsv.hueF(), hsv.saturationF(), 1.0f); |
651 | + colors.append(QVariant::fromValue(hsv.toRgb())); |
652 | + |
653 | + return colors; |
654 | +} |
655 | |
656 | === added file 'libunity-2d-private/Unity2d/iconutilities.h' |
657 | --- libunity-2d-private/Unity2d/iconutilities.h 1970-01-01 00:00:00 +0000 |
658 | +++ libunity-2d-private/Unity2d/iconutilities.h 2011-06-07 22:59:36 +0000 |
659 | @@ -0,0 +1,35 @@ |
660 | +/* |
661 | + * Copyright (C) 2011 Canonical, Ltd. |
662 | + * |
663 | + * This program is free software; you can redistribute it and/or modify |
664 | + * it under the terms of the GNU General Public License as published by |
665 | + * the Free Software Foundation; version 3. |
666 | + * |
667 | + * This program is distributed in the hope that it will be useful, |
668 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
669 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
670 | + * GNU General Public License for more details. |
671 | + * |
672 | + * You should have received a copy of the GNU General Public License |
673 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
674 | + */ |
675 | + |
676 | +#ifndef ICONUTILITIES_H |
677 | +#define ICONUTILITIES_H |
678 | + |
679 | +#include <QObject> |
680 | +#include <QUrl> |
681 | +#include <QSize> |
682 | +#include <QVariant> |
683 | + |
684 | +class IconUtilities : public QObject |
685 | +{ |
686 | + Q_OBJECT |
687 | + |
688 | +public : |
689 | + explicit IconUtilities(QObject *parent = 0); |
690 | + |
691 | + Q_INVOKABLE QList<QVariant> getColorsFromIcon(QUrl source, QSize size) const; |
692 | +}; |
693 | + |
694 | +#endif // ICONUTILITIES_H |
695 | |
696 | === renamed file 'launcher/UnityApplications/launcherapplication.cpp' => 'libunity-2d-private/Unity2d/launcherapplication.cpp' |
697 | === renamed file 'launcher/UnityApplications/launcherapplication.h' => 'libunity-2d-private/Unity2d/launcherapplication.h' |
698 | === renamed file 'launcher/UnityApplications/launcherapplicationslist.cpp' => 'libunity-2d-private/Unity2d/launcherapplicationslist.cpp' |
699 | === renamed file 'launcher/UnityApplications/launcherapplicationslist.h' => 'libunity-2d-private/Unity2d/launcherapplicationslist.h' |
700 | === renamed file 'launcher/UnityApplications/launcherapplicationslistdbus.cpp' => 'libunity-2d-private/Unity2d/launcherapplicationslistdbus.cpp' |
701 | === renamed file 'launcher/UnityApplications/launcherapplicationslistdbus.h' => 'libunity-2d-private/Unity2d/launcherapplicationslistdbus.h' |
702 | === renamed file 'launcher/UnityApplications/launcherdevice.cpp' => 'libunity-2d-private/Unity2d/launcherdevice.cpp' |
703 | === renamed file 'launcher/UnityApplications/launcherdevice.h' => 'libunity-2d-private/Unity2d/launcherdevice.h' |
704 | === renamed file 'launcher/UnityApplications/launcherdeviceslist.cpp' => 'libunity-2d-private/Unity2d/launcherdeviceslist.cpp' |
705 | === renamed file 'launcher/UnityApplications/launcherdeviceslist.h' => 'libunity-2d-private/Unity2d/launcherdeviceslist.h' |
706 | === renamed file 'launcher/UnityApplications/launcheritem.cpp' => 'libunity-2d-private/Unity2d/launcheritem.cpp' |
707 | === renamed file 'launcher/UnityApplications/launcheritem.h' => 'libunity-2d-private/Unity2d/launcheritem.h' |
708 | === renamed file 'launcher/UnityApplications/launchermenu.cpp' => 'libunity-2d-private/Unity2d/launchermenu.cpp' |
709 | === renamed file 'launcher/UnityApplications/launchermenu.h' => 'libunity-2d-private/Unity2d/launchermenu.h' |
710 | === renamed file 'launcher/UnityApplications/launcherplaceslist.cpp' => 'libunity-2d-private/Unity2d/launcherplaceslist.cpp' |
711 | === renamed file 'launcher/UnityApplications/launcherplaceslist.h' => 'libunity-2d-private/Unity2d/launcherplaceslist.h' |
712 | === renamed file 'launcher/UnityApplications/launcherutility.cpp' => 'libunity-2d-private/Unity2d/launcherutility.cpp' |
713 | === renamed file 'launcher/UnityApplications/launcherutility.h' => 'libunity-2d-private/Unity2d/launcherutility.h' |
714 | === renamed file 'launcher/UnityApplications/listaggregatormodel.cpp' => 'libunity-2d-private/Unity2d/listaggregatormodel.cpp' |
715 | === renamed file 'launcher/UnityApplications/listaggregatormodel.h' => 'libunity-2d-private/Unity2d/listaggregatormodel.h' |
716 | === renamed file 'launcher/UnityApplications/place.cpp' => 'libunity-2d-private/Unity2d/place.cpp' |
717 | === renamed file 'launcher/UnityApplications/place.h' => 'libunity-2d-private/Unity2d/place.h' |
718 | === renamed file 'launcher/UnityApplications/placeentry.cpp' => 'libunity-2d-private/Unity2d/placeentry.cpp' |
719 | === renamed file 'launcher/UnityApplications/placeentry.h' => 'libunity-2d-private/Unity2d/placeentry.h' |
720 | === modified file 'libunity-2d-private/Unity2d/plugin.cpp' |
721 | --- libunity-2d-private/Unity2d/plugin.cpp 2011-05-18 15:47:16 +0000 |
722 | +++ libunity-2d-private/Unity2d/plugin.cpp 2011-06-07 22:59:36 +0000 |
723 | @@ -1,5 +1,5 @@ |
724 | /* |
725 | - * Copyright (C) 2010 Canonical, Ltd. |
726 | + * Copyright (C) 2010-2011 Canonical, Ltd. |
727 | * |
728 | * Authors: |
729 | * Florian Boucault <florian.boucault@canonical.com> |
730 | @@ -20,8 +20,23 @@ |
731 | /* Required otherwise using wnck_set_client_type breaks linking with error: |
732 | undefined reference to `wnck_set_client_type(WnckClientType)' |
733 | */ |
734 | +extern "C" { |
735 | +#include <libwnck/util.h> |
736 | +} |
737 | + |
738 | #include "plugin.h" |
739 | |
740 | +#include "launcherapplication.h" |
741 | +#include "place.h" |
742 | +#include "placeentry.h" |
743 | +#include "launcherdevice.h" |
744 | +#include "trash.h" |
745 | +#include "workspaces.h" |
746 | +#include "listaggregatormodel.h" |
747 | +#include "launcherapplicationslist.h" |
748 | +#include "launcherdeviceslist.h" |
749 | +#include "launcherplaceslist.h" |
750 | +#include "iconimageprovider.h" |
751 | #include "blendedimageprovider.h" |
752 | #include "cacheeffect.h" |
753 | #include "qsortfilterproxymodelqml.h" |
754 | @@ -31,6 +46,7 @@ |
755 | #include "screeninfo.h" |
756 | #include "plugin.h" |
757 | #include "cacheeffect.h" |
758 | +#include "iconutilities.h" |
759 | |
760 | #include "mimedata.h" |
761 | #include "dragdropevent.h" |
762 | @@ -41,11 +57,9 @@ |
763 | #include <QDeclarativeEngine> |
764 | #include <QDeclarativeContext> |
765 | #include <QGraphicsEffect> |
766 | +#include <QAbstractListModel> |
767 | |
768 | #undef signals |
769 | -extern "C" { |
770 | -#include <libwnck/util.h> |
771 | -} |
772 | |
773 | #include <X11/Xlib.h> |
774 | |
775 | @@ -81,6 +95,29 @@ |
776 | qmlRegisterType<DeclarativeDropItem>(uri, 0, 1, "DropItem"); |
777 | qmlRegisterType<DeclarativeMimeData>(); |
778 | qmlRegisterType<DeclarativeDragDropEvent>(); |
779 | + |
780 | + qmlRegisterType<ListAggregatorModel>(uri, 0, 1, "ListAggregatorModel"); |
781 | + |
782 | + qmlRegisterType<LauncherApplicationsList>(uri, 0, 1, "LauncherApplicationsList"); |
783 | + qmlRegisterType<LauncherApplication>(uri, 0, 1, "LauncherApplication"); |
784 | + |
785 | + qmlRegisterType<LauncherPlacesList>(uri, 0, 1, "LauncherPlacesList"); |
786 | + qmlRegisterType<Place>(uri, 0, 1, "Place"); |
787 | + qmlRegisterType<PlaceEntry>(uri, 0, 1, "PlaceEntry"); |
788 | + /* DeeListModel is exposed to QML by PlaceEntry */ |
789 | + qmlRegisterType<DeeListModel>(uri, 0, 1, "DeeListModel"); |
790 | + |
791 | + qmlRegisterType<LauncherDevicesList>(uri, 0, 1, "LauncherDevicesList"); |
792 | + qmlRegisterType<LauncherDevice>(uri, 0, 1, "LauncherDevice"); |
793 | + |
794 | + qmlRegisterType<Trashes>(uri, 0, 1, "Trashes"); |
795 | + qmlRegisterType<Trash>(uri, 0, 1, "Trash"); |
796 | + |
797 | + qmlRegisterType<WorkspacesList>(uri, 0, 1, "WorkspacesList"); |
798 | + qmlRegisterType<Workspaces>(uri, 0, 1, "Workspaces"); |
799 | + |
800 | + qmlRegisterType<IconUtilities>(uri, 0, 1, "IconUtilities"); |
801 | + |
802 | } |
803 | |
804 | void Unity2dPlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri) |
805 | @@ -91,6 +128,7 @@ |
806 | |
807 | engine->addImageProvider(QString("blended"), new BlendedImageProvider); |
808 | engine->addImageProvider(QString("window"), new WindowImageProvider); |
809 | + engine->addImageProvider(QString("icons"), new IconImageProvider); |
810 | |
811 | /* ScreenInfo is exposed as a context property as it's a singleton and therefore |
812 | not creatable directly in QML */ |
813 | |
814 | === renamed file 'launcher/UnityApplications/trash.cpp' => 'libunity-2d-private/Unity2d/trash.cpp' |
815 | === renamed file 'launcher/UnityApplications/trash.h' => 'libunity-2d-private/Unity2d/trash.h' |
816 | === renamed file 'launcher/UnityApplications/webfavorite.cpp' => 'libunity-2d-private/Unity2d/webfavorite.cpp' |
817 | === renamed file 'launcher/UnityApplications/webfavorite.h' => 'libunity-2d-private/Unity2d/webfavorite.h' |
818 | === renamed file 'launcher/UnityApplications/workspaces.cpp' => 'libunity-2d-private/Unity2d/workspaces.cpp' |
819 | === renamed file 'launcher/UnityApplications/workspaces.h' => 'libunity-2d-private/Unity2d/workspaces.h' |
820 | === modified file 'libunity-2d-private/tests/CMakeLists.txt' |
821 | --- libunity-2d-private/tests/CMakeLists.txt 2011-03-16 15:51:49 +0000 |
822 | +++ libunity-2d-private/tests/CMakeLists.txt 2011-06-07 22:59:36 +0000 |
823 | @@ -3,6 +3,7 @@ |
824 | |
825 | include_directories( |
826 | ${libunity-2d-private_SOURCE_DIR}/src |
827 | + ${libunity-2d-private_SOURCE_DIR}/Unity2d |
828 | ${CMAKE_CURRENT_BINARY_DIR} |
829 | ${QT_QTTEST_INCLUDE_DIR} |
830 | ) |
831 | @@ -21,6 +22,7 @@ |
832 | target_link_libraries(${_test} |
833 | ${QT_QTTEST_LIBRARIES} |
834 | unity-2d-private |
835 | + unity-2d-private-qml |
836 | ) |
837 | set(_test_list "${_test_list};${_test}") |
838 | endforeach(_test) |
839 | @@ -34,6 +36,7 @@ |
840 | keyboardmodifiersmonitortest |
841 | paneltest |
842 | unity2dtrtest |
843 | + launchermenutest |
844 | ) |
845 | |
846 | add_custom_target(unity2dtr_po COMMAND |
847 | |
848 | === renamed file 'launcher/tests/launchermenutest.cpp' => 'libunity-2d-private/tests/launchermenutest.cpp' |
849 | === modified file 'places/Home.qml' |
850 | --- places/Home.qml 2011-05-19 12:05:17 +0000 |
851 | +++ places/Home.qml 2011-06-07 22:59:36 +0000 |
852 | @@ -17,8 +17,7 @@ |
853 | */ |
854 | |
855 | import Qt 4.7 |
856 | -import UnityApplications 1.0 /* Necessary for the ImageProvider serving image://icons/theme_name/icon_name */ |
857 | -import Unity2d 1.0 /* Necessary for SortFilterProxyModel */ |
858 | +import Unity2d 1.0 /* Necessary for SortFilterProxyModel and for the ImageProvider serving image://icons/theme_name/icon_name */ |
859 | import Places 1.0 /* Necessary for DashDeclarativeView.*Dash */ |
860 | |
861 | Item { |
862 | |
863 | === modified file 'places/HomeButtonApplication.qml' |
864 | --- places/HomeButtonApplication.qml 2011-03-30 10:45:39 +0000 |
865 | +++ places/HomeButtonApplication.qml 2011-06-07 22:59:36 +0000 |
866 | @@ -21,7 +21,7 @@ |
867 | - ImageProvider serving image://icons/theme_name/icon_name |
868 | - LauncherApplication |
869 | */ |
870 | -import UnityApplications 1.0 |
871 | +import Unity2d 1.0 |
872 | import gconf 1.0 |
873 | |
874 | HomeButton { |
875 | |
876 | === modified file 'places/HomeShortcuts.qml' |
877 | --- places/HomeShortcuts.qml 2011-04-06 14:51:19 +0000 |
878 | +++ places/HomeShortcuts.qml 2011-06-07 22:59:36 +0000 |
879 | @@ -17,7 +17,7 @@ |
880 | */ |
881 | |
882 | import Qt 4.7 |
883 | -import UnityApplications 1.0 /* Necessary for the ImageProvider serving image://icons/theme_name/icon_name */ |
884 | +import Unity2d 1.0 /* Necessary for the ImageProvider serving image://icons/theme_name/icon_name */ |
885 | |
886 | Flow { |
887 | anchors.fill: parent |
888 | |
889 | === modified file 'places/RendererGrid.qml' |
890 | --- places/RendererGrid.qml 2011-05-18 16:04:47 +0000 |
891 | +++ places/RendererGrid.qml 2011-06-07 22:59:36 +0000 |
892 | @@ -17,7 +17,7 @@ |
893 | */ |
894 | |
895 | import Qt 4.7 |
896 | -import UnityApplications 1.0 /* Necessary for the ImageProvider serving image://icons */ |
897 | +import Unity2d 1.0 /* Necessary for the ImageProvider serving image://icons */ |
898 | |
899 | /* Renderers typically use a grid layout to render the model. The RendererGrid |
900 | component provides a standard implementation of such a layout where the |
901 | |
902 | === modified file 'places/app/places.cpp' |
903 | --- places/app/places.cpp 2011-06-06 09:23:48 +0000 |
904 | +++ places/app/places.cpp 2011-06-07 22:59:36 +0000 |
905 | @@ -81,9 +81,6 @@ |
906 | view.engine()->setBaseUrl(QUrl::fromLocalFile(unity2dDirectory() + "/places/")); |
907 | |
908 | if (!isRunningInstalled()) { |
909 | - /* Place.qml imports UnityApplications, which is part of the launcher |
910 | - component… */ |
911 | - view.engine()->addImportPath(unity2dDirectory() + "/launcher/"); |
912 | /* Place.qml imports Unity2d */ |
913 | view.engine()->addImportPath(unity2dDirectory() + "/libunity-2d-private/"); |
914 | } |
915 | |
916 | === modified file 'places/dash.qml' |
917 | --- places/dash.qml 2011-05-26 11:44:11 +0000 |
918 | +++ places/dash.qml 2011-06-07 22:59:36 +0000 |
919 | @@ -17,9 +17,8 @@ |
920 | */ |
921 | |
922 | import Qt 4.7 |
923 | -import UnityApplications 1.0 /* Necessary for LauncherPlacesList */ |
924 | import Places 1.0 /* Necessary for DashDeclarativeView.*Dash */ |
925 | -import Unity2d 1.0 /* Necessary for GnomeBackground */ |
926 | +import Unity2d 1.0 /* Necessary for GnomeBackground and LauncherPlacesList*/ |
927 | |
928 | Item { |
929 | id: dash |
930 | |
931 | === modified file 'po/unity-2d.pot' |
932 | --- po/unity-2d.pot 2011-04-06 21:14:07 +0000 |
933 | +++ po/unity-2d.pot 2011-06-07 22:59:36 +0000 |
934 | @@ -8,7 +8,7 @@ |
935 | msgstr "" |
936 | "Project-Id-Version: unity-2d\n" |
937 | "Report-Msgid-Bugs-To: https://bugs.launchpad.net/unity-2d/+filebug\n" |
938 | -"POT-Creation-Date: 2011-04-06 23:13+0200\n" |
939 | +"POT-Creation-Date: 2011-06-07 18:21+0200\n" |
940 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
941 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
942 | "Language-Team: LANGUAGE <LL@li.org>\n" |
943 | @@ -18,90 +18,94 @@ |
944 | "Content-Transfer-Encoding: 8bit\n" |
945 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
946 | |
947 | -#: places/SearchRefine.qml:61 |
948 | -msgid "Refine search" |
949 | -msgstr "" |
950 | - |
951 | -#: places/SearchRefine.qml:84 |
952 | -msgid "Type" |
953 | -msgstr "" |
954 | - |
955 | -#: places/GroupHeader.qml:86 |
956 | +#: places/GroupHeader.qml:88 |
957 | +msgid "See one more result" |
958 | +msgstr "" |
959 | + |
960 | +#: places/GroupHeader.qml:90 |
961 | #, qt-format |
962 | msgid "See %1 more results" |
963 | msgstr "" |
964 | |
965 | -#: places/GroupHeader.qml:86 |
966 | +#: places/GroupHeader.qml:93 |
967 | msgid "See fewer results" |
968 | msgstr "" |
969 | |
970 | -#: places/Home.qml:80 |
971 | -msgid "Shortcuts" |
972 | -msgstr "" |
973 | - |
974 | -#: places/Home.qml:193 |
975 | +#: places/HomeShortcuts.qml:32 |
976 | msgid "Media Apps" |
977 | msgstr "" |
978 | |
979 | -#: places/Home.qml:199 |
980 | +#: places/HomeShortcuts.qml:38 |
981 | msgid "Internet Apps" |
982 | msgstr "" |
983 | |
984 | -#: places/Home.qml:205 |
985 | +#: places/HomeShortcuts.qml:44 |
986 | msgid "More Apps" |
987 | msgstr "" |
988 | |
989 | -#: places/Home.qml:211 |
990 | +#: places/HomeShortcuts.qml:50 |
991 | msgid "Find Files" |
992 | msgstr "" |
993 | |
994 | -#: places/Home.qml:218 |
995 | +#: places/HomeShortcuts.qml:57 |
996 | msgid "Browse the Web" |
997 | msgstr "" |
998 | |
999 | -#: places/Home.qml:223 |
1000 | +#: places/HomeShortcuts.qml:62 |
1001 | msgid "View Photos" |
1002 | msgstr "" |
1003 | |
1004 | -#: places/Home.qml:228 |
1005 | +#: places/HomeShortcuts.qml:67 |
1006 | msgid "Check Email" |
1007 | msgstr "" |
1008 | |
1009 | -#: places/Home.qml:233 |
1010 | +#: places/HomeShortcuts.qml:72 |
1011 | msgid "Listen to Music" |
1012 | msgstr "" |
1013 | |
1014 | -#: launcher/UnityApplications/trash.cpp:74 |
1015 | +#: places/Home.qml:79 |
1016 | +msgid "Shortcuts" |
1017 | +msgstr "" |
1018 | + |
1019 | +#: places/SearchRefine.qml:61 |
1020 | +msgid "Refine search" |
1021 | +msgstr "" |
1022 | + |
1023 | +#: places/SearchRefine.qml:84 |
1024 | +msgid "Type" |
1025 | +msgstr "" |
1026 | + |
1027 | +#: libunity-2d-private/Unity2d/launcherdevice.cpp:238 |
1028 | +msgid "Eject" |
1029 | +msgstr "" |
1030 | + |
1031 | +#: libunity-2d-private/Unity2d/trash.cpp:125 |
1032 | msgid "Trash" |
1033 | msgstr "" |
1034 | |
1035 | -#: launcher/UnityApplications/trash.cpp:200 |
1036 | +#: libunity-2d-private/Unity2d/trash.cpp:255 |
1037 | #, c-format, qt-plural-format |
1038 | msgid "%n item in trash" |
1039 | msgid_plural "%n items in trash" |
1040 | msgstr[0] "" |
1041 | msgstr[1] "" |
1042 | |
1043 | -#: launcher/UnityApplications/trash.cpp:207 |
1044 | +#: libunity-2d-private/Unity2d/trash.cpp:262 |
1045 | msgid "Empty Trash" |
1046 | msgstr "" |
1047 | |
1048 | -#: launcher/UnityApplications/launcherapplication.cpp:844 |
1049 | +#: libunity-2d-private/Unity2d/workspaces.cpp:73 |
1050 | +msgid "Workspaces" |
1051 | +msgstr "" |
1052 | + |
1053 | +#: libunity-2d-private/Unity2d/launcherapplication.cpp:863 |
1054 | msgid "Keep In Launcher" |
1055 | msgstr "" |
1056 | |
1057 | -#: launcher/UnityApplications/launcherapplication.cpp:844 |
1058 | +#: libunity-2d-private/Unity2d/launcherapplication.cpp:863 |
1059 | msgid "Remove From Launcher" |
1060 | msgstr "" |
1061 | |
1062 | -#: launcher/UnityApplications/launcherapplication.cpp:851 |
1063 | +#: libunity-2d-private/Unity2d/launcherapplication.cpp:870 |
1064 | msgid "Quit" |
1065 | msgstr "" |
1066 | - |
1067 | -#: launcher/UnityApplications/workspaces.cpp:70 |
1068 | -msgid "Workspaces" |
1069 | -msgstr "" |
1070 | - |
1071 | -#: launcher/UnityApplications/launcherdevice.cpp:228 |
1072 | -msgid "Eject" |
1073 | -msgstr "" |
1074 | |
1075 | === modified file 'spread/Windows.qml' |
1076 | --- spread/Windows.qml 2011-04-19 14:11:36 +0000 |
1077 | +++ spread/Windows.qml 2011-06-07 22:59:36 +0000 |
1078 | @@ -18,7 +18,6 @@ |
1079 | |
1080 | import Qt 4.7 |
1081 | import "utils.js" as Utils |
1082 | -import UnityApplications 1.0 |
1083 | import Unity2d 1.0 |
1084 | |
1085 | /* The main component that manages the windows. |
1086 | |
1087 | === modified file 'spread/app/spread.cpp' |
1088 | --- spread/app/spread.cpp 2011-06-06 09:23:48 +0000 |
1089 | +++ spread/app/spread.cpp 2011-06-07 22:59:36 +0000 |
1090 | @@ -34,7 +34,7 @@ |
1091 | |
1092 | int main(int argc, char *argv[]) |
1093 | { |
1094 | - /* UnityApplications plugin uses GTK APIs to retrieve theme icons |
1095 | + /* Unity2d plugin uses GTK APIs to retrieve theme icons |
1096 | (gtk_icon_theme_get_default) and requires a call to gtk_init */ |
1097 | gtk_init(&argc, &argv); |
1098 | |
1099 | @@ -72,9 +72,6 @@ |
1100 | view.engine()->setBaseUrl(QUrl::fromLocalFile(unity2dDirectory() + "/spread/")); |
1101 | |
1102 | if (!isRunningInstalled()) { |
1103 | - /* Spread.qml imports UnityApplications, which is part of the launcher |
1104 | - component */ |
1105 | - view.engine()->addImportPath(unity2dDirectory() + "/launcher/"); |
1106 | /* Spread.qml imports Unity2d */ |
1107 | view.engine()->addImportPath(unity2dDirectory() + "/libunity-2d-private/"); |
1108 | } |
The branch in this MR depends on https:/ /code.launchpad .net/~fboucault /unity- 2d/reorg/ +merge/ 63736