Changeset 1593 for trunk/dll/command.c
- Timestamp:
- Jul 4, 2011, 4:32:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/command.c
r1544 r1593 40 40 01 May 10 GKY Add ENVIRONMENT_SIZE variable to standardize this size everywhere. 41 41 01 May 10 GKY Changes to move environment storage to INI file 42 03 Jul 11 GKY Fixed problem with creation of duplicate command IDs. 42 43 43 44 ***********************************************************************/ … … 95 96 static PSZ pszSrcFile = __FILE__; 96 97 static LINKCMDS *cmdtail; 97 static BOOL UsedCommandIDs[300] ;98 static BOOL UsedHotKeyIDs[40] ;98 static BOOL UsedCommandIDs[300] = {FALSE}; 99 static BOOL UsedHotKeyIDs[40] = {FALSE}; 99 100 static PSZ pszCommandsList; 100 101 static ULONG ulSizeCommandsList = 10000; … … 377 378 378 379 379 size = sizeof(BOOL) * 300;380 /*size = sizeof(BOOL) * 300; 380 381 PrfQueryProfileData(fmprof, FM3Str, "COMMANDS.UsedCommandIDs", &UsedCommandIDs, 381 382 &size); 382 383 size = sizeof(BOOL) * 40; 383 384 PrfQueryProfileData(fmprof, FM3Str, "COMMANDS.UsedHotKeyIDs", &UsedHotKeyIDs, 384 &size); 385 &size);*/ // No need to use profile just count them GKY 02 JUL 11 385 386 size = sizeof(BOOL); 386 387 PrfQueryProfileData(fmprof, FM3Str, "COMMANDS.LoadCommandsFromINI", … … 507 508 size = sizeof(ULONG); 508 509 PrfQueryProfileData(fmprof, FM3Str, key, &ID, &size); 510 UsedCommandIDs[ID - IDM_COMMANDSTART] = TRUE; // No need to use profile just count them GKY 02 JUL 11 509 511 sprintf(key, "COMMAND.%sHotKeyID", szTitle); 510 512 size = sizeof(ULONG); 511 513 PrfQueryProfileData(fmprof, FM3Str, key, &HotKeyID, &size); 514 UsedHotKeyIDs[HotKeyID - IDM_COMMANDNUM0] = TRUE; // No need to use profile just count them GKY 02 JUL 11 512 515 sprintf(key, "COMMAND.%sflags", szTitle); 513 516 size = sizeof(ULONG); … … 620 623 sprintf(key, "COMMAND.%sID", info->title); 621 624 PrfWriteProfileData(fmprof, FM3Str, key, &info->ID, sizeof(INT)); 625 UsedCommandIDs[info->ID - IDM_COMMANDSTART] = TRUE; 622 626 sprintf(key, "COMMAND.%sHotKeyID", info->title); 623 627 PrfWriteProfileData(fmprof, FM3Str, key, &info->HotKeyID, sizeof(INT)); 628 UsedHotKeyIDs[info->HotKeyID - IDM_COMMANDNUM0] = TRUE; 624 629 if (info->env != NullStr) { 625 630 sprintf(key, "COMMAND.%senv", info->title); … … 635 640 } // while info 636 641 PrfWriteProfileData(fmprof, FM3Str, "COMMANDS.UsedCommandIDs", &UsedCommandIDs, 637 sizeof(BOOL) * 300); 642 sizeof(BOOL) * 300); // left for backward compatability GKY 02 Jul 11 638 643 PrfWriteProfileData(fmprof, FM3Str, "COMMANDS.UsedHotKeyIDs", &UsedHotKeyIDs, 639 sizeof(BOOL) * 40); 644 sizeof(BOOL) * 40);// left for backward compatability GKY 02 Jul 11 640 645 ulSizeCommandsList = strlen(pszCommandsList) + 1; 641 646 PrfWriteProfileData(fmprof, FM3Str, "COMMANDS.SizeSortOrder", … … 682 687 } 683 688 else 684 return NULL;689 return (LINKCMDS *) -1; 685 690 } 686 691 info = info->next; … … 1016 1021 fDontCheckHotKey = TRUE; 1017 1022 info = add_command(temp, fDontCheckHotKey); 1023 if (info == (LINKCMDS *) -1) 1024 break; 1018 1025 } 1019 1026 else {
Note:
See TracChangeset
for help on using the changeset viewer.