From 84ae416c2cea79199eccdab62d00269c17eb9edf Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Tue, 14 May 2024 17:42:46 +0400 Subject: [PATCH] Removed AODC feature, it's been deprecated for a while. --- dependencies/tl_expected/expected/README.md | 6 +- po/cs.po | 4 - src/applib/smartctl_json_ata_parser.cpp | 4 - src/applib/storage_device.cpp | 115 ++----------- src/applib/storage_device.h | 20 +-- src/gsc_main_window.cpp | 169 ++------------------ src/gsc_main_window.h | 4 - src/gsc_main_window_iconview.h | 2 - src/ui/gsc_main_window.glade | 121 +++++++------- 9 files changed, 92 insertions(+), 353 deletions(-) diff --git a/dependencies/tl_expected/expected/README.md b/dependencies/tl_expected/expected/README.md index b740686..5486d16 100644 --- a/dependencies/tl_expected/expected/README.md +++ b/dependencies/tl_expected/expected/README.md @@ -1,9 +1,9 @@ # expected Single header implementation of `std::expected` with functional-style extensions. -[![Documentation Status](https://readthedocs.org/projects/tl-docs/badge/?version=latest)](https://tl.tartanllama.xyz/en/latest/?badge=latest) -Clang + GCC: [![Linux Build Status](https://github.com/TartanLlama/expected/actions/workflows/cmake.yml/badge.svg)](https://github.com/TartanLlama/expected/actions/workflows/cmake.yml) -MSVC: [![Windows Build Status](https://ci.appveyor.com/api/projects/status/k5x00xa11y3s5wsg?svg=true)](https://ci.appveyor.com/project/TartanLlama/expected) +[![Documentation SmartStatus](https://readthedocs.org/projects/tl-docs/badge/?version=latest)](https://tl.tartanllama.xyz/en/latest/?badge=latest) +Clang + GCC: [![Linux Build SmartStatus](https://github.com/TartanLlama/expected/actions/workflows/cmake.yml/badge.svg)](https://github.com/TartanLlama/expected/actions/workflows/cmake.yml) +MSVC: [![Windows Build SmartStatus](https://ci.appveyor.com/api/projects/status/k5x00xa11y3s5wsg?svg=true)](https://ci.appveyor.com/project/TartanLlama/expected) Available on [Vcpkg](https://github.com/microsoft/vcpkg/tree/master/ports/tl-expected) and [Conan](https://github.com/yipdw/conan-tl-expected). diff --git a/po/cs.po b/po/cs.po index 7df6386..7d6bfdf 100644 --- a/po/cs.po +++ b/po/cs.po @@ -33,10 +33,6 @@ msgstr "Řada modelu:" msgid "enable smart (action-replaced text)" msgstr "Zapnout SMART" -#: src/ui/gsc_main_window.glade:209 -msgid "enable aodc (action-replaced text)" -msgstr "Zapnout AODC" - #: src/ui/gsc_add_device_window.glade:29 msgid "Add Device - GSmartControl" msgstr "Přidat zařízení - GSmartControl" diff --git a/src/applib/smartctl_json_ata_parser.cpp b/src/applib/smartctl_json_ata_parser.cpp index 0e84920..2cf2838 100644 --- a/src/applib/smartctl_json_ata_parser.cpp +++ b/src/applib/smartctl_json_ata_parser.cpp @@ -67,10 +67,6 @@ Information not printed in JSON yet: _text_only/write_cache_reorder _text_only/power_mode -- Automatic Offline Data Collection toggle support - FIXME Already filed a bug report with smartmontools. - _text_only/aodc_support - - Directory log supported We don't use this. _text_only/directory_log_supported diff --git a/src/applib/storage_device.cpp b/src/applib/storage_device.cpp index 9f6a8ef..ba97eae 100644 --- a/src/applib/storage_device.cpp +++ b/src/applib/storage_device.cpp @@ -40,13 +40,12 @@ Copyright: -std::string StorageDevice::get_status_displayable_name(Status status) +std::string StorageDevice::get_status_displayable_name(SmartStatus status) { - static const std::unordered_map m { - {Status::Enabled, C_("status", "Enabled")}, - {Status::Disabled, C_("status", "Disabled")}, - {Status::Unsupported, C_("status", "Unsupported")}, - {Status::Unknown, C_("status", "Unknown")}, + static const std::unordered_map m { + {SmartStatus::Enabled, C_("status", "Enabled")}, + {SmartStatus::Disabled, C_("status", "Disabled")}, + {SmartStatus::Unsupported, C_("status", "Unsupported")}, }; if (auto iter = m.find(status); iter != m.end()) { return iter->second; @@ -92,7 +91,6 @@ void StorageDevice::clear_parse_results() smart_supported_.reset(); smart_enabled_.reset(); model_name_.reset(); - aodc_status_.reset(); family_name_.reset(); size_.reset(); health_property_.reset(); @@ -146,7 +144,7 @@ hz::ExpectedVoid StorageDevice::fetch_basic_data_and_parse( // return execute_status; // } - // Set some properties too - they are needed for e.g. AODC status, etc. + // Set some properties too - they are needed for e.g. SMART on/off support, etc. return this->parse_basic_data(); } @@ -524,42 +522,6 @@ A mandatory SMART command failed: exiting. To continue, add one or more '-T perm -hz::ExpectedVoid StorageDevice::set_aodc_enabled(bool b, const std::shared_ptr& smartctl_ex) -{ - if (this->test_is_active_) { - return hz::Unexpected(StorageDeviceError::TestRunning, _("A test is currently being performed on this drive.")); - } - - // execute smartctl --offlineauto=on|off /dev/... - // Output: -/* -=== START OF ENABLE/DISABLE COMMANDS SECTION === -SMART Automatic Offline Testing Enabled every four hours. ---------------------------- OR --------------------------- -=== START OF ENABLE/DISABLE COMMANDS SECTION === -SMART Automatic Offline Testing Disabled. ---------------------------- OR --------------------------- -A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. -*/ - std::string output; - auto status = execute_device_smartctl((b ? "--offlineauto=on" : "--offlineauto=off"), smartctl_ex, output); - if (!status) { - return status; - } - - if (app_pcre_match("/Testing Enabled/mi", output) || app_pcre_match("/Testing Disabled/mi", output)) { - return {}; // success - } - - if (app_pcre_match("/^A mandatory SMART command failed/mi", output)) { - return hz::Unexpected(StorageDeviceError::CommandFailed, _("Mandatory SMART command failed.")); - } - - return hz::Unexpected(StorageDeviceError::CommandUnknownError, _("Unknown error occurred.")); -} - - - void StorageDevice::read_common_properties() { if (auto prop = property_repository_.lookup_property("smart_support/available"); !prop.empty()) { @@ -648,32 +610,32 @@ void StorageDevice::detect_drive_type_from_properties(const StoragePropertyRepos -StorageDevice::Status StorageDevice::get_smart_status() const +StorageDevice::SmartStatus StorageDevice::get_smart_status() const { - Status status = Status::Unsupported; + SmartStatus status = SmartStatus::Unsupported; if (smart_enabled_.has_value()) { if (smart_enabled_.value()) { // enabled, supported - status = Status::Enabled; + status = SmartStatus::Enabled; } else { // if it's disabled, maybe it's unsupported, check that: if (smart_supported_.has_value()) { if (smart_supported_.value()) { // disabled, supported - status = Status::Disabled; + status = SmartStatus::Disabled; } else { // disabled, unsupported - status = Status::Unsupported; + status = SmartStatus::Unsupported; } } else { // disabled, support unknown - status = Status::Disabled; + status = SmartStatus::Disabled; } } } else { // status unknown if (smart_supported_.has_value()) { if (smart_supported_.value()) { // status unknown, supported - status = Status::Disabled; // at least give the user a chance to try enabling it + status = SmartStatus::Disabled; // at least give the user a chance to try enabling it } else { // status unknown, unsupported - status = Status::Unsupported; // most likely + status = SmartStatus::Unsupported; // most likely } } else { // status unknown, support unknown - status = Status::Unsupported; + status = SmartStatus::Unsupported; } } return status; @@ -683,7 +645,7 @@ StorageDevice::Status StorageDevice::get_smart_status() const bool StorageDevice::get_smart_switch_supported() const { - const bool supported = get_smart_status() != Status::Unsupported; + const bool supported = get_smart_status() != SmartStatus::Unsupported; // NVMe does not support on/off const bool is_nvme = get_detected_type() == StorageDeviceDetectedType::Nvme; @@ -692,51 +654,6 @@ bool StorageDevice::get_smart_switch_supported() const -StorageDevice::Status StorageDevice::get_aodc_status() const -{ - // smart-disabled drives are known to print some garbage, so - // let's protect us from it. - if (get_smart_status() != Status::Enabled) - return Status::Unsupported; - - if (aodc_status_.has_value()) // cached return value - return aodc_status_.value(); - - Status status = Status::Unknown; // for now - - bool aodc_supported = false; - int found = 0; - - for (const auto& p : property_repository_.get_properties()) { -// if (p.section == AtaStoragePropertySection::Internal) { - if (p.generic_name == "ata_smart_data/offline_data_collection/status/value/_parsed") { // if this is not present at all, we set the unknown status. - status = (p.get_value() ? Status::Enabled : Status::Disabled); - //++found; - continue; - } - if (p.generic_name == "_text_only/aodc_support") { - aodc_supported = p.get_value(); - ++found; - continue; - } - if (found >= 2) - break; -// } - } - - if (!aodc_supported) - status = Status::Unsupported; - // if it's supported, then status may be enabled, disabled or unknown. - - aodc_status_ = status; // store to cache - - debug_out_info("app", DBG_FUNC_MSG << "AODC status: " << get_status_displayable_name(status) << "\n"); - - return status; -} - - - std::string StorageDevice::get_device_size_str() const { return (size_.has_value() ? size_.value() : ""); diff --git a/src/applib/storage_device.h b/src/applib/storage_device.h index b022d79..ffcbdae 100644 --- a/src/applib/storage_device.h +++ b/src/applib/storage_device.h @@ -52,15 +52,14 @@ class StorageDevice { public: /// Statuses of various states - enum class Status { - Enabled, ///< SMART, AODC - Disabled, ///< SMART, AODC - Unsupported, ///< SMART, AODC - Unknown ///< AODC - supported but unknown if it's enabled or not. + enum class SmartStatus { + Enabled, + Disabled, + Unsupported, }; /// Get displayable name for Status. - [[nodiscard]] static std::string get_status_displayable_name(Status status); + [[nodiscard]] static std::string get_status_displayable_name(SmartStatus status); /// Statuses of various parse states @@ -115,9 +114,6 @@ class StorageDevice { /// Try to enable SMART. [[nodiscard]] hz::ExpectedVoid set_smart_enabled(bool b, const std::shared_ptr& smartctl_ex); - /// Try to enable Automatic Offline Data Collection. - [[nodiscard]] hz::ExpectedVoid set_aodc_enabled(bool b, const std::shared_ptr& smartctl_ex); - /// Read common properties (smart supported, smart enabled, etc.) from the repository. void read_common_properties(); @@ -127,14 +123,11 @@ class StorageDevice { /// Get SMART status - [[nodiscard]] Status get_smart_status() const; + [[nodiscard]] SmartStatus get_smart_status() const; /// Get if SMART on/off is supported [[nodiscard]] bool get_smart_switch_supported() const; - /// Get AODC status - [[nodiscard]] Status get_aodc_status() const; - /// Get format size string, or an empty string on error. [[nodiscard]] std::string get_device_size_str() const; @@ -294,7 +287,6 @@ class StorageDevice { // Common properties std::optional smart_supported_; ///< SMART support status std::optional smart_enabled_; ///< SMART enabled status - mutable std::optional aodc_status_; ///< Cached aodc status. std::optional model_name_; ///< Model name std::optional family_name_; ///< Family name std::optional serial_number_; ///< Serial number diff --git a/src/gsc_main_window.cpp b/src/gsc_main_window.cpp index 14399dc..97ad3fa 100644 --- a/src/gsc_main_window.cpp +++ b/src/gsc_main_window.cpp @@ -238,7 +238,6 @@ bool GscMainWindow::create_widgets() " " " " " " - " " " " " " " " @@ -269,7 +268,6 @@ bool GscMainWindow::create_widgets() " " " " " " - " " " " " " " " @@ -311,12 +309,6 @@ bool GscMainWindow::create_widgets() actiongroup_device_->add((action_map_[action_enable_smart] = action), Gtk::AccelKey("M"), sigc::bind(sigc::mem_fun(*this, &GscMainWindow::on_action_activated), action_enable_smart)); - action = Gtk::ToggleAction::create(APP_ACTION_NAME(action_enable_aodc), _("Enable Auto Offline Data Collection"), - _("Toggle Automatic Offline Data Collection which will update \"offline\" SMART attributes every four hours")); - lookup_widget("status_aodc_enabled_check")->set_related_action(action); - actiongroup_device_->add((action_map_[action_enable_aodc] = action), Gtk::AccelKey("F"), - sigc::bind(sigc::mem_fun(*this, &GscMainWindow::on_action_activated), action_enable_aodc)); - action = Gtk::Action::create(APP_ACTION_NAME(action_reread_device_data), Gtk::Stock::REFRESH, _("Re-read Data"), _("Re-read basic SMART data")); actiongroup_device_->add((action_map_[action_reread_device_data] = action), Gtk::AccelKey("E"), @@ -526,11 +518,6 @@ void GscMainWindow::on_action_activated(GscMainWindow::action_t action_type) actiongroup_device_->get_action(APP_ACTION_NAME(action_enable_smart)).operator->())); break; - case action_enable_aodc: // this may be invoked on menu manipulation - on_action_enable_aodc_toggled(dynamic_cast( - actiongroup_device_->get_action(APP_ACTION_NAME(action_enable_aodc)).operator->())); - break; - case action_reread_device_data: on_action_reread_device_data(); break; @@ -641,14 +628,14 @@ void GscMainWindow::on_action_enable_smart_toggled(Gtk::ToggleAction* action) if (!drive->get_smart_switch_supported()) return; - StorageDevice::Status status = drive->get_smart_status(); - if (status == StorageDevice::Status::Unsupported) // this shouldn't happen + StorageDevice::SmartStatus status = drive->get_smart_status(); + if (status == StorageDevice::SmartStatus::Unsupported) // this shouldn't happen return; bool toggle_active = action->get_active(); - if ( (toggle_active && status == StorageDevice::Status::Disabled) - || (!toggle_active && status == StorageDevice::Status::Enabled) ) { + if ( (toggle_active && status == StorageDevice::SmartStatus::Disabled) + || (!toggle_active && status == StorageDevice::SmartStatus::Enabled) ) { std::shared_ptr ex(new SmartctlExecutorGui()); ex->create_running_dialog(this); @@ -666,112 +653,6 @@ void GscMainWindow::on_action_enable_smart_toggled(Gtk::ToggleAction* action) -void GscMainWindow::on_action_enable_aodc_toggled(Gtk::ToggleAction* action) -{ - if (!action || !iconview_) - return; - if (!action->get_sensitive()) // it's insensitive, nothing to do (this shouldn't happen). - return; - - StorageDevicePtr drive = iconview_->get_selected_drive(); - - // we should be protected from these by disabled actions, but still... - if (!drive || drive->get_is_virtual() || drive->get_test_is_active()) - return; - - StorageDevice::Status status = drive->get_aodc_status(); - if (status == StorageDevice::Status::Unsupported) // this shouldn't happen - return; - - if (status == StorageDevice::Status::Unknown) { - // it's supported, but we don't know if it's enabled or not. ask the user. - - int response = 0; - { // the dialog hides at the end of scope - Gtk::MessageDialog dialog(*this, "\n"s + _("Automatic Offline Data Collection status could not be determined.\n" - "\nDo you want to enable or disable it?") + "\n", - true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE, true); // markup, modal - - Gtk::Button dismiss_button(_("Dis_miss"), true); - dismiss_button.set_image(*Gtk::manage(new Gtk::Image(Gtk::Stock::CANCEL, Gtk::ICON_SIZE_BUTTON))); - dismiss_button.show_all(); - dialog.add_action_widget(dismiss_button, Gtk::RESPONSE_CANCEL); - - Gtk::Button disable_button(_("_Disable"), true); - disable_button.set_image(*Gtk::manage(new Gtk::Image(Gtk::Stock::NO, Gtk::ICON_SIZE_BUTTON))); - disable_button.show_all(); - dialog.add_action_widget(disable_button, Gtk::RESPONSE_NO); - - Gtk::Button enable_button(_("_Enable"), true); - enable_button.set_image(*Gtk::manage(new Gtk::Image(Gtk::Stock::YES, Gtk::ICON_SIZE_BUTTON))); - enable_button.set_can_default(true); - enable_button.show_all(); - dialog.add_action_widget(enable_button, Gtk::RESPONSE_YES); - enable_button.grab_default(); // make it the default widget - - dialog.set_position(Gtk::WIN_POS_CENTER_ON_PARENT); - - response = dialog.run(); // blocks until the dialog is closed - } - - bool enable_aodc = false; - - switch (response) { - case Gtk::RESPONSE_YES: - enable_aodc = true; - break; - case Gtk::RESPONSE_NO: - enable_aodc = false; - break; - case Gtk::RESPONSE_CANCEL: case Gtk::RESPONSE_DELETE_EVENT: - // nothing, the dialog is closed already - return; - default: - debug_out_error("app", DBG_FUNC_MSG << "Unknown dialog response code: " << response << ".\n"); - return; - } - - std::shared_ptr ex(new SmartctlExecutorGui()); - ex->create_running_dialog(this); - - auto command_status = drive->set_aodc_enabled(enable_aodc, ex); // run it with GUI support - - if (!command_status) { - std::string error_header = (enable_aodc ? _("Cannot enable Automatic Offline Data Collection") - : _("Cannot disable Automatic Offline Data Collection")); - gsc_executor_error_dialog_show(error_header, command_status.error().message(), this); - - } else { // tell the user, because there's no other feedback - gui_show_info_dialog((enable_aodc ? _("Automatic Offline Data Collection enabled.") - : _("Automatic Offline Data Collection disabled.")), this); - } - - return; - } - - - bool toggle_active = action->get_active(); - - if ( (toggle_active && status == StorageDevice::Status::Disabled) - || (!toggle_active && status == StorageDevice::Status::Enabled) ) { - - std::shared_ptr ex(new SmartctlExecutorGui()); - ex->create_running_dialog(this); - - auto command_status = drive->set_aodc_enabled(toggle_active, ex); // run it with GUI support - - if (!command_status) { - std::string error_header = (toggle_active ? _("Cannot enable Automatic Offline Data Collection") - : _("Cannot disable Automatic Offline Data Collection")); - gsc_executor_error_dialog_show(error_header, command_status.error().message(), this); - } - - on_action_reread_device_data(); // reread if changed - } -} - - - void GscMainWindow::on_action_reread_device_data() { if (!iconview_) @@ -826,12 +707,10 @@ void GscMainWindow::set_drive_menu_status(const StorageDevicePtr& drive) bool is_virtual = (drive && drive->get_is_virtual()); - StorageDevice::Status smart_status = StorageDevice::Status::Unsupported; - StorageDevice::Status aodc_status = StorageDevice::Status::Unsupported; + StorageDevice::SmartStatus smart_status = StorageDevice::SmartStatus::Unsupported; if (drive && !is_virtual) { smart_status = drive->get_smart_status(); - aodc_status = drive->get_aodc_status(); } @@ -841,7 +720,7 @@ void GscMainWindow::set_drive_menu_status(const StorageDevicePtr& drive) Glib::RefPtr action; if ((action = actiongroup_device_->get_action(APP_ACTION_NAME(action_perform_tests)))) - action->set_sensitive(smart_status == StorageDevice::Status::Enabled); + action->set_sensitive(smart_status == StorageDevice::SmartStatus::Enabled); if ((action = actiongroup_device_->get_action(APP_ACTION_NAME(action_reread_device_data)))) action->set_visible(drive && !is_virtual); if ((action = actiongroup_device_->get_action(APP_ACTION_NAME(action_remove_device)))) { @@ -853,8 +732,6 @@ void GscMainWindow::set_drive_menu_status(const StorageDevicePtr& drive) if ((action = actiongroup_device_->get_action(APP_ACTION_NAME(action_enable_smart)))) { action->set_sensitive(drive && drive->get_smart_switch_supported()); } - if ((action = actiongroup_device_->get_action(APP_ACTION_NAME(action_enable_aodc)))) - action->set_sensitive(aodc_status != StorageDevice::Status::Unsupported); } @@ -863,33 +740,7 @@ void GscMainWindow::set_drive_menu_status(const StorageDevicePtr& drive) Gtk::ToggleAction* action = dynamic_cast( actiongroup_device_->get_action(APP_ACTION_NAME(action_enable_smart)).operator->()); if (action) { - action->set_active(smart_status == StorageDevice::Status::Enabled); - } - } - - - // aodc toggle status - { - Gtk::ToggleAction* action = dynamic_cast( - actiongroup_device_->get_action(APP_ACTION_NAME(action_enable_aodc)).operator->()); - - if (action) { - Gtk::CheckMenuItem* dev_odc_item = dynamic_cast(ui_manager_->get_widget( - "/main_menubar/device_menu/" APP_ACTION_NAME(action_enable_aodc))); - Gtk::CheckMenuItem* popup_odc_item = dynamic_cast(ui_manager_->get_widget( - "/device_popup/" APP_ACTION_NAME(action_enable_aodc))); - auto* status_aodc_check = lookup_widget("status_aodc_enabled_check"); - - // true if supported, but unknown whether it's enabled or not. - if (dev_odc_item) - dev_odc_item->set_inconsistent(aodc_status == StorageDevice::Status::Unknown); - if (popup_odc_item) - popup_odc_item->set_inconsistent(aodc_status == StorageDevice::Status::Unknown); - if (status_aodc_check) - status_aodc_check->set_inconsistent(aodc_status == StorageDevice::Status::Unknown); - - // for unknown it doesn't really matter what state it's in. - action->set_active(aodc_status == StorageDevice::Status::Enabled); + action->set_active(smart_status == StorageDevice::SmartStatus::Enabled); } } @@ -1062,7 +913,7 @@ void GscMainWindow::rescan_devices() // add them to iconview for (auto& drive : drives_) { if (rconfig::get_data("gui/show_smart_capable_only")) { - if (drive->get_smart_status() != StorageDevice::Status::Unsupported) + if (drive->get_smart_status() != StorageDevice::SmartStatus::Unsupported) iconview_->add_entry(drive); } else { iconview_->add_entry(drive); @@ -1207,7 +1058,7 @@ std::shared_ptr GscMainWindow::show_device_info_window(const Stor } // ask to enable SMART if it's supported but disabled - if (!drive->get_is_virtual() && (drive->get_smart_status() == StorageDevice::Status::Disabled)) { + if (!drive->get_is_virtual() && (drive->get_smart_status() == StorageDevice::SmartStatus::Disabled)) { int status = 0; @@ -1237,7 +1088,7 @@ std::shared_ptr GscMainWindow::show_device_info_window(const Stor // Virtual drives are parsed at load time. // Parse non-virtual, smart-supporting drives here. - if (!drive->get_is_virtual() && drive->get_smart_status() != StorageDevice::Status::Unsupported) { + if (!drive->get_is_virtual() && drive->get_smart_status() != StorageDevice::SmartStatus::Unsupported) { std::shared_ptr ex(new SmartctlExecutorGui()); ex->create_running_dialog(this, Glib::ustring::compose(_("Running {command} on %1..."), drive->get_device_with_type())); auto command_status = drive->fetch_full_data_and_parse(ex); // run it with GUI support diff --git a/src/gsc_main_window.h b/src/gsc_main_window.h index 87f87d1..66732f7 100644 --- a/src/gsc_main_window.h +++ b/src/gsc_main_window.h @@ -79,7 +79,6 @@ class GscMainWindow : public AppBuilderWidget { action_view_details, action_enable_smart, - action_enable_aodc, action_reread_device_data, action_perform_tests, action_remove_device, @@ -146,9 +145,6 @@ class GscMainWindow : public AppBuilderWidget { /// Action callback void on_action_enable_smart_toggled(Gtk::ToggleAction* action); - /// Action callback - void on_action_enable_aodc_toggled(Gtk::ToggleAction* action); - /// Action callback void on_action_reread_device_data(); diff --git a/src/gsc_main_window_iconview.h b/src/gsc_main_window_iconview.h index 8d3403d..740afaa 100644 --- a/src/gsc_main_window_iconview.h +++ b/src/gsc_main_window_iconview.h @@ -339,8 +339,6 @@ class GscMainWindowIconView : public Gtk::IconView { } tooltip_strs.push_back(Glib::ustring::compose(_("SMART status: %1"), "" + Glib::Markup::escape_text(StorageDevice::get_status_displayable_name(drive->get_smart_status())) + "")); - tooltip_strs.push_back(Glib::ustring::compose(_("Automatic Offline Data Collection status: %1"), - "" + Glib::Markup::escape_text(StorageDevice::get_status_displayable_name(drive->get_aodc_status())) + "")); std::string tooltip_str = hz::string_join(tooltip_strs, '\n'); diff --git a/src/ui/gsc_main_window.glade b/src/ui/gsc_main_window.glade index bb4e30b..7f56d4e 100644 --- a/src/ui/gsc_main_window.glade +++ b/src/ui/gsc_main_window.glade @@ -1,5 +1,5 @@ - - False + False GSmartControl - 560 - 450 - - - + 560 + 450 True - False + False vertical True - False + False @@ -52,45 +49,46 @@ along with GSmartControl. If not, see . + True - False - 6 - 6 - 6 - 6 - 6 - 6 + False + 6 + 6 + 6 + 6 + 6 + 6 True - False + False - 1 - 0 + 1 + 0 True - False + False - 1 - 1 + 1 + 1 True - False + False start Drive information: @@ -98,14 +96,14 @@ along with GSmartControl. If not, see . - 0 - 0 + 0 + 0 True - False + False start Basic health check: @@ -113,14 +111,14 @@ along with GSmartControl. If not, see . - 0 - 1 + 0 + 1 True - False + False start Model family: True @@ -129,23 +127,32 @@ along with GSmartControl. If not, see . - 0 - 2 + 0 + 2 True - False + False - 1 - 2 + 1 + 2 + + + + + + + + + False @@ -156,21 +163,21 @@ along with GSmartControl. If not, see . True - True + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - in + in True - True - True - True + True + True + True GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 10 - 250 + 250 3 - 20 - 5 + 20 + 5 @@ -183,20 +190,20 @@ along with GSmartControl. If not, see . True - False - 6 - 6 - 6 - 6 + False + 6 + 6 + 6 + 6 vertical 6 enable smart (action-replaced text) True - True - False - True + True + False + True True @@ -204,20 +211,6 @@ along with GSmartControl. If not, see . 0 - - - enable aodc (action-replaced text) - True - True - False - True - - - True - True - 1 - - False