Skip to content

Commit

Permalink
Update to use methods added to ovos_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Mar 31, 2023
1 parent 264d177 commit ebf89d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
26 changes: 3 additions & 23 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ def get_gui_input(self, title=None, placeholder=None,
gui_response = None
response_event = Event()
response_event.clear()
self.show_input_box(title, placeholder, confirm_text, exit_text,
True, True)
self.gui.show_input_box(title, placeholder, confirm_text, exit_text,
True, True)

def _on_response(message):
nonlocal gui_response
Expand All @@ -625,31 +625,11 @@ def _on_close(message):
self.add_event(resp_message, _on_response, once=True)
self.add_event(close_message, _on_close, once=True)
response_event.wait()
self.remove_input_box()
self.gui.remove_input_box()
self.remove_event(resp_message)
self.remove_event(close_message)
return gui_response

# TODO: Update to import from ovos-utils
def show_input_box(self, title=None, placeholder=None,
confirm_text=None, exit_text=None,
override_idle=None, override_animations=None):
self.gui["title"] = title
self.gui["placeholder"] = placeholder
self.gui["skill_id_handler"] = self.skill_id
if not confirm_text:
self.gui["confirm_text"] = "Confirm"
else:
self.gui["confirm_text"] = confirm_text

if not exit_text:
self.gui["exit_text"] = "Exit"
else:
self.gui["exit_text"] = exit_text

self.gui.show_page("SYSTEM_InputBox.qml", override_idle,
override_animations)

# TODO: Update to import from ovos-utils
def remove_input_box(self):
LOG.info(f"GUI pages length {len(self.gui.pages)}")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
neon-utils[network]~=1.3
ovos_utils~=0.0.28
ovos_utils~=0.0.28,>=0.0.31a1

0 comments on commit ebf89d0

Please sign in to comment.