Skip to content

Commit 870a475

Browse files
authored
Merge pull request #134 from OpenVoiceOS/release-0.1.6a1
Release 0.1.6a1
2 parents fd603ca + 395d12b commit 870a475

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Changelog
22

3-
## [0.1.5a1](https://github.com/OpenVoiceOS/ovos-bus-client/tree/0.1.5a1) (2024-10-21)
3+
## [0.1.6a1](https://github.com/OpenVoiceOS/ovos-bus-client/tree/0.1.6a1) (2024-10-27)
44

5-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-bus-client/compare/0.1.4...0.1.5a1)
5+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-bus-client/compare/0.1.5...0.1.6a1)
66

77
**Merged pull requests:**
88

9-
- fix:log spam [\#131](https://github.com/OpenVoiceOS/ovos-bus-client/pull/131) ([JarbasAl](https://github.com/JarbasAl))
9+
- fix:gui spam [\#133](https://github.com/OpenVoiceOS/ovos-bus-client/pull/133) ([JarbasAl](https://github.com/JarbasAl))
1010

1111

1212

ovos_bus_client/apis/gui.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ def set_bus(self, bus=None):
119119
self._bus = bus or get_mycroft_bus()
120120
self.setup_default_handlers()
121121

122+
@property
123+
def gui_disabled(self) -> bool:
124+
return Configuration().get("gui", {}).get("disable_gui", False)
125+
122126
@property
123127
def bus(self):
124128
"""
@@ -276,6 +280,8 @@ def gui_set(self, message: Message):
276280
self.on_gui_changed_callback()
277281

278282
def _sync_data(self):
283+
if self.gui_disabled:
284+
return
279285
if not self.bus:
280286
raise RuntimeError("bus not set, did you call self.bind() ?")
281287
data = self.__session_data.copy()
@@ -322,6 +328,8 @@ def clear(self):
322328
self.__session_data = {}
323329
self._pages = []
324330
self.current_page_idx = -1
331+
if self.gui_disabled:
332+
return
325333
if not self.bus:
326334
raise RuntimeError("bus not set, did you call self.bind() ?")
327335
self.bus.emit(Message("gui.clear.namespace",
@@ -337,6 +345,8 @@ def send_event(self, event_name: str,
337345
params: json serializable object containing any parameters that
338346
should be sent along with the request.
339347
"""
348+
if self.gui_disabled:
349+
return
340350
params = params or {}
341351
if not self.bus:
342352
raise RuntimeError("bus not set, did you call self.bind() ?")
@@ -442,6 +452,8 @@ def show_pages(self, page_names: List[str], index: int = 0,
442452
self._pages = page_names
443453
self.current_page_idx = index
444454

455+
if self.gui_disabled:
456+
return
445457
# First sync any data...
446458
data = self.__session_data.copy()
447459
data.update({'__from': self.skill_id})
@@ -470,6 +482,8 @@ def remove_pages(self, page_names: List[str]):
470482
Request to remove a list of pages from the GUI.
471483
@param page_names: list of page resources requested
472484
"""
485+
if self.gui_disabled:
486+
return
473487
if not self.bus:
474488
raise RuntimeError("bus not set, did you call self.bind() ?")
475489
if isinstance(page_names, str):
@@ -489,6 +503,8 @@ def remove_all_pages(self, except_pages=None):
489503
Request to remove all pages from the GUI.
490504
@param except_pages: list of optional page resources to keep
491505
"""
506+
if self.gui_disabled:
507+
return
492508
if not self.bus:
493509
raise RuntimeError("bus not set, did you call self.bind() ?")
494510
self.bus.emit(Message("gui.page.delete.all",

ovos_bus_client/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# START_VERSION_BLOCK
22
VERSION_MAJOR = 0
33
VERSION_MINOR = 1
4-
VERSION_BUILD = 5
5-
VERSION_ALPHA = 0
4+
VERSION_BUILD = 6
5+
VERSION_ALPHA = 1
66
# END_VERSION_BLOCK

0 commit comments

Comments
 (0)