[gnome-control-center/wip/new-design: 5/7] secure boot dialog- changing success icon
- From: Kate Hsuan <khsuan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/new-design: 5/7] secure boot dialog- changing success icon
- Date: Mon, 1 Aug 2022 08:52:50 +0000 (UTC)
commit b5b6543a4c8fa473201924029e3e14fee0359f69
Author: Kate Hsuan <hpa redhat com>
Date: Mon Aug 1 15:50:45 2022 +0800
secure boot dialog- changing success icon
.../cc-firmware-security-boot-dialog.c | 1 +
.../cc-firmware-security-dialog.c | 24 +---------------------
.../firmware-security/cc-firmware-security-utils.c | 14 ++++++-------
3 files changed, 9 insertions(+), 30 deletions(-)
---
diff --git a/panels/firmware-security/cc-firmware-security-boot-dialog.c
b/panels/firmware-security/cc-firmware-security-boot-dialog.c
index 0752026a4..bf8a0e755 100644
--- a/panels/firmware-security/cc-firmware-security-boot-dialog.c
+++ b/panels/firmware-security/cc-firmware-security-boot-dialog.c
@@ -70,6 +70,7 @@ cc_firmware_security_boot_dialog_new (SecureBootState secure_boot_state)
case SECURE_BOOT_STATE_ACTIVE:
/* TRANSLATORS: secure boot refers to the system firmware security mode */
gtk_label_set_text (GTK_LABEL(dialog->secure_boot_title), _("Secure Boot is Active"));
+ gtk_image_set_from_icon_name (GTK_IMAGE (dialog->secure_boot_icon), "channel-secure-symbolic");
gtk_widget_add_css_class (dialog->secure_boot_icon, "good");
status_description = g_strdup_printf ("%s",
/* TRANSLATORS: this is the first section of the decription */
diff --git a/panels/firmware-security/cc-firmware-security-dialog.c
b/panels/firmware-security/cc-firmware-security-dialog.c
index 2e923a8af..6893f6e1f 100644
--- a/panels/firmware-security/cc-firmware-security-dialog.c
+++ b/panels/firmware-security/cc-firmware-security-dialog.c
@@ -259,24 +259,16 @@ hsi_create_pg_row (const gchar *icon_name,
FwupdSecurityAttr *attr)
{
GtkWidget *row;
- GtkWidget *subrow;
GtkWidget *status_icon;
GtkWidget *status_label;
- GtkWidget *title;
- GtkWidget *box;
-
printf("result->%d %s\n", attr->result, fwupd_security_attr_result_to_string(attr->result));
row = adw_expander_row_new ();
- box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
- //adw_expander_row_set_icon_name (ADW_EXPANDER_ROW (row), icon_name);
adw_preferences_row_set_title (ADW_PREFERENCES_ROW (row), attr->title);
- //adw_preferences_row_set_title (ADW_PREFERENCES_ROW (row), "Test");
- title = gtk_label_new (attr->title);
status_label = gtk_label_new (fwupd_security_attr_result_to_string(attr->result));
- if (fwupd_get_result_status (attr->result))
+ if (firmware_security_attr_has_flag (attr, FWUPD_SECURITY_ATTR_FLAG_SUCCESS))
{
status_icon = gtk_image_new_from_icon_name ("emblem-ok");
}
@@ -285,25 +277,11 @@ hsi_create_pg_row (const gchar *icon_name,
status_icon = gtk_image_new_from_icon_name ("process-stop");
}
- //gtk_box_append (GTK_BOX (box), status_icon);
- //gtk_box_append (GTK_BOX (box), status_label);
-
- //adw_expander_row_add_prefix (ADW_EXPANDER_ROW (row), title);
- //adw_expander_row_add_prefix (ADW_EXPANDER_ROW (row), box);
adw_expander_row_add_action (ADW_EXPANDER_ROW (row), status_label);
adw_expander_row_add_action (ADW_EXPANDER_ROW (row), status_icon);
-
-
-
- //gtk_widget_set_halign (status_label, GTK_ALIGN_END);
- //gtk_widget_set_hexpand (status_label, true);
-
- //gtk_widget_set_halign (status_icon, GTK_ALIGN_END);
- //gtk_widget_set_hexpand (status_icon, true);
gtk_widget_add_css_class (status_icon, "icon");
gtk_widget_add_css_class (status_label, "hsi_label");
- //gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), status_icon);
if (attr->description != NULL)
{
diff --git a/panels/firmware-security/cc-firmware-security-utils.c
b/panels/firmware-security/cc-firmware-security-utils.c
index a17acddfd..decd7e4c3 100644
--- a/panels/firmware-security/cc-firmware-security-utils.c
+++ b/panels/firmware-security/cc-firmware-security-utils.c
@@ -234,31 +234,31 @@ fwupd_security_attr_result_to_string(FwupdSecurityAttrResult result)
if (result == FWUPD_SECURITY_ATTR_RESULT_VALID)
return _("Valid");
if (result == FWUPD_SECURITY_ATTR_RESULT_NOT_VALID)
- return _("Not valid");
+ return _("Not Valid");
if (result == FWUPD_SECURITY_ATTR_RESULT_ENABLED)
return _("Enabled");
if (result == FWUPD_SECURITY_ATTR_RESULT_NOT_ENABLED)
- return _("Not enabled");
+ return _("Not Enabled");
if (result == FWUPD_SECURITY_ATTR_RESULT_LOCKED)
return _("Locked");
if (result == FWUPD_SECURITY_ATTR_RESULT_NOT_LOCKED)
- return _("Not locked");
+ return _("Not Locked");
if (result == FWUPD_SECURITY_ATTR_RESULT_ENCRYPTED)
return _("Encrypted");
if (result == FWUPD_SECURITY_ATTR_RESULT_NOT_ENCRYPTED)
- return _("Not encrypted");
+ return _("Not Encrypted");
if (result == FWUPD_SECURITY_ATTR_RESULT_TAINTED)
return _("Tainted");
if (result == FWUPD_SECURITY_ATTR_RESULT_NOT_TAINTED)
- return _("Not tainted");
+ return _("Not Tainted");
if (result == FWUPD_SECURITY_ATTR_RESULT_FOUND)
return _("Found");
if (result == FWUPD_SECURITY_ATTR_RESULT_NOT_FOUND)
- return _("Not found");
+ return _("Not Found");
if (result == FWUPD_SECURITY_ATTR_RESULT_SUPPORTED)
return _("Supported");
if (result == FWUPD_SECURITY_ATTR_RESULT_NOT_SUPPORTED)
- return _("Not supported");
+ return _("Not Supported");
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]