diff --git a/docs/screenshots/1.png b/docs/screenshots/1.png index 15665f2..ee38e56 100644 Binary files a/docs/screenshots/1.png and b/docs/screenshots/1.png differ diff --git a/docs/screenshots/2.png b/docs/screenshots/2.png index 88da3ba..2744cef 100644 Binary files a/docs/screenshots/2.png and b/docs/screenshots/2.png differ diff --git a/docs/screenshots/3.png b/docs/screenshots/3.png index 760ba60..4a8c0de 100644 Binary files a/docs/screenshots/3.png and b/docs/screenshots/3.png differ diff --git a/docs/screenshots/4.png b/docs/screenshots/4.png new file mode 100644 index 0000000..98a9eb5 Binary files /dev/null and b/docs/screenshots/4.png differ diff --git a/docs/screenshots/5.png b/docs/screenshots/5.png new file mode 100644 index 0000000..77c3c60 Binary files /dev/null and b/docs/screenshots/5.png differ diff --git a/nomadnet/_version.py b/nomadnet/_version.py index 71eb32d..2418e6b 100644 --- a/nomadnet/_version.py +++ b/nomadnet/_version.py @@ -1 +1 @@ -__version__ = "0.0.8" \ No newline at end of file +__version__ = "0.0.9" \ No newline at end of file diff --git a/nomadnet/ui/textui/Browser.py b/nomadnet/ui/textui/Browser.py index 9033ce2..ae4be99 100644 --- a/nomadnet/ui/textui/Browser.py +++ b/nomadnet/ui/textui/Browser.py @@ -429,7 +429,7 @@ class Browser: self.delegate.columns.contents[1] = (self.display_widget, options) def url_dialog(self): - e_url = urwid.Edit(caption="URL : ", edit_text=self.current_url()) + e_url = UrlEdit(caption="URL : ", edit_text=self.current_url()) def dismiss_dialog(sender): self.close_dialogs() @@ -444,6 +444,7 @@ class Browser: urwid.Columns([("weight", 0.45, urwid.Button("Cancel", on_press=dismiss_dialog)), ("weight", 0.1, urwid.Text("")), ("weight", 0.45, urwid.Button("Go", on_press=confirmed))]) ]), title="Enter URL" ) + e_url.confirmed = confirmed dialog.confirmed = confirmed dialog.delegate = self bottom = self.display_widget @@ -848,10 +849,15 @@ def size_str(num, suffix='B'): return "%.2f%s%s" % (num, last_unit, suffix) class UrlDialogLineBox(urwid.LineBox): - def keypress(self, size, key): - if key == "esc": - self.delegate.close_dialogs() - if key == "enter": - self.confirmed(self) - else: - return super(UrlDialogLineBox, self).keypress(size, key) \ No newline at end of file + def keypress(self, size, key): + if key == "esc": + self.delegate.close_dialogs() + else: + return super(UrlDialogLineBox, self).keypress(size, key) + +class UrlEdit(urwid.Edit): + def keypress(self, size, key): + if key == "enter": + self.confirmed(self) + else: + return super(UrlEdit, self).keypress(size, key) \ No newline at end of file