BX 1z 401 prefsX462V1,  %6 Bo { , authorNicholas Riley authorEmail todo@sabi.net description)Maintain to-do lists in Radios outliner. homePageUrl/http://web.sabi.net/log/2002/04/26/toDoForRadionametoDo releaseDateversion1.0.16MGeneva ^fc.LANDmac if (op.countSubs (1) == 0) toDoSuite.markUncompleted () else op.expand (1) !.󺷸ics4ics4``fo`ff`f`ics8ics8icspoundDics#  4 l  !$󺷸 macwindowsBico (( !!/ :Geneva ⑁W_LANDmac toDoSuite.fullVisitNoDisplay (@toDoSuite.markUncompleted) Geneva T✃✇_LANDmac op.attributes.makeEmpty () 2HGeneva q✰_LANDmac Right-Click Menu - Uncheck (Mark To Be Completed) Remove Checkbox -  vpDGeneva puq.޸  $ 3expandiconrightClickMenu uKGeneva _LANDmac if (op.countSubs (1) == 0) toDoSuite.markCompleted () else op.expand (1) !.󺷸ics4ics4ics8ics8icspoundDics#      !$󺷸 macP windowsBico (( 8Geneva ܸ=_LANDmac toDoSuite.fullVisitNoDisplay (@toDoSuite.markCompleted) Geneva ✃]_LANDmac toDoSuite.removeAttributes () 2@Geneva q✹9_LANDmac Right-Click Menu - Check (Mark Completed) Remove Checkbox -  p*.Geneva \`&pq.r  $ 3expand icon *rightClickMenu VGeneva 2X^Z$1  & toDoCheckedx toDoUncheckedx^:Geneva 0bILANDmac toDoSuite.fullVisitNoDisplay (@toDoSuite.markUncompleted) 11 {=Geneva J!\"-kLANDmac on openWindow (adrWindow) local (xmlHeaderString) if not window.attributes.getOne ("xmlHeaders", @xmlHeaderString, adrWindow) return true try local (xmlHeaders, adrRenderInfo) xml.compile (xmlHeaderString, @xmlHeaders) adrRenderInfo = xml.getAddress (@xmlHeaders, "opmlRenderInfo") local (flRenderOutline = true) try get flRenderOutline from attribute flRenderOutline = boolean (xml.getAttribute (adrRenderInfo, "enabled")^) window.attributes.setOne ("flRenderOutline", flRenderOutline, adrWindow) local (adrPrefsTable) adrPrefsTable = xml.getAddress (adrRenderInfo, "#prefs") XXX better to use table.xmlToTable/table.tableToXml for encoding? on stripNamePrefixes (adr) local (tableindex, cttableitems, adrItem) cttableitems = sizeof (adr^) for tableindex = 1 to cttableitems adrItem = @adr^ [tableindex] if typeOf (adrItem^) == tabletype stripNamePrefixes (adrItem) table.rename (adrItem, xml.convertToDisplayName (nameOf (adrItem^))) sys.systemTask () stripNamePrefixes (adrPrefsTable) window.attributes.setOne ("#prefs", adrPrefsTable^, adrWindow) return true bundle testing code local (atts, adrWindow) new (tableType, @atts) atts.f = radio.outliner.getMyOutlineFile () Frontier.tools.windowTypes.findWindowWithMatchingAtts (@atts, @adrWindow) openWindow (adrWindow) {^*Geneva jo_LANDmac local (inTextMode = wp.inTextMode ()) if op.go (flatup, 1) local (isToDo = toDoSuite.isToDo ()) op.go (flatdown, 1) if isToDo toDoSuite.markUncompleted () wp.setTextMode (inTextMode) ^Z Geneva cceLANDmac on opRightClick (adrAdrMenu) user.callbacks.opRightClick.tools^ (adrAdrMenu) if toDoSuite.isToDo () return true local (adrMenu = adrAdrMenu^) local (oldTarget = target.get ()) target.set (adrMenu) op.firstSummit () op.insert ("Add Checkboxes", right) op.go (right, 1) menu.setScript (@toDoSuite.addCheckboxes) target.set (oldTarget) table.assign (@scratchpad.xyz, adrMenu^) return true opRightClick (@scratchpad.opRightClickMenu) vGeneva 1sYALANDmac on saveWindow (adrwindow, flRunnable) if adrwindow == nil adrwindow = window.frontmost () local (flRenderOutline, f) if window.getType (adrWindow) != outlineType return true if window.attributes.getOne ("flRenderOutline", @flRenderOutline, adrwindow) and flRenderOutline local (f) if not window.attributes.getOne ("f", @f, adrwindow) return true local (adrSitePrefs = @radio.data.website.["#prefs"], prefTable) new (tableType, @prefTable) table.copyContents (adrSitePrefs, @prefTable) if window.attributes.getOne ("#prefs", @prefTable.["#prefs"], adrwindow) table.copyContents (@prefTable.["#prefs"], @prefTable) prefTable.flRender = true render the outline local (origPrefTable) bundle try origPrefTable = adrSitePrefs^ table.assign (adrSitePrefs, prefTable) radio.html.publishStaticPage (f) if origPrefTable != nil table.assign (adrSitePrefs, origPrefTable) return true bundle testing code local (atts, adrWindow) new (tableType, @atts) atts.f = radio.outliner.getMyOutlineFile () Frontier.tools.windowTypes.findWindowWithMatchingAtts (@atts, @adrWindow) saveWindow (adrWindow, false) 81J!  , 9E P openWindowopInsertT opRightClick saveWindowXVGeneva 2XRN$11  fileMenuuser$RH Geneva ⚑e4LANDmac on fullVisitNoDisplay (visitProc) op.setDisplay (false) local (oldCursor = op.getCursor ()) try visitProc^ () op.visit (visitProc) else op.setDisplay (true) op.setCursor (oldCursor) scriptError (tryError) op.setDisplay (true) op.setCursor (oldCursor) ZGeneva 8 LANDmac local (dummy) on getRez (rezType) rez.getNthResource (file.folderfromPath (Frontier.getProgramPath ()) + "Appearance:Icons:" + iconName, rezType, 1, @dummy, @adrIcons^.mac.[string.replace (rezType, "#", "pound")]) on getIcon (iconName, adrNodeTypeTable) local (adrIcons = adrNodeTypeTable + "." + iconName + ".icon", rezType, winIco) table.surePath (adrIcons) new (tableType, adrIcons) new (tableType, @adrIcons^.mac) getRez ('ics4') getRez ('ics8') getRez ('ics#') table.assign (@adrIcons^.windows, file.readWholeFile (file.folderfromPath (Frontier.getProgramPath ()) + "Appearance:Icons:" + iconName + ".ico")) setBinaryType (@adrIcons^.windows, 'ico ') getIcon ("toDoChecked", @toDoNodeTypes) getIcon ("toDoUnchecked", @toDoNodeTypes) =TqGeneva  7XLANDmac This script is designed for internal use only; don't blame me if it blows up. Tue, Apr 30, 2002 at 3:07:58 AM by NJR if not dialog.ask ("Release toDo.root as version:", @toDoInfo.version) return toDoInfo.releaseDate = clock.now () local (x = string.parseAddress (this), myGDB = x [1], myName = file.fileFromPath (myGDB)) Frontier.tools.install (myGDB) local (pc = file.getPathChar ()) local (gemsFolder = user.radio.prefs.wwwfolder + radio.data.folderNames.wwwGemsSubFolderName + pc) target.set (this) fileMenu.saveCopy (gemsFolder + myName) file.openFolder (gemsFolder) if system.environment.isMac Finder.bringToFront () =T$o  importIcons'9release+VGeneva 2XGeneva ,]6LANDmac local (nodeType) op.attributes.getOne ("type", @nodeType) return nodeType != nil and {"toDoChecked", "toDoUnchecked"} contains nodeType -Geneva _LANDmac op.attributes.setOne ("type", "toDoChecked") /Geneva ⑰kOLANDmac op.attributes.setOne ("type", "toDoUnchecked") uGeneva 0➕rLANDmac op.attributes.makeEmpty () wp.setTextMode (true) force the outliner to refresh the node icon wp.setTextMode (false) 8Geneva WiLANDmac toDoSuite.fullVisitNoDisplay (@op.attributes.makeEmpty) |Geneva    ~LANDmac on toDoRender (adrOutline, cssName = "l", flExpand = false, depth = 0, length = 0) target.set (adrOutline) op.firstSummit () if flExpand op.fullExpand () local (level = 0, node = 0, s) on visit () loop local (u = "", extraAtts = "", type = "") local (hassubs = op.countSubs (1) > 0) local (hasurl = op.attributes.getOne ("url", @u)) if op.attributes.getOne ("type", @type) case type "toDoChecked" extraAtts = "style='list-style-image: url(http://web.sabi.net/log/gems/toDoChecked.png)'" "toDoUnchecked" extraAtts = "style='list-style-image: url(http://web.sabi.net/log/gems/toDoUnchecked.png)'" s = s + string.filledString (tab, level) + "

" if hasurl s = s + "" s = s + op.getLineText () if hasurl s = s + "" s = s + "

" + cr if (depth > 0 and level >= depth) or (length > 0 and node >= length) hassubs = false if hassubs if op.go (right, 1) level++ visit () level-- op.go (left, 1) if not op.go (down, 1) break else if level == 0 node++ visit () return s bundle testing code html.commands.releaseRenderedPage (@websites.samples.testRenderer) |06Geneva ' LANDmac on toDoRenderer (adrOutline) local (pta = html.getPageTableAddress ()) on pref (n, d) local (p = html.getPref (n, pta)) if p == true return d return p return toDoSuite.toDoRender (adrOutline, pref ("toDoCssPrefix", "l"), pref ("toDoFlExpand", false), pref ("toDoDepth", 0), pref ("toDoLength", 0)) TGeneva tLANDmac on toDoRenderOpml (url, cssName = "l", flExpand = false, depth = 0, length = 0) local (urlList, opmlText) urlList = string.urlSplit (url) if string.lower (urlList[1]) beginsWith "file:" opmlText = file.readWholeFile (file.urlToFile (url)) else opmlText = string.httpResultSplit (tcp.httpClient (server: urlList[2], path: urlList[3], flAcceptOpml: true)) opmlText = radio.string.convertToMac (@opmlText) local (ol) op.xmlToOutline (opmlText, @ol, true) return toDoSuite.toDoRender (@ol, cssName, flExpand, depth, length) bundle testing code toDoRenderOpml ("http://radio.weblogs.com/0100148/instantOutliner/nicholasRiley.opml", cssName: "instant") wp.newTextObject (toDoRenderOpml (file.fileToUrl (radio.outliner.getMyOutlineFile ()), cssName: "instant"), @workspace.renderedOutline) 1\w  $0 CO Xd kw   & addCheckboxesx callbacksx%fullVisitNoDisplayx%binternalx.LisToDox/ markCompletedx0$markUncompletedx0removeAttributesx1removeCheckboxesx2 toDoRenderx3a toDoRendererx9toDoRenderOpmlx;VGeneva 32E811  * 8D NtoDoDatatoDoInfo toDoNodeTypess toDoSuite?VGeneva g22RAXChicago? Lucida Grande qGeneva 6]Chicago? ENChicago? Lucida Grande