From dade0fbabccb206591d776274d0925974ddaf1cf Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 26 Oct 2006 13:47:57 +0000 Subject: Created SugarBrowserChandler, for signaling when the browser has downloaded a file that cannot handle himself. --- (limited to 'activities') diff --git a/activities/web/webactivity.py b/activities/web/webactivity.py index 372fad4..08d0af1 100644 --- a/activities/web/webactivity.py +++ b/activities/web/webactivity.py @@ -102,6 +102,13 @@ def start(): raise "Error when initializising the web activity." style.load_stylesheet(web.stylesheet) + + chandler = _sugar.get_browser_chandler() + chandler.connect('handle-content', handle_content_cb) + logging.debug('handle-content connected.') def stop(): gtkmozembed.pop_startup() + +def handle_content_cb(chandler, url, suggestedFileName, mimeType, tmpFileName): + logging.debug('File ' + tmpFileName + ' with MIMEType ' + mimeType + ' downloaded from ' + url) -- cgit v0.9.1