1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00

Remove SUBs sorting (F2) from Linux and Mac versions.

The sorting routine isn't compatible with these platforms. For now, it is Windows-only.
This commit is contained in:
FellippeHeitor 2016-01-15 04:10:30 -02:00
parent 10c53de173
commit 02f63c2457

View file

@ -7272,16 +7272,20 @@ END IF
'-------- init -------- '-------- init --------
ly$ = MKL$(1) ly$ = MKL$(1)
lySorted$ = ly$
CurrentlyViewingWhichSUBFUNC = 1 CurrentlyViewingWhichSUBFUNC = 1
PreferCurrentCursorSUBFUNC = 0 PreferCurrentCursorSUBFUNC = 0
InsideDECLARE = 0 InsideDECLARE = 0
FoundExternalSUBFUNC = 0 FoundExternalSUBFUNC = 0
l$ = ideprogname$ l$ = ideprogname$
IF l$ = "" THEN l$ = "Untitled" + tempfolderindexstr$ IF l$ = "" THEN l$ = "Untitled" + tempfolderindexstr$
IF INSTR(_OS$, "MAC") = 0 THEN lSorted$ = l$ IF INSTR(_OS$, "WIN") THEN
lySorted$ = ly$
lSorted$ = l$
END IF
TotalSUBs = 0 TotalSUBs = 0
SortedSubsFlag = idesortsubs
FOR y = 1 TO iden FOR y = 1 TO iden
a$ = idegetline(y) a$ = idegetline(y)
a$ = LTRIM$(RTRIM$(a$)) a$ = LTRIM$(RTRIM$(a$))
@ -7352,8 +7356,8 @@ FOR y = 1 TO iden
END IF END IF
l$ = l$ + sep + chr$(195) + chr$(196) + n$ + " " + sf$ + args$ l$ = l$ + sep + chr$(195) + chr$(196) + n$ + " " + sf$ + args$
'Populate SortedSubsList() IF INSTR(_OS$, "WIN") THEN
IF INSTR(_OS$, "MAC") = 0 THEN 'Populate SortedSubsList()
TotalSUBs = TotalSUBs + 1 TotalSUBs = TotalSUBs + 1
ListItemLength = LEN(n$ + " " + sf$ + args$) ListItemLength = LEN(n$ + " " + sf$ + args$)
REDIM _PRESERVE SortedSubsList(1 to TotalSUBs) as string * 998 REDIM _PRESERVE SortedSubsList(1 to TotalSUBs) as string * 998
@ -7368,7 +7372,7 @@ FOR x = LEN(l$) TO 1 STEP -1
IF a$ = chr$(195) THEN MID$(l$, x, 1) = chr$(192): EXIT FOR IF a$ = chr$(195) THEN MID$(l$, x, 1) = chr$(192): EXIT FOR
NEXT NEXT
IF INSTR(_OS$, "MAC") = 0 THEN IF INSTR(_OS$, "WIN") THEN
if TotalSUBs > 1 then if TotalSUBs > 1 then
DIM m as _MEM DIM m as _MEM
m = _MEM(SortedSubsList()) m = _MEM(SortedSubsList())
@ -7383,7 +7387,6 @@ IF INSTR(_OS$, "MAC") = 0 THEN
a$ = MID$(lSorted$, x, 1) a$ = MID$(lSorted$, x, 1)
IF a$ = chr$(195) THEN MID$(lSorted$, x, 1) = chr$(192): EXIT FOR IF a$ = chr$(195) THEN MID$(lSorted$, x, 1) = chr$(192): EXIT FOR
NEXT NEXT
SortedSubsFlag = idesortsubs
else else
SortedSubsFlag = 0 'Override idesortsubs if the current program doesn't have more than 1 subprocedure SortedSubsFlag = 0 'Override idesortsubs if the current program doesn't have more than 1 subprocedure
end if end if
@ -7434,13 +7437,15 @@ o(i).y = idewy + idesubwindow - 6
o(i).txt = idenewtxt("#Edit" + sep + "#Cancel") o(i).txt = idenewtxt("#Edit" + sep + "#Cancel")
o(i).dft = 1 o(i).dft = 1
If TotalSUBs > 1 then IF INSTR(_OS$, "WIN") THEN
i = i + 1 If TotalSUBs > 1 then
o(i).typ = 4 'check box i = i + 1
o(i).x = idewx - 22 o(i).typ = 4 'check box
o(i).y = idewy + idesubwindow - 6 o(i).x = idewx - 22
o(i).nam = idenewtxt("#Sorted A-Z") o(i).y = idewy + idesubwindow - 6
o(i).sel = SortedSubsFLAG o(i).nam = idenewtxt("#Sorted A-Z")
o(i).sel = SortedSubsFLAG
END IF
END IF END IF
@ -11652,5 +11657,4 @@ SELECT CASE DataType
END SELECT END SELECT
END SUB END SUB
'$INCLUDE:'wiki\wiki_methods.bas' '$INCLUDE:'wiki\wiki_methods.bas'