summaryrefslogtreecommitdiffstats
path: root/src/windows
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2007-10-01 05:27:29 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2007-10-01 05:27:29 +0000
commit9234b5edeab0d0ef2c3aec2998b1013c1e7fef48 (patch)
tree535ef5ca5b9b8c0d9b24cfc20d300c7c6038a8df /src/windows
parent6fb143c5cb273f1207e6f0140d72460a1aa7a852 (diff)
downloadkrb5-9234b5edeab0d0ef2c3aec2998b1013c1e7fef48.tar.gz
krb5-9234b5edeab0d0ef2c3aec2998b1013c1e7fef48.tar.xz
krb5-9234b5edeab0d0ef2c3aec2998b1013c1e7fef48.zip
NIM: BUG: APP: notification icon state
Currently, the notification icon that is created by Network Identity Manager indicates the status of all the known credentials. If any credential belonging to any identity is expired or in a critical state, the icon will change color to indicate this. This patch changes the behavior to only indicate the status of credentials belonging to the default identity. The expiration state of credentials that do not belong to the default identity no longer affect the appearance of the notification icon. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20031 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/identity/ui/credwnd.c41
1 files changed, 28 insertions, 13 deletions
diff --git a/src/windows/identity/ui/credwnd.c b/src/windows/identity/ui/credwnd.c
index e58786363..913503f04 100644
--- a/src/windows/identity/ui/credwnd.c
+++ b/src/windows/identity/ui/credwnd.c
@@ -1445,7 +1445,6 @@ cw_update_outline(khui_credwnd_tbl * tbl)
khm_size cbbuf;
khm_int32 flags;
int selected;
- khm_int32 expstate = 0;
/* this is called after calling cw_update_creds, so we assume
that the credentials are all loaded and sorted according to
@@ -1715,7 +1714,6 @@ cw_update_outline(khui_credwnd_tbl * tbl)
if (flags) {
ol->flags |= flags;
ol->flags |= KHUI_CW_O_SHOWFLAG;
- expstate |= flags;
} else if (grouping[j] == tbl->n_cols - 1) {
/* if we aren't showing any creds under this
outline level, we should also show any
@@ -1994,17 +1992,34 @@ cw_update_outline(khui_credwnd_tbl * tbl)
tbl->cursor_row = 0;
_exit:
- /* note that the expstate is derived from whether or not
- * we have expiration states set for any active identities */
- if (n_creds == 0)
- khm_notify_icon_expstate(KHM_NOTIF_EMPTY);
- else if ((expstate & CW_EXPSTATE_EXPIRED) == CW_EXPSTATE_EXPIRED)
- khm_notify_icon_expstate(KHM_NOTIF_EXP);
- else if ((expstate & CW_EXPSTATE_WARN) == CW_EXPSTATE_WARN ||
- (expstate & CW_EXPSTATE_CRITICAL) == CW_EXPSTATE_CRITICAL)
- khm_notify_icon_expstate(KHM_NOTIF_WARN);
- else
- khm_notify_icon_expstate(KHM_NOTIF_OK);
+
+ {
+ khm_handle def_ident = NULL;
+ khm_int32 def_expstate = 0;
+ khm_boolean def_empty = TRUE;
+
+ kcdb_identity_get_default(&def_ident);
+ if (def_ident) {
+ khui_credwnd_ident * cwi;
+
+ cwi = cw_find_ident(tbl, def_ident);
+ if (cwi) {
+ def_empty = (cwi->id_credcount == 0);
+ }
+
+ def_expstate = cw_get_buf_exp_flags(tbl, def_ident);
+ }
+
+ if (def_empty)
+ khm_notify_icon_expstate(KHM_NOTIF_EMPTY);
+ else if ((def_expstate & CW_EXPSTATE_EXPIRED) == CW_EXPSTATE_EXPIRED)
+ khm_notify_icon_expstate(KHM_NOTIF_EXP);
+ else if ((def_expstate & CW_EXPSTATE_WARN) == CW_EXPSTATE_WARN ||
+ (def_expstate & CW_EXPSTATE_CRITICAL) == CW_EXPSTATE_CRITICAL)
+ khm_notify_icon_expstate(KHM_NOTIF_WARN);
+ else
+ khm_notify_icon_expstate(KHM_NOTIF_OK);
+ }
}
void