mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-12-04 22:00:06 -05:00
Manual image loading action
This commit is contained in:
parent
05b968ecf6
commit
6451d7fa7f
2 changed files with 11 additions and 2 deletions
|
|
@ -31,6 +31,8 @@ class BrowserFrame(urwid.Frame):
|
|||
self.delegate.reload()
|
||||
elif key == "ctrl u":
|
||||
self.delegate.url_dialog()
|
||||
elif key == "ctrl l":
|
||||
self.delegate.load_images()
|
||||
elif key == "ctrl s":
|
||||
self.delegate.save_node_dialog()
|
||||
elif key == "ctrl b":
|
||||
|
|
@ -644,7 +646,7 @@ class Browser:
|
|||
self.page_images = {}
|
||||
self.browser_body = urwid.AttrMap(ScrollBar(Scrollable(pile, force_forward_keypress=True), thumb_char="\u2503", trough_char=" "), "scrollbar")
|
||||
self.detect_partials()
|
||||
self.detect_images()
|
||||
if self.should_load_images(): self.detect_images()
|
||||
self.init_folds()
|
||||
|
||||
def image_cache_path(self, url):
|
||||
|
|
@ -668,6 +670,13 @@ class Browser:
|
|||
if hasattr(screen, "purge_images"): screen.purge_images()
|
||||
except Exception: pass
|
||||
|
||||
def should_load_images(self):
|
||||
return False
|
||||
|
||||
def load_images(self):
|
||||
if not self.image_rendering_supported: return
|
||||
else: self.detect_images()
|
||||
|
||||
def detect_images(self):
|
||||
if not self.image_rendering_supported: return
|
||||
for w in self.attr_maps:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue