[Sugar-devel] [PATCH browse] Adopt to WebKit API for title of the browser widget

Simon Schampijer simon at schampijer.de
Wed Jan 4 08:34:29 EST 2012


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



More information about the Sugar-devel mailing list