summaryrefslogtreecommitdiff
path: root/tools
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2016-07-18 19:17:49 +0200
committerAndrea Azzarone <azzaronea@gmail.com>2016-07-18 19:17:49 +0200
commit9fceda291fa1df76d2676ccaf8b6d52a9b27f643 (patch)
treec097dadd34f605d2f8ddeb82c94d484a58341d69 /tools
parentdee3b8f186cb974bb030f61206b0bbf9ecb9208d (diff)
Print out info string. Add to upstream pre-start script.
(bzr r4151.2.2)
Diffstat (limited to 'tools')
-rw-r--r--tools/unity_active_plugins_safety_check.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/unity_active_plugins_safety_check.cpp b/tools/unity_active_plugins_safety_check.cpp
index 6f10ae6db..b3fb3c67c 100644
--- a/tools/unity_active_plugins_safety_check.cpp
+++ b/tools/unity_active_plugins_safety_check.cpp
@@ -19,6 +19,7 @@
#include <ccs.h>
#include <gio/gio.h>
+#include <iostream>
#include <string>
extern const CCSInterfaceTable ccsDefaultInterfaceTable;
@@ -43,7 +44,10 @@ void PluginSetActiveWithDeps(CCSContext* context, std::string const& plugin_name
}
}
- ccsPluginSetActive(plugin, true);
+ if (!ccsPluginIsActive(context, plugin_name.c_str())) {
+ std::cout << "Setting plugin '" << plugin_name << "' to active" << std::endl;
+ ccsPluginSetActive(plugin, true);
+ }
auto conflicts = ccsPluginGetConflictPlugins(plugin);
for (auto con = conflicts; con; con = con->next)
@@ -52,7 +56,12 @@ void PluginSetActiveWithDeps(CCSContext* context, std::string const& plugin_name
{
std::string name = con->data->value;
auto plugin = ccsFindPlugin(context, name.c_str());
- ccsPluginSetActive(plugin, false);
+
+ if (ccsPluginIsActive(context, name.c_str()))
+ {
+ std::cout << "Setting plugin '" << name << "' to non-active" << std::endl;
+ ccsPluginSetActive(plugin, false);
+ }
}
}
}
@@ -66,7 +75,7 @@ int main()
PluginSetActiveWithDeps(context, "unityshell");
- ccsWriteSettings(context);
+ ccsWriteChangedSettings(context);
g_settings_sync();
ccsFreeContext(context);