Add missing remove page implementation and show idle if all pages removed
parent
4c254aa99f
commit
89a07d05ab
|
@ -240,6 +240,10 @@ class Enclosure:
|
||||||
})
|
})
|
||||||
# Remove the page from the local reprensentation as well.
|
# Remove the page from the local reprensentation as well.
|
||||||
self.loaded[0].pages.pop(pos)
|
self.loaded[0].pages.pop(pos)
|
||||||
|
# Add a check to return to idle from position 0
|
||||||
|
if pos == 0 and self.config.get("platform") == "mycroft_mark_2" and
|
||||||
|
len(self.loaded[0].pages) == 0:
|
||||||
|
self.bus.emit(Message("mycroft.mark2.reset_idle"))
|
||||||
|
|
||||||
def __insert_new_namespace(self, namespace, pages):
|
def __insert_new_namespace(self, namespace, pages):
|
||||||
""" Insert new namespace and pages.
|
""" Insert new namespace and pages.
|
||||||
|
|
|
@ -228,9 +228,15 @@ class SkillGUI:
|
||||||
# Convert pages to full reference
|
# Convert pages to full reference
|
||||||
page_urls = []
|
page_urls = []
|
||||||
for name in page_names:
|
for name in page_names:
|
||||||
page = self.skill.find_resource(name, 'ui')
|
if name.startswith("SYSTEM"):
|
||||||
|
page = resolve_resource_file(join('ui', name))
|
||||||
|
else:
|
||||||
|
page = self.skill.find_resource(name, 'ui')
|
||||||
if page:
|
if page:
|
||||||
page_urls.append("file://" + page)
|
if self.config.get('remote'):
|
||||||
|
page_urls.append(self.remote_url + "/" + page)
|
||||||
|
else:
|
||||||
|
page_urls.append("file://" + page)
|
||||||
else:
|
else:
|
||||||
raise FileNotFoundError("Unable to find page: {}".format(name))
|
raise FileNotFoundError("Unable to find page: {}".format(name))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue