Skip Menu |
 

Subject: NIM GUI picture does not track tray icon
NIM from either MIT KfW Beta 2 or from secure-
endpoints.com/binaries/mit-kfw-3-2-0/kfw-3-2-0.msi.

Vista or XP.


Both NIM views contain a large version of the tray icon in the lower
right corner of the display.

This image confuses the user because it does not track the tray icon.
It should be removed.
[kpkoch - Mon Jul 30 10:42:15 2007]:
Patch:

Index: credwnd.c
===================================================================
--- credwnd.c (revision 19739)
+++ credwnd.c (working copy)
@@ -2271,7 +2271,7 @@
rlogo.right = r_wnd->right;
rlogo.top = r_wnd->bottom - tbl->kbm_logo_shade.cy;
rlogo.bottom = r_wnd->bottom;
- rie = IntersectRect(&ri, r_erase, &rlogo);
+ rie = FALSE; /* Do not show watermark. */
} else {
ZeroMemory(&rlogo, sizeof(rlogo));
ZeroMemory(&ri, sizeof(ri));
Fixed by telling the code that the watermark (large NIM icon) is never
on the display.
From: kpkoch@mit.edu
Subject: SVN Commit
[Usability] Tell the code that the watermark (large NIM icon in lower right corner) is never on the display.
Commit By: kpkoch



Revision: 19744
Changed Files:
U branches/krb5-1-6/src/windows/identity/ui/credwnd.c
I object to this patch. Watermarks are becoming a standard UI component
of applications. The watermark is shadowed and is not a indication of
credential status.

If MIT wishes to disable the watermark display, it should make the
display conditional upon a registry setting. Use khc_read_int32() to
read a DWORD value from the registry.

I would suggest using the value "HideWatermarks" DWORD in the key
"CredWindow". MIT should set this value to non-zero to trigger the
hiding of the watermarks.

Be sure to update the appropriate schema (.csv file) when you add
registry parameters.

Jeffrey Altman
New patch:

Index: credwnd.c
===================================================================
--- credwnd.c (revision 19739)
+++ credwnd.c (working copy)
@@ -2248,6 +2248,11 @@
RECT t;
BOOL rie;
HBRUSH hbr;
+ khm_handle hc_cw = NULL;
+ khm_int32 bHideWatermarks = 0;
+
+ khc_open_space(NULL, L"CredWindow", KHM_PERM_READ, &hc_cw);
+ if (hc_cw) {khc_read_int32(hc_cw, L"HideWatermarks",
&bHideWatermarks);}

switch(type) {
case CW_ER_BLANK:
@@ -2271,7 +2276,8 @@
rlogo.right = r_wnd->right;
rlogo.top = r_wnd->bottom - tbl->kbm_logo_shade.cy;
rlogo.bottom = r_wnd->bottom;
- rie = IntersectRect(&ri, r_erase, &rlogo);
+ if (bHideWatermarks) {rie = FALSE;}
+ else {rie = IntersectRect(&ri, r_erase,
&rlogo);}
} else {
ZeroMemory(&rlogo, sizeof(rlogo));
ZeroMemory(&ri, sizeof(ri));
Can you clarify what you mean by adding to a csv file?

There is, for example, an entry in the registry for CredWindow called
FontBase. But

/c/KfW/pismere/athena/auth/krb5/src/windows/identity
$ find . -name '*.csv' -exec grep -i fontbase {} /dev/null \;

/c/KfW/pismere/athena/auth/krb5/src/windows/identity
$

So where is something having to do with HideWatermarks to go?

Thanks.
Show quoted text
> Index: credwnd.c
> ===================================================================
> --- credwnd.c (revision 19739)
> +++ credwnd.c (working copy)
> @@ -2248,6 +2248,11 @@
> RECT t;
> BOOL rie;
> HBRUSH hbr;
> + khm_handle hc_cw = NULL;
> + khm_int32 bHideWatermarks = 0;
> +
> + khc_open_space(NULL, L"CredWindow", KHM_PERM_READ, &hc_cw);
> + if (hc_cw) {khc_read_int32(hc_cw, L"HideWatermarks",
> &bHideWatermarks);}
>
> switch(type) {
> case CW_ER_BLANK:


A couple of comments:

1. You should call khc_close_space() to release the configuration space
handle you obtain using khc_open_space().

(see:
http://www.secure-endpoints.com/netidmgr/developer/group__kconf.html#g62d589d0a29fd534d9dfc1b7305f5efb
)

2. cw_erase_rect() is not the best place to check for this registry
setting. This function is called many times during a screen refresh to
erase portions of the credentials display area. It would be better if
this registry setting is read somewhere else (eg: in cw_load_view())
instead.
[kpkoch - Thu Aug 2 11:51:42 2007]:

Show quoted text
> Can you clarify what you mean by adding to a csv file?

There are several .csv files in the source that document the
configuration schema used by different modules of Network Identity
Manager. These .csv files are then used to generate schema definitions
during build time that are then used by the configuration provider.

Configuration settings for the credentials window and the UI go in
src/windows/identity/ui/uiconfig.csv . The format should be fairly
straightforward. When you are adding registry settings, you should add
an entry to the corresponding .csv file so that the schema is consistent.


- Asanka Herath
Secure Endpoints Inc.
Download (untitled) / with headers
text/plain 1.5KiB
New patches:

Index: credwnd.c
===================================================================
--- credwnd.c (revision 19739)
+++ credwnd.c (working copy)
@@ -33,6 +33,8 @@

khm_int32 attr_to_action[KCDB_ATTR_MAX_ID + 1];

+khm_int32 bHideWatermarks = 0;
+
void
khm_set_cw_element_font(wchar_t * name, LOGFONT * pfont) {
khm_handle csp_cw = NULL;
@@ -462,6 +464,8 @@
&hc_cw)))
return;

+ khc_read_int32(hc_cw, L"HideWatermarks", &bHideWatermarks);
+
if(KHM_FAILED(khc_open_space(hc_cw, L"Views", KHM_PERM_READ,
&hc_vs)))
goto _exit;

@@ -2271,7 +2275,8 @@
rlogo.right = r_wnd->right;
rlogo.top = r_wnd->bottom - tbl->kbm_logo_shade.cy;
rlogo.bottom = r_wnd->bottom;
- rie = IntersectRect(&ri, r_erase, &rlogo);
+ if (bHideWatermarks) {rie = FALSE;}
+ else {rie = IntersectRect(&ri, r_erase,
&rlogo);}
} else {
ZeroMemory(&rlogo, sizeof(rlogo));
ZeroMemory(&ri, sizeof(ri));

Index: uiconfig.csv
===================================================================
--- uiconfig.csv (revision 19739)
+++ uiconfig.csv (working copy)
@@ -4,6 +4,7 @@
AutoStart,KC_INT32,0,Start Khimaira when Windows starts
AutoImport,KC_INT32,1,Import Windows creds when Khimaira starts
AutoDetectNet,KC_INT32,1,Automatically detect network connectivity
changes
+ HideWatermarks,KC_INT32,0,Suppress watermark display
KeepRunning,KC_INT32,1,Keep running after closing Khimaira
DefaultView,KC_STRING,ByIdentity,
DefaultViewMini,KC_STRING,CompactIdentity,
From: Sam Hartman <hartmans@MIT.EDU>
To: kfw-bugs@MIT.EDU
CC: undisclosed-recipients:;undisclosed-recipients:;@MIT.EDU
Subject: Re: [krbdev.mit.edu #5609] NIM GUI picture does not track tray icon
Date: Thu, 02 Aug 2007 13:57:24 -0400
RT-Send-Cc:
Why is this something that we want to be an option rather than simply as a community agreeing on the right behavior?

I'm not convinced that the complexity of making this configurable is
justified.
From: kpkoch@mit.edu
Subject: SVN Commit
Control watermark display with registry entry; document the registry entry.
Commit By: kpkoch



Revision: 19769
Changed Files:
U trunk/src/windows/identity/ui/credwnd.c
U trunk/src/windows/identity/ui/uiconfig.csv
From: tlyu@mit.edu
Subject: SVN Commit
back out r19744

Commit By: tlyu



Revision: 19794
Changed Files:
_U branches/krb5-1-6/
U branches/krb5-1-6/src/windows/identity/ui/credwnd.c
From: tlyu@mit.edu
Subject: SVN Commit
pull up r19769 from trunk

r19769@cathode-dark-space: kpkoch | 2007-08-09 09:31:11 -0400
Ticket: 5609
Tags: pullup
Target_Version: 1.6.3

Control watermark display with registry entry; document the registry entry.


Commit By: tlyu



Revision: 19796
Changed Files:
_U branches/krb5-1-6/
U branches/krb5-1-6/src/windows/identity/ui/credwnd.c
U branches/krb5-1-6/src/windows/identity/ui/uiconfig.csv