diff options
author | Owen Williams <owen-olpc@ywwg.com> | 2007-05-30 17:57:27 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-05-30 17:58:49 (GMT) |
commit | 8ab08300d961e34e7c27c1903b296e6ca95d330f (patch) | |
tree | 101d9e99519066344d7858b255315bcf24cf3b00 /python | |
parent | a07dcc0c503cc081b7fc4e877a148258b45af583 (diff) |
Add property for status text
Diffstat (limited to 'python')
-rw-r--r-- | python/webview.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/python/webview.py b/python/webview.py index 93de5bf..c6b9375 100644 --- a/python/webview.py +++ b/python/webview.py @@ -48,7 +48,7 @@ class _Chrome: def setStatus(self, statusType, status): #logging.debug("nsIWebBrowserChrome.setStatus") - pass + self.web_view._set_status(status.encode('utf-8')) def showAsModal(self): logging.debug("nsIWebBrowserChrome.showAsModal") @@ -134,6 +134,8 @@ class WebView(_hulahop.WebView): __gproperties__ = { 'title' : (str, None, None, None, + gobject.PARAM_READABLE), + 'status' : (str, None, None, None, gobject.PARAM_READABLE) } def __init__(self): @@ -149,14 +151,22 @@ class WebView(_hulahop.WebView): item = self.browser.queryInterface(interfaces.nsIDocShellTreeItem) item.itemType = interfaces.nsIDocShellTreeItem.typeContentWrapper + self._status = '' + self.create_window() def _notify_title_changed(self): self.notify('title') + def _set_status(self, status): + self._status = status + self.notify('status') + def do_get_property(self, pspec): if pspec.name == 'title': return self._chrome.title + elif pspec.name == 'status': + return self._status def get_window_root(self): return _hulahop.WebView.get_window_root(self) |