4
* Copyright (C) 2011 Collabora Ltd
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as
8
* published by the Free Software Foundation; either version 2.1 of
9
* the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21
* Author: Stef Walter <stefw@collabora.co.uk>
26
#include "gcr-icons.h"
30
* @token_info: the token info
32
* Get an appropriate icon for the token
34
* Returns: (transfer full): the icon
37
gcr_icon_for_token (GckTokenInfo *token_info)
41
g_return_val_if_fail (token_info != NULL, NULL);
43
if (g_strcmp0 (token_info->manufacturer_id, "Gnome Keyring") == 0)
44
icon = g_themed_icon_new (GCR_ICON_HOME_DIRECTORY);
46
else if (g_strcmp0 (token_info->manufacturer_id, "Mozilla Foundation") == 0 &&
47
g_strcmp0 (token_info->model, "NSS 3") == 0)
48
icon = g_themed_icon_new (GCR_ICON_HOME_DIRECTORY);
51
icon = g_themed_icon_new (GCR_ICON_SMART_CARD);