[gcr/gnome-3-8] icons: Add appropriate icon for p11-kit trust module



commit 470025f69d1af69abb245e667c0a115474824c6a
Author: Stef Walter <stefw gnome org>
Date:   Fri Apr 19 21:20:57 2013 +0200

    icons: Add appropriate icon for p11-kit trust module

 gcr/gcr-icons.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/gcr/gcr-icons.c b/gcr/gcr-icons.c
index 2a9da4e..5fe787c 100644
--- a/gcr/gcr-icons.c
+++ b/gcr/gcr-icons.c
@@ -25,6 +25,9 @@
 
 #include "gcr-icons.h"
 
+#define ICON_SYSTEM         "applications-system"
+#define ICON_FOLDER         "folder"
+
 /**
  * gcr_icon_for_token:
  * @token_info: the token info
@@ -40,15 +43,24 @@ gcr_icon_for_token (GckTokenInfo *token_info)
 
        g_return_val_if_fail (token_info != NULL, NULL);
 
-       if (g_strcmp0 (token_info->manufacturer_id, "Gnome Keyring") == 0)
+       if (g_strcmp0 (token_info->manufacturer_id, "Gnome Keyring") == 0) {
                icon = g_themed_icon_new (GCR_ICON_HOME_DIRECTORY);
 
-       else if (g_strcmp0 (token_info->manufacturer_id, "Mozilla Foundation") == 0 &&
-                g_strcmp0 (token_info->model, "NSS 3") == 0)
+       } else if (g_strcmp0 (token_info->model, "p11-kit-trust") == 0) {
+               if (g_strcmp0 (token_info->label, "Default Trust") == 0 ||
+                   g_strcmp0 (token_info->label, "System Trust") == 0) {
+                       icon = g_themed_icon_new (ICON_SYSTEM);
+               } else {
+                       icon = g_themed_icon_new (ICON_FOLDER);
+               }
+
+       } else if (g_strcmp0 (token_info->manufacturer_id, "Mozilla Foundation") == 0 &&
+                  g_strcmp0 (token_info->model, "NSS 3") == 0) {
                icon = g_themed_icon_new (GCR_ICON_HOME_DIRECTORY);
 
-       else
+       } else {
                icon = g_themed_icon_new (GCR_ICON_SMART_CARD);
+       }
 
        return icon;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]