[Xfce4-commits] <midori:master> Enable command line DM/ FlashGet on Win32

Christian Dywan noreply at xfce.org
Mon Sep 24 19:26:02 CEST 2012


Updating branch refs/heads/master
         to 79973ceefc94b90e459102f1894c34b157e0086e (commit)
       from 4bedc647d84eb205e328f3bf94aa2eab364e60e5 (commit)

commit 79973ceefc94b90e459102f1894c34b157e0086e
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Mon Sep 24 19:23:12 2012 +0200

    Enable command line DM/ FlashGet on Win32

 extensions/external-download-manager.vala |   18 ++++++++++++------
 extensions/wscript_build                  |    3 ---
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/extensions/external-download-manager.vala b/extensions/external-download-manager.vala
index 672e6d4..35e7b71 100644
--- a/extensions/external-download-manager.vala
+++ b/extensions/external-download-manager.vala
@@ -16,10 +16,12 @@ using Midori;
 using WebKit;
 
 namespace EDM {
+#if !HAVE_WIN32
     [DBus (name = "net.launchpad.steadyflow.App")]
     interface SteadyflowInterface : GLib.Object {
         public abstract void AddFile (string url) throws IOError;
     }
+#endif
 
     private class DownloadRequest : GLib.Object {
         public string uri;
@@ -132,6 +134,7 @@ namespace EDM {
         public abstract bool download (DownloadRequest dlReq);
     }
 
+#if !HAVE_WIN32
     private class Aria2 : ExternalDownloadManager {
         public override bool download (DownloadRequest dlReq) {
             var url = value_array_new ();
@@ -206,6 +209,7 @@ namespace EDM {
             this.deactivate.connect (deactivated);
         }
     }
+#endif
 
     private class CommandLinePreferences : Dialog {
         protected Entry input;
@@ -287,12 +291,6 @@ namespace EDM {
             return false;
         }
 
-        #if HAVE_WIN32
-        string default_commandline = "\"%s\\FlashGet\\flashget.exe\" {URL}".printf (Environment.get_variable ("ProgramFiles"));
-        #else
-        const string default_commandline = "wget --no-check-certificate --referer={REFERER} --header={COOKIES} {URL}";
-        #endif
-
         static string description_with_command (string commandline) {
             string command;
             try {
@@ -311,6 +309,12 @@ namespace EDM {
         }
 
         internal CommandLine () {
+#if HAVE_WIN32
+            string default_commandline = "\"%s\\FlashGet\\flashget.exe\" {URL}".printf (Environment.get_variable ("ProgramFiles"));
+#else
+            string default_commandline = "wget --no-check-certificate --referer={REFERER} --header={COOKIES} {URL}";
+#endif
+
             GLib.Object (name: _("External Download Manager - CommandLine"),
                          description: description_with_command (default_commandline),
                          version: "0.1" + Midori.VERSION_SUFFIX,
@@ -331,8 +335,10 @@ public Katze.Array extension_init () {
     EDM.manager = new EDM.Manager();
 
     var extensions = new Katze.Array( typeof (Midori.Extension));
+    #if !HAVE_WIN32
     extensions.add_item (new EDM.Aria2 ());
     extensions.add_item (new EDM.SteadyFlow ());
+    #endif
     extensions.add_item (new EDM.CommandLine ());
     return extensions;
 }
diff --git a/extensions/wscript_build b/extensions/wscript_build
index 152d820..c09a92b 100644
--- a/extensions/wscript_build
+++ b/extensions/wscript_build
@@ -28,9 +28,6 @@ for extension in extensions:
             continue
         source = extension
 
-    if bld.env['platform'] == 'win32' and target in ['external-download-manager']:
-        continue
-
     obj = bld.new_task_gen ('cc', 'shlib')
     obj.target = target
     obj.includes = '.. ../katze ../midori'


More information about the Xfce4-commits mailing list