[Sugar-devel] [PATCH browse] Adopt to WebKit API for title of the browser widget
Manuel Quiñones
manuq at laptop.org
Wed Jan 4 10:18:47 EST 2012
2012/1/4 Simon Schampijer <simon at schampijer.de>:
> The webkitgtk API [1] does return None if the title is not
> set. Adopt to that change.
>
> [1] http://webkitgtk.org/reference/webkitgtk-webkitwebview.html#WebKitWebView--title
> ---
> webactivity.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/webactivity.py b/webactivity.py
> index 9ccbe4c..e314566 100644
> --- a/webactivity.py
> +++ b/webactivity.py
> @@ -426,7 +426,7 @@ class WebActivity(activity.Activity):
> browser = self._tabbed_view.current_browser
>
> if not self._jobject.metadata['title_set_by_user'] == '1':
> - if browser.props.title == '':
> + if browser.props.title == None:
> self.metadata['title'] = _('Untitled')
> else:
> self.metadata['title'] = browser.props.title
> --
> 1.7.7.3
Tested, works as expected now.
--
.. manuq ..
More information about the Sugar-devel
mailing list