From 6ba97f3e6db91604a011b6b26bbcea68c3e52350 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Wed, 28 Oct 2009 07:48:05 +0000 Subject: [PATCH] GeoView : We need webkit 1.1.10 to use the encoding. reset the combobox text when switching map. svn: r13438 --- src/DataViews/GeoView.py | 1 + src/DataViews/HtmlRenderer.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/DataViews/GeoView.py b/src/DataViews/GeoView.py index 16094d804..6ea9cc757 100644 --- a/src/DataViews/GeoView.py +++ b/src/DataViews/GeoView.py @@ -1168,6 +1168,7 @@ class GeoView(HtmlView): self.nbpages = 0 self.box1.set_sensitive(True) self.pages_selection.hide() + self.combobox.child.set_text("") self.last_page = 1 self.plist.clear() self.buttons[0].set_active(True) diff --git a/src/DataViews/HtmlRenderer.py b/src/DataViews/HtmlRenderer.py index a56132ea6..d191b3b70 100644 --- a/src/DataViews/HtmlRenderer.py +++ b/src/DataViews/HtmlRenderer.py @@ -220,14 +220,17 @@ class RendererWebkit(Renderer): def __init__(self): Renderer.__init__(self) self.window = webkit.WebView() - self.window.set_custom_encoding('utf-8') + try: + self.window.set_custom_encoding('utf-8') # needs webkit 1.1.10 + except: # pylint: disable-msg=W0702 + pass settings = self.window.get_settings() try: proxy = os.environ['http_proxy'] # webkit use libsoup instead of libcurl. #if proxy: # settings.set_property("use-proxy", True) - except: + except: # pylint: disable-msg=W0702 pass #settings.set_property("ident-string", get_identity()) # do we need it ? Yes if webkit avoid to use local files for security