mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-27 06:15:45 +00:00
Properly implemented persistence of manually added devices (#87). Added --forget-devices option to clear the list if any of the devices causes trouble.
This commit is contained in:
@@ -58,6 +58,9 @@ can specify this option multiple times. Example:\fR
|
||||
\-\-add\-device /dev/sda \-\-add\-device /dev/twa0::3ware,2 \-\-add\-device '/dev/sdb::::-T permissive'
|
||||
.fi
|
||||
.TP
|
||||
\fB\-\-forget\-devices\fP
|
||||
Forget all previously manually added devices
|
||||
.TP
|
||||
\fB\-\-display\fP=\fIDISPLAY\fP
|
||||
X display to use
|
||||
.TP
|
||||
|
||||
@@ -43,6 +43,8 @@ Example:
|
||||
`--add-device /dev/sda --add-device /dev/twa0::3ware,2 --add-device
|
||||
'/dev/sdb::::-T permissive'`.
|
||||
|
||||
`--forget-devices` - Forget all previously manually added devices.
|
||||
|
||||
`-v`, `--verbose` - Enable verbose logging; same as `--verbosity-level 5`.
|
||||
|
||||
`-q`, `--quiet` - Disable logging; same as `--verbosity-level 0`.
|
||||
|
||||
@@ -48,7 +48,7 @@ inline void init_default_settings()
|
||||
|
||||
rconfig::set_default_data("system/smartctl_options", ""); // default options on ALL commands
|
||||
rconfig::set_default_data("system/smartctl_device_options", ""); // dev1:val1;dev2:val2;... format, each bin2ascii-encoded.
|
||||
rconfig::set_default_data("system/auto_add_devices", ""); // Auto-add devices on startup
|
||||
rconfig::set_default_data("system/startup_manual_devices", ""); // Auto-add devices on startup
|
||||
|
||||
rconfig::set_default_data("system/linux_udev_byid_path", "/dev/disk/by-id"); // linux hard disk device links here
|
||||
rconfig::set_default_data("system/linux_proc_partitions_path", "/proc/partitions"); // file in linux /proc/partitions format
|
||||
|
||||
@@ -15,6 +15,7 @@ Copyright:
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <set>
|
||||
|
||||
#include "rconfig/rconfig.h"
|
||||
|
||||
@@ -75,17 +76,13 @@ inline void from_json(const rconfig::json& j, AppDeviceOptionMap& devmap)
|
||||
|
||||
|
||||
|
||||
/// Get device option map from config
|
||||
/// Get per-device options from config
|
||||
inline AppDeviceOptionMap app_config_get_device_option_map()
|
||||
{
|
||||
return rconfig::get_data<AppDeviceOptionMap>("system/smartctl_device_options");
|
||||
}
|
||||
|
||||
/// Get auto-add device option map from config
|
||||
inline AppDeviceOptionMap app_config_get_auto_add_device_map()
|
||||
{
|
||||
return rconfig::get_data<AppDeviceOptionMap>("system/auto_add_devices");
|
||||
}
|
||||
|
||||
|
||||
/// Read device option map from config and get the options for (dev, type_arg) pair.
|
||||
inline std::vector<std::string> app_get_device_options(const std::string& dev, const std::string& type_arg)
|
||||
@@ -110,12 +107,103 @@ inline std::vector<std::string> app_get_device_options(const std::string& dev, c
|
||||
return {};
|
||||
}
|
||||
|
||||
/// Read auto-add devices from configuration
|
||||
inline AppDeviceOptionMap app_get_auto_add_devices()
|
||||
|
||||
|
||||
/// Device information used when manually adding devices
|
||||
struct AppAddDeviceOption {
|
||||
AppAddDeviceOption() = default;
|
||||
|
||||
AppAddDeviceOption(std::string device, std::string type, std::string options)
|
||||
: device(std::move(device)), type(std::move(type)), options(std::move(options))
|
||||
{ }
|
||||
|
||||
std::string device; ///< Device name, e.g. /dev/sda
|
||||
std::string type; ///< Smartctl type
|
||||
std::string options; ///< Additional smartctl options
|
||||
|
||||
|
||||
/// Compare two AppAddDeviceOption objects
|
||||
bool operator==(const AppAddDeviceOption& other) const
|
||||
{
|
||||
return device == other.device && type == other.type && options == other.options;
|
||||
}
|
||||
|
||||
/// Compare two AppAddDeviceOption objects
|
||||
bool operator!=(const AppAddDeviceOption& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
/// Compare two AppAddDeviceOption objects
|
||||
bool operator<(const AppAddDeviceOption& other) const
|
||||
{
|
||||
if (device != other.device)
|
||||
return device < other.device;
|
||||
if (type != other.type)
|
||||
return type < other.type;
|
||||
return options < other.options;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/// json serializer for rconfig
|
||||
inline void to_json(rconfig::json& j, const std::set<AppAddDeviceOption>& devices)
|
||||
{
|
||||
return app_config_get_auto_add_device_map();
|
||||
for (const auto& dev : devices) {
|
||||
if (!dev.device.empty()) {
|
||||
j.push_back(rconfig::json {
|
||||
{"device", dev.device},
|
||||
{"type", dev.type},
|
||||
{"options", dev.options}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// json deserializer for rconfig
|
||||
inline void from_json(const rconfig::json& j, std::set<AppAddDeviceOption>& devices)
|
||||
{
|
||||
if (!j.is_array()) {
|
||||
return;
|
||||
}
|
||||
for (const auto& obj : j) {
|
||||
try {
|
||||
if (obj.contains("device") && obj.contains("type") && obj.contains("options")) {
|
||||
devices.emplace(
|
||||
obj.at("device").get<std::string>(),
|
||||
obj.at("type").get<std::string>(),
|
||||
obj.at("options").get<std::string>()
|
||||
);
|
||||
}
|
||||
}
|
||||
catch(std::exception& e) {
|
||||
// ignore "not found"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Get devices to manually add on startup
|
||||
inline std::set<AppAddDeviceOption> app_get_startup_manual_devices()
|
||||
{
|
||||
return rconfig::get_data<std::set<AppAddDeviceOption>>("system/startup_manual_devices");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Set devices to manually add on startup
|
||||
inline void app_set_startup_manual_devices(std::set<AppAddDeviceOption> devices)
|
||||
{
|
||||
rconfig::set_data("system/startup_manual_devices", std::move(devices));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -20,7 +20,7 @@ Copyright:
|
||||
#include "gsc_add_device_window.h"
|
||||
#include "gsc_main_window.h"
|
||||
#include "build_config.h"
|
||||
|
||||
#include "applib/storage_settings.h"
|
||||
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ void GscAddDeviceWindow::on_window_ok_button_clicked()
|
||||
{
|
||||
std::string dev, type;
|
||||
std::vector<std::string> params;
|
||||
std::string params_str;
|
||||
if (auto* entry = lookup_widget<Gtk::Entry*>("device_name_entry")) {
|
||||
dev = entry->get_text();
|
||||
}
|
||||
@@ -155,7 +156,7 @@ void GscAddDeviceWindow::on_window_ok_button_clicked()
|
||||
type = type_combo->get_entry_text();
|
||||
}
|
||||
if (auto* entry = lookup_widget<Gtk::Entry*>("smartctl_params_entry")) {
|
||||
auto params_str = entry->get_text();
|
||||
params_str = entry->get_text();
|
||||
if (!params_str.empty()) {
|
||||
try {
|
||||
params = Glib::shell_parse_argv(params_str);
|
||||
@@ -166,35 +167,29 @@ void GscAddDeviceWindow::on_window_ok_button_clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the auto-add checkbox is checked
|
||||
bool auto_add = false;
|
||||
if (auto* check = lookup_widget<Gtk::CheckButton*>("auto_add_device_check")) {
|
||||
auto_add = check->get_active();
|
||||
}
|
||||
|
||||
// If auto-add is checked, save the device info to config
|
||||
if (auto_add && !dev.empty()) {
|
||||
// Get existing auto-add devices
|
||||
AppDeviceOptionMap auto_add_devices = app_config_get_auto_add_device_map();
|
||||
|
||||
// Create params string from vector
|
||||
std::string params_str;
|
||||
for (const auto& param : params) {
|
||||
if (!params_str.empty())
|
||||
params_str += " ";
|
||||
params_str += param;
|
||||
}
|
||||
|
||||
// Add or update this device in the map
|
||||
auto_add_devices.value.insert_or_assign({dev, type}, params_str);
|
||||
|
||||
// Save the updated map back to config
|
||||
rconfig::set_data("system/auto_add_devices", auto_add_devices);
|
||||
}
|
||||
|
||||
bool added = false;
|
||||
if (main_window_ && !dev.empty()) {
|
||||
main_window_->add_device(dev, type, params);
|
||||
added = main_window_->add_device_interactive(dev, type, params);
|
||||
}
|
||||
|
||||
if (added) {
|
||||
bool auto_add = false;
|
||||
if (auto* check = lookup_widget<Gtk::CheckButton*>("auto_add_device_check")) {
|
||||
auto_add = check->get_active();
|
||||
}
|
||||
|
||||
// If auto-add is checked, save the device info to config
|
||||
if (auto_add && !dev.empty()) {
|
||||
// Get existing auto-add devices
|
||||
auto devices = app_get_startup_manual_devices();
|
||||
|
||||
// Add or update this device in the map
|
||||
devices.emplace(dev, type, params_str);
|
||||
|
||||
// Save the updated map back to config
|
||||
app_set_startup_manual_devices(devices);
|
||||
}
|
||||
}
|
||||
|
||||
destroy_instance();
|
||||
|
||||
@@ -206,6 +206,7 @@ namespace {
|
||||
gboolean arg_locale = TRUE; ///< if false, disable using system locale
|
||||
gboolean arg_version = FALSE; ///< if true, show version and exit
|
||||
gboolean arg_scan = TRUE; ///< if false, don't scan the system for drives on startup
|
||||
gboolean arg_forget_manual_devices = FALSE; ///< if true, forget all manually added devices
|
||||
gchar** arg_add_virtual = nullptr; ///< load smartctl data from these files as virtual drives
|
||||
gchar** arg_add_device = nullptr; ///< add these device files manually
|
||||
double arg_gdk_scale = std::numeric_limits<double>::quiet_NaN(); ///< The value of GDK_SCALE environment variable
|
||||
@@ -230,6 +231,8 @@ namespace {
|
||||
N_("Add this device to device list. The format of the device is \"<device>::<type>::<extra_args>\", where type and extra_args are optional."
|
||||
" This option is useful with --no-scan to list certain drives only. You can specify this option multiple times."
|
||||
" Example: --add-device /dev/sda --add-device /dev/twa0::3ware,2 --add-device '/dev/sdb::::-T permissive'"), nullptr },
|
||||
{ "forget-devices", '\0', 0, G_OPTION_ARG_NONE, &(args.arg_forget_manual_devices),
|
||||
N_("Forget all previously manually added devices."), nullptr },
|
||||
#ifndef _WIN32
|
||||
// X11-specific
|
||||
{ "gdk-scale", 'l', 0, G_OPTION_ARG_DOUBLE, &(args.arg_gdk_scale),
|
||||
@@ -557,6 +560,9 @@ bool app_init_and_loop(int& argc, char**& argv)
|
||||
// add devices to the list on startup if specified.
|
||||
get_startup_settings().add_devices = load_devices;
|
||||
|
||||
// forget all manually added devices on startup if specified.
|
||||
get_startup_settings().forget_manual_devices = bool(args.arg_forget_manual_devices);
|
||||
|
||||
|
||||
// Create executor log window, but don't show it.
|
||||
// It will track all command executor outputs.
|
||||
|
||||
+60
-24
@@ -44,7 +44,7 @@ Copyright:
|
||||
#include "applib/command_executor_factory.h"
|
||||
#include "gsc_startup_settings.h"
|
||||
#include "build_config.h"
|
||||
|
||||
#include "applib/storage_settings.h"
|
||||
|
||||
|
||||
using namespace std::literals;
|
||||
@@ -142,30 +142,17 @@ void GscMainWindow::populate_iconview_on_startup(bool smartctl_valid)
|
||||
}
|
||||
}
|
||||
if (!file.empty()) {
|
||||
add_device(file, type_arg, extra_args);
|
||||
// Report any smartctl-related issues
|
||||
add_device_interactive(file, type_arg, extra_args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add auto-add devices stored in configuration
|
||||
auto auto_add_devices = app_get_auto_add_devices();
|
||||
for (const auto& [dev_type, options_str] : auto_add_devices.value) {
|
||||
const auto& dev = dev_type.first;
|
||||
const auto& type_arg = dev_type.second;
|
||||
|
||||
if (!dev.empty()) {
|
||||
std::vector<std::string> params;
|
||||
if (!options_str.empty()) {
|
||||
try {
|
||||
params = Glib::shell_parse_argv(options_str);
|
||||
}
|
||||
catch(Glib::ShellError& e) {
|
||||
// Skip this entry if we can't parse params
|
||||
continue;
|
||||
}
|
||||
}
|
||||
add_device(dev, type_arg, params);
|
||||
}
|
||||
if (get_startup_settings().forget_manual_devices) {
|
||||
app_set_startup_manual_devices({}); // clear the list
|
||||
} else {
|
||||
add_startup_manual_devices();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,8 +491,16 @@ void GscMainWindow::on_action_activated(GscMainWindow::action_t action_type)
|
||||
case action_remove_device:
|
||||
if (iconview_) {
|
||||
StorageDevicePtr drive = iconview_->get_selected_drive();
|
||||
if (drive && drive->get_is_manually_added() && !drive->get_test_is_active())
|
||||
if (drive && drive->get_is_manually_added() && !drive->get_test_is_active()) {
|
||||
iconview_->remove_selected_drive();
|
||||
|
||||
auto devices = app_get_startup_manual_devices();
|
||||
std::erase_if(devices,
|
||||
[drive](const AppAddDeviceOption& dev) {
|
||||
return (dev.device == drive->get_device() && dev.type == drive->get_type_argument());
|
||||
});
|
||||
app_set_startup_manual_devices(devices);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -528,6 +523,7 @@ void GscMainWindow::on_action_activated(GscMainWindow::action_t action_type)
|
||||
|
||||
case action_rescan_devices:
|
||||
rescan_devices(false);
|
||||
add_startup_manual_devices();
|
||||
break;
|
||||
|
||||
case action_executor_log:
|
||||
@@ -914,6 +910,29 @@ void GscMainWindow::rescan_devices(bool startup)
|
||||
|
||||
|
||||
|
||||
void GscMainWindow::add_startup_manual_devices()
|
||||
{
|
||||
auto auto_add_devices = app_get_startup_manual_devices();
|
||||
for (const auto& dev : auto_add_devices) {
|
||||
if (!dev.device.empty()) {
|
||||
std::vector<std::string> params;
|
||||
if (!dev.options.empty()) {
|
||||
try {
|
||||
params = Glib::shell_parse_argv(dev.options);
|
||||
}
|
||||
catch(Glib::ShellError& e) {
|
||||
// Skip this entry if we can't parse params
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Ignore errors here so that the devices can be removed manually
|
||||
add_device_silent(dev.device, dev.type, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GscMainWindow::run_update_drivedb()
|
||||
{
|
||||
auto smartctl_binary = get_smartctl_binary();
|
||||
@@ -951,18 +970,34 @@ void GscMainWindow::run_update_drivedb()
|
||||
|
||||
|
||||
|
||||
bool GscMainWindow::add_device(const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args)
|
||||
bool GscMainWindow::add_device_interactive(const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args)
|
||||
{
|
||||
// win32 doesn't have device files, so skip the check in Windows.
|
||||
if constexpr(!BuildEnv::is_kernel_family_windows()) {
|
||||
std::error_code ec;
|
||||
if (!hz::fs::exists(hz::fs_path_from_string(file), ec)) {
|
||||
gui_show_error_dialog(_("Cannot add device"),
|
||||
(ec.message().empty() ? Glib::ustring::compose(_("Device \"%1\" doesn't exist."), file).raw() : ec.message()), this);
|
||||
(!ec ? Glib::ustring::compose(_("Device \"%1\" doesn't exist."), file).raw() : ec.message()), this);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return add_device(false, file, type_arg, extra_args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool GscMainWindow::add_device_silent(const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args)
|
||||
{
|
||||
// We want the manual add to always succeed even if there are errors,
|
||||
// so that it can be removed as well.
|
||||
return add_device(true, file, type_arg, extra_args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool GscMainWindow::add_device(bool silent, const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args)
|
||||
{
|
||||
auto drive = std::make_shared<StorageDevice>(file);
|
||||
drive->set_type_argument(type_arg);
|
||||
drive->set_extra_arguments(extra_args);
|
||||
@@ -973,9 +1008,10 @@ bool GscMainWindow::add_device(const std::string& file, const std::string& type_
|
||||
std::vector<StorageDevicePtr> tmp_drives;
|
||||
tmp_drives.push_back(drive);
|
||||
|
||||
// Don't report errors here, just add the drive to the list.
|
||||
StorageDetector sd;
|
||||
auto fetch_error = sd.fetch_basic_data(tmp_drives, ex_factory, true); // return its first error
|
||||
if (!fetch_error) {
|
||||
if (!silent && !fetch_error) {
|
||||
gsc_executor_error_dialog_show(_("An error occurred while adding the device"), fetch_error.error().message(), this);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -48,13 +48,28 @@ class GscMainWindow : public AppBuilderWidget<GscMainWindow, false> {
|
||||
void rescan_devices(bool startup);
|
||||
|
||||
|
||||
/// Add manually added devices to the icon view.
|
||||
void add_startup_manual_devices();
|
||||
|
||||
|
||||
/// Execute update-smart-drivedb
|
||||
void run_update_drivedb();
|
||||
|
||||
|
||||
/// Manually add device file to icon list
|
||||
bool add_device(const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args);
|
||||
/// Add device file to icon list, interactively showing errors if any.
|
||||
bool add_device_interactive(const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args);
|
||||
|
||||
/// Add device file to icon list silently, ignoring errors.
|
||||
bool add_device_silent(const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/// Add device file to icon list
|
||||
bool add_device(bool silent, const std::string& file, const std::string& type_arg, const std::vector<std::string>& extra_args);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
/// Read smartctl data from file, add it as a virtual drive to icon list
|
||||
bool add_virtual_drive(const std::string& file);
|
||||
|
||||
@@ -20,6 +20,7 @@ struct GscStartupSettings {
|
||||
bool no_scan = false; ///< No scanning on startup
|
||||
std::vector<std::string> load_virtuals; ///< Virtual files to load
|
||||
std::vector<std::string> add_devices; ///< Devices to add (with options)
|
||||
bool forget_manual_devices = false; ///< Forget all manually added devices
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1
|
||||
<!-- Generated with glade 3.40.0
|
||||
|
||||
Copyright (C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
|
||||
@@ -25,31 +25,28 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<!-- interface-name GSmartControl -->
|
||||
<!-- interface-copyright 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com> -->
|
||||
<object class="GtkWindow" id="gsc_add_device_window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="title" translatable="yes">Add Device - GSmartControl</property>
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="border-width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="top_info_link_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">The <a href="%1">smartctl man page</a> contains information on what you can enter here.</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -59,24 +56,25 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=3 n-rows=3 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="device_name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="invisible-char">●</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -88,9 +86,9 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkButton" id="device_name_browse_button">
|
||||
<property name="label" translatable="yes">Browse...</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -100,80 +98,89 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="device_type_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Device type:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Additional smartctl parameters</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Additional smartctl parameters</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Smartctl parameters:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="device_type_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="has_entry">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="has-entry">True</property>
|
||||
<child internal-child="entry">
|
||||
<object class="GtkEntry">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="smartctl_params_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Additional smartctl parameters</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Additional smartctl parameters</property>
|
||||
<property name="invisible-char">●</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="device_name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Device name:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -182,10 +189,26 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="auto_add_device_check">
|
||||
<property name="label" translatable="yes">Automatically add this device on startup</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
@@ -193,22 +216,6 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="auto_add_device_check">
|
||||
<property name="label" translatable="yes">Automatically add this device on startup</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">0</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -222,16 +229,16 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkButtonBox" id="hbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="layout-style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="window_cancel_button">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -243,11 +250,11 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkButton" id="window_ok_button">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="can-default">True</property>
|
||||
<property name="has-default">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -259,7 +266,7 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="pack-type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1
|
||||
<!-- Generated with glade 3.40.0
|
||||
|
||||
Copyright (C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
|
||||
|
||||
@@ -25,65 +25,62 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<!-- interface-name GSmartControl -->
|
||||
<!-- interface-copyright 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com> -->
|
||||
<object class="GtkWindow" id="gsc_preferences_window">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="border-width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="has-focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="border-width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label-xalign">0</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="left-padding">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="scan_on_startup_check">
|
||||
<property name="label" translatable="yes">Scan system for drives on startup</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -95,11 +92,11 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkCheckButton" id="show_smart_capable_only_check">
|
||||
<property name="label" translatable="yes">Show SMART-capable drives only</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -111,11 +108,11 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkCheckButton" id="show_device_name_under_icon_check">
|
||||
<property name="label" translatable="yes">Show device name under drive icon</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -127,11 +124,11 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkCheckButton" id="show_serial_number_under_icon_check">
|
||||
<property name="label" translatable="yes">Show serial number under drive icon</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -154,9 +151,9 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Program Settings</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -170,35 +167,35 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label-xalign">0</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="left-padding">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox12">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">7</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="search_in_smartmontools_first_check">
|
||||
<property name="label" translatable="yes">Look for smartctl in smartmontools installation directory first</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">If smartmontools is installed, use its smartctl by default</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="tooltip-text" translatable="yes">If smartmontools is installed, use its smartctl by default</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -207,23 +204,24 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=3 n-rows=3 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="smartctl_binary_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -235,9 +233,9 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkButton" id="smartctl_binary_browse_button">
|
||||
<property name="label" translatable="yes">Browse...</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -247,51 +245,66 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="smartctl_options_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped.</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped.</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped.</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Global parameters for smartctl. These parameters will be used every time the program invokes smartctl. Must be shell-escaped.</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Smartctl parameters:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="smartctl_binary_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Smartctl binary:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -314,9 +327,9 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Smartctl Invocation</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="use-markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -332,53 +345,53 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">3</property>
|
||||
<property name="margin_bottom">3</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-top">3</property>
|
||||
<property name="margin-bottom">3</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">_General</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
<property name="tab-fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="border-width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label-xalign">0</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="left-padding">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox9">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.{1}$". Simply listing them as "sda;sdb" will also work.</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.{1}$". Simply listing them as "sda;sdb" will also work.</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Device blacklist patterns:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -389,11 +402,11 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkEntry" id="device_blacklist_patterns_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.$". Simply listing them as "sda;sdb" or "sd[ab]" will also work.</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Semicolon-separated blacklist regular expression patterns for device search. For example, to blacklist all "/dev/sd*" devices, use "sd.$". Simply listing them as "sda;sdb" or "sd[ab]" will also work.</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -416,7 +429,7 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label10">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Drive Search</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
@@ -434,28 +447,28 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label-xalign">0</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="left-padding">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="top-padding">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Adding a drive here will make it use the specified parameters.</property>
|
||||
</object>
|
||||
@@ -471,25 +484,25 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox10">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="device_options_treeview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Device list</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Device list</property>
|
||||
<property name="headers-clickable">False</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection"/>
|
||||
</child>
|
||||
@@ -505,17 +518,17 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="device_options_remove_device_button">
|
||||
<property name="label">gtk-remove</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Remove selected entry from device list</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Remove selected entry from device list</property>
|
||||
<property name="use-stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -527,10 +540,10 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkButton" id="device_options_add_device_button">
|
||||
<property name="label">gtk-add</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Add a new entry to device list</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Add a new entry to device list</property>
|
||||
<property name="use-stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -555,97 +568,98 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox11">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<!-- n-columns=3 n-rows=4 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label67">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus")</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus")</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Parameters:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="label" translatable="yes">Add parameters:</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="device_options_type_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2".</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2".</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Type:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="label" translatable="yes">Match type:</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="device_options_device_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Device:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="label" translatable="yes">Match device:</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="device_options_parameter_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus")</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Smartctl parameters to add (for example, "-T permissive" or "-d usbsunplus")</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="device_options_type_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2".</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Match only this type of device (as used by the -d smartctl parameter). Leave empty for all types. This can be used to match a drive behind a RAID device, e.g. "areca,2".</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="device_options_device_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="primary-icon-activatable">False</property>
|
||||
<property name="secondary-icon-activatable">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label9">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Drive Properties:</property>
|
||||
<attributes>
|
||||
@@ -653,11 +667,23 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -687,8 +713,8 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label11">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Per-drive Smartctl Parameters</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Per-Drive Smartctl Parameters</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
@@ -710,17 +736,17 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-left">6</property>
|
||||
<property name="margin-right">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">_Drives</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="width_chars">10</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="width-chars">10</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_fill">False</property>
|
||||
<property name="tab-fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@@ -740,17 +766,17 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="window_reset_all_button">
|
||||
<property name="label" translatable="yes">_Reset all</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Reset all program settings to their defaults</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset all program settings to their defaults</property>
|
||||
<property name="use-underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -761,7 +787,7 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -773,9 +799,9 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkButton" id="window_cancel_button">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
@@ -787,12 +813,12 @@ along with GSmartControl. If not, see <http://www.gnu.org/licenses/>.
|
||||
<object class="GtkButton" id="window_ok_button">
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="is_focus">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="is-focus">True</property>
|
||||
<property name="can-default">True</property>
|
||||
<property name="has-default">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
||||
Reference in New Issue
Block a user