Skip to content

Commit

Permalink
Merge pull request jeanphix#54 from jansel/master
Browse files Browse the repository at this point in the history
Fix plugins_enabled and java_enabled options
  • Loading branch information
jeanphix committed Feb 10, 2013
2 parents 0caa0bc + 2c7eb4b commit 18686b6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ghost/ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ def __init__(self, user_agent=default_user_agent, wait_timeout=8,

self.page.setForwardUnsupportedContent(True)
self.page.settings().setAttribute(QtWebKit.QWebSettings.AutoLoadImages, download_images)
self.page.settings().setAttribute(QtWebKit.QWebSettings.PluginsEnabled, plugins_enabled)
self.page.settings().setAttribute(QtWebKit.QWebSettings.JavaEnabled, java_enabled)


self.set_viewport_size(*viewport_size)

Expand Down Expand Up @@ -250,9 +253,9 @@ def __init__(self, user_agent=default_user_agent, wait_timeout=8,
if self.display:
self.webview = QtWebKit.QWebView()
if plugins_enabled:
selfwebview.settings().setAttribute(QtWebKit.QWebSettings.PluginsEnabled, True)
self.webview.settings().setAttribute(QtWebKit.QWebSettings.PluginsEnabled, True)
if java_enabled:
selfwebview.settings().setAttribute(QtWebKit.QWebSettings.JavaEnabled, True)
self.webview.settings().setAttribute(QtWebKit.QWebSettings.JavaEnabled, True)
self.webview.setPage(self.page)
self.webview.show()

Expand Down

0 comments on commit 18686b6

Please sign in to comment.