Merge lp:~mhr3/libunity/fix-1235342 into lp:libunity

Proposed by Michal Hruby
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 301
Merged at revision: 301
Proposed branch: lp:~mhr3/libunity/fix-1235342
Merge into: lp:libunity
Diff against target: 29 lines (+12/-5)
1 file modified
tools/unity-tool.vala (+12/-5)
To merge this branch: bzr merge lp:~mhr3/libunity/fix-1235342
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Paweł Stołowski (community) Approve
Review via email: mp+189361@code.launchpad.net

Commit message

libunity-tool: Use protocol library to get scope information

Description of the change

Use protocol library to get scope information.

To post a comment you must log in.
Revision history for this message
Paweł Stołowski (stolowski) wrote :

+1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/unity-tool.vala'
2--- tools/unity-tool.vala 2013-09-02 11:38:31 +0000
3+++ tools/unity-tool.vala 2013-10-04 16:15:36 +0000
4@@ -116,13 +116,20 @@
5 }
6 };
7
8- public static void get_scope_params_from_file(string filename) throws GLib.KeyFileError, GLib.FileError
9+ public static void get_scope_params_from_file(string filename) throws Error
10 {
11- var keyfile = new KeyFile ();
12- keyfile.load_from_file(filename, 0);
13+ Unity.Protocol.ScopeRegistry.ScopeMetadata metadata;
14+ if (Path.is_absolute (filename))
15+ {
16+ metadata = Unity.Protocol.ScopeRegistry.ScopeMetadata.for_path (filename);
17+ }
18+ else
19+ {
20+ metadata = Unity.Protocol.ScopeRegistry.ScopeMetadata.for_id (filename);
21+ }
22
23- Options.scope_dbus_name = keyfile.get_string ("Scope", "DBusName");
24- Options.scope_dbus_path = keyfile.get_string ("Scope", "DBusPath");
25+ Options.scope_dbus_name = metadata.dbus_name;
26+ Options.scope_dbus_path = metadata.dbus_path;
27 }
28
29 public static void warn (string format, ...)

Subscribers

People subscribed via source and target branches