|
From: creecode <icr...@us...> - 2006-03-07 05:39:24
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes/types/manilaMessage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6847 Modified Files: openMessage Log Message: replace calls to verbs at extensions.latinToMac with string.(latin/mac)To(Latin/Mac) verbs Index: openMessage =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/apps/Manila/windowTypes/types/manilaMessage/openMessage,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openMessage 26 Mar 2005 19:42:26 -0000 1.1.1.1 --- openMessage 7 Mar 2006 05:39:21 -0000 1.2 *************** *** 1,3 **** ! FrontierVcsFile:1:scpt:system.verbs.apps.Manila.windowTypes.types.manilaMessage.openMessage ! on openMessage (siteurl, msgnum, flHidden=false, flHomePage=false, adradrwindow=nil) { ÇOpen a message in a Manila site. ÇChanges Ç3/11/02; 11:56:46 AM by JES ÇIf this is a Mac, and the message is opml, convert to Mac text. bundle { //if the window is already open, bring it to the front local (t); new (tableType, @t); local (adrtype = parentOf (this^)); t.type = nameOf (adrtype^); t.msgnum = msgnum; manila.windowTypes.findSiteInfo (siteurl, @t.adrSiteInfo); local (adrwindow); if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { local (title, flReadOnly = false); window.attributes.getOne ("title", @title, adrwindow); window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); if not flHidden { edit (adrwindow, title, flReadOnly)}; return (true)}}; 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)}; return (false)}}; local (adrinfo); if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { return (false)}; //the user cancelled the username/password dialog bundle { //get the site name and displaySiteName if we need them if adrinfo^.siteName == "" { adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; if adrinfo^.displaySiteName == "" { adrinfo^.displaySiteName = adrinfo^.siteName}}; manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password); local (siteinfo = adrinfo^); siteinfo.username = username; siteinfo.password = password; local (msg = manila.message.get (@siteinfo, msgnum)); //get the message from the server bundle { //update server info if defined (msg.flServerAcceptsOpml) { adrinfo^.flServerAcceptsOpml = msg.flServerAcceptsOpml}; if defined (msg.displaySiteName) { adrinfo^.displaySiteName = msg.displaySiteName}}; local (windowTitle = adrinfo^.displaySiteName + ": " + msg.subject); local (flReadOnly = false); //the server doesn't support this, but there may be need in the future local (adr = Frontier.tools.windowTypes.newWindow ("manilaMessage", true, windowTitle)); window.attributes.setOne ("adrSiteInfo", adrinfo, adr); bundle { //put the message text in the window local (bodyType = "text/html"); if defined (msg.bodyType) { bodyType = msg.bodyType}; case bodyType { "text/html" { op.newOutlineObject (msg.body, adr)}; "text/x-outline-tabbed" { op.newOutlineObject (msg.outline, adr)}; "text/x-opml" { if defined (msg.opml) { local (opmltext = msg.opml); if system.environment.isMac { opmltext = latinToMac.convert (opmltext)}; op.xmlToOutline (opmltext, adr)} else { op.newOutlineObject (msg.body, adr)}}}; if defined (msg.windowInfo) { manila.windowTypes.restoreWindowState (adr, @msg.windowInfo)}; if defined (msg.flReadOnly) { flReadOnly = msg.flReadOnly}}; bundle { //set window attributes local (atts); new (tableType, @atts); atts.subject = msg.subject; atts.msgnum = msg.msgnum; atts.inResponseTo = msg.inResponseTo; atts.responses = msg.responses; atts.flAddToStoriesList = false; //if it's already a story, we don't need to add it again atts.timeCreated = msg.postTime; if defined (msg.lastUpdate) { //set lastSaved and the window's timeModified local (lastSaved = msg.lastUpdate, now = clock.now ()); if msg.lastUpdate > now { //make sure lastSaved is not later than now lastSaved = now}; atts.lastSaved = lastSaved; setTimeModified (adr, lastSaved)}; if defined (msg.url) { atts.url = msg.url}; if flHomePage { //get the home page url from the siteinfo table's name local (url = nameOf (adrinfo^)); local (parts = string.urlSplit (url)); if parts[2] contains ":" { if string.nthField (parts[2], ':', 2) == "80" { url = parts[1] + string.nthField (parts[2], ':', 1) + "/" + parts[3]}}; atts.url = url}; if defined (msg.rendererInfo) { atts.rendererInfo = msg.rendererInfo}; if defined (msg.member) { atts.authorEmail = msg.member}; if defined (msg.memberName) { atts.authorName = msg.memberName}; if defined (msg.ctReads) { atts.ctReads = msg.ctReads}; window.attributes.addGroup (@atts, adr)}; manila.message.checkOut (adrinfo, msgnum); if not flHidden { //open the window edit (adr, windowTitle, flReadOnly)}; if adradrwindow != nil { adradrwindow^ = adr}; return (true)}; bundle { //debugging openMessage ("http://test.w2k.jspace.org/", 3)} \ No newline at end of file --- 1,131 ---- ! FrontierVcsFile:2:scpt:system.verbs.apps.Manila.windowTypes.types.manilaMessage.openMessage ! on openMessage (siteurl, msgnum, flHidden=false, flHomePage=false, adradrwindow=nil) { ! «Changes ! «2/28/06; 12:07:07 PM by TAC ! «replace extensions.latinToMac.convert with string.latinToMac ! «3/11/02; 11:56:46 AM by JES ! «If this is a Mac, and the message is opml, convert to Mac text. ! «Open a message in a Manila site. ! ! bundle { //if the window is already open, bring it to the front ! local (t); new (tableType, @t); ! local (adrtype = parentOf (this^)); ! t.type = nameOf (adrtype^); ! t.msgnum = msgnum; ! manila.windowTypes.findSiteInfo (siteurl, @t.adrSiteInfo); ! local (adrwindow); ! if Frontier.tools.windowTypes.findWindowWithMatchingAtts (@t, @adrwindow) { ! local (title, flReadOnly = false); ! window.attributes.getOne ("title", @title, adrwindow); ! window.attributes.getOne ("flReadOnly", @flReadOnly, adrwindow); ! if not flHidden { ! edit (adrwindow, title, flReadOnly)}; ! return (true)}}; ! ! 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)}; ! return (false)}}; ! ! local (adrinfo); ! if not manila.windowTypes.findSiteInfo (siteUrl, @adrinfo, @createInfoCallback) { ! return (false)}; //the user cancelled the username/password dialog ! ! bundle { //get the site name and displaySiteName if we need them ! if adrinfo^.siteName == "" { ! adrinfo^.siteName = manila.getSiteName (nameOf (adrinfo^))}; ! if adrinfo^.displaySiteName == "" { ! adrinfo^.displaySiteName = adrinfo^.siteName}}; ! ! manila.windowTypes.getUsernameAndPassword (adrinfo, @username, @password); ! local (siteinfo = adrinfo^); ! siteinfo.username = username; ! siteinfo.password = password; ! ! local (msg = manila.message.get (@siteinfo, msgnum)); //get the message from the server ! ! bundle { //update server info ! if defined (msg.flServerAcceptsOpml) { ! adrinfo^.flServerAcceptsOpml = msg.flServerAcceptsOpml}; ! if defined (msg.displaySiteName) { ! adrinfo^.displaySiteName = msg.displaySiteName}}; ! ! local (windowTitle = adrinfo^.displaySiteName + ": " + msg.subject); ! local (flReadOnly = false); //the server doesn't support this, but there may be need in the future ! local (adr = Frontier.tools.windowTypes.newWindow ("manilaMessage", true, windowTitle)); ! window.attributes.setOne ("adrSiteInfo", adrinfo, adr); ! ! bundle { //put the message text in the window ! local (bodyType = "text/html"); ! if defined (msg.bodyType) { ! bodyType = msg.bodyType}; ! case bodyType { ! "text/html" { ! op.newOutlineObject (msg.body, adr)}; ! "text/x-outline-tabbed" { ! op.newOutlineObject (msg.outline, adr)}; ! "text/x-opml" { ! if defined (msg.opml) { ! local (opmltext = msg.opml); ! if system.environment.isMac { ! opmltext = string.latinToMac (opmltext)}; ! op.xmlToOutline (opmltext, adr)} ! else { ! op.newOutlineObject (msg.body, adr)}}}; ! if defined (msg.windowInfo) { ! manila.windowTypes.restoreWindowState (adr, @msg.windowInfo)}; ! if defined (msg.flReadOnly) { ! flReadOnly = msg.flReadOnly}}; ! ! bundle { //set window attributes ! local (atts); new (tableType, @atts); ! atts.subject = msg.subject; ! atts.msgnum = msg.msgnum; ! atts.inResponseTo = msg.inResponseTo; ! atts.responses = msg.responses; ! atts.flAddToStoriesList = false; //if it's already a story, we don't need to add it again ! atts.timeCreated = msg.postTime; ! if defined (msg.lastUpdate) { //set lastSaved and the window's timeModified ! local (lastSaved = msg.lastUpdate, now = clock.now ()); ! if msg.lastUpdate > now { //make sure lastSaved is not later than now ! lastSaved = now}; ! atts.lastSaved = lastSaved; ! setTimeModified (adr, lastSaved)}; ! if defined (msg.url) { ! atts.url = msg.url}; ! if flHomePage { //get the home page url from the siteinfo table's name ! local (url = nameOf (adrinfo^)); ! local (parts = string.urlSplit (url)); ! if parts[2] contains ":" { ! if string.nthField (parts[2], ':', 2) == "80" { ! url = parts[1] + string.nthField (parts[2], ':', 1) + "/" + parts[3]}}; ! atts.url = url}; ! if defined (msg.rendererInfo) { ! atts.rendererInfo = msg.rendererInfo}; ! if defined (msg.member) { ! atts.authorEmail = msg.member}; ! if defined (msg.memberName) { ! atts.authorName = msg.memberName}; ! if defined (msg.ctReads) { ! atts.ctReads = msg.ctReads}; ! window.attributes.addGroup (@atts, adr)}; ! ! manila.message.checkOut (adrinfo, msgnum); ! ! if not flHidden { //open the window ! edit (adr, windowTitle, flReadOnly)}; ! ! if adradrwindow != nil { ! adradrwindow^ = adr}; ! ! return (true)}; ! ! «bundle // testing ! «openMessage ("http://test.w2k.jspace.org/", 3) \ No newline at end of file |