The "View Output" window always saved the raw output (JSON), even with a
.txt file name, and offered no format choice. The device information
window saved text into a .json file when the "Text Files" type was
selected, since the suggested file name has a .json extension.
- Add smartctl_output_export (applib): extracts the available formats
(JSON, and the text output embedded with --json=o) from smartctl output,
and decides the format and file extension from the selected file type or
the typed extension.
- Add a shared Save As dialog used by both windows, offering only the
available formats and confirming overwrites of extension-adjusted names.
- "View Output" window: add a JSON / Text selector, so the displayed (and
copyable) text can be switched; Save As suggests the displayed format.
Fixes#85
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Move the adaptive estimation into SelfTestEtaEstimator, which tracks
observed seconds per percent instead of per-change "segment" durations.
This fixes NVMe estimates (1% steps were counted as 10% segments, giving
~10x too short ETAs), and progress spanning several steps between two
polls (e.g. 80% -> 60%) being counted as a single segment.
- Reset the estimator state in start().
- Return unknown ETA when the test is not running.
- Add unit tests for the estimator (the existing tests did not cover it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Treat scales below 100% as non-fractional, avoiding a division by zero
in the correction ratio and a bogus font size increase.
- Add app_get_fractional_scaling_part_percent() and use it in gsc_init.
- Move scaling tests to applib_tests and test the actual helper functions
instead of duplicated inline math; remove the gui_tests target.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GTK3 only supports integer scaling, so at e.g. 125% or 250% system scaling
the UI is rendered at 1x / 2x. Store the full system scale percentage and
scale the default (glade) window sizes by the remaining fractional ratio,
and increase the font size by the fractional amount.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parsing of the smartctl output was broken here, tests would initiate but the GUI would report them as failing. Re-running the test would detect the in-progress SMART scan and function as expected on the second try. Fixed by modifying this regex on the stable smartmontools 7.5.
- Guard theme detection with Gtk::Main::level() check to avoid crashes in non-GUI executables
- Use narrow headers (gtkmm/settings.h, gtkmm/main.h) instead of umbrella gtkmm.h
- Return early from app_property_get_label_highlight_color() for WarningLevel::None
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Added descriptions and warnings to NVMe Attributes.
Storage Property: Rely less on reported name (not as useful with JSON parser), more on generic name.
As documented in https://github.com/nlohmann/json, the canonical
include path for json.hpp is nlohmann/json.hpp. Tihs updated the
vendored dependency to match, so that gsmartcontrol can more easily be
built using a system-installed copy of nlohmann json as well as the
vendored copy.
Signed-off-by: Stephen Kitt <steve@sk2.org>