From 126d6da2e13eee4bdba539d4f44d0819733b1cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Frohm=C3=BCller?= Date: Mon, 4 Sep 2023 10:43:35 +0200 Subject: [PATCH] Fix SMART warning and error icons being mixed up. --- src/opensuperclone/clone_gui.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/opensuperclone/clone_gui.c b/src/opensuperclone/clone_gui.c index d5fbdc3..b93d538 100644 --- a/src/opensuperclone/clone_gui.c +++ b/src/opensuperclone/clone_gui.c @@ -2729,17 +2729,20 @@ void display_smart_data_ccc(void) GdkPixbuf *pixbuf = NULL; + // show an info icon if the raw value is 0 pixbuf = gdk_pixbuf_new_from_file_at_size(smart_info_icon_path, 16, 16, NULL); if (smart_data_ccc[i].raw != 0) { + // show an error icon if there are reallocated sectors (005) or pending sectors (197) if (smart_data_ccc[i].id == 5 || smart_data_ccc[i].id == 197) { - pixbuf = gdk_pixbuf_new_from_file_at_size(smart_warning_icon_path, 16, 16, NULL); + pixbuf = gdk_pixbuf_new_from_file_at_size(smart_error_icon_path, 16, 16, NULL); } + // show a warning icon if there are reported uncorrectable errors (187), command timeouts (188), UDMA CRC errors (199), or offline uncorrectable errors (198) else if (smart_data_ccc[i].id == 187 || smart_data_ccc[i].id == 188 || smart_data_ccc[i].id == 198 || smart_data_ccc[i].id == 199) { - pixbuf = gdk_pixbuf_new_from_file_at_size(smart_error_icon_path, 16, 16, NULL); + pixbuf = gdk_pixbuf_new_from_file_at_size(smart_warning_icon_path, 16, 16, NULL); } }