diff options
Diffstat (limited to 'browser.py')
-rw-r--r-- | browser.py | 36 |
1 files changed, 0 insertions, 36 deletions
@@ -35,36 +35,6 @@ from sugar.graphics import style import sessionstore from palettes import ContentInvoker from sessionhistory import HistoryListener -from progresslistener import ProgressListener - -_ZOOM_AMOUNT = 0.1 - -class GetSourceListener(object): - #_com_interfaces_ = interfaces.nsIWebProgressListener - - def __init__(self, file_path, async_cb, async_err_cb): - self._file_path = file_path - self._async_cb = async_cb - self._async_err_cb = async_err_cb - - def onStateChange(self, webProgress, request, stateFlags, status): - #if stateFlags & interfaces.nsIWebProgressListener.STATE_IS_REQUEST and \ - # stateFlags & interfaces.nsIWebProgressListener.STATE_STOP: - # self._async_cb(self._file_path) - pass - - def onProgressChange(self, progress, request, curSelfProgress, - maxSelfProgress, curTotalProgress, maxTotalProgress): - pass - - def onLocationChange(self, progress, request, location): - pass - - def onStatusChange(self, progress, request, status, message): - pass - - def onSecurityChange(self, progress, request, state): - pass class CommandListener(object): #_com_interfaces_ = interfaces.nsIDOMEventListener @@ -94,7 +64,6 @@ class Browser(WebView): WebView.__init__(self) self.history = HistoryListener() - self.progress = ProgressListener() #cls = components.classes["@mozilla.org/typeaheadfind;1"] #self.typeahead = cls.createInstance(interfaces.nsITypeAheadFind) @@ -126,7 +95,6 @@ class Browser(WebView): # interfaces.nsIDOMEventListener) #self.window_root.addEventListener('command', listener, False) - self.progress.setup(self) self.history.setup(self.web_navigation) @@ -163,10 +131,6 @@ class Browser(WebView): local_file = cls.createInstance(interfaces.nsILocalFile) local_file.initWithPath(file_path) - progresslistener = GetSourceListener(file_path, async_cb, async_err_cb) - persist.progressListener = xpcom.server.WrapObject( - progresslistener, interfaces.nsIWebProgressListener) - uri = self.web_navigation.currentURI persist.saveURI(uri, self.doc_shell, None, None, None, local_file) |