Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 3483226

Browse files
author
Monte Goulding
authored
Merge pull request #1866 from livecode/ide-cleanup
[[ Cleanup ]] Clean up a couple of bits of IDE code
2 parents 83ee167 + a1c4ab9 commit 3483226

2 files changed

Lines changed: 9 additions & 29 deletions

File tree

Toolset/palettes/menubar/revmenubar.livecodescript

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,27 +2367,6 @@ end markMenuItem
23672367

23682368
################################################################################
23692369

2370-
command revMenuBarUpdateRecentPaths
2371-
revIDECleanRecentPaths
2372-
2373-
local tRecentPathsMenu
2374-
put revIDEGetRecentPathsAsMenu() into tRecentPathsMenu
2375-
2376-
local tFileButtonText
2377-
put the text of button "File" of group "revMenuBar" of me into tFileButtonText
2378-
2379-
local tStart
2380-
set the wholeMatches to true
2381-
put lineOffset("Open Recent File", tFileButtonText) + 1 into tStart
2382-
set the wholeMatches to false
2383-
2384-
local tEnd
2385-
put lineOffset("&Close/W", tFileButtonText) - 1 into tEnd
2386-
put tRecentPathsMenu into line tStart to tEnd of tFileButtonText
2387-
set the text of button "File" of group "revMenuBar" of me to tFileButtonText
2388-
2389-
end revMenuBarUpdateRecentPaths
2390-
23912370
# OK-2007-05-03: Bug 4833.
23922371
# Parameters
23932372
# pObject : reference to the object to list handlers for

Toolset/palettes/tools/revtools.livecodescript

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,17 @@ on framePreferenceSelected pPreference, pValue
138138
revIDESetPreference "revTools_columns", pValue
139139
break
140140
case "revTools_show"
141-
local tCurrentPreferenceValue, tPreferencePosition
141+
local tCurrentPreferenceValue, tPreferencePosition, tItemOffset
142142
put revIDEGetPreference("revTools_show") into tCurrentPreferenceValue
143-
if pValue is among the items of tCurrentPreferenceValue then
144-
repeat with x = the number of items of tCurrentPreferenceValue down to 1
145-
if item x of tCurrentPreferenceValue is pValue then
146-
delete item x of tCurrentPreferenceValue
147-
end if
148-
end repeat
143+
put itemOffset(pValue, tCurrentPreferenceValue) into tItemOffset
144+
if tItemOffset is not 0 then
145+
delete item tItemOffset of tCurrentPreferenceValue
149146
else
150-
put "," & pValue after tCurrentPreferenceValue
147+
if tCurrentPreferenceValue is empty then
148+
put pValue into tCurrentPreferenceValue
149+
else
150+
put comma & pValue after tCurrentPreferenceValue
151+
end if
151152
end if
152153
revIDESetPreference "revTools_show", tCurrentPreferenceValue
153154
break

0 commit comments

Comments
 (0)