Changeset 1121 for trunk/dll/tools.c
- Timestamp:
- Aug 27, 2008, 2:07:20 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/tools.c
r1119 r1121 20 20 19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory and use BldFullPathName 21 21 24 Aug 08 GKY Warn full drive on save of .DAT & .TLS files; prevent loss of existing file 22 26 Aug 08 GKY Require unique ID plus text and help strings for all tools save toolbar on button delete 22 23 23 24 ***********************************************************************/ … … 705 706 CHAR help[81], text[81], idstr[7]; 706 707 BOOL invisible, dropable, separator, istext, myicon; 707 TOOL *tool; 708 708 TOOL *tool; 709 BOOL BadID = FALSE; 710 711 help[0] = text[0] = NULL; 709 712 WinQueryDlgItemText(hwnd, ADDBTN_HELP, 80, help); 710 713 WinQueryDlgItemText(hwnd, ADDBTN_TEXT, 80, text); … … 733 736 xfree(tool->text, pszSrcFile, __LINE__); 734 737 tool->text = NULL; 735 if (*help) 738 if (*help && *text && help && text) { 736 739 tool->help = xstrdup(help, pszSrcFile, __LINE__); 737 if (*text) 738 tool->text = xstrdup(text, pszSrcFile, __LINE__); 740 tool->text = xstrdup(text, pszSrcFile, __LINE__); 741 } 742 else { 743 saymsg(MB_ENTER, 744 hwnd, 745 GetPString(IDS_MISSINGTEXT), 746 GetPString(IDS_TOOLHELPTEXTBLANK)); 747 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, ADDBTN_HELP)); 748 break; 749 } 739 750 tool->flags = (((dropable) ? T_DROPABLE : 0) | 740 751 ((invisible) ? T_INVISIBLE : 0) | … … 753 764 tool = toolhead; 754 765 while (tool) { 755 if (tool->id == (USHORT) atoi(idstr)&& tool != tool) {766 if (tool->id == (USHORT) atoi(idstr)) { // && tool != tool) { 756 767 saymsg(MB_ENTER, 757 768 hwnd, … … 759 770 GetPString(IDS_TOOLIDEXISTS)); 760 771 WinSetDlgItemText(hwnd, ADDBTN_ID, NullStr); 761 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, ADDBTN_ID)); 772 WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, ADDBTN_ID)); 773 BadID =TRUE; 762 774 break; 763 775 } 764 776 tool = tool->next; 765 } 777 } 778 if (BadID) 779 break; 766 780 tool = xmallocz(sizeof(TOOL), pszSrcFile, __LINE__); 767 781 if (tool) {
Note:
See TracChangeset
for help on using the changeset viewer.