Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/downloadmanager.py
diff options
context:
space:
mode:
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>2010-06-17 20:54:30 (GMT)
committer Lucian Branescu Mihaila <lucian.branescu@gmail.com>2010-06-17 20:54:30 (GMT)
commita8b17436c94ec188857c4a06efa6ade64a0ef20b (patch)
tree4093124cf4163003b4a9c43bad12076d0930fe4b /downloadmanager.py
parent3ec9f9dca7f8a696ec90b934771436d70063880a (diff)
Browse stards and loads pages with pywebkitgtk. Several features are disabled for now, although it mostly has feature-parity with Surf.
Diffstat (limited to 'downloadmanager.py')
-rw-r--r--downloadmanager.py30
1 files changed, 12 insertions, 18 deletions
diff --git a/downloadmanager.py b/downloadmanager.py
index 3eec649..211eb77 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -24,12 +24,6 @@ import urlparse
import urllib
import gtk
-import hulahop
-import xpcom
-from xpcom.nsError import *
-from xpcom import components
-from xpcom.components import interfaces
-from xpcom.server.factory import Factory
from sugar.datastore import datastore
from sugar import profile
@@ -74,7 +68,7 @@ def remove_all_downloads():
class HelperAppLauncherDialog:
- _com_interfaces_ = interfaces.nsIHelperAppLauncherDialog
+ #_com_interfaces_ = interfaces.nsIHelperAppLauncherDialog
def promptForSaveToFile(self, launcher, window_context,
default_file, suggested_file_extension,
@@ -111,14 +105,14 @@ class HelperAppLauncherDialog:
return NS_OK
-components.registrar.registerFactory('{64355793-988d-40a5-ba8e-fcde78cac631}',
- 'Sugar Download Manager',
- '@mozilla.org/helperapplauncherdialog;1',
- Factory(HelperAppLauncherDialog))
+#components.registrar.registerFactory('{64355793-988d-40a5-ba8e-fcde78cac631}',
+# 'Sugar Download Manager',
+# '@mozilla.org/helperapplauncherdialog;1',
+# Factory(HelperAppLauncherDialog))
class Download:
- _com_interfaces_ = interfaces.nsITransfer
+ #_com_interfaces_ = interfaces.nsITransfer
def init(self, source, target, display_name, mime_info, start_time,
temp_file, cancelable):
@@ -297,10 +291,10 @@ class Download:
_active_downloads.remove(self)
-components.registrar.registerFactory('{23c51569-e9a1-4a92-adeb-3723db82ef7c}',
- 'Sugar Download',
- '@mozilla.org/transfer;1',
- Factory(Download))
+#components.registrar.registerFactory('{23c51569-e9a1-4a92-adeb-3723db82ef7c}',
+# 'Sugar Download',
+# '@mozilla.org/transfer;1',
+# Factory(Download))
def save_link(url, text, owner_document):
@@ -346,7 +340,7 @@ def _implements_interface(obj, interface):
class _AuthPromptCallback(object):
- _com_interfaces_ = interfaces.nsIInterfaceRequestor
+ #_com_interfaces_ = interfaces.nsIInterfaceRequestor
def __init__(self, dom_window):
self._dom_window = dom_window
@@ -360,7 +354,7 @@ class _AuthPromptCallback(object):
class _SaveLinkProgressListener(object):
- _com_interfaces_ = interfaces.nsIStreamListener
+ #_com_interfaces_ = interfaces.nsIStreamListener
""" an object to proxy the data through to
nsIExternalHelperAppService.doContent, which will wait for the appropriate