[gnome-builder] Revert "GVls: fixing Variant construct for server configuration"
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] Revert "GVls: fixing Variant construct for server configuration"
- Date: Sat, 14 Dec 2019 20:42:14 +0000 (UTC)
commit 641f3e0c422d4d4ec776ba71b74a54150f9901a3
Author: Christian Hergert <chergert redhat com>
Date: Sat Dec 14 12:41:39 2019 -0800
Revert "GVls: fixing Variant construct for server configuration"
This reverts commit d1b2ff7079dfdf371ea3a58f7aae3081e262ed95.
src/plugins/gvls/gvls_plugin.py | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
---
diff --git a/src/plugins/gvls/gvls_plugin.py b/src/plugins/gvls/gvls_plugin.py
index 88d22d812..a2fe6b001 100644
--- a/src/plugins/gvls/gvls_plugin.py
+++ b/src/plugins/gvls/gvls_plugin.py
@@ -118,37 +118,36 @@ class GVlsService(Ide.Object):
self._supervisor.start()
def _on_load_configuration(self):
- if DEV_MODE:
+ if DEV_MODE
print ("Creating Vala Language Server Configuration response")
- conf = GLib.Variant('a{sv}', {
- 'initialized': GLib.Variant.new_boolean(True),
- 'defaultNamespaces': GLib.Variant.new_boolean(True),
- 'defaultVapiDirs': GLib.Variant.new_boolean(True),
- 'scanWorkspace': GLib.Variant.new_boolean(True),
- 'addUsingNamespaces': GLib.Variant.new_boolean(True),
- })
+ conf = GLib.VariantBuilder (GLib.Variant ('a{sv}'))
+ conf.add ('{sv}', 'initialized', GLib.Variant.boolean (True))
+ conf.add ('{sv}', 'initialized', GLib.Variant.boolean (True))
+ conf.add ('{sv}', 'defaultNamespaces', GLib.Variant.boolean (True))
+ conf.add ('{sv}', 'defaultVapiDirs', GLib.Variant.boolean (True))
+ conf.add ('{sv}', 'scanWorkspace', GLib.Variant.boolean (True))
+ conf.add ('{sv}', 'addUsingNamespaces', GLib.Variant.boolean (True))
-
- # pkgs = GLib.VariantBuilder (GLib.Variant ('av'))
+ pkgs = GLib.VariantBuilder (GLib.Variant ('av'))
# Get from build environment
# pkgs.add ('v', GLib.Variant.string ())
- # vargs = GLib.VariantBuilder (GLib.Variant ('av'))
+ vargs = GLib.VariantBuilder (GLib.Variant ('av'))
# Get from build environment
# vargs.add ('v', GLib.Variant.string ())
- # opts = GLib.VariantBuilder (GLib.Variant ('av'))
+ opts = GLib.VariantBuilder (GLib.Variant ('av'))
# Get from build environment
# vargs.add ('v', GLib.Variant.string ())
- # conf.add ('{sv}', 'packages', pkgs)
- # conf.add ('{sv}', 'valaArgs', vargs)
- # conf.add ('{sv}', 'options', opts)
+ conf.add ('{sv}', 'packages', pkgs)
+ conf.add ('{sv}', 'valaArgs', vargs)
+ conf.add ('{sv}', 'options', opts)
- if DEV_MODE:
+ conf.end ()
+ if DEV_MODE
print ("Configuration response: "+conf.print(True))
-
return conf
def _gvls_spawned(self, supervisor, subprocess):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]