diff options
| author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2016-09-01 23:58:01 +0000 |
|---|---|---|
| committer | Bileto Bot <ci-train-bot@canonical.com> | 2016-09-01 23:58:01 +0000 |
| commit | 74ca57638845574ffb9bdb3d8808f98817d60f79 (patch) | |
| tree | 21ca23de9430fc60174e7e52ac64f44e78865b9e /unity-shared | |
| parent | fee779111435e7cfda848142092623d3d8bd50ca (diff) | |
| parent | 2b8246f01db8fb2b28557dac8d44b4c1ba9d3dea (diff) | |
CMake: move data and setting files in proper folder, define shared libdir variables
Approved by: Andrea Azzarone (bzr r4191)
Diffstat (limited to 'unity-shared')
| -rwxr-xr-x | unity-shared/DashStyle.cpp | 4 | ||||
| -rw-r--r-- | unity-shared/GnomeFileManager.cpp | 6 | ||||
| -rw-r--r-- | unity-shared/UpstartWrapper.cpp | 17 |
3 files changed, 17 insertions, 10 deletions
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&) {}); } // |
