GeoView : We need webkit 1.1.10 to use the encoding.

reset the combobox text when switching map.


svn: r13438
This commit is contained in:
Serge Noiraud 2009-10-28 07:48:05 +00:00
parent c1c27b3ebf
commit 6ba97f3e6d
2 changed files with 6 additions and 2 deletions

View File

@ -1168,6 +1168,7 @@ class GeoView(HtmlView):
self.nbpages = 0 self.nbpages = 0
self.box1.set_sensitive(True) self.box1.set_sensitive(True)
self.pages_selection.hide() self.pages_selection.hide()
self.combobox.child.set_text("")
self.last_page = 1 self.last_page = 1
self.plist.clear() self.plist.clear()
self.buttons[0].set_active(True) self.buttons[0].set_active(True)

View File

@ -220,14 +220,17 @@ class RendererWebkit(Renderer):
def __init__(self): def __init__(self):
Renderer.__init__(self) Renderer.__init__(self)
self.window = webkit.WebView() 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() settings = self.window.get_settings()
try: try:
proxy = os.environ['http_proxy'] proxy = os.environ['http_proxy']
# webkit use libsoup instead of libcurl. # webkit use libsoup instead of libcurl.
#if proxy: #if proxy:
# settings.set_property("use-proxy", True) # settings.set_property("use-proxy", True)
except: except: # pylint: disable-msg=W0702
pass pass
#settings.set_property("ident-string", get_identity()) #settings.set_property("ident-string", get_identity())
# do we need it ? Yes if webkit avoid to use local files for security # do we need it ? Yes if webkit avoid to use local files for security