Merge lp:~3v1n0/unity/cmake-libs-prefixes into lp:unity
- cmake-libs-prefixes
- Merge into trunk
Proposed by
Marco Trevisan (Treviño)
Status: | Merged |
---|---|
Approved by: | Andrea Azzarone |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4191 |
Proposed branch: | lp:~3v1n0/unity/cmake-libs-prefixes |
Merge into: | lp:unity |
Diff against target: |
431 lines (+96/-76) 14 files modified
CMakeLists.txt (+8/-49) UnityCore/DBusIndicators.cpp (+1/-1) UnityCore/GnomeSessionManager.cpp (+17/-7) config.h.cmake (+3/-2) data/CMakeLists.txt (+37/-1) data/unity7.conf.in (+1/-1) services/CMakeLists.txt (+1/-1) services/unity-panel-service-lockscreen.conf.in (+1/-1) services/unity-panel-service-lockscreen.service.in (+7/-0) services/unity-panel-service.conf.in (+1/-1) tools/CMakeLists.txt (+2/-2) unity-shared/DashStyle.cpp (+2/-2) unity-shared/GnomeFileManager.cpp (+4/-2) unity-shared/UpstartWrapper.cpp (+11/-6) |
To merge this branch: | bzr merge lp:~3v1n0/unity/cmake-libs-prefixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Azzarone (community) | Approve | ||
Review via email: mp+304525@code.launchpad.net |
Commit message
CMake: move data and setting files in proper folder, define shared libdir variables
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2016-07-21 13:01:59 +0000 |
3 | +++ CMakeLists.txt 2016-09-01 23:52:57 +0000 |
4 | @@ -158,14 +158,15 @@ |
5 | # |
6 | set (VERSION "${UNITY_VERSION}") |
7 | set (PREFIXPATH "${CMAKE_INSTALL_PREFIX}") |
8 | -set (UNITYLIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}") |
9 | -set (UNITYDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}") |
10 | -set (PKGDATADIR "${UNITYDATADIR}/icons") |
11 | +set (UNITY_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}") |
12 | +set (UNITY_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}") |
13 | +set (UNITY_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}") |
14 | +set (PKGDATADIR "${UNITY_DATADIR}/icons") |
15 | set (SOURCEDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/resources") |
16 | set (BUILDDIR "${CMAKE_BINARY_DIR}") |
17 | set (TESTDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/data") |
18 | set (LOCALE_DIR "${CMAKE_INSTALL_FULL_LOCALEDIR}") |
19 | -# specify the domain directly rather than refering to a variable |
20 | +# specify the domain directly rather than refering to a variable |
21 | # like ${PROJECT_NAME} to no confuse dh_translations |
22 | set (GETTEXT_PACKAGE "unity") |
23 | |
24 | @@ -182,7 +183,6 @@ |
25 | # |
26 | # i18n |
27 | # |
28 | - |
29 | find_package (Gettext REQUIRED) |
30 | |
31 | set (COMPIZ_I18N_DIR ${CMAKE_SOURCE_DIR}/po) |
32 | @@ -203,7 +203,7 @@ |
33 | |
34 | # |
35 | # Enable or disable boot logging |
36 | -# |
37 | +# |
38 | option (BOOT_LOGGER "Enable startup performance logging" OFF) |
39 | if (BOOT_LOGGER) |
40 | SET (BOOT_LOGGER_FLAG "-DENABLE_LOGGER") |
41 | @@ -248,7 +248,7 @@ |
42 | libnotify |
43 | libstartup-notification-1.0 |
44 | nux-4.0>=4.0.5 |
45 | - sigc++-2.0 |
46 | + sigc++-2.0>=2.4.0 |
47 | unity-misc>=0.4.0 |
48 | xpathselect=1.4 |
49 | zeitgeist-2.0 |
50 | @@ -259,7 +259,7 @@ |
51 | if(ENABLE_X_SUPPORT) |
52 | set(UNITY_PLUGIN_DEPS |
53 | ${UNITY_PLUGIN_DEPS} |
54 | - compiz>=0.9.9 |
55 | + compiz>=0.9.11 |
56 | libgeis |
57 | x11 |
58 | xfixes |
59 | @@ -361,46 +361,11 @@ |
60 | add_custom_target (gcheck COMMAND echo ${MISSING_TESTS_MSG}) |
61 | endif (ENABLE_UNIT_TESTS) |
62 | |
63 | -# |
64 | -# GSettings Schema |
65 | -# |
66 | -SET (UNITY_SCHEMAS "com.canonical.Unity.gschema.xml") |
67 | -SET (UNITY_TEST_SCHEMAS "external.gschema.xml") |
68 | - |
69 | -# Have an option to not install the schema into where GLib is |
70 | -option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF) |
71 | -if (GSETTINGS_LOCALINSTALL) |
72 | - SET (GSETTINGS_DIR "${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/") |
73 | -else (GSETTINGS_LOCALINSTALL) |
74 | - execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) |
75 | - SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") |
76 | -endif (GSETTINGS_LOCALINSTALL) |
77 | - |
78 | -# Run the validator and error if it fails |
79 | -execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) |
80 | -execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_SCHEMAS} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) |
81 | - |
82 | -if (_schemas_invalid) |
83 | - message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") |
84 | -endif (_schemas_invalid) |
85 | - |
86 | -# Actually install and recomple schemas |
87 | -message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") |
88 | -install (FILES ${UNITY_SCHEMAS} DESTINATION ${GSETTINGS_DIR} OPTIONAL) |
89 | -install (CODE "message (STATUS \"Compiling GSettings schemas\")") |
90 | -install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") |
91 | - |
92 | # Resources |
93 | install (FILES resources/dash-widgets.json DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/themes) |
94 | file (GLOB _datafiles "${CMAKE_CURRENT_SOURCE_DIR}/resources/*") |
95 | install (FILES ${_datafiles} DESTINATION ${PKGDATADIR}) |
96 | |
97 | - |
98 | -# For testing |
99 | -configure_file (${CMAKE_SOURCE_DIR}/${UNITY_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_SCHEMAS}) |
100 | -configure_file (${CMAKE_SOURCE_DIR}/tests/data/${UNITY_TEST_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_TEST_SCHEMAS}) |
101 | -execute_process (COMMAND ${_glib_comple_schemas} ${CMAKE_BINARY_DIR}/settings) |
102 | - |
103 | # |
104 | # docs |
105 | # |
106 | @@ -425,9 +390,3 @@ |
107 | ADDITIONAL_MAKE_CLEAN_FILES api-doc) |
108 | |
109 | endif (DOXYGEN_FOUND STREQUAL "YES") |
110 | - |
111 | -# |
112 | -# Upstart |
113 | -# |
114 | -configure_file(unity7.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf) |
115 | -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions) |
116 | |
117 | === modified file 'UnityCore/DBusIndicators.cpp' |
118 | --- UnityCore/DBusIndicators.cpp 2016-02-09 01:26:22 +0000 |
119 | +++ UnityCore/DBusIndicators.cpp 2016-09-01 23:52:57 +0000 |
120 | @@ -123,7 +123,7 @@ |
121 | |
122 | // This is obviously hackish, but this part of the code is mostly hackish... |
123 | // Let's attempt to run it from where we expect it to be |
124 | - std::string cmd = UNITYLIBDIR"/" + std::string("unity-panel-service"); |
125 | + std::string cmd = UNITY_LIBDIR"/" + std::string("unity-panel-service"); |
126 | LOG_WARN(logger) << "Couldn't load panel from installed services, " |
127 | << "so trying to load panel from known location: " << cmd; |
128 | |
129 | |
130 | === modified file 'UnityCore/GnomeSessionManager.cpp' |
131 | --- UnityCore/GnomeSessionManager.cpp 2016-05-31 14:57:10 +0000 |
132 | +++ UnityCore/GnomeSessionManager.cpp 2016-09-01 23:52:57 +0000 |
133 | @@ -77,6 +77,8 @@ |
134 | |
135 | const std::string GNOME_LOCKDOWN_OPTIONS = "org.gnome.desktop.lockdown"; |
136 | const std::string DISABLE_LOCKSCREEN_KEY = "disable-lock-screen"; |
137 | + |
138 | +GDBusProxyFlags DEFAULT_CALL_FLAGS = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES|G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS|G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION); |
139 | } |
140 | |
141 | GnomeManager::Impl::Impl(GnomeManager* manager, bool test_mode) |
142 | @@ -130,7 +132,9 @@ |
143 | { |
144 | presence_proxy_ = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.gnome.SessionManager", |
145 | "/org/gnome/SessionManager/Presence", |
146 | - "org.gnome.SessionManager.Presence"); |
147 | + "org.gnome.SessionManager.Presence", |
148 | + G_BUS_TYPE_SESSION, |
149 | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES); |
150 | |
151 | presence_proxy_->Connect("StatusChanged", [this](GVariant* variant) { |
152 | enum class PresenceStatus : unsigned |
153 | @@ -166,7 +170,8 @@ |
154 | dm_seat_proxy_ = std::make_shared<glib::DBusProxy>("org.freedesktop.Accounts", |
155 | ("/org/freedesktop/Accounts/User" + std::to_string(getuid())).c_str(), |
156 | "org.freedesktop.Accounts.User", |
157 | - G_BUS_TYPE_SYSTEM); |
158 | + G_BUS_TYPE_SYSTEM, |
159 | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS); |
160 | } |
161 | |
162 | CallLogindMethod("CanHibernate", nullptr, [this] (GVariant* variant, glib::Error const& err) { |
163 | @@ -374,7 +379,8 @@ |
164 | glib::DBusProxy::CallFinishedCallback const& cb) |
165 | { |
166 | auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.gnome.SessionManager", |
167 | - "/org/gnome/SessionManager", "org.gnome.SessionManager"); |
168 | + "/org/gnome/SessionManager", "org.gnome.SessionManager", |
169 | + G_BUS_TYPE_SESSION, DEFAULT_CALL_FLAGS); |
170 | |
171 | // By passing the proxy to the lambda we ensure that it will be smartly handled |
172 | proxy->CallBegin(method, parameters, [proxy, cb] (GVariant* ret, glib::Error const& e) { |
173 | @@ -392,7 +398,8 @@ |
174 | { |
175 | auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.UPower", |
176 | "/org/freedesktop/UPower", "org.freedesktop.UPower", |
177 | - test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM); |
178 | + test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM, |
179 | + DEFAULT_CALL_FLAGS); |
180 | |
181 | proxy->CallBegin(method, nullptr, [proxy, cb] (GVariant *ret, glib::Error const& e) { |
182 | if (e) |
183 | @@ -411,7 +418,8 @@ |
184 | auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.login1", |
185 | "/org/freedesktop/login1", |
186 | "org.freedesktop.login1.Manager", |
187 | - test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM); |
188 | + test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM, |
189 | + DEFAULT_CALL_FLAGS); |
190 | |
191 | // By passing the proxy to the lambda we ensure that it will be smartly handled |
192 | proxy->CallBegin(method, parameters, [proxy, cb, method] (GVariant* ret, glib::Error const& e) { |
193 | @@ -432,7 +440,8 @@ |
194 | auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.ConsoleKit", |
195 | "/org/freedesktop/ConsoleKit/Manager", |
196 | "org.freedesktop.ConsoleKit.Manager", |
197 | - test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM); |
198 | + test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM, |
199 | + DEFAULT_CALL_FLAGS); |
200 | |
201 | // By passing the proxy to the lambda we ensure that it will be smartly handled |
202 | proxy->CallBegin(method, parameters, [this, proxy] (GVariant*, glib::Error const& e) { |
203 | @@ -450,7 +459,8 @@ |
204 | auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.DisplayManager", |
205 | glib::gchar_to_string(xdg_seat_path), |
206 | "org.freedesktop.DisplayManager.Seat", |
207 | - test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM); |
208 | + test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM, |
209 | + DEFAULT_CALL_FLAGS); |
210 | proxy->CallBegin(method, parameters, [this, proxy] (GVariant*, glib::Error const& e) { |
211 | if (e) |
212 | { |
213 | |
214 | === modified file 'config.h.cmake' |
215 | --- config.h.cmake 2016-02-09 01:26:22 +0000 |
216 | +++ config.h.cmake 2016-09-01 23:52:57 +0000 |
217 | @@ -2,8 +2,9 @@ |
218 | #define CONFIG_H |
219 | |
220 | #cmakedefine PREFIXPATH "@PREFIXPATH@" |
221 | -#cmakedefine UNITYDATADIR "@UNITYDATADIR@" |
222 | -#cmakedefine UNITYLIBDIR "@UNITYLIBDIR@" |
223 | +#cmakedefine UNITY_DATADIR "@UNITY_DATADIR@" |
224 | +#cmakedefine UNITY_LIBDIR "@UNITY_LIBDIR@" |
225 | +#cmakedefine UNITY_INSTALL_LIBDIR "@UNITY_INSTALL_LIBDIR@" |
226 | #cmakedefine PKGDATADIR "@PKGDATADIR@" |
227 | #cmakedefine LOCALE_DIR "@LOCALE_DIR@" |
228 | #cmakedefine VERSION "@VERSION@" |
229 | |
230 | === modified file 'data/CMakeLists.txt' |
231 | --- data/CMakeLists.txt 2014-05-27 07:53:19 +0000 |
232 | +++ data/CMakeLists.txt 2016-09-01 23:52:57 +0000 |
233 | @@ -1,1 +1,37 @@ |
234 | -add_subdirectory(pam) |
235 | \ No newline at end of file |
236 | +add_subdirectory(pam) |
237 | + |
238 | +# GSettings Schema |
239 | +SET (UNITY_SCHEMAS "com.canonical.Unity.gschema.xml") |
240 | +SET (UNITY_TEST_SCHEMAS "external.gschema.xml") |
241 | + |
242 | +# Have an option to not install the schema into where GLib is |
243 | +option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF) |
244 | +if (GSETTINGS_LOCALINSTALL) |
245 | + SET (GSETTINGS_DIR "${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/") |
246 | +else (GSETTINGS_LOCALINSTALL) |
247 | + execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE) |
248 | + SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/") |
249 | +endif (GSETTINGS_LOCALINSTALL) |
250 | + |
251 | +# Run the validator and error if it fails |
252 | +execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) |
253 | +execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_SCHEMAS} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) |
254 | + |
255 | +if (_schemas_invalid) |
256 | + message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") |
257 | +endif (_schemas_invalid) |
258 | + |
259 | +# Actually install and recomple schemas |
260 | +message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") |
261 | +install (FILES ${UNITY_SCHEMAS} DESTINATION ${GSETTINGS_DIR} OPTIONAL) |
262 | +install (CODE "message (STATUS \"Compiling GSettings schemas\")") |
263 | +install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})") |
264 | + |
265 | +# Settings for testing |
266 | +configure_file (${CMAKE_SOURCE_DIR}/data/${UNITY_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_SCHEMAS}) |
267 | +configure_file (${CMAKE_SOURCE_DIR}/tests/data/${UNITY_TEST_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_TEST_SCHEMAS}) |
268 | +execute_process (COMMAND ${_glib_comple_schemas} ${CMAKE_BINARY_DIR}/settings) |
269 | + |
270 | +# Upstart |
271 | +configure_file(unity7.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf) |
272 | +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions) |
273 | |
274 | === renamed file 'com.canonical.Unity.gschema.xml' => 'data/com.canonical.Unity.gschema.xml' |
275 | === renamed file 'unity7.conf.in' => 'data/unity7.conf.in' |
276 | --- unity7.conf.in 2016-07-21 13:01:59 +0000 |
277 | +++ data/unity7.conf.in 2016-09-01 23:52:57 +0000 |
278 | @@ -23,7 +23,7 @@ |
279 | initctl set-env -g COMPIZ_CONFIG_PROFILE="$compiz_profile" |
280 | export COMPIZ_CONFIG_PROFILE="$compiz_profile" |
281 | |
282 | - ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-active-plugins-safety-check |
283 | + ${UNITY_LIBDIR}/unity-active-plugins-safety-check |
284 | end script |
285 | |
286 | respawn |
287 | |
288 | === modified file 'services/CMakeLists.txt' |
289 | --- services/CMakeLists.txt 2016-02-09 01:26:22 +0000 |
290 | +++ services/CMakeLists.txt 2016-09-01 23:52:57 +0000 |
291 | @@ -51,7 +51,7 @@ |
292 | |
293 | add_executable(unity-panel-service ${PANEL_SOURCES}) |
294 | target_link_libraries(unity-panel-service ${LIBS}) |
295 | -install(TARGETS unity-panel-service DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity/) |
296 | +install(TARGETS unity-panel-service DESTINATION ${UNITY_INSTALL_LIBDIR}) |
297 | |
298 | configure_file(unity-panel-service.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf) |
299 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions) |
300 | |
301 | === modified file 'services/unity-panel-service-lockscreen.conf.in' |
302 | --- services/unity-panel-service-lockscreen.conf.in 2016-02-09 01:26:22 +0000 |
303 | +++ services/unity-panel-service-lockscreen.conf.in 2016-09-01 23:52:57 +0000 |
304 | @@ -5,4 +5,4 @@ |
305 | stop on desktop-unlock |
306 | |
307 | respawn |
308 | -exec ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-panel-service --lockscreen-mode |
309 | +exec ${UNITY_LIBDIR}/unity-panel-service --lockscreen-mode |
310 | |
311 | === added file 'services/unity-panel-service-lockscreen.service.in' |
312 | --- services/unity-panel-service-lockscreen.service.in 1970-01-01 00:00:00 +0000 |
313 | +++ services/unity-panel-service-lockscreen.service.in 2016-09-01 23:52:57 +0000 |
314 | @@ -0,0 +1,7 @@ |
315 | +[Unit] |
316 | +Description=Backing Service for the Unity Panel in Lockscreen mode |
317 | +PartOf=unity-screen-locked.target |
318 | + |
319 | +[Service] |
320 | +ExecStart=${UNITY_LIBDIR}/unity-panel-service --lockscreen-mode |
321 | +Restart=on-failure |
322 | |
323 | === modified file 'services/unity-panel-service.conf.in' |
324 | --- services/unity-panel-service.conf.in 2016-02-09 01:26:22 +0000 |
325 | +++ services/unity-panel-service.conf.in 2016-09-01 23:52:57 +0000 |
326 | @@ -15,4 +15,4 @@ |
327 | emits indicator-services-end |
328 | |
329 | respawn |
330 | -exec ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-panel-service |
331 | +exec ${UNITY_LIBDIR}/unity-panel-service |
332 | |
333 | === modified file 'tools/CMakeLists.txt' |
334 | --- tools/CMakeLists.txt 2016-07-18 17:26:01 +0000 |
335 | +++ tools/CMakeLists.txt 2016-09-01 23:52:57 +0000 |
336 | @@ -1,7 +1,7 @@ |
337 | # |
338 | # Some unity tools |
339 | # |
340 | -install(FILES makebootchart.py PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity) |
341 | +install(FILES makebootchart.py PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${UNITY_INSTALL_LIBDIR}) |
342 | |
343 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/unity.cmake ${CMAKE_BINARY_DIR}/bin/unity) |
344 | install(FILES ${CMAKE_BINARY_DIR}/bin/unity PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ |
345 | @@ -27,4 +27,4 @@ |
346 | |
347 | add_executable(unity-active-plugins-safety-check unity_active_plugins_safety_check.cpp) |
348 | target_link_libraries(unity-active-plugins-safety-check ${LIBS}) |
349 | -install(TARGETS unity-active-plugins-safety-check DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity/) |
350 | +install(TARGETS unity-active-plugins-safety-check DESTINATION ${UNITY_INSTALL_LIBDIR}) |
351 | |
352 | === modified file 'unity-shared/DashStyle.cpp' |
353 | --- unity-shared/DashStyle.cpp 2016-08-10 10:37:02 +0000 |
354 | +++ unity-shared/DashStyle.cpp 2016-09-01 23:52:57 +0000 |
355 | @@ -44,7 +44,7 @@ |
356 | #include "UnitySettings.h" |
357 | #include "config.h" |
358 | |
359 | -#define DASH_WIDGETS_FILE UNITYDATADIR"/themes/dash-widgets.json" |
360 | +#define DASH_WIDGETS_FILE UNITY_DATADIR"/themes/dash-widgets.json" |
361 | |
362 | namespace unity |
363 | { |
364 | @@ -303,7 +303,7 @@ |
365 | // is initialised. |
366 | SetDefaultValues(); |
367 | |
368 | - if (!parser.Open(theme::Settings::Get()->ThemedFilePath("dash-widgets", {UNITYDATADIR"/themes"}, {"json"}))) |
369 | + if (!parser.Open(theme::Settings::Get()->ThemedFilePath("dash-widgets", {UNITY_DATADIR"/themes"}, {"json"}))) |
370 | { |
371 | LOG_ERROR(logger) << "Impossible to find a dash-widgets.json in theme paths"; |
372 | return; |
373 | |
374 | === modified file 'unity-shared/GnomeFileManager.cpp' |
375 | --- unity-shared/GnomeFileManager.cpp 2015-12-11 17:48:29 +0000 |
376 | +++ unity-shared/GnomeFileManager.cpp 2016-09-01 23:52:57 +0000 |
377 | @@ -45,7 +45,7 @@ |
378 | { |
379 | Impl(GnomeFileManager* parent) |
380 | : parent_(parent) |
381 | - , filemanager_proxy_("org.freedesktop.FileManager1", "/org/freedesktop/FileManager1", "org.freedesktop.FileManager1") |
382 | + , filemanager_proxy_("org.freedesktop.FileManager1", "/org/freedesktop/FileManager1", "org.freedesktop.FileManager1", G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS) |
383 | { |
384 | auto callback = sigc::mem_fun(this, &Impl::OnOpenLocationsXidsUpdated); |
385 | filemanager_proxy_.GetProperty("XUbuntuOpenLocationsXids", callback); |
386 | @@ -54,8 +54,10 @@ |
387 | |
388 | glib::DBusProxy::Ptr NautilusOperationsProxy() const |
389 | { |
390 | + auto flags = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES|G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS); |
391 | return std::make_shared<glib::DBusProxy>(NAUTILUS_NAME, NAUTILUS_PATH, |
392 | - "org.gnome.Nautilus.FileOperations"); |
393 | + "org.gnome.Nautilus.FileOperations", |
394 | + G_BUS_TYPE_SESSION, flags); |
395 | } |
396 | |
397 | void OnOpenLocationsXidsUpdated(GVariant* value) |
398 | |
399 | === modified file 'unity-shared/UpstartWrapper.cpp' |
400 | --- unity-shared/UpstartWrapper.cpp 2015-10-14 10:31:11 +0000 |
401 | +++ unity-shared/UpstartWrapper.cpp 2016-09-01 23:52:57 +0000 |
402 | @@ -37,18 +37,23 @@ |
403 | void Emit(std::string const& name); |
404 | |
405 | private: |
406 | - glib::DBusProxy::Ptr upstart_proxy_; |
407 | + bool test_mode_; |
408 | }; |
409 | |
410 | UpstartWrapper::Impl::Impl(bool test_mode) |
411 | -{ |
412 | - upstart_proxy_ = std::make_shared<unity::glib::DBusProxy>(test_mode ? "com.canonical.Unity.Test.Upstart" : DBUS_SERVICE_UPSTART, |
413 | - DBUS_PATH_UPSTART, DBUS_INTERFACE_UPSTART); |
414 | -} |
415 | + : test_mode_(test_mode) |
416 | +{} |
417 | |
418 | void UpstartWrapper::Impl::Emit(std::string const& name) |
419 | { |
420 | - upstart_proxy_->Call("EmitEvent", g_variant_new("(sasb)", name.c_str(), nullptr, 0)); |
421 | + auto flags = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | |
422 | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS); |
423 | + |
424 | + auto proxy = std::make_shared<unity::glib::DBusProxy>(test_mode_ ? "com.canonical.Unity.Test.Upstart" : DBUS_SERVICE_UPSTART, |
425 | + DBUS_PATH_UPSTART, DBUS_INTERFACE_UPSTART, |
426 | + G_BUS_TYPE_SESSION, flags); |
427 | + |
428 | + proxy->CallBegin("EmitEvent", g_variant_new("(sasb)", name.c_str(), nullptr, 0), [proxy] (GVariant*, glib::Error const&) {}); |
429 | } |
430 | |
431 | // |
+1