summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2016-09-01 23:58:01 +0000
committerBileto Bot <ci-train-bot@canonical.com>2016-09-01 23:58:01 +0000
commit74ca57638845574ffb9bdb3d8808f98817d60f79 (patch)
tree21ca23de9430fc60174e7e52ac64f44e78865b9e
parentfee779111435e7cfda848142092623d3d8bd50ca (diff)
parent2b8246f01db8fb2b28557dac8d44b4c1ba9d3dea (diff)
CMake: move data and setting files in proper folder, define shared libdir variables
Approved by: Andrea Azzarone (bzr r4191)
-rw-r--r--CMakeLists.txt57
-rw-r--r--UnityCore/DBusIndicators.cpp2
-rw-r--r--UnityCore/GnomeSessionManager.cpp24
-rw-r--r--config.h.cmake5
-rw-r--r--data/CMakeLists.txt38
-rw-r--r--data/com.canonical.Unity.gschema.xml (renamed from com.canonical.Unity.gschema.xml)0
-rw-r--r--data/unity7.conf.in (renamed from unity7.conf.in)2
-rw-r--r--services/CMakeLists.txt2
-rw-r--r--services/unity-panel-service-lockscreen.conf.in2
-rw-r--r--services/unity-panel-service-lockscreen.service.in7
-rw-r--r--services/unity-panel-service.conf.in2
-rw-r--r--tools/CMakeLists.txt4
-rwxr-xr-xunity-shared/DashStyle.cpp4
-rw-r--r--unity-shared/GnomeFileManager.cpp6
-rw-r--r--unity-shared/UpstartWrapper.cpp17
15 files changed, 96 insertions, 76 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2298c7b0..90c5998b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,14 +158,15 @@ add_dependencies (release distcheck)
#
set (VERSION "${UNITY_VERSION}")
set (PREFIXPATH "${CMAKE_INSTALL_PREFIX}")
-set (UNITYLIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}")
-set (UNITYDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}")
-set (PKGDATADIR "${UNITYDATADIR}/icons")
+set (UNITY_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}")
+set (UNITY_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}")
+set (UNITY_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
+set (PKGDATADIR "${UNITY_DATADIR}/icons")
set (SOURCEDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
set (BUILDDIR "${CMAKE_BINARY_DIR}")
set (TESTDATADIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/data")
set (LOCALE_DIR "${CMAKE_INSTALL_FULL_LOCALEDIR}")
-# specify the domain directly rather than refering to a variable
+# specify the domain directly rather than refering to a variable
# like ${PROJECT_NAME} to no confuse dh_translations
set (GETTEXT_PACKAGE "unity")
@@ -182,7 +183,6 @@ configure_file (${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
#
# i18n
#
-
find_package (Gettext REQUIRED)
set (COMPIZ_I18N_DIR ${CMAKE_SOURCE_DIR}/po)
@@ -203,7 +203,7 @@ endif()
#
# Enable or disable boot logging
-#
+#
option (BOOT_LOGGER "Enable startup performance logging" OFF)
if (BOOT_LOGGER)
SET (BOOT_LOGGER_FLAG "-DENABLE_LOGGER")
@@ -248,7 +248,7 @@ set(UNITY_PLUGIN_SHARED_DEPS
libnotify
libstartup-notification-1.0
nux-4.0>=4.0.5
- sigc++-2.0
+ sigc++-2.0>=2.4.0
unity-misc>=0.4.0
xpathselect=1.4
zeitgeist-2.0
@@ -259,7 +259,7 @@ set(UNITY_PLUGIN_DEPS ${UNITY_PLUGIN_SHARED_DEPS})
if(ENABLE_X_SUPPORT)
set(UNITY_PLUGIN_DEPS
${UNITY_PLUGIN_DEPS}
- compiz>=0.9.9
+ compiz>=0.9.11
libgeis
x11
xfixes
@@ -361,46 +361,11 @@ else (ENABLE_UNIT_TESTS)
add_custom_target (gcheck COMMAND echo ${MISSING_TESTS_MSG})
endif (ENABLE_UNIT_TESTS)
-#
-# GSettings Schema
-#
-SET (UNITY_SCHEMAS "com.canonical.Unity.gschema.xml")
-SET (UNITY_TEST_SCHEMAS "external.gschema.xml")
-
-# Have an option to not install the schema into where GLib is
-option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF)
-if (GSETTINGS_LOCALINSTALL)
- SET (GSETTINGS_DIR "${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/")
-else (GSETTINGS_LOCALINSTALL)
- execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
- SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/")
-endif (GSETTINGS_LOCALINSTALL)
-
-# Run the validator and error if it fails
-execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_SCHEMAS} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-if (_schemas_invalid)
- message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
-endif (_schemas_invalid)
-
-# Actually install and recomple schemas
-message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
-install (FILES ${UNITY_SCHEMAS} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
-install (CODE "message (STATUS \"Compiling GSettings schemas\")")
-install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
-
# Resources
install (FILES resources/dash-widgets.json DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/themes)
file (GLOB _datafiles "${CMAKE_CURRENT_SOURCE_DIR}/resources/*")
install (FILES ${_datafiles} DESTINATION ${PKGDATADIR})
-
-# For testing
-configure_file (${CMAKE_SOURCE_DIR}/${UNITY_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_SCHEMAS})
-configure_file (${CMAKE_SOURCE_DIR}/tests/data/${UNITY_TEST_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_TEST_SCHEMAS})
-execute_process (COMMAND ${_glib_comple_schemas} ${CMAKE_BINARY_DIR}/settings)
-
#
# docs
#
@@ -425,9 +390,3 @@ if (DOXYGEN_FOUND STREQUAL "YES")
ADDITIONAL_MAKE_CLEAN_FILES api-doc)
endif (DOXYGEN_FOUND STREQUAL "YES")
-
-#
-# Upstart
-#
-configure_file(unity7.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
diff --git a/UnityCore/DBusIndicators.cpp b/UnityCore/DBusIndicators.cpp
index 6021418f2..b9c17e105 100644
--- a/UnityCore/DBusIndicators.cpp
+++ b/UnityCore/DBusIndicators.cpp
@@ -123,7 +123,7 @@ void DBusIndicators::Impl::CheckLocalService()
// This is obviously hackish, but this part of the code is mostly hackish...
// Let's attempt to run it from where we expect it to be
- std::string cmd = UNITYLIBDIR"/" + std::string("unity-panel-service");
+ std::string cmd = UNITY_LIBDIR"/" + std::string("unity-panel-service");
LOG_WARN(logger) << "Couldn't load panel from installed services, "
<< "so trying to load panel from known location: " << cmd;
diff --git a/UnityCore/GnomeSessionManager.cpp b/UnityCore/GnomeSessionManager.cpp
index 4c59ece30..5f87fed8f 100644
--- a/UnityCore/GnomeSessionManager.cpp
+++ b/UnityCore/GnomeSessionManager.cpp
@@ -77,6 +77,8 @@ const std::string SUPPRESS_DIALOGS_KEY = "suppress-logout-restart-shutdown";
const std::string GNOME_LOCKDOWN_OPTIONS = "org.gnome.desktop.lockdown";
const std::string DISABLE_LOCKSCREEN_KEY = "disable-lock-screen";
+
+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);
}
GnomeManager::Impl::Impl(GnomeManager* manager, bool test_mode)
@@ -130,7 +132,9 @@ GnomeManager::Impl::Impl(GnomeManager* manager, bool test_mode)
{
presence_proxy_ = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.gnome.SessionManager",
"/org/gnome/SessionManager/Presence",
- "org.gnome.SessionManager.Presence");
+ "org.gnome.SessionManager.Presence",
+ G_BUS_TYPE_SESSION,
+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES);
presence_proxy_->Connect("StatusChanged", [this](GVariant* variant) {
enum class PresenceStatus : unsigned
@@ -166,7 +170,8 @@ GnomeManager::Impl::Impl(GnomeManager* manager, bool test_mode)
dm_seat_proxy_ = std::make_shared<glib::DBusProxy>("org.freedesktop.Accounts",
("/org/freedesktop/Accounts/User" + std::to_string(getuid())).c_str(),
"org.freedesktop.Accounts.User",
- G_BUS_TYPE_SYSTEM);
+ G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS);
}
CallLogindMethod("CanHibernate", nullptr, [this] (GVariant* variant, glib::Error const& err) {
@@ -374,7 +379,8 @@ void GnomeManager::Impl::CallGnomeSessionMethod(std::string const& method, GVari
glib::DBusProxy::CallFinishedCallback const& cb)
{
auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.gnome.SessionManager",
- "/org/gnome/SessionManager", "org.gnome.SessionManager");
+ "/org/gnome/SessionManager", "org.gnome.SessionManager",
+ G_BUS_TYPE_SESSION, DEFAULT_CALL_FLAGS);
// By passing the proxy to the lambda we ensure that it will be smartly handled
proxy->CallBegin(method, parameters, [proxy, cb] (GVariant* ret, glib::Error const& e) {
@@ -392,7 +398,8 @@ void GnomeManager::Impl::CallUPowerMethod(std::string const& method, glib::DBusP
{
auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.UPower",
"/org/freedesktop/UPower", "org.freedesktop.UPower",
- test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM);
+ test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM,
+ DEFAULT_CALL_FLAGS);
proxy->CallBegin(method, nullptr, [proxy, cb] (GVariant *ret, glib::Error const& e) {
if (e)
@@ -411,7 +418,8 @@ void GnomeManager::Impl::CallLogindMethod(std::string const& method, GVariant* p
auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.login1",
"/org/freedesktop/login1",
"org.freedesktop.login1.Manager",
- test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM);
+ test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM,
+ DEFAULT_CALL_FLAGS);
// By passing the proxy to the lambda we ensure that it will be smartly handled
proxy->CallBegin(method, parameters, [proxy, cb, method] (GVariant* ret, glib::Error const& e) {
@@ -432,7 +440,8 @@ void GnomeManager::Impl::CallConsoleKitMethod(std::string const& method, GVarian
auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.ConsoleKit",
"/org/freedesktop/ConsoleKit/Manager",
"org.freedesktop.ConsoleKit.Manager",
- test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM);
+ test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM,
+ DEFAULT_CALL_FLAGS);
// By passing the proxy to the lambda we ensure that it will be smartly handled
proxy->CallBegin(method, parameters, [this, proxy] (GVariant*, glib::Error const& e) {
@@ -450,7 +459,8 @@ void GnomeManager::Impl::CallDisplayManagerSeatMethod(std::string const& method,
auto proxy = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.DisplayManager",
glib::gchar_to_string(xdg_seat_path),
"org.freedesktop.DisplayManager.Seat",
- test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM);
+ test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM,
+ DEFAULT_CALL_FLAGS);
proxy->CallBegin(method, parameters, [this, proxy] (GVariant*, glib::Error const& e) {
if (e)
{
diff --git a/config.h.cmake b/config.h.cmake
index 11dfa0e5f..3caa2ecde 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -2,8 +2,9 @@
#define CONFIG_H
#cmakedefine PREFIXPATH "@PREFIXPATH@"
-#cmakedefine UNITYDATADIR "@UNITYDATADIR@"
-#cmakedefine UNITYLIBDIR "@UNITYLIBDIR@"
+#cmakedefine UNITY_DATADIR "@UNITY_DATADIR@"
+#cmakedefine UNITY_LIBDIR "@UNITY_LIBDIR@"
+#cmakedefine UNITY_INSTALL_LIBDIR "@UNITY_INSTALL_LIBDIR@"
#cmakedefine PKGDATADIR "@PKGDATADIR@"
#cmakedefine LOCALE_DIR "@LOCALE_DIR@"
#cmakedefine VERSION "@VERSION@"
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 321867659..e87bb93d8 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1 +1,37 @@
-add_subdirectory(pam) \ No newline at end of file
+add_subdirectory(pam)
+
+# GSettings Schema
+SET (UNITY_SCHEMAS "com.canonical.Unity.gschema.xml")
+SET (UNITY_TEST_SCHEMAS "external.gschema.xml")
+
+# Have an option to not install the schema into where GLib is
+option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF)
+if (GSETTINGS_LOCALINSTALL)
+ SET (GSETTINGS_DIR "${CMAKE_INSTALL_DATADIR}/glib-2.0/schemas/")
+else (GSETTINGS_LOCALINSTALL)
+ execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
+ SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/")
+endif (GSETTINGS_LOCALINSTALL)
+
+# Run the validator and error if it fails
+execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_SCHEMAS} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if (_schemas_invalid)
+ message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
+endif (_schemas_invalid)
+
+# Actually install and recomple schemas
+message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
+install (FILES ${UNITY_SCHEMAS} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
+install (CODE "message (STATUS \"Compiling GSettings schemas\")")
+install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
+
+# Settings for testing
+configure_file (${CMAKE_SOURCE_DIR}/data/${UNITY_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_SCHEMAS})
+configure_file (${CMAKE_SOURCE_DIR}/tests/data/${UNITY_TEST_SCHEMAS} ${CMAKE_BINARY_DIR}/settings/${UNITY_TEST_SCHEMAS})
+execute_process (COMMAND ${_glib_comple_schemas} ${CMAKE_BINARY_DIR}/settings)
+
+# Upstart
+configure_file(unity7.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity7.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
diff --git a/com.canonical.Unity.gschema.xml b/data/com.canonical.Unity.gschema.xml
index bfeeb7dad..bfeeb7dad 100644
--- a/com.canonical.Unity.gschema.xml
+++ b/data/com.canonical.Unity.gschema.xml
diff --git a/unity7.conf.in b/data/unity7.conf.in
index 2cd42aa72..e465df919 100644
--- a/unity7.conf.in
+++ b/data/unity7.conf.in
@@ -23,7 +23,7 @@ pre-start script
initctl set-env -g COMPIZ_CONFIG_PROFILE="$compiz_profile"
export COMPIZ_CONFIG_PROFILE="$compiz_profile"
- ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-active-plugins-safety-check
+ ${UNITY_LIBDIR}/unity-active-plugins-safety-check
end script
respawn
diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt
index 13a61716b..46915fea4 100644
--- a/services/CMakeLists.txt
+++ b/services/CMakeLists.txt
@@ -51,7 +51,7 @@ link_directories(${LIB_PATHS})
add_executable(unity-panel-service ${PANEL_SOURCES})
target_link_libraries(unity-panel-service ${LIBS})
-install(TARGETS unity-panel-service DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity/)
+install(TARGETS unity-panel-service DESTINATION ${UNITY_INSTALL_LIBDIR})
configure_file(unity-panel-service.conf.in ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unity-panel-service.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
diff --git a/services/unity-panel-service-lockscreen.conf.in b/services/unity-panel-service-lockscreen.conf.in
index b9255d825..d9ceb3276 100644
--- a/services/unity-panel-service-lockscreen.conf.in
+++ b/services/unity-panel-service-lockscreen.conf.in
@@ -5,4 +5,4 @@ start on desktop-lock
stop on desktop-unlock
respawn
-exec ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-panel-service --lockscreen-mode
+exec ${UNITY_LIBDIR}/unity-panel-service --lockscreen-mode
diff --git a/services/unity-panel-service-lockscreen.service.in b/services/unity-panel-service-lockscreen.service.in
new file mode 100644
index 000000000..d1b1eb6ff
--- /dev/null
+++ b/services/unity-panel-service-lockscreen.service.in
@@ -0,0 +1,7 @@
+[Unit]
+Description=Backing Service for the Unity Panel in Lockscreen mode
+PartOf=unity-screen-locked.target
+
+[Service]
+ExecStart=${UNITY_LIBDIR}/unity-panel-service --lockscreen-mode
+Restart=on-failure
diff --git a/services/unity-panel-service.conf.in b/services/unity-panel-service.conf.in
index 62712f833..5fc3e012b 100644
--- a/services/unity-panel-service.conf.in
+++ b/services/unity-panel-service.conf.in
@@ -15,4 +15,4 @@ emits indicator-services-start
emits indicator-services-end
respawn
-exec ${CMAKE_INSTALL_FULL_LIBDIR}/unity/unity-panel-service
+exec ${UNITY_LIBDIR}/unity-panel-service
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 58e575a8d..adc58083f 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,7 +1,7 @@
#
# Some unity tools
#
-install(FILES makebootchart.py PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity)
+install(FILES makebootchart.py PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${UNITY_INSTALL_LIBDIR})
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/unity.cmake ${CMAKE_BINARY_DIR}/bin/unity)
install(FILES ${CMAKE_BINARY_DIR}/bin/unity PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
@@ -27,4 +27,4 @@ link_directories(${LIB_PATHS})
add_executable(unity-active-plugins-safety-check unity_active_plugins_safety_check.cpp)
target_link_libraries(unity-active-plugins-safety-check ${LIBS})
-install(TARGETS unity-active-plugins-safety-check DESTINATION ${CMAKE_INSTALL_LIBDIR}/unity/)
+install(TARGETS unity-active-plugins-safety-check DESTINATION ${UNITY_INSTALL_LIBDIR})
diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp
index 65bbe0c11..66ed48c5b 100755
--- a/unity-shared/DashStyle.cpp
+++ b/unity-shared/DashStyle.cpp
@@ -44,7 +44,7 @@
#include "UnitySettings.h"
#include "config.h"
-#define DASH_WIDGETS_FILE UNITYDATADIR"/themes/dash-widgets.json"
+#define DASH_WIDGETS_FILE UNITY_DATADIR"/themes/dash-widgets.json"
namespace unity
{
@@ -303,7 +303,7 @@ void Style::Impl::LoadStyleFile()
// is initialised.
SetDefaultValues();
- if (!parser.Open(theme::Settings::Get()->ThemedFilePath("dash-widgets", {UNITYDATADIR"/themes"}, {"json"})))
+ if (!parser.Open(theme::Settings::Get()->ThemedFilePath("dash-widgets", {UNITY_DATADIR"/themes"}, {"json"})))
{
LOG_ERROR(logger) << "Impossible to find a dash-widgets.json in theme paths";
return;
diff --git a/unity-shared/GnomeFileManager.cpp b/unity-shared/GnomeFileManager.cpp
index 4ec6e51f2..df3534720 100644
--- a/unity-shared/GnomeFileManager.cpp
+++ b/unity-shared/GnomeFileManager.cpp
@@ -45,7 +45,7 @@ struct GnomeFileManager::Impl
{
Impl(GnomeFileManager* parent)
: parent_(parent)
- , filemanager_proxy_("org.freedesktop.FileManager1", "/org/freedesktop/FileManager1", "org.freedesktop.FileManager1")
+ , filemanager_proxy_("org.freedesktop.FileManager1", "/org/freedesktop/FileManager1", "org.freedesktop.FileManager1", G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS)
{
auto callback = sigc::mem_fun(this, &Impl::OnOpenLocationsXidsUpdated);
filemanager_proxy_.GetProperty("XUbuntuOpenLocationsXids", callback);
@@ -54,8 +54,10 @@ struct GnomeFileManager::Impl
glib::DBusProxy::Ptr NautilusOperationsProxy() const
{
+ auto flags = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES|G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS);
return std::make_shared<glib::DBusProxy>(NAUTILUS_NAME, NAUTILUS_PATH,
- "org.gnome.Nautilus.FileOperations");
+ "org.gnome.Nautilus.FileOperations",
+ G_BUS_TYPE_SESSION, flags);
}
void OnOpenLocationsXidsUpdated(GVariant* value)
diff --git a/unity-shared/UpstartWrapper.cpp b/unity-shared/UpstartWrapper.cpp
index ea2cd4650..284668b41 100644
--- a/unity-shared/UpstartWrapper.cpp
+++ b/unity-shared/UpstartWrapper.cpp
@@ -37,18 +37,23 @@ public:
void Emit(std::string const& name);
private:
- glib::DBusProxy::Ptr upstart_proxy_;
+ bool test_mode_;
};
UpstartWrapper::Impl::Impl(bool test_mode)
-{
- upstart_proxy_ = std::make_shared<unity::glib::DBusProxy>(test_mode ? "com.canonical.Unity.Test.Upstart" : DBUS_SERVICE_UPSTART,
- DBUS_PATH_UPSTART, DBUS_INTERFACE_UPSTART);
-}
+ : test_mode_(test_mode)
+{}
void UpstartWrapper::Impl::Emit(std::string const& name)
{
- upstart_proxy_->Call("EmitEvent", g_variant_new("(sasb)", name.c_str(), nullptr, 0));
+ auto flags = static_cast<GDBusProxyFlags>(G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
+ G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS);
+
+ auto proxy = std::make_shared<unity::glib::DBusProxy>(test_mode_ ? "com.canonical.Unity.Test.Upstart" : DBUS_SERVICE_UPSTART,
+ DBUS_PATH_UPSTART, DBUS_INTERFACE_UPSTART,
+ G_BUS_TYPE_SESSION, flags);
+
+ proxy->CallBegin("EmitEvent", g_variant_new("(sasb)", name.c_str(), nullptr, 0), [proxy] (GVariant*, glib::Error const&) {});
}
//