From 736fbedaae9a6404a04104735a35a8f2a787d2e1 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Tue, 6 Jan 2026 11:12:44 +0100 Subject: [PATCH] fix(dark_mode_button): RPC access disabled --- bec_widgets/cli/client.py | 21 ------------------- .../dark_mode_button/dark_mode_button.py | 2 +- tests/end-2-end/test_rpc_widgets_e2e.py | 2 +- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/bec_widgets/cli/client.py b/bec_widgets/cli/client.py index cf6eb172..eaefc0d1 100644 --- a/bec_widgets/cli/client.py +++ b/bec_widgets/cli/client.py @@ -33,7 +33,6 @@ _Widgets = { "BECShell": "BECShell", "BECStatusBox": "BECStatusBox", "DapComboBox": "DapComboBox", - "DarkModeButton": "DarkModeButton", "DeviceBrowser": "DeviceBrowser", "Heatmap": "Heatmap", "Image": "Image", @@ -1001,26 +1000,6 @@ class DapComboBox(RPCBase): """ -class DarkModeButton(RPCBase): - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - @rpc_call - def attach(self): - """ - None - """ - - @rpc_call - def detach(self): - """ - Detach the widget from its parent dock widget (if widget is in the dock), making it a floating widget. - """ - - class DeviceBrowser(RPCBase): """DeviceBrowser is a widget that displays all available devices in the current BEC session.""" diff --git a/bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py b/bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py index 840e56ad..d37ee51a 100644 --- a/bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py +++ b/bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py @@ -12,7 +12,7 @@ class DarkModeButton(BECWidget, QWidget): ICON_NAME = "dark_mode" PLUGIN = True - RPC = True + RPC = False def __init__( self, diff --git a/tests/end-2-end/test_rpc_widgets_e2e.py b/tests/end-2-end/test_rpc_widgets_e2e.py index 2a81168f..471df917 100644 --- a/tests/end-2-end/test_rpc_widgets_e2e.py +++ b/tests/end-2-end/test_rpc_widgets_e2e.py @@ -75,7 +75,7 @@ def test_available_widgets(qtbot, connected_client_gui_obj): gui = connected_client_gui_obj dock_area = gui.bec # Number of top level widgets, should be 4 - top_level_widgets_count = 12 + top_level_widgets_count = 10 assert len(gui._server_registry) == top_level_widgets_count names = set(list(gui._server_registry.keys())) # Number of widgets with parent_id == None, should be 2