pull up r19861 from trunk
authorTom Yu <tlyu@mit.edu>
Fri, 28 Sep 2007 23:38:01 +0000 (23:38 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 28 Sep 2007 23:38:01 +0000 (23:38 +0000)
 r19861@cathode-dark-space:  jaltman | 2007-08-24 10:40:23 -0400
 ticket: new
 subject: NIM: remove unused code from ui/credwnd.c
 component: windows

 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: 5682
version_fixed: 1.6.3

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19996 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 */