NIM: remove unused code from ui/credwnd.c
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 24 Aug 2007 14:40:23 +0000 (14:40 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 24 Aug 2007 14:40:23 +0000 (14:40 +0000)
Remove unused code from Network Identity Manager credwnd.c.  The code
was meant to construct a user interface context based on where the
user right clicks on the credentials display.  However, doing so
without indicating the changed selection to the user results in the
application performing an operation on an identity or credential that
the user didn't intend to select.

The code was commented out and was never used in any recent release of
Kerberos for Windows.

ticket: new
component: windows

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19861 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/identity/ui/credwnd.c

index 75ca31d67d4f4931fec523b02727c073ae2172df..5091829e00df6197526528753328519a49bbf186 100644 (file)
@@ -5013,34 +5013,6 @@ cw_properties(HWND hwnd)
     if(ctx.scope == KHUI_SCOPE_NONE) {
         khui_context_release(&ctx);
         return FALSE;
-
-        /* While it seems like a good idea, doing this is not */
-#if 0
-        /* try to establish a context based on the current cursor
-           position */
-        if(tbl->cursor_row >= 0 && tbl->cursor_row < (int) tbl->n_rows) {
-            if(tbl->rows[tbl->cursor_row].flags & KHUI_CW_ROW_HEADER) {
-                if(tbl->cols[tbl->rows[tbl->cursor_row].col].attr_id == KCDB_ATTR_ID_NAME) {
-                    /* identity context */
-                    ctx.ctx = KHUI_SCOPE_IDENT;
-                    ctx.identity = (khm_handle) 
-                        ((khui_credwnd_outline *) tbl->rows[tbl->cursor_row].data)->data;
-                } else if(tbl->cols[tbl->rows[tbl->cursor_row].col].attr_id == KCDB_ATTR_TYPE_NAME) {
-                    ctx.ctx = KHUI_SCOPE_CREDTYPE;
-                    ctx.cred_type = (khm_int32) (DWORD_PTR) 
-                        ((khui_credwnd_outline *) tbl->rows[tbl->cursor_row].data)->data;
-                } else {
-                    ctx.ctx = KHUI_SCOPE_GROUP;
-                    //ctx.parm = (khm_lparm) tbl->rows[tbl->cursor_row].data;
-                    /* TODO: Figure out method of establishing a credgroup */
-                }
-            } else {
-                /* a credential context */
-                ctx.ctx = KHUI_SCOPE_CRED;
-                ctx.cred = (khm_handle) tbl->rows[tbl->cursor_row].data;
-            }
-        }
-#endif
     }
 
     /* if still no context, then we can't show a property sheet */