mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-08-12 00:30:20 -04:00
Improved browser UI.
This commit is contained in:
parent
29c843509a
commit
675946e2b7
1 changed files with 11 additions and 7 deletions
|
@ -35,8 +35,8 @@ class Browser:
|
||||||
REQUEST_FAILED = 0x07
|
REQUEST_FAILED = 0x07
|
||||||
REQUEST_TIMEOUT = 0x08
|
REQUEST_TIMEOUT = 0x08
|
||||||
RECEIVING_RESPONSE = 0x09
|
RECEIVING_RESPONSE = 0x09
|
||||||
DONE = 0xFF
|
|
||||||
DISCONECTED = 0xFE
|
DISCONECTED = 0xFE
|
||||||
|
DONE = 0xFF
|
||||||
|
|
||||||
def __init__(self, app, app_name, aspects, destination_hash = None, path = None, auth_identity = None, delegate = None):
|
def __init__(self, app, app_name, aspects, destination_hash = None, path = None, auth_identity = None, delegate = None):
|
||||||
self.app = app
|
self.app = app
|
||||||
|
@ -79,12 +79,16 @@ class Browser:
|
||||||
return RNS.hexrep(self.destination_hash, delimit=False)+":"+path
|
return RNS.hexrep(self.destination_hash, delimit=False)+":"+path
|
||||||
|
|
||||||
def handle_link(self, link_target):
|
def handle_link(self, link_target):
|
||||||
RNS.log("Browser handling link to: "+str(link_target), RNS.LOG_DEBUG)
|
if self.status >= Browser.DISCONECTED:
|
||||||
try:
|
RNS.log("Browser handling link to: "+str(link_target), RNS.LOG_DEBUG)
|
||||||
self.retrieve_url(link_target)
|
try:
|
||||||
except Exception as e:
|
self.retrieve_url(link_target)
|
||||||
self.browser_footer = urwid.Text("Could not open link: "+str(e))
|
except Exception as e:
|
||||||
self.frame.contents["footer"] = (self.browser_footer, self.frame.options())
|
self.browser_footer = urwid.Text("Could not open link: "+str(e))
|
||||||
|
self.frame.contents["footer"] = (self.browser_footer, self.frame.options())
|
||||||
|
else:
|
||||||
|
RNS.log("Browser aleady hadling link, cannot handle link to: "+str(link_target), RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def micron_released_focus(self):
|
def micron_released_focus(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue