/* do nothing */
}
+ if (KHM_FAILED(khc_read_int32(hc_cw, L"ViewAllIdents", &tbl->view_all_idents)))
+ tbl->view_all_idents = 0;
+
+ khui_check_action(KHUI_ACTION_VIEW_ALL_IDS, tbl->view_all_idents);
+
kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);
if(KHM_FAILED(khc_open_space(hc_vs, view, 0, &hc_v)))
wchar_t ** idarray = NULL;
int i;
+ khm_int32 and_flags = 0;
+ khm_int32 eq_flags = 0;
+
/* see if the default identity is in the list */
{
khm_handle id_def = NULL;
;
}
- if (kcdb_identity_enum(KCDB_IDENT_FLAG_STICKY,
- KCDB_IDENT_FLAG_STICKY,
+ if (tbl->view_all_idents) {
+ and_flags = 0;
+ eq_flags = 0;
+ } else {
+ and_flags = KCDB_IDENT_FLAG_STICKY;
+ eq_flags = KCDB_IDENT_FLAG_STICKY;
+ }
+
+ if (kcdb_identity_enum(and_flags,
+ eq_flags,
NULL,
&cb_names,
&n_idents) != KHM_ERROR_TOO_LONG ||
assert(idarray);
#endif
- if (KHM_FAILED(kcdb_identity_enum(KCDB_IDENT_FLAG_STICKY,
- KCDB_IDENT_FLAG_STICKY,
+ if (KHM_FAILED(kcdb_identity_enum(and_flags,
+ eq_flags,
idnames,
&cb_names,
&n_idents)))
for (i=0; i < (int) n_idents; i++) {
khm_handle h;
+ khm_int32 f_sticky;
+ khm_int32 flags;
if (KHM_FAILED(kcdb_identity_create(idarray[i],
KCDB_IDENT_FLAG_CREATE, &h)))
continue;
+ kcdb_identity_get_flags(h, &flags);
+
+ if (flags & KCDB_IDENT_FLAG_STICKY)
+ f_sticky = KHUI_CW_O_STICKY;
+ else
+ f_sticky = 0;
+
for (o = tbl->outline; o; o = LNEXT(o)) {
if (!wcscmp(idarray[i], o->header))
break;
if (o->start != -1) /* already visible? */
continue;
o->flags &= (KHUI_CW_O_RELIDENT | KHUI_CW_O_SELECTED);
- o->flags |= KHUI_CW_O_STICKY | KHUI_CW_O_VISIBLE | KHUI_CW_O_EMPTY;
+ o->flags |= f_sticky | KHUI_CW_O_VISIBLE | KHUI_CW_O_EMPTY;
if (!kcdb_identity_is_equal(o->data, h)) {
if (o->flags & KHUI_CW_O_RELIDENT)
/* not found. create */
o = cw_new_outline_node(idarray[i]);
LPUSH(&tbl->outline, o);
- o->flags = KHUI_CW_O_STICKY | KHUI_CW_O_VISIBLE | KHUI_CW_O_EMPTY | KHUI_CW_O_RELIDENT;
+ o->flags = f_sticky | KHUI_CW_O_VISIBLE | KHUI_CW_O_EMPTY | KHUI_CW_O_RELIDENT;
o->level = 0;
o->col = grouping[0];
o->data = h;
tbl->mouse_state = CW_MOUSE_WIDGET | CW_MOUSE_WSTICKY;
+ khm_refresh_identity_menus();
+
return 0;
} else if ((nm_state & CW_MOUSE_WICON) &&
(tbl->mouse_state & CW_MOUSE_WICON)) {
kcdb_identity_set_flags(s->identity, flags,
KCDB_IDENT_FLAG_STICKY |
KCDB_IDENT_FLAG_DEFAULT);
+ khm_refresh_identity_menus();
return TRUE;
case PSN_RESET:
}
break;
+ case KHUI_ACTION_VIEW_ALL_IDS:
+ {
+ khm_handle hc_cw = NULL;
+
+ tbl->view_all_idents = !tbl->view_all_idents;
+
+ cw_update_outline(tbl);
+ cw_update_extents(tbl, TRUE);
+ cw_update_selection_state(tbl);
+
+ InvalidateRect(tbl->hwnd, NULL, TRUE);
+
+ if(KHM_SUCCEEDED(khc_open_space(NULL, L"CredWindow", KHM_PERM_READ | KHM_PERM_WRITE,
+ &hc_cw))) {
+ khc_write_int32(hc_cw, L"ViewAllIdents", tbl->view_all_idents);
+ khc_close_space(hc_cw);
+ }
+
+ khui_check_action(KHUI_ACTION_VIEW_ALL_IDS, tbl->view_all_idents);
+
+ khm_refresh_identity_menus();
+ }
+ break;
+
case KHUI_PACTION_UP:
case KHUI_PACTION_UP_EXTEND:
case KHUI_PACTION_UP_TOGGLE:
khm_size n_idents;
khm_size nc_idents;
+ khm_int32 view_all_idents;
+
} khui_credwnd_tbl;
#define KHUI_MAXCB_HEADING 256
IDS_CW_EXPIRED "(Expired)"
END
+STRINGTABLE
+BEGIN
+ IDS_ACTION_VIEW_ALL_IDS "All identities"
+END
+
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
+
return 0;
/* layout control */
+
+ case KHUI_ACTION_VIEW_ALL_IDS:
+ return SendMessage(khm_hwnd_main_cred, uMsg,
+ wParam, lParam);
+
case KHUI_ACTION_LAYOUT_MINI:
if (khm_main_wnd_mode == KHM_MAIN_WND_MINI) {
#define IDS_CW_TYPEF 316
#define IDS_CW_EXPIREF 317
#define IDS_CW_EXPIRED 318
+#define IDS_ACTION_VIEW_ALL_IDS 321
#define IDC_NC_CREDTEXT_LABEL 1009
#define IDC_NC_CREDTEXT 1012
#define IDC_NC_HELP 1017
NotificationAction,KC_INT32,50025,Action to perform when the user clicks on the notification icon.
DefaultWindowMode,KC_INT32,1,(0-normal; 1-mini)
DefaultTheme,KC_STRING,Default,Default theme. The name should correspond to a subspace in Themes
+ ViewAllIdents,KC_INT32,0,"Boolean. Try to display all known identities if non-zero."
Windows,KC_SPACE,0,Window parameters
_Schema,KC_SPACE,0,Schema
Width,KC_INT32,0,
khui_action_ref khui_menu_view[] = {
MENU_ACTION(KHUI_ACTION_LAYOUT_MINI),
- MENU_SUBMENU(KHUI_MENU_COLUMNS),
MENU_SUBMENU(KHUI_MENU_LAYOUT),
+ MENU_ACTION(KHUI_ACTION_VIEW_ALL_IDS),
+ MENU_SUBMENU(KHUI_MENU_COLUMNS),
#if 0
/* not implemented yet */
MENU_SUBMENU(KHUI_MENU_TOOLBARS),
KHUI_ACTION_LAYOUT_CUST,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_LAYOUT_CUST,0,0,0
KHUI_ACTION_LAYOUT_MINI,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_LAYOUT_MINI,0,0,0
KHUI_ACTION_TB_STANDARD,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_TB_STANDARD,0,0,KHUI_ACTIONSTATE_CHECKED|KHUI_ACTIONSTATE_DISABLED
+KHUI_ACTION_VIEW_ALL_IDS,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_VIEW_ALL_IDS,0,0,0
KHUI_ACTION_DEBUG_WINDOW,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_DEBUG_WINDOW,0,IDH_ACTION_DEBUG_WINDOW,KHUI_ACTIONSTATE_DISABLED
KHUI_ACTION_VIEW_REFRESH,KHUI_ACTIONTYPE_TRIGGER,,IDB_VW_REFRESH,0,0,IDB_VW_REFRESH_SM,0,IDS_ACTION_VIEW_REFRESH,IDS_ACTIONT_VIEW_REFRESH,IDH_ACTION_VIEW_REFRESH,0
KHUI_ACTION_OPT_IDENTS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_IDENTS,IDS_ACTIONT_OPT_IDENTS,IDH_ACTION_OPT_INIT,0
#define KHUI_ACTION_DESTROY_ALL (KHUI_ACTION_BASE + 34)
#define KHUI_ACTION_UICB (KHUI_ACTION_BASE + 35)
#define KHUI_ACTION_LAYOUT_MINI (KHUI_ACTION_BASE + 36)
+#define KHUI_ACTION_VIEW_ALL_IDS (KHUI_ACTION_BASE + 37)
/*@}*/
/*! \name Pseudo actions