[USRMGR] Rename some functions. #179

This commit is contained in:
Amine Khaldi 2017-12-25 22:11:57 +01:00
parent 5e4f6c69c7
commit 5a54e722b3
4 changed files with 29 additions and 29 deletions

View file

@ -354,9 +354,9 @@ RemoveUserFromGroup(HWND hwndDlg,
static BOOL static BOOL
OnNotify(HWND hwndDlg, OnGroupPropSheetNotify(HWND hwndDlg,
PGENERAL_GROUP_DATA pGroupData, PGENERAL_GROUP_DATA pGroupData,
LPARAM lParam) LPARAM lParam)
{ {
LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lParam; LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lParam;
@ -581,7 +581,7 @@ GroupGeneralPageProc(HWND hwndDlg,
} }
else else
{ {
return OnNotify(hwndDlg, pGroupData, lParam); return OnGroupPropSheetNotify(hwndDlg, pGroupData, lParam);
} }
break; break;
@ -595,7 +595,7 @@ GroupGeneralPageProc(HWND hwndDlg,
static VOID static VOID
InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, LPTSTR pszGroup) InitGroupPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, LPTSTR pszGroup)
{ {
ZeroMemory(psp, sizeof(PROPSHEETPAGE)); ZeroMemory(psp, sizeof(PROPSHEETPAGE));
psp->dwSize = sizeof(PROPSHEETPAGE); psp->dwSize = sizeof(PROPSHEETPAGE);
@ -638,7 +638,7 @@ GroupProperties(HWND hwndDlg)
psh.nStartPage = 0; psh.nStartPage = 0;
psh.ppsp = psp; psh.ppsp = psp;
InitPropSheetPage(&psp[0], IDD_GROUP_GENERAL, GroupGeneralPageProc, szGroupName); InitGroupPropSheetPage(&psp[0], IDD_GROUP_GENERAL, GroupGeneralPageProc, szGroupName);
return (PropertySheet(&psh) == IDOK); return (PropertySheet(&psh) == IDOK);
} }

View file

@ -294,7 +294,7 @@ GroupDelete(HWND hwndDlg)
static VOID static VOID
OnInitDialog(HWND hwndDlg) OnGroupsPageInitDialog(HWND hwndDlg)
{ {
HWND hwndListView; HWND hwndListView;
HIMAGELIST hImgList; HIMAGELIST hImgList;
@ -319,7 +319,7 @@ OnInitDialog(HWND hwndDlg)
static BOOL static BOOL
OnBeginLabelEdit(LPNMLVDISPINFO pnmv) OnGroupsPageBeginLabelEdit(LPNMLVDISPINFO pnmv)
{ {
HWND hwndEdit; HWND hwndEdit;
@ -334,7 +334,7 @@ OnBeginLabelEdit(LPNMLVDISPINFO pnmv)
static BOOL static BOOL
OnEndLabelEdit(LPNMLVDISPINFO pnmv) OnGroupsPageEndLabelEdit(LPNMLVDISPINFO pnmv)
{ {
TCHAR szOldGroupName[UNLEN]; TCHAR szOldGroupName[UNLEN];
TCHAR szNewGroupName[UNLEN]; TCHAR szNewGroupName[UNLEN];
@ -388,7 +388,7 @@ OnEndLabelEdit(LPNMLVDISPINFO pnmv)
static BOOL static BOOL
OnNotify(HWND hwndDlg, PGROUP_DATA pGroupData, NMHDR *phdr) OnGroupsPageNotify(HWND hwndDlg, PGROUP_DATA pGroupData, NMHDR *phdr)
{ {
LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)phdr; LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)phdr;
@ -420,10 +420,10 @@ OnNotify(HWND hwndDlg, PGROUP_DATA pGroupData, NMHDR *phdr)
break; break;
case LVN_BEGINLABELEDIT: case LVN_BEGINLABELEDIT:
return OnBeginLabelEdit((LPNMLVDISPINFO)phdr); return OnGroupsPageBeginLabelEdit((LPNMLVDISPINFO)phdr);
case LVN_ENDLABELEDIT: case LVN_ENDLABELEDIT:
return OnEndLabelEdit((LPNMLVDISPINFO)phdr); return OnGroupsPageEndLabelEdit((LPNMLVDISPINFO)phdr);
} }
break; break;
} }
@ -455,7 +455,7 @@ GroupsPageProc(HWND hwndDlg,
pGroupData->hPopupMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDM_POPUP_GROUP)); pGroupData->hPopupMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDM_POPUP_GROUP));
OnInitDialog(hwndDlg); OnGroupsPageInitDialog(hwndDlg);
SetMenuDefaultItem(GetSubMenu(pGroupData->hPopupMenu, 1), SetMenuDefaultItem(GetSubMenu(pGroupData->hPopupMenu, 1),
IDM_GROUP_PROPERTIES, IDM_GROUP_PROPERTIES,
FALSE); FALSE);
@ -487,7 +487,7 @@ GroupsPageProc(HWND hwndDlg,
break; break;
case WM_NOTIFY: case WM_NOTIFY:
return OnNotify(hwndDlg, pGroupData, (NMHDR *)lParam); return OnGroupsPageNotify(hwndDlg, pGroupData, (NMHDR *)lParam);
case WM_DESTROY: case WM_DESTROY:
DestroyMenu(pGroupData->hPopupMenu); DestroyMenu(pGroupData->hPopupMenu);

View file

@ -586,9 +586,9 @@ AddGroupToUser(HWND hwndDlg,
static BOOL static BOOL
OnNotify(HWND hwndDlg, OnUserPropSheetNotify(HWND hwndDlg,
PMEMBERSHIP_USER_DATA pUserData, PMEMBERSHIP_USER_DATA pUserData,
LPARAM lParam) LPARAM lParam)
{ {
LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lParam; LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lParam;
@ -664,7 +664,7 @@ UserMembershipPageProc(HWND hwndDlg,
} }
else else
{ {
return OnNotify(hwndDlg, pUserData, lParam); return OnUserPropSheetNotify(hwndDlg, pUserData, lParam);
} }
break; break;
@ -885,7 +885,7 @@ UserGeneralPageProc(HWND hwndDlg,
static VOID static VOID
InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, LPTSTR pszUser) InitUserPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, LPTSTR pszUser)
{ {
ZeroMemory(psp, sizeof(PROPSHEETPAGE)); ZeroMemory(psp, sizeof(PROPSHEETPAGE));
psp->dwSize = sizeof(PROPSHEETPAGE); psp->dwSize = sizeof(PROPSHEETPAGE);
@ -928,9 +928,9 @@ UserProperties(HWND hwndDlg)
psh.nStartPage = 0; psh.nStartPage = 0;
psh.ppsp = psp; psh.ppsp = psp;
InitPropSheetPage(&psp[0], IDD_USER_GENERAL, UserGeneralPageProc, szUserName); InitUserPropSheetPage(&psp[0], IDD_USER_GENERAL, UserGeneralPageProc, szUserName);
InitPropSheetPage(&psp[1], IDD_USER_MEMBERSHIP, UserMembershipPageProc, szUserName); InitUserPropSheetPage(&psp[1], IDD_USER_MEMBERSHIP, UserMembershipPageProc, szUserName);
InitPropSheetPage(&psp[2], IDD_USER_PROFILE, UserProfilePageProc, szUserName); InitUserPropSheetPage(&psp[2], IDD_USER_PROFILE, UserProfilePageProc, szUserName);
return (PropertySheet(&psh) == IDOK); return (PropertySheet(&psh) == IDOK);
} }

View file

@ -153,9 +153,9 @@ UserChangePassword(HWND hwndDlg)
static VOID static VOID
UpdateUserOptions(HWND hwndDlg, UpdateNewUserOptions(HWND hwndDlg,
PUSER_INFO_3 userInfo, PUSER_INFO_3 userInfo,
BOOL bInit) BOOL bInit)
{ {
EnableWindow(GetDlgItem(hwndDlg, IDC_USER_NEW_CANNOT_CHANGE), EnableWindow(GetDlgItem(hwndDlg, IDC_USER_NEW_CANNOT_CHANGE),
!userInfo->usri3_password_expired); !userInfo->usri3_password_expired);
@ -201,7 +201,7 @@ NewUserDlgProc(HWND hwndDlg,
userInfo = (PUSER_INFO_3)lParam; userInfo = (PUSER_INFO_3)lParam;
SetWindowLongPtr(hwndDlg, DWLP_USER, lParam); SetWindowLongPtr(hwndDlg, DWLP_USER, lParam);
SendDlgItemMessage(hwndDlg, IDC_USER_NEW_NAME, EM_SETLIMITTEXT, 20, 0); SendDlgItemMessage(hwndDlg, IDC_USER_NEW_NAME, EM_SETLIMITTEXT, 20, 0);
UpdateUserOptions(hwndDlg, userInfo, TRUE); UpdateNewUserOptions(hwndDlg, userInfo, TRUE);
break; break;
case WM_COMMAND: case WM_COMMAND:
@ -217,17 +217,17 @@ NewUserDlgProc(HWND hwndDlg,
case IDC_USER_NEW_FORCE_CHANGE: case IDC_USER_NEW_FORCE_CHANGE:
userInfo->usri3_password_expired = !userInfo->usri3_password_expired; userInfo->usri3_password_expired = !userInfo->usri3_password_expired;
UpdateUserOptions(hwndDlg, userInfo, FALSE); UpdateNewUserOptions(hwndDlg, userInfo, FALSE);
break; break;
case IDC_USER_NEW_CANNOT_CHANGE: case IDC_USER_NEW_CANNOT_CHANGE:
userInfo->usri3_flags ^= UF_PASSWD_CANT_CHANGE; userInfo->usri3_flags ^= UF_PASSWD_CANT_CHANGE;
UpdateUserOptions(hwndDlg, userInfo, FALSE); UpdateNewUserOptions(hwndDlg, userInfo, FALSE);
break; break;
case IDC_USER_NEW_NEVER_EXPIRES: case IDC_USER_NEW_NEVER_EXPIRES:
userInfo->usri3_flags ^= UF_DONT_EXPIRE_PASSWD; userInfo->usri3_flags ^= UF_DONT_EXPIRE_PASSWD;
UpdateUserOptions(hwndDlg, userInfo, FALSE); UpdateNewUserOptions(hwndDlg, userInfo, FALSE);
break; break;
case IDC_USER_NEW_DISABLED: case IDC_USER_NEW_DISABLED: