Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7c5b5b95
authored
Feb 08, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laborgui: Added new window support for login.bme
parent
6246553c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
miscellaneous/laborclient/cloudgui/gui.py
+10
-2
No files found.
miscellaneous/laborclient/cloudgui/gui.py
View file @
7c5b5b95
...
@@ -122,7 +122,15 @@ class Browser:
...
@@ -122,7 +122,15 @@ class Browser:
def
on_navigation_requested
(
self
,
view
,
frame
,
req
,
data
=
None
):
def
on_navigation_requested
(
self
,
view
,
frame
,
req
,
data
=
None
):
uri
=
req
.
get_uri
()
uri
=
req
.
get_uri
()
if
uri
==
"https://cloud.ik.bme.hu/logout/"
:
if
uri
==
"https://login.bme.hu/admin/"
:
gobject
.
threads_init
()
window
=
gtk
.
Window
(
type
=
gtk
.
WINDOW_TOPLEVEL
)
browser
=
webkit
.
WebView
()
browser
.
open
(
uri
)
window
.
add
(
browser
)
window
.
show_all
()
return
True
elif
uri
==
"https://cloud.ik.bme.hu/logout/"
:
self
.
umount_sshfs_folder
()
self
.
umount_sshfs_folder
()
try
:
try
:
scheme
,
rest
=
uri
.
split
(
":"
,
1
)
scheme
,
rest
=
uri
.
split
(
":"
,
1
)
...
@@ -175,11 +183,11 @@ class Browser:
...
@@ -175,11 +183,11 @@ class Browser:
self
.
webview
.
execute_script
(
js
)
self
.
webview
.
execute_script
(
js
)
def
load_committed_cb
(
self
,
web_view
,
frame
):
def
load_committed_cb
(
self
,
web_view
,
frame
):
uri
=
frame
.
get_uri
()
try
:
try
:
self
.
webview
.
execute_script
(
'document.getElementsByTagName("a")[0].target="";'
)
self
.
webview
.
execute_script
(
'document.getElementsByTagName("a")[0].target="";'
)
except
:
except
:
pass
pass
uri
=
frame
.
get_uri
()
### Send keys via JavaScript ###
### Send keys via JavaScript ###
if
uri
==
"https://cloud.ik.bme.hu/store/gui/"
:
if
uri
==
"https://cloud.ik.bme.hu/store/gui/"
:
self
.
init_keypair
()
self
.
init_keypair
()
...
...
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