[gnome-weather] package: add support for split launcher/service apps



commit 1a8163793ebcb00e7c6107b191f3361a074a4689
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Aug 10 19:57:16 2013 +0200

    package: add support for split launcher/service apps
    
    In the future, all apps will be dbus activated, and only install
    a shim launcher in $(bindir). Add support for that with launch()
    method that takes the package name (which must also be the application id
    in the new app model)

 src/package.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/package.js b/src/package.js
index 34e0b96..9795551 100644
--- a/src/package.js
+++ b/src/package.js
@@ -293,3 +293,12 @@ function initSubmodule(name) {
         // Running installed, submodule is in $(pkglibdir), nothing to do
     }
 }
+
+function launch(params) {
+    params.flags = params.flags || 0;
+    let app = new Gio.Application({ application_id: params.name,
+                                    flags: (Gio.ApplicationFlags.IS_LAUNCHER |
+                                            params.flags),
+                                  });
+    return app.run(ARGV);
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]