Skip to content

Commit

Permalink
Merge pull request #41 from OpenVoiceOS/release-1.0.2a1
Browse files Browse the repository at this point in the history
Release 1.0.2a1
  • Loading branch information
JarbasAl authored Nov 29, 2024
2 parents eb65c16 + 67bfc97 commit bdde416
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Changelog

## [1.0.1a1](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/tree/1.0.1a1) (2024-11-06)
## [1.0.2a1](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/tree/1.0.2a1) (2024-11-29)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/compare/V1.0.0...1.0.1a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/compare/V1.0.1...1.0.2a1)

**Closed issues:**

- Interactive reboot causes Mark2 to hang when rebooting [\#34](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/issues/34)
- Can't restart via GUI [\#39](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/issues/39)

**Merged pull requests:**

- fix: requirements.txt [\#37](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/pull/37) ([JarbasAl](https://github.com/JarbasAl))
- fix: gui pages [\#40](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/pull/40) ([JarbasAl](https://github.com/JarbasAl))

## [V1.0.0](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/tree/V1.0.0) (2024-09-17)
## [V1.0.1](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/tree/V1.0.1) (2024-11-06)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/compare/1.0.0...V1.0.0)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/compare/1.0.1...V1.0.1)



Expand Down
19 changes: 7 additions & 12 deletions ovos_PHAL_plugin_system/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class SystemEventsPlugin(PHALPlugin):
def __init__(self, bus=None, config=None):
super().__init__(bus=bus, name="ovos-PHAL-plugin-system", config=config)
self.gui = GUIInterface(bus=self.bus, skill_id=self.name,
ui_directories={"qt5": join(dirname(__file__), "ui")},
config=self.config_core.get('gui'))
self.bus.on("system.ssh.status", self.handle_ssh_status)
self.bus.on("system.ssh.enable", self.handle_ssh_enable_request)
Expand Down Expand Up @@ -201,28 +202,25 @@ def handle_ssh_enable_request(self, message):
subprocess.call(f"systemctl start {self.ssh_service}", shell=True)
# ovos-shell does not want to display
if message.data.get("display", True):
page = join(dirname(__file__), "ui", "Status.qml")
self.gui["status"] = "Enabled"
self.gui["label"] = "SSH Enabled"
self.gui.show_page(page)
self.gui.show_page("Status")

def handle_ssh_disable_request(self, message):
subprocess.call(f"systemctl stop {self.ssh_service}", shell=True)
subprocess.call(f"systemctl disable {self.ssh_service}", shell=True)
# ovos-shell does not want to display
if message.data.get("display", True):
page = join(dirname(__file__), "ui", "Status.qml")
self.gui["status"] = "Disabled"
self.gui["label"] = "SSH Disabled"
self.gui.show_page(page)
self.gui.show_page("Status")

def handle_reboot_request(self, message):
"""
Shut down and restart the system
"""
if message.data.get("display", True):
page = join(dirname(__file__), "ui", "Reboot.qml")
self.gui.show_page(page, override_animations=True,
self.gui.show_page("Reboot", override_animations=True,
override_idle=True)

script = os.path.expanduser(self.config.get("reboot_script") or "")
Expand All @@ -237,8 +235,7 @@ def handle_shutdown_request(self, message):
Turn the system completely off (with no option to inhibit it)
"""
if message.data.get("display", True):
page = join(dirname(__file__), "ui", "Shutdown.qml")
self.gui.show_page(page, override_animations=True,
self.gui.show_page("Shutdown", override_animations=True,
override_idle=True)
script = os.path.expanduser(self.config.get("shutdown_script") or "")
LOG.info(f"Shutdown requested. script={script}")
Expand All @@ -261,18 +258,16 @@ def handle_configure_language_request(self, message):
# it is usually part of other groups of actions that may
# provide their own UI
if message.data.get("display", False):
page = join(dirname(__file__), "ui", "Status.qml")
self.gui["status"] = "Enabled"
self.gui["label"] = f"Language changed to {language_code}"
self.gui.show_page(page)
self.gui.show_page("Status")

self.bus.emit(Message('system.configure.language.complete',
{"lang": language_code}))

def handle_mycroft_restart_request(self, message):
if message.data.get("display", True):
page = join(dirname(__file__), "ui", "Restart.qml")
self.gui.show_page(page, override_animations=True,
self.gui.show_page("Restart", override_animations=True,
override_idle=True)
service = self.core_service_name
# TODO - clean up this mess
Expand Down
4 changes: 2 additions & 2 deletions ovos_PHAL_plugin_system/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 1
VERSION_MINOR = 0
VERSION_BUILD = 1
VERSION_ALPHA = 0
VERSION_BUILD = 2
VERSION_ALPHA = 1
# END_VERSION_BLOCK

0 comments on commit bdde416

Please sign in to comment.