Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rémi Cailletaud
yade
Commits
d2c02161
Commit
d2c02161
authored
Jul 01, 2016
by
Anton Gladky
Browse files
Partly fix webpage help show. LP:1598174
parent
e68407dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
gui/qt5/__init__.py
View file @
d2c02161
...
...
@@ -13,6 +13,7 @@ from PyQt5 import QtCore
from
PyQt5
import
QtGui
from
PyQt5.QtCore
import
*
from
PyQt5.QtWidgets
import
*
from
PyQt5
import
QtWebKit
,
QtWebKitWidgets
from
yade.qt.ui_controller
import
Ui_Controller
...
...
@@ -28,7 +29,6 @@ webWindows=[]
sphinxOnlineDocPath
=
'https://www.yade-dem.org/doc/'
"Base URL for the documentation. Packaged versions should change to the local installation directory."
import
os.path
# find if we have docs installed locally from package
sphinxLocalDocPath
=
yade
.
config
.
prefix
+
'/share/doc/yade'
+
yade
.
config
.
suffix
+
'-doc/html/'
...
...
@@ -42,11 +42,7 @@ else: sphinxPrefix=sphinxOnlineDocPath
sphinxDocWrapperPage
=
sphinxPrefix
+
'/yade.wrapper.html'
def
openUrl
(
url
):
from
PyQt5
import
QtWebKit
global
maxWebWindows
,
webWindows
reuseLast
=
False
# use the last window if the class is the same and only the attribute differs
...
...
@@ -55,12 +51,14 @@ def openUrl(url):
#print str(webWindows[-1].url()).split('#')[-1].split('.')[2],url.split('#')[-1].split('.')[2]
except
:
pass
if
not
reuseLast
:
if
len
(
webWindows
)
<
maxWebWindows
:
webWindows
.
append
(
QtWebKit
.
QWebView
())
if
len
(
webWindows
)
<
maxWebWindows
:
webWindows
.
append
(
QtWebKit
Widgets
.
QWebView
())
else
:
webWindows
=
webWindows
[
1
:]
+
[
webWindows
[
0
]]
web
=
webWindows
[
-
1
]
web
.
load
(
QUrl
(
url
));
web
.
setWindowTitle
(
url
);
web
.
show
();
web
.
raise_
()
connect
(
web
.
page
().
networkAccessManager
(),
SIGNAL
(
"sslErrors (QNetworkReply *, const QList<QSslError> &)"
),
sslErrorHandler
)
web
.
load
(
QUrl
(
url
))
web
.
setWindowTitle
(
url
)
web
.
setFocus
()
web
.
show
()
controller
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment