More commits for NIM 1.2 Beta 1
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 2 Apr 2007 17:49:08 +0000 (17:49 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 2 Apr 2007 17:49:08 +0000 (17:49 +0000)
netidmgr.exe

- Credentials display :

  - When picking out the mouse hit rectangles, correctly handle the
    case where a sticky identity doesn't have any outline controls.

  - Move code to check and uncheck view layout action to
    cw_load_view() for consistency.

  - Initialize outlines properly when creating them.

  - cw_select_row_creds() should be called on all rows that are being
    selected or unselected.

- Actions :

  - Remove the 'Contents' item from the 'Help' menu.  The
    KHUI_ACTION_HELP_CTX action already opens the 'Contents' section.

  - Add 'Change password', 'Import', 'Help contents', and 'About' to
    the notification icon context menu.

  - Move the 'Import' action to be between 'Renew' and 'Destroy' for
    consistency.

- Resources :

  - "Run Network Identity Manager in System Tray" -> "Run from taskbar
    notification area"

  - "New Credentials" -> "Obtain new credentials"

- Main window :

  - Don't switch the window mode when handling a
    KHUI_ACTION_LAYOUT_RELOAD.

  - Refresh the action tables after changing the window state actions.

- Main Menu :

  - Call khm_refresh_identity_menus() when initializing the menus so
    that they have a consistent initial state.

  - When refreshing menus, the checked/unchecked state needs to be set
    explicitly by turning off flags that are no longer necessary.

  - Refresh the identities before refreshing the identity menus.

  - If there are no identities with credentials, disable renew/destroy
    menus and actions.

  - Don't bother adding 'renew/destroy all' menu items to the
    per-identity action menus if there is only one identity.

krb5cred.dll

- Resources :

  - Expand the 'Credential flags' control so that it's big enough to
    hold the contents.

source

- ccsv.pl :

  - Handle comment lines before the actual content.

- csvschema.cfg :

  - Don't bother embedding documentation in the data strucutre now.
    We don't use it.

  - Convert '[~]' to '\0' before we send it back to the parser.

ticket: new
component: windows
tags: pullup

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

src/windows/identity/config/ccsv.pl
src/windows/identity/config/csvschema.cfg
src/windows/identity/plugins/krb5/lang/en_us/langres.rc
src/windows/identity/ui/credwnd.c
src/windows/identity/ui/lang/en_us/khapp.rc
src/windows/identity/ui/mainmenu.c
src/windows/identity/ui/mainwnd.c
src/windows/identity/uilib/action.c

index c6c82814f2e0f79de879e0467ee0ea4a576d0f56..a3777975aecee10756de7ffdee812012f7a01420 100644 (file)
@@ -88,10 +88,10 @@ $first_line = 1;
 \r
 while(<IN>) {\r
     chomp $_;\r
-    if($skip_lines > 0) {\r
-       $skip_lines--;\r
-    } elsif (m/^\#/) {\r
+    if (m/^\#/) {\r
         # ignore\r
+    } elsif ($skip_lines > 0) {\r
+        $skip_lines--;\r
     } else {\r
        if($first_line == 0){\r
            print OUT $record_sep;\r
index ba3bf9bfceb8bfff230643de92aa4c915076dba8..cc8acd26bc55a62a683c21a088ff22e97c06bbd5 100644 (file)
@@ -55,13 +55,11 @@ $skip_lines = 1;
 sub rec_handler {\r
     $arr = shift;\r
     if($$arr[1] =~ "KC_STRING") {\r
-       $$arr[2] = "(khm_int64) L\"".$$arr[2]."\"";\r
        $$arr[2] =~ s/\[\~\]/\\0/g;\r
+       $$arr[2] = "(khm_int64) L\"".$$arr[2]."\"";\r
     }\r
 \r
-    if($#$arr == 2){\r
-       $$arr[3] = "";\r
-    }\r
+    $$arr[3] = "";\r
 }\r
 \r
 $record_parser = \&rec_handler;\r
index 1bdae10e28391eeb7b8ddb6f2ba947bd2aefef3d..67492dadf1e97ce05af50aa78250b95df0819460 100644 (file)
@@ -81,7 +81,7 @@ BEGIN
     LTEXT           "Valid till",IDC_STATIC,7,39,24,8\r
     LTEXT           "Renewable till",IDC_STATIC,7,55,45,12\r
     LTEXT           "Issued on",IDC_STATIC,7,23,32,8\r
-    LTEXT           "Credential flags",IDC_STATIC,7,75,37,8\r
+    LTEXT           "Credential flags",IDC_STATIC,7,75,51,8\r
     EDITTEXT        IDC_PPK5_NAME,72,7,156,12,ES_AUTOHSCROLL | ES_READONLY\r
     EDITTEXT        IDC_PPK5_ISSUE,72,23,156,12,ES_AUTOHSCROLL | ES_READONLY\r
     EDITTEXT        IDC_PPK5_VALID,72,39,156,12,ES_AUTOHSCROLL | ES_READONLY\r
index 4ed45e6d91775ea50a364e33552e292e6d675ac0..a31daac5aba299860792134efdbb9376e8d04b4f 100644 (file)
@@ -470,31 +470,31 @@ cw_load_view(khui_credwnd_tbl * tbl, wchar_t * view, HWND hwnd) {
         if(KHM_FAILED(khc_read_string(hc_cw, viewval, buf, &cbsize)))\r
             goto _exit;\r
         view = buf;\r
+    } else {\r
+        khc_write_string(hc_cw, viewval, view);\r
+    }\r
 \r
         /* in addition, if we are loading the default view, we should\r
            also check the appropriate menu item */\r
 \r
-        if (!wcscmp(view, L"ByIdentity"))\r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
-                                    KHUI_ACTION_LAYOUT_ID);\r
-        else if (!wcscmp(view, L"ByLocation"))\r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
-                                    KHUI_ACTION_LAYOUT_LOC);\r
-        else if (!wcscmp(view, L"ByType"))\r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
-                                    KHUI_ACTION_LAYOUT_TYPE);\r
-        else if (!wcscmp(view, L"Custom_0"))\r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
-                                    KHUI_ACTION_LAYOUT_CUST);\r
-        else if (!wcscmp(view, L"CompactIdentity"))\r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
-                                    KHUI_ACTION_LAYOUT_MINI);\r
-\r
-        kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);\r
-    } else {\r
-        khc_write_string(hc_cw, viewval, view);\r
+    if (!wcscmp(view, L"ByIdentity"))\r
+        khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
+                                KHUI_ACTION_LAYOUT_ID);\r
+    else if (!wcscmp(view, L"ByLocation"))\r
+        khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
+                                KHUI_ACTION_LAYOUT_LOC);\r
+    else if (!wcscmp(view, L"ByType"))\r
+        khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
+                                KHUI_ACTION_LAYOUT_TYPE);\r
+    else if (!wcscmp(view, L"Custom_0"))\r
+        khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
+                                KHUI_ACTION_LAYOUT_CUST);\r
+    else {\r
+        /* do nothing */\r
     }\r
 \r
+    kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);\r
+\r
     if(KHM_FAILED(khc_open_space(hc_vs, view, 0, &hc_v)))\r
         goto _exit;\r
 \r
@@ -1064,6 +1064,7 @@ cw_new_outline_node(wchar_t * heading) {
         o->header = PMALLOC(cblen);\r
         StringCbCopy(o->header, cblen, heading);\r
     }\r
+    o->start = -1;\r
 \r
     return o;\r
 }\r
@@ -1708,23 +1709,29 @@ cw_update_outline(khui_credwnd_tbl * tbl)
                 o->col = grouping[0];\r
                 o->data = id_def;\r
                 o->attr_id = KCDB_ATTR_ID;\r
+                o->start = -1;\r
+            } else {\r
+                kcdb_identity_release(id_def);\r
+            }\r
 \r
-                if (flags & KCDB_IDENT_FLAG_STICKY)\r
-                    o->flags |= KHUI_CW_O_STICKY;\r
+            if (o->start != -1)\r
+                goto done_with_defident;\r
+\r
+            if (flags & KCDB_IDENT_FLAG_STICKY)\r
+                o->flags |= KHUI_CW_O_STICKY;\r
+            else\r
+                o->flags &= ~KHUI_CW_O_STICKY;\r
 \r
-                o->start = n_rows;\r
-                o->length = 1;\r
-                o->idx_start = -1;\r
+            o->start = n_rows;\r
+            o->length = 1;\r
+            o->idx_start = -1;\r
 \r
-                if (grouping[0] == tbl->n_cols - 1)\r
-                    o->flags |= KHUI_CW_O_NOOUTLINE;\r
+            if (grouping[0] == tbl->n_cols - 1)\r
+                o->flags |= KHUI_CW_O_NOOUTLINE;\r
 \r
-                cw_set_tbl_row_header(tbl, n_rows, grouping[0], o);\r
+            cw_set_tbl_row_header(tbl, n_rows, grouping[0], o);\r
 \r
-                n_rows ++;\r
-            } else {\r
-                kcdb_identity_release(id_def);\r
-            }\r
+            n_rows ++;\r
 \r
         done_with_defident:\r
             ;\r
@@ -1775,7 +1782,7 @@ cw_update_outline(khui_credwnd_tbl * tbl)
                 /* found it */\r
                 if (o->start != -1) /* already visible? */\r
                     continue;\r
-                o->flags &= KHUI_CW_O_STICKY;\r
+                o->flags &= KHUI_CW_O_STICKY | KHUI_CW_O_RELIDENT;\r
                 o->flags |= KHUI_CW_O_VISIBLE;\r
             } else {\r
                 /* not found.  create */\r
@@ -1786,21 +1793,22 @@ cw_update_outline(khui_credwnd_tbl * tbl)
                 o->col = grouping[0];\r
                 o->data = (void *) h;\r
                 o->attr_id = KCDB_ATTR_ID;\r
-\r
-                if (grouping[0] == tbl->n_cols - 1)\r
-                    o->flags |= KHUI_CW_O_NOOUTLINE;\r
             }\r
 \r
+            if (grouping[0] == tbl->n_cols - 1)\r
+                o->flags |= KHUI_CW_O_NOOUTLINE;\r
+\r
             if (o->flags & KHUI_CW_O_STICKY)\r
                 kcdb_identity_release(h);\r
             else\r
                 /* leave identity held in this case */\r
-                o->flags |= KHUI_CW_O_STICKY;\r
+                o->flags |= KHUI_CW_O_STICKY | KHUI_CW_O_RELIDENT;\r
 \r
             o->flags &= ~KHUI_CW_O_EXPAND;\r
             o->start = n_rows;\r
             o->length = 1;\r
             o->idx_start = -1;\r
+            o->idx_end = -1;\r
 \r
             cw_set_tbl_row_header(tbl, n_rows, grouping[0], o);\r
 \r
@@ -2369,6 +2377,9 @@ cw_draw_header(HDC hdc,
     if (o->flags & KHUI_CW_O_STICKY) {\r
         /* khui_ilist_draw_id(tbl->ilist, IDB_TK_NEW_SM, hdc, \r
            r->left, r->bottom - KHUI_SMICON_CY, 0); */\r
+        if (!(o->flags & KHUI_CW_O_NOOUTLINE)) {\r
+            r->left += KHUI_SMICON_CX * 3 / 2;\r
+        }\r
     } else if (!(o->flags & KHUI_CW_O_NOOUTLINE)) {\r
         if((tbl->mouse_state & CW_MOUSE_WOUTLINE) && \r
            tbl->mouse_row == row) {\r
@@ -3582,7 +3593,7 @@ cw_select_outline(khui_credwnd_outline * o,
 }\r
 \r
 static void\r
-cw_select_cred_row(khui_credwnd_tbl * tbl, int row, int selected) {\r
+cw_select_row_creds(khui_credwnd_tbl * tbl, int row, int selected) {\r
 \r
     khm_size j;\r
     khm_size idx_start, idx_end;\r
@@ -3613,6 +3624,9 @@ cw_select_cred_row(khui_credwnd_tbl * tbl, int row, int selected) {
         idx_end = tbl->rows[row].idx_end;\r
     }\r
 \r
+    if (idx_start == -1 || idx_end == -1)\r
+        return;\r
+\r
     for (j = idx_start; j <= idx_end; j++) {\r
         khm_handle cred = NULL;\r
 \r
@@ -3634,9 +3648,7 @@ cw_unselect_all(khui_credwnd_tbl * tbl)
     for(i=0; i<tbl->n_rows; i++) {\r
         tbl->rows[i].flags &= ~KHUI_CW_ROW_SELECTED;\r
 \r
-        if (!(tbl->rows[i].flags & KHUI_CW_ROW_HEADER)) {\r
-            cw_select_cred_row(tbl, i, FALSE);\r
-        }\r
+        cw_select_row_creds(tbl, i, FALSE);\r
     }\r
 \r
     cw_select_outline_level(tbl->outline, FALSE);\r
@@ -3856,8 +3868,7 @@ cw_select_all(khui_credwnd_tbl * tbl)
 \r
     for(i=0; i<tbl->n_rows; i++) {\r
         tbl->rows[i].flags |= KHUI_CW_ROW_SELECTED;\r
-        if (!(tbl->rows[i].flags & KHUI_CW_ROW_HEADER))\r
-            cw_select_cred_row(tbl, i, TRUE);\r
+        cw_select_row_creds(tbl, i, TRUE);\r
     }\r
 \r
     cw_select_outline_level(tbl->outline, TRUE);\r
@@ -3913,7 +3924,7 @@ cw_select_row(khui_credwnd_tbl * tbl, int row, WPARAM wParam)
 \r
         for (i = group_begin; i <= group_end; i++) {\r
             tbl->rows[i].flags |= KHUI_CW_ROW_SELECTED;\r
-            cw_select_cred_row(tbl, i, TRUE);\r
+            cw_select_row_creds(tbl, i, TRUE);\r
         }\r
     } else if (toggle) {\r
         BOOL select;\r
@@ -3929,7 +3940,7 @@ cw_select_row(khui_credwnd_tbl * tbl, int row, WPARAM wParam)
             else\r
                 tbl->rows[i].flags &= ~KHUI_CW_ROW_SELECTED;\r
 \r
-            cw_select_cred_row(tbl, i, select);\r
+            cw_select_row_creds(tbl, i, select);\r
         }\r
     } else if (extend) {\r
         int range_begin;\r
@@ -3943,7 +3954,7 @@ cw_select_row(khui_credwnd_tbl * tbl, int row, WPARAM wParam)
         for (i = range_begin; i <= range_end; i++) {\r
             tbl->rows[i].flags |= KHUI_CW_ROW_SELECTED;\r
 \r
-            cw_select_cred_row(tbl, i, TRUE);\r
+            cw_select_row_creds(tbl, i, TRUE);\r
         }\r
 \r
         tbl->cursor_row = row;\r
@@ -4073,7 +4084,7 @@ cw_wm_mouse(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
                            x < KHUI_SMICON_CX * 4) {\r
                     nm_state |= CW_MOUSE_WICON | CW_MOUSE_WIDGET;\r
                 }\r
-            } else if (tbl->cols[tbl->rows[row].col].attr_id == KCDB_ATTR_ID_NAME) {\r
+            } else if (tbl->cols[o->col].attr_id == KCDB_ATTR_ID_NAME) {\r
                 if (col == tbl->rows[row].col &&\r
                     x >= 0 &&\r
                     x < KHUI_SMICON_CX){\r
@@ -5000,8 +5011,6 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 \r
             InvalidateRect(tbl->hwnd, NULL, TRUE);\r
 \r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT), KHUI_ACTION_LAYOUT_ID);\r
-            kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);\r
         }\r
         break;\r
 \r
@@ -5020,9 +5029,6 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 \r
             InvalidateRect(tbl->hwnd, NULL, TRUE);\r
 \r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT), \r
-                                    KHUI_ACTION_LAYOUT_LOC);\r
-            kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);\r
         }\r
         break;\r
 \r
@@ -5041,9 +5047,6 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 \r
             InvalidateRect(tbl->hwnd, NULL, TRUE);\r
 \r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT), \r
-                                    KHUI_ACTION_LAYOUT_TYPE);\r
-            kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);\r
         }\r
         break;\r
 \r
@@ -5062,9 +5065,6 @@ cw_wm_command(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 \r
             InvalidateRect(tbl->hwnd, NULL, TRUE);\r
 \r
-            khui_check_radio_action(khui_find_menu(KHUI_MENU_LAYOUT),\r
-                                    KHUI_ACTION_LAYOUT_CUST);\r
-            kmq_post_message(KMSG_ACT, KMSG_ACT_REFRESH, 0, 0);\r
         }\r
         break;\r
 \r
index 74255fb021ee0a11be7d85fcca0a0a514d676793..285db67aa986b8be2ed0d8f0bc2073a87366f7c3 100644 (file)
@@ -247,7 +247,7 @@ BEGIN
     CONTROL         "&Destroy all credentials on exit",IDC_CFG_DESTROYALL,\r
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,36,111,10\r
     GROUPBOX        "Other",IDC_CFG_OTHER,7,55,241,120\r
-    CONTROL         "&Run Network Identity Manager in system tray after window close",IDC_CFG_KEEPRUNNING,\r
+    CONTROL         "&Run from taskbar notification area after window close",IDC_CFG_KEEPRUNNING,\r
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,68,230,10\r
     LTEXT           "Clicking on the &notification icon",IDC_CFG_NOTACT_STATIC,26,87,99,8\r
     COMBOBOX        IDC_CFG_NOTACTION,133,85,110,48,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
@@ -564,7 +564,7 @@ BEGIN
     IDS_ACTION_SET_SRCH_ID  "Allow applications to &search"\r
     IDS_CFG_ROOT_TITLE      "Network Identity Manager Configuration"\r
     IDS_CFG_GENERAL_SHORT   "General"\r
-    IDS_ACTION_NEW_CRED     "&New credentials ..."\r
+    IDS_ACTION_NEW_CRED     "Obtain &new credentials ..."\r
     IDS_ACTION_PASSWD_ID    "Change &password"\r
     IDS_ACTION_CHOOSE_COLS  "View columns"\r
     IDS_ACTION_DEBUG_WINDOW "Debug window"\r
@@ -582,7 +582,7 @@ BEGIN
     IDS_ACTION_OPT_KHIM     "General"\r
     IDS_ACTION_OPT_IDENTS   "Identities"\r
     IDS_ACTION_OPT_NOTIF    "Notifications"\r
-    IDS_ACTION_HELP_CTX     "Help Index"\r
+    IDS_ACTION_HELP_CTX     "Help Contents"\r
     IDS_ACTION_HELP_CONTENTS "Contents"\r
     IDS_ACTION_HELP_INDEX   "Index"\r
     IDS_ACTION_HELP_ABOUT   "About Network Identity Manager"\r
index 5d9e4d9973058b856e61e74f0ed68ba4ea41492e..e27d0399b3e7709402b6ca33c37adc9c18b24981 100644 (file)
@@ -49,6 +49,8 @@ void khui_init_menu(void) {
                                 MAX_ILIST, 5, 0);\r
     for(i=0;i<MAX_ILIST;i++)\r
         il_icon_id[i] = -1;\r
