diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-02-05 15:51:07 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-02-05 15:51:07 -0500 |
commit | 543ce2ba293eb732b95ddbcab2dbd601d5d5b9ed (patch) | |
tree | ac8df40130e2d0152f624c378fa11081f287ba71 /client | |
parent | e2d03370be7ff0f909fd13432892f7cbebde7a75 (diff) | |
download | dconf-543ce2ba293eb732b95ddbcab2dbd601d5d5b9ed.tar.gz |
client: clean up some Vala issues
We had a workaround for a Vala bug that has been fixed, so remove that.
Add another workaround because Vala cannot be certain that a particular
value has been set or not (so just set it to null to stop the warning).
Diffstat (limited to 'client')
-rw-r--r-- | client/dconf-client.vala | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/client/dconf-client.vala b/client/dconf-client.vala index 472e544..fea10d7 100644 --- a/client/dconf-client.vala +++ b/client/dconf-client.vala @@ -35,6 +35,8 @@ namespace DConf { void call_sync (EngineMessage dcem, out string tag, Cancellable? cancellable) throws Error { DBusConnection connection; + tag = null; + if (dcem.bus_types[0] == 'e') { if (session == null) { session = Bus.get_sync (BusType.SESSION, cancellable); @@ -66,6 +68,8 @@ namespace DConf { async void call_async (EngineMessage dcem, out string tag, Cancellable? cancellable) throws Error { DBusConnection connection; + tag = null; + if (dcem.bus_types[0] == 'e') { if (session == null) { session = yield Bus.get (BusType.SESSION, cancellable); @@ -123,12 +127,7 @@ namespace DConf { * tag that appears in change notifications. **/ public bool write (string key, Variant? value, out string tag = null, Cancellable? cancellable = null) throws Error { - if (&tag == null) { /* bgo #591673 */ - string junk; - call_sync (engine.write (key, value), out junk, cancellable); - } else { - call_sync (engine.write (key, value), out tag, cancellable); - } + call_sync (engine.write (key, value), out tag, cancellable); return true; } @@ -173,12 +172,7 @@ namespace DConf { * tag that appears in change notifications. **/ public bool write_many (string dir, [CCode (array_length = false, array_null_terminated = true)] string[] rels, Variant?[] values, out string? tag = null, Cancellable? cancellable = null) throws Error { - if (&tag == null) { /* bgo #591673 */ - string junk; - call_sync (engine.write_many (dir, rels, values), out junk, cancellable); - } else { - call_sync (engine.write_many (dir, rels, values), out tag, cancellable); - } + call_sync (engine.write_many (dir, rels, values), out tag, cancellable); return true; } @@ -359,7 +353,7 @@ namespace DConf { **/ public Client (string? profile = null, owned WatchFunc? watch_func = null) { engine = new Engine (profile); - this.watch_func = watch_func; + this.watch_func = (owned) watch_func; } } |