From 28714979bd8db5639eeff72db8110ec143c24e30 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 20 Aug 2020 14:00:14 +0200 Subject: [PATCH] sculpt: drop storage-detect-cancellation feature Fixes #3853 --- repos/gems/run/sculpt.run | 2 -- repos/gems/run/sculpt/leitzentrale.config | 1 - repos/gems/src/app/sculpt_manager/main.cc | 31 ------------------- .../sculpt_manager/model/discovery_state.h | 13 -------- 4 files changed, 47 deletions(-) diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index 091d9ed1bf..7e03a01d42 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -55,8 +55,6 @@ install_config { - diff --git a/repos/gems/run/sculpt/leitzentrale.config b/repos/gems/run/sculpt/leitzentrale.config index 6409e5252f..f4ac6bb811 100644 --- a/repos/gems/run/sculpt/leitzentrale.config +++ b/repos/gems/run/sculpt/leitzentrale.config @@ -229,7 +229,6 @@ - diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 386f4e3f6b..1ee27c3836 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -116,13 +116,6 @@ struct Sculpt::Main : Input_event_handler, _event_filter_config.try_generate_manually_managed(); } - Attached_rom_dataspace _gui_hover { _env, "nitpicker_hover" }; - - Signal_handler
_gui_hover_handler { - _env.ep(), *this, &Main::_handle_gui_hover }; - - void _handle_gui_hover(); - /********************** ** Device discovery ** @@ -1036,7 +1029,6 @@ struct Sculpt::Main : Input_event_handler, * Subscribe to reports */ _update_state_rom .sigh(_update_state_handler); - _gui_hover .sigh(_gui_hover_handler); _pci_devices .sigh(_pci_devices_handler); _window_list .sigh(_window_list_handler); _decorator_margins .sigh(_decorator_margins_handler); @@ -1382,29 +1374,6 @@ Sculpt::Dialog::Hover_result Sculpt::Main::hover(Xml_node hover) } -void Sculpt::Main::_handle_gui_hover() -{ - if (!_storage._discovery_state.discovery_in_progress()) - return; - - /* check if initial user activity has already been evaluated */ - if (_storage._discovery_state.user_state != Discovery_state::USER_UNKNOWN) - return; - - _gui_hover.update(); - Xml_node const hover = _gui_hover.xml(); - if (!hover.has_type("hover")) - return; - - _storage._discovery_state.user_state = hover.attribute_value("active", false) - ? Discovery_state::USER_INTERVENED - : Discovery_state::USER_IDLE; - - /* trigger re-evaluation of default storage target */ - _storage.handle_storage_devices_update(); -} - - void Sculpt::Main::_handle_update_state() { _update_state_rom.update(); diff --git a/repos/gems/src/app/sculpt_manager/model/discovery_state.h b/repos/gems/src/app/sculpt_manager/model/discovery_state.h index 9619cb7b2a..ca83cd9610 100644 --- a/repos/gems/src/app/sculpt_manager/model/discovery_state.h +++ b/repos/gems/src/app/sculpt_manager/model/discovery_state.h @@ -26,10 +26,6 @@ namespace Sculpt { struct Discovery_state; } struct Sculpt::Discovery_state { - enum User_state { USER_UNKNOWN, USER_IDLE, USER_INTERVENED }; - - User_state user_state { USER_UNKNOWN }; - bool _done = false; bool discovery_in_progress() const { return !_done; } @@ -40,15 +36,6 @@ struct Sculpt::Discovery_state if (_done) return Storage_target { }; - /* user intervention disarms the built-in selection policy */ - if (user_state == USER_UNKNOWN) - return Storage_target { }; - - if (user_state == USER_INTERVENED) { - _done = true; - return Storage_target { }; - } - /* defer decision until the low-level device enumeration is complete */ if (!devices.all_devices_enumerated()) return Storage_target { };