|
From: creecode <icr...@us...> - 2006-03-07 05:38:32
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/nodeTypes/types/manilaMessageReadOnly In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6328 Modified Files: expand Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: expand =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/nodeTypes/types/manilaMessageReadOnly/expand,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** expand 26 Mar 2005 19:42:21 -0000 1.1.1.1 --- expand 7 Mar 2006 05:38:28 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.nodeTypes.types.manilaMessageReadOnly.expand ! ÇExpand a manilaMessageReadOnly nodeType. ÇInsert the text of the message into the outline. ÇChanges ÇTue, Aug 22, 2000 at 11:31:52 AM by PBS ÇCreated. Display a Manila discussion group message in-line. ÇSaturday, September 30, 2000 at 4:09:26 PM by DW ÇWhen expanding a message add the responses after the message body. Ç11/03/00; 1:11:02 AM by JES ÇIf the message contains an opml document, use that to build the outline. Ç12/31/00; 5:06:20 PM by JES ÇOn Macs, convert opml text to Mac text before converting to an outline. local (oldTarget = target.set (window.frontmost ())); local (oldDisplay = op.getDisplay ()); op.setDisplay (false); local (atts); op.attributes.getAll (@atts); local (siteUrl = atts.siteUrl); local (msgNum = atts.msgnum); local (baseDiscussUrl = atts.baseDiscussUrl); local (username, password); on createInfoCallback (adrinfo) { if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { manila.windowTypes.setUsernameAndPassword (adrinfo, username, password)} else { bundle { //don't leave stale data lying around local (adrtempinfo = @system.temp.manila.data.sites.[nameOf (adrinfo^)]); if defined (adrtempinfo^) {delete (adrtempinfo)}; delete (adrinfo)}; dialog.alert ("Can't display this message for because your username and password are not set."); return (false)}}; local (adrinfo); if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { return (false)}; //the user cancelled the username/password dialog if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { return (false)}; //the user cancelled the password dialog local (siteinfo = adrinfo^); siteinfo.username = username; siteinfo.password = password; local (messageTable = manila.message.get (@siteinfo, atts.msgNum)); op.deleteSubs (); local (s); local (posted = messageTable.postTime); local (author = messageTable.memberName); if author != messageTable.member { ÇJES: changed parens to carets becuase they can be pasted into email programs -- it's a sendmail standard format author = author + " <" + messageTable.member + ">"}; if system.environment.isMac { //convert author to Mac text author = string.latinToMac (author)}; if defined (messageTable.opml) { //11/01/00 JES: insert opml instead of plain outline local (localOutline); if system.environment.isMac { //12/31/00 JES: convert to Mac text op.xmlToOutline (latinToMac.convert (messageTable.opml), @localOutline)} else { op.xmlToOutline (messageTable.opml, @localOutline)}; bundle { //delete <rules> from the outline local (oldTarget = target.set (@localOutline)); op.fullExpand (); op.firstSummit (); op.go (down, infinity); op.go (right, infinity); loop { if op.getLineText () beginsWith "<rules>" { op.deleteLine (); continue}; if not op.go (flatup, 1) { break}}; try {target.set (oldTarget)}}; op.insertOutline (@localOutline, right)} else { //tabbed outline, or html text if defined (messageTable.outline) { if system.environment.isMac { s = string.latinToMac (messageTable.outline)} else { s = messageTable.outline}; local (localOutline); op.newOutlineObject (s, @localOutline); op.insertOutline (@localOutline, right)} else { s = messageTable.body; s = string.replaceAll (s, "\r\r", "\r"); //collapse blank lines s = string.replaceAll (s, "\r\n\r\n", "\r"); //collapse blank lines op.insert (s, right); op.go (left, 1)}}; bundle { //add the responses to the message local (flGoneRight = true); on addMessage (adrTable, flLastMessage=false) { local (linetext = adrTable^.subject); local (author = adrTable^.memberName); if author != adrTable^.member { author = author + " <" + adrTable^.member + ">"}; linetext = linetext + " -- " + author; if system.environment.isMac { linetext = string.latinToMac (linetext)}; local (dir = down); if not flGoneRight { dir = right; flGoneRight = true}; op.insert (linetext, dir); adrTable^.siteUrl = siteUrl; adrTable^.baseDiscussUrl = baseDiscussUrl; adrTable^.type = "manilaMessageReadOnly"; adrTable^.flLastMessage = flLastMessage; manila.nodeTypes.addSitePrefsToAtts (adrinfo, adrTable); op.attributes.addGroup (adrTable)}; local (messageHeaders = manila.message.getResponsesHeaders (@siteinfo, msgNum)); op.go (right, 1); op.go (down, infinity); local (i); for i = 1 to sizeOf (messageHeaders) { local (flLastMessage = false); if i == 1 { flLastMessage = true}; addMessage (@messageHeaders [i], flLastMessage)}; op.go (left, 1)}; op.setDisplay (oldDisplay); try {oldTarget = target.set (oldTarget)}; return (true) \ No newline at end of file --- 1,134 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.nodeTypes.types.manilaMessageReadOnly.expand ! «Changes ! «2/28/06; 12:02:46 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «2000 ! «12/31/00; 5:06:20 PM by JES ! «On Macs, convert opml text to Mac text before converting to an outline. ! «11/03/00; 1:11:02 AM by JES ! «If the message contains an opml document, use that to build the outline. ! «9/30/00; 4:09:26 PM by DW ! «When expanding a message add the responses after the message body. ! «8/22/00; 11:31:52 AM by PBS ! «Created. Display a Manila discussion group message in-line. ! «Expand a manilaMessageReadOnly nodeType. Insert the text of the message into the outline. ! ! local (oldTarget = target.set (window.frontmost ())); ! local (oldDisplay = op.getDisplay ()); ! op.setDisplay (false); ! ! local (atts); ! op.attributes.getAll (@atts); ! local (siteUrl = atts.siteUrl); ! local (msgNum = atts.msgnum); ! local (baseDiscussUrl = atts.baseDiscussUrl); ! ! local (username, password); ! on createInfoCallback (adrinfo) { ! if manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! manila.windowTypes.setUsernameAndPassword (adrinfo, username, password)} ! else { ! bundle { //don't leave stale data lying around ! local (adrtempinfo = @system.temp.manila.data.sites.[nameOf (adrinfo^)]); ! if defined (adrtempinfo^) {delete (adrtempinfo)}; ! delete (adrinfo)}; ! dialog.alert ("Can't display this message for because your username and password are not set."); ! return (false)}}; ! ! local (adrinfo); ! if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { ! return (false)}; //the user cancelled the username/password dialog ! if not manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password) { ! return (false)}; //the user cancelled the password dialog ! local (siteinfo = adrinfo^); ! siteinfo.username = username; ! siteinfo.password = password; ! ! local (messageTable = manila.message.get (@siteinfo, atts.msgNum)); ! ! op.deleteSubs (); ! ! local (s); ! ! local (posted = messageTable.postTime); ! local (author = messageTable.memberName); ! if author != messageTable.member { ! «JES: changed parens to carets becuase they can be pasted into email programs -- it's a sendmail standard format ! author = author + " <" + messageTable.member + ">"}; ! if system.environment.isMac { //convert author to Mac text ! author = string.latinToMac (author)}; ! ! if defined (messageTable.opml) { //11/01/00 JES: insert opml instead of plain outline ! local (localOutline); ! if system.environment.isMac { //12/31/00 JES: convert to Mac text ! op.xmlToOutline (string.latinToMac (messageTable.opml), @localOutline)} ! else { ! op.xmlToOutline (messageTable.opml, @localOutline)}; ! bundle { //delete <rules> from the outline ! local (oldTarget = target.set (@localOutline)); ! op.fullExpand (); ! op.firstSummit (); ! op.go (down, infinity); ! op.go (right, infinity); ! loop { ! if op.getLineText () beginsWith "<rules>" { ! op.deleteLine (); ! continue}; ! if not op.go (flatup, 1) { ! break}}; ! try {target.set (oldTarget)}}; ! op.insertOutline (@localOutline, right)} ! else { //tabbed outline, or html text ! if defined (messageTable.outline) { ! if system.environment.isMac { ! s = string.latinToMac (messageTable.outline)} ! else { ! s = messageTable.outline}; ! local (localOutline); ! op.newOutlineObject (s, @localOutline); ! op.insertOutline (@localOutline, right)} ! else { ! s = messageTable.body; ! s = string.replaceAll (s, "\r\r", "\r"); //collapse blank lines ! s = string.replaceAll (s, "\r\n\r\n", "\r"); //collapse blank lines ! op.insert (s, right); ! op.go (left, 1)}}; ! ! bundle { //add the responses to the message ! local (flGoneRight = true); ! on addMessage (adrTable, flLastMessage=false) { ! local (linetext = adrTable^.subject); ! local (author = adrTable^.memberName); ! if author != adrTable^.member { ! author = author + " <" + adrTable^.member + ">"}; ! linetext = linetext + " -- " + author; ! if system.environment.isMac { ! linetext = string.latinToMac (linetext)}; ! local (dir = down); ! if not flGoneRight { ! dir = right; ! flGoneRight = true}; ! op.insert (linetext, dir); ! ! adrTable^.siteUrl = siteUrl; ! adrTable^.baseDiscussUrl = baseDiscussUrl; ! adrTable^.type = "manilaMessageReadOnly"; ! adrTable^.flLastMessage = flLastMessage; ! manila.nodeTypes.addSitePrefsToAtts (adrinfo, adrTable); ! op.attributes.addGroup (adrTable)}; ! local (messageHeaders = manila.message.getResponsesHeaders (@siteinfo, msgNum)); ! op.go (right, 1); ! op.go (down, infinity); ! local (i); ! for i = 1 to sizeOf (messageHeaders) { ! local (flLastMessage = false); ! if i == 1 { ! flLastMessage = true}; ! addMessage (@messageHeaders [i], flLastMessage)}; ! op.go (left, 1)}; ! ! op.setDisplay (oldDisplay); ! try {oldTarget = target.set (oldTarget)}; ! ! return (true) \ No newline at end of file |