Changeset 79 for trunk/ICeCoffEE/ICeCoffEE/ICeCoffEETextEdit.c
- Timestamp:
- 02/02/03 14:06:10 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICeCoffEE/ICeCoffEE/ICeCoffEETextEdit.c
r75 r79 20 20 //----------------------------------------------------------------------------- 21 21 TEClickProcPtr gTEClick = NULL; 22 Handle gErrors;23 22 24 23 //============================================================================= … … 119 118 SInt8 s; 120 119 ConstStringPtr hint; 120 Boolean needsSlashes; 121 121 textH = (Handle)TEGetText(teH); 122 122 s = HGetState(textH); 123 123 HLock(textH); 124 hint = ICCF_GetHint(inst, *textH, selStart, selEnd); 124 hint = ICCF_GetHint(inst, *textH, GetHandleSize(textH), &selStart, &selEnd, &needsSlashes); 125 ICapeprintf("ICCF_DoCommandClick: %sneedsSlashes\n", needsSlashes ? "" : "doesn't "); 125 126 if (hint != NULL) { 126 127 CGrafPtr thePort = teH[0]->inPort; 127 128 if (!QDIsPortBuffered(thePort)) thePort = NULL; 128 129 129 TESetSelect(selStart, selEnd, teH); 130 130 if (thePort != NULL) QDFlushPortBuffer(thePort, NULL); … … 136 136 } else { 137 137 err = ICParseURL(inst, hint, *textH, GetHandleSize(textH), &selStart, &selEnd, urlH); 138 if (err == noErr) 139 err = ICCF_DoURLActionMenu(inst, hint, *urlH, 0, GetHandleSize(urlH) - 1); 138 if (err == noErr) { 139 if (needsSlashes) ICCF_AddSlashes(urlH, hint); 140 err = ICCF_DoURLActionMenu(inst, hint, *urlH, 0, GetHandleSize(urlH)); 141 } 140 142 DisposeHandle(urlH); 141 143 } 142 144 } else { 143 err = ICLaunchURL(inst, hint, *textH, GetHandleSize(textH), &selStart, &selEnd); 145 if (needsSlashes) { 146 Handle urlH = NewHandle(0); 147 err = ICParseURL(inst, hint, *textH, GetHandleSize(textH), &selStart, &selEnd, urlH); 148 if (err == noErr) { 149 ICCF_AddSlashes(urlH, hint); 150 // don't want to disturb text selection 151 long tmpEnd = GetHandleSize(urlH); 152 long tmpStart = 0; 153 err = ICLaunchURL(inst, hint, *urlH, GetHandleSize(urlH), &tmpStart, &tmpEnd); 154 } 155 } else { 156 err = ICLaunchURL(inst, hint, *textH, GetHandleSize(textH), &selStart, &selEnd); 157 } 144 158 } 145 159
Note:
See TracChangeset
for help on using the changeset viewer.