diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2006-10-26 13:47:57 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2006-10-26 13:47:57 (GMT) |
commit | dade0fbabccb206591d776274d0925974ddaf1cf (patch) | |
tree | 2ae4a03bf874707656dc8a1872f08535cc62619f /activities | |
parent | 60fd7fb810a716bd9cedcdefe9b840fae60dc288 (diff) |
Created SugarBrowserChandler, for signaling when the browser has downloaded a file that cannot handle himself.
Diffstat (limited to 'activities')
-rw-r--r-- | activities/web/webactivity.py | 7 |
1 files changed, 7 insertions, 0 deletions
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) |