comparison os2/dw.c @ 513:7755599311d4

Fixes search and replace errors.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 09 Mar 2004 05:58:52 +0000
parents 80dbd5a1f403
children 08d770271709
comparison
equal deleted inserted replaced
512:8eb10e610270 513:7755599311d4
5727 * Sets the visible line of an MLE box. 5727 * Sets the visible line of an MLE box.
5728 * Parameters: 5728 * Parameters:
5729 * handle: Handle to the MLE to be positioned. 5729 * handle: Handle to the MLE to be positioned.
5730 * line: Line to be visible. 5730 * line: Line to be visible.
5731 */ 5731 */
5732 void API dw_mle_set_cursor_visible(HWND handle, int line) 5732 void API dw_mle_set_visible(HWND handle, int line)
5733 { 5733 {
5734 int tmppnt = (int)WinSendMsg(handle, MLM_CHARFROMLINE, MPFROMLONG(line), 0); 5734 int tmppnt = (int)WinSendMsg(handle, MLM_CHARFROMLINE, MPFROMLONG(line), 0);
5735 WinSendMsg(handle, MLM_SETSEL, MPFROMLONG(tmppnt), MPFROMLONG(tmppnt)); 5735 WinSendMsg(handle, MLM_SETSEL, MPFROMLONG(tmppnt), MPFROMLONG(tmppnt));
5736 } 5736 }
5737 5737
5739 * Sets the editablity of an MLE box. 5739 * Sets the editablity of an MLE box.
5740 * Parameters: 5740 * Parameters:
5741 * handle: Handle to the MLE. 5741 * handle: Handle to the MLE.
5742 * state: TRUE if it can be edited, FALSE for readonly. 5742 * state: TRUE if it can be edited, FALSE for readonly.
5743 */ 5743 */
5744 void API dw_mle_set_cursor_editable(HWND handle, int state) 5744 void API dw_mle_set_editable(HWND handle, int state)
5745 { 5745 {
5746 WinSendMsg(handle, MLM_SETREADONLY, MPFROMLONG(state ? FALSE : TRUE), 0); 5746 WinSendMsg(handle, MLM_SETREADONLY, MPFROMLONG(state ? FALSE : TRUE), 0);
5747 } 5747 }
5748 5748
5749 /* 5749 /*
5750 * Sets the word wrap state of an MLE box. 5750 * Sets the word wrap state of an MLE box.
5751 * Parameters: 5751 * Parameters:
5752 * handle: Handle to the MLE. 5752 * handle: Handle to the MLE.
5753 * state: TRUE if it wraps, FALSE if it doesn't. 5753 * state: TRUE if it wraps, FALSE if it doesn't.
5754 */ 5754 */
5755 void API dw_mle_set_cursor_word_wrap(HWND handle, int state) 5755 void API dw_mle_set_word_wrap(HWND handle, int state)
5756 { 5756 {
5757 WinSendMsg(handle, MLM_SETWRAP, MPFROMLONG(state), 0); 5757 WinSendMsg(handle, MLM_SETWRAP, MPFROMLONG(state), 0);
5758 } 5758 }
5759 5759
5760 /* 5760 /*
6102 * Parameters: 6102 * Parameters:
6103 * handle: Handle to the tree containing the item. 6103 * handle: Handle to the tree containing the item.
6104 * item: Handle of the item to be modified. 6104 * item: Handle of the item to be modified.
6105 * itemdata: User defined data to be associated with item. 6105 * itemdata: User defined data to be associated with item.
6106 */ 6106 */
6107 void API dw_tree_item_change_data(HWND handle, HTREEITEM item, void *itemdata) 6107 void API dw_tree_item_set_data(HWND handle, HTREEITEM item, void *itemdata)
6108 { 6108 {
6109 PCNRITEM pci = (PCNRITEM)item; 6109 PCNRITEM pci = (PCNRITEM)item;
6110 6110
6111 handle = handle; /* keep compiler happy */ 6111 handle = handle; /* keep compiler happy */
6112 if(!pci) 6112 if(!pci)
8217 strcpy(folder, path); 8217 strcpy(folder, path);
8218 strcpy(&folder[len-1], ffbuf.achName); 8218 strcpy(&folder[len-1], ffbuf.achName);
8219 8219
8220 item = dw_tree_insert(tree, ffbuf.achName, WinLoadFileIcon(folder, TRUE), parent, (void *)parent); 8220 item = dw_tree_insert(tree, ffbuf.achName, WinLoadFileIcon(folder, TRUE), parent, (void *)parent);
8221 tempitem = dw_tree_insert(tree, "", 0, item, 0); 8221 tempitem = dw_tree_insert(tree, "", 0, item, 0);
8222 dw_tree_item_change_data(tree, item, (void *)tempitem); 8222 dw_tree_item_set_data(tree, item, (void *)tempitem);
8223 } 8223 }
8224 } 8224 }
8225 DosFindClose(hdir); 8225 DosFindClose(hdir);
8226 } 8226 }
8227 } 8227 }
8246 8246
8247 folder[0] = name[6] = 'A' + drive; 8247 folder[0] = name[6] = 'A' + drive;
8248 8248
8249 items[drive] = dw_tree_insert(tree, name, WinLoadFileIcon(folder, TRUE), NULL, 0); 8249 items[drive] = dw_tree_insert(tree, name, WinLoadFileIcon(folder, TRUE), NULL, 0);
8250 tempitem = dw_tree_insert(tree, "", 0, items[drive], 0); 8250 tempitem = dw_tree_insert(tree, "", 0, items[drive], 0);
8251 dw_tree_item_change_data(tree, items[drive], (void *)tempitem); 8251 dw_tree_item_set_data(tree, items[drive], (void *)tempitem);
8252 } 8252 }
8253 else 8253 else
8254 items[drive] = 0; 8254 items[drive] = 0;
8255 } 8255 }
8256 dw_mutex_unlock(mtx); 8256 dw_mutex_unlock(mtx);
8340 data = data; 8340 data = data;
8341 if(tempitem) 8341 if(tempitem)
8342 { 8342 {
8343 char *folder = _tree_folder(window, item); 8343 char *folder = _tree_folder(window, item);
8344 8344
8345 dw_tree_item_change_data(window, item, 0); 8345 dw_tree_item_set_data(window, item, 0);
8346 dw_tree_item_delete(window, tempitem); 8346 dw_tree_item_delete(window, tempitem);
8347 8347
8348 if(*folder) 8348 if(*folder)
8349 { 8349 {
8350 strcat(folder, "*"); 8350 strcat(folder, "*");