Created SugarBrowserChandler, for signaling when the browser has downloaded a file that cannot handle himself.

This commit is contained in:
Tomeu Vizoso
2006-10-26 15:47:57 +02:00
parent 60fd7fb810
commit dade0fbabc
8 changed files with 205 additions and 17 deletions
+7
View File
@@ -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)