[Xfce4-commits] <midori:master> Move construction of ExternalApplications inside the class

Christian Dywan noreply at xfce.org
Sat May 15 01:08:01 CEST 2010


Updating branch refs/heads/master
         to 25a08b36eefbfef9a2b6436af39f1d1315e7fc1f (commit)
       from 01899219749059da50e29700176904fc8ab19944 (commit)

commit 25a08b36eefbfef9a2b6436af39f1d1315e7fc1f
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri May 14 22:17:37 2010 +0200

    Move construction of ExternalApplications inside the class

 extensions/external-applications.vala |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/extensions/external-applications.vala b/extensions/external-applications.vala
index 8661286..f56b3c4 100644
--- a/extensions/external-applications.vala
+++ b/extensions/external-applications.vala
@@ -17,10 +17,10 @@ public class ExternalApplications : Midori.Extension {
     Dialog? dialog;
     bool launch (string command, string uri) {
         try {
-            var info = GLib.AppInfo.create_from_commandline (command, null, 0);
+            var info = GLib.AppInfo.create_from_commandline (command, "", 0);
             var uris = new List<string>();
             uris.prepend (uri);
-            info.launch_uris (uris, null);
+            info.launch_uris (uris, new GLib.AppLaunchContext ());
             return true;
         }
         catch (GLib.Error error) {
@@ -90,17 +90,16 @@ public class ExternalApplications : Midori.Extension {
         }
     }
     internal ExternalApplications () {
+        GLib.Object (name: "External Applications",
+                     description: "Associate URL schemes with external commands",
+                     version: "0.1",
+                     authors: "Christian Dywan <christian at twotoasts.de>");
         activate.connect (activated);
         deactivate.connect (deactivated);
     }
 }
 
 public Midori.Extension extension_init () {
-    var extension = new ExternalApplications ();
-    extension.name = "External Applications";
-    extension.description = "Lalala";
-    extension.version = "0.1";
-    extension.authors = "Christian Dywan <christian at twotoasts.de>";
-    return extension;
+    return new ExternalApplications ();
 }
 



More information about the Xfce4-commits mailing list