+\r
+    khm_refresh_identity_menus();\r
 }\r
 \r
 void khui_exit_menu(void) {\r
@@ -258,8 +260,10 @@ static int refresh_menu_item(HMENU hm, khui_action * act,
     if(act->type & KHUI_ACTIONTYPE_TOGGLE) {\r
         mii.fMask |= MIIM_STATE;\r
         if (act->state & KHUI_ACTIONSTATE_CHECKED) {\r
+            mii.fState &= ~MFS_UNCHECKED;\r
             mii.fState |= MFS_CHECKED;\r
         } else {\r
+            mii.fState &= ~MFS_CHECKED;\r
             mii.fState |= MFS_UNCHECKED;\r
         }\r
     }\r
@@ -817,6 +821,8 @@ khm_refresh_identity_menus(void) {
     khm_size t;\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
 \r
+    kcdb_identity_refresh_all();\r
+\r
     khui_action_lock();\r
 \r
     idcmd_refreshcycle++;\r
@@ -858,6 +864,18 @@ khm_refresh_identity_menus(void) {
 \r
     } while(TRUE);\r
 \r
+    if (idlist != NULL && n_idents > 0) {\r
+        khui_enable_action(KHUI_MENU_RENEW_CRED, TRUE);\r
+        khui_enable_action(KHUI_MENU_DESTROY_CRED, TRUE);\r
+        khui_enable_action(KHUI_ACTION_RENEW_CRED, TRUE);\r
+        khui_enable_action(KHUI_ACTION_DESTROY_CRED, TRUE);\r
+    } else {\r
+        khui_enable_action(KHUI_MENU_RENEW_CRED, FALSE);\r
+        khui_enable_action(KHUI_MENU_DESTROY_CRED, FALSE);\r
+        khui_enable_action(KHUI_ACTION_RENEW_CRED, FALSE);\r
+        khui_enable_action(KHUI_ACTION_DESTROY_CRED, FALSE);\r
+    }\r
+\r
     renew_def = khui_find_menu(KHUI_MENU_RENEW_CRED);\r
     dest_def = khui_find_menu(KHUI_MENU_DESTROY_CRED);\r
 #ifdef DEBUG\r
@@ -870,17 +888,18 @@ khm_refresh_identity_menus(void) {
         khui_menu_remove_action(renew_def, 0);\r
         t--;\r
     }\r
-    khui_menu_insert_action(renew_def, 0, KHUI_ACTION_RENEW_ALL, 0);\r
 \r
     t = khui_menu_get_size(dest_def);\r
     while(t) {\r
         khui_menu_remove_action(dest_def, 0);\r
         t--;\r
     }\r
-    khui_menu_insert_action(dest_def, 0, KHUI_ACTION_DESTROY_ALL, 0);\r
 \r
-    if (idlist != NULL && n_idents > 0) {\r
+    if (idlist != NULL && n_idents > 1) {\r
+        khui_menu_insert_action(renew_def, 0, KHUI_ACTION_RENEW_ALL, 0);\r
         khui_menu_insert_action(renew_def, 1, KHUI_MENU_SEP, 0);\r
+\r
+        khui_menu_insert_action(dest_def, 0, KHUI_ACTION_DESTROY_ALL, 0);\r
         khui_menu_insert_action(dest_def,  1, KHUI_MENU_SEP, 0);\r
     }\r
 \r
index 128be085c33715230d43a3a7cb2ef11e4c3000d6..76a3fdefebfc9affd943f2f30f9d1aed30238f54 100644 (file)
@@ -387,11 +387,14 @@ khm_main_wnd_proc(HWND hwnd,
             return SendMessage(khm_hwnd_main_cred, uMsg, \r
                                wParam, lParam);\r
 \r
+        case KHUI_ACTION_LAYOUT_RELOAD:\r
+            return SendMessage(khm_hwnd_main_cred, uMsg, \r
+                               wParam, lParam);\r
+\r
         case KHUI_ACTION_LAYOUT_ID:\r
         case KHUI_ACTION_LAYOUT_TYPE:\r
         case KHUI_ACTION_LAYOUT_LOC:\r
         case KHUI_ACTION_LAYOUT_CUST:\r
-        case KHUI_ACTION_LAYOUT_RELOAD:\r
             khm_set_main_window_mode(KHM_MAIN_WND_NORMAL);\r
             return SendMessage(khm_hwnd_main_cred, uMsg, \r
                                wParam, lParam);\r
@@ -1105,6 +1108,8 @@ khm_set_main_window_mode(int mode) {
     khui_enable_action(KHUI_MENU_COLUMNS,\r
                        ((mode == KHM_MAIN_WND_MINI)? FALSE : TRUE));\r
 \r
+    khui_refresh_actions();\r
+\r
     khm_main_wnd_mode = mode;\r
     if (khm_hwnd_main) {\r
         khm_get_main_window_rect(&r);\r
index 00902eec9eaa40c34a263f96c9438ca309876f38..a0295d39eec4cdc8b8b052dd31e885a472116118 100644 (file)
@@ -53,8 +53,8 @@ khui_action_ref khui_menu_cred[] = {
     MENU_ACTION(KHUI_ACTION_NEW_CRED),\r
     MENU_SEP(),\r
     MENU_SUBMENU(KHUI_MENU_RENEW_CRED),\r
-    MENU_SUBMENU(KHUI_MENU_DESTROY_CRED),\r
     MENU_ACTION(KHUI_ACTION_IMPORT),\r
+    MENU_SUBMENU(KHUI_MENU_DESTROY_CRED),\r
     MENU_SEP(),\r
     MENU_ACTION(KHUI_ACTION_SET_DEF_ID),\r
 #if 0\r
@@ -110,7 +110,6 @@ khui_action_ref khui_menu_options[] = {
 khui_action_ref khui_menu_help[] = {\r
     MENU_ACTION(KHUI_ACTION_HELP_CTX),\r
     MENU_SEP(),\r
-    MENU_ACTION(KHUI_ACTION_HELP_CONTENTS),\r
     MENU_ACTION(KHUI_ACTION_HELP_INDEX),\r
     MENU_SEP(),\r
     MENU_ACTION(KHUI_ACTION_HELP_ABOUT),\r
@@ -157,8 +156,14 @@ khui_action_ref khui_menu_ico_ctx_min[] = {
     MENU_SEP(),\r
     MENU_ACTION(KHUI_ACTION_NEW_CRED),\r
     MENU_SUBMENU(KHUI_MENU_RENEW_CRED),\r
+    MENU_ACTION(KHUI_ACTION_IMPORT),\r
     MENU_SUBMENU(KHUI_MENU_DESTROY_CRED),\r
     MENU_SEP(),\r
+    MENU_ACTION(KHUI_ACTION_PASSWD_ID),\r
+    MENU_SEP(),\r
+    MENU_ACTION(KHUI_ACTION_HELP_CTX),\r
+    MENU_ACTION(KHUI_ACTION_HELP_ABOUT),\r
+    MENU_SEP(),\r
     MENU_ACTION(KHUI_ACTION_EXIT),\r
     MENU_END()\r
 };\r
@@ -168,8 +173,14 @@ khui_action_ref khui_menu_ico_ctx_normal[] = {
     MENU_SEP(),\r
     MENU_ACTION(KHUI_ACTION_NEW_CRED),\r
     MENU_SUBMENU(KHUI_MENU_RENEW_CRED),\r
+    MENU_ACTION(KHUI_ACTION_IMPORT),\r
     MENU_SUBMENU(KHUI_MENU_DESTROY_CRED),\r
     MENU_SEP(),\r
+    MENU_ACTION(KHUI_ACTION_PASSWD_ID),\r
+    MENU_SEP(),\r
+    MENU_ACTION(KHUI_ACTION_HELP_CTX),\r
+    MENU_ACTION(KHUI_ACTION_HELP_ABOUT),\r
+    MENU_SEP(),\r
     MENU_ACTION(KHUI_ACTION_EXIT),\r
     MENU_END()\r
 };\r