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

Commit c2cf1c2

Browse files
Merge pull request #2037 from livecode/merge-develop-9.0_21.02.2019
Merge develop 9.0 21.02.2019
2 parents 2246802 + 315d17b commit c2cf1c2

29 files changed

+100
-26
lines changed
-40.2 KB
Binary file not shown.

Toolset/libraries/revidelibrary.8.livecodescript

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8095,21 +8095,26 @@ on revIDECut
80958095
end if
80968096

80978097
lock screen
8098-
lock messages
8098+
80998099
if the selectedImage is not empty then
81008100
# If the there is a selection in an image using the image selection tool
81018101
# Then make sure no text is selected before doing the cut
8102-
if the selectedText is not empty then select empty
8102+
if the selectedText is not empty then
8103+
lock messages
8104+
select empty
8105+
unlock messages
8106+
end if
81038107
set the defaultStack to revTargetStack(the long id of the selectedImage)
81048108
cut
8109+
unlock screen
81058110
exit revIDECut
81068111
end if
81078112

81088113
# Ensure the user is aware of the consequences of the cut wrt groups
81098114
if revCheckGroupDelete() then
81108115
cut
81118116
end if
8112-
unlock messages
8117+
81138118
unlock screen
81148119

81158120
ideMessageSend "ideSelectedObjectChanged"

Toolset/palettes/inspector/editors/com.livecode.pi.editorlist.behavior.livecodescript

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
script "com.livecode.pi.editorList.behavior"
1+
script "com.livecode.pi.editorList.behavior" with behavior "revInspectorEditorBehavior"
22
local sNumChildren
33

44
constant kComponentSpacing = 6
@@ -117,7 +117,15 @@ on editorValueChanged
117117
repeat with x =1 to sNumChildren
118118
put the editorValue of group ("editor" & x) of me into tValueArray[x]
119119
end repeat
120-
combine tValueArray with tDelimiter
121-
set the editorValue of me to tValueArray
120+
121+
// TODO: Use 'combine tValueArray with tDelimiter' once we add sorting option to combine
122+
// See bug 9344
123+
local tList
124+
repeat for each element tElement in tValueArray
125+
put tElement & tDelimiter after tList
126+
end repeat
127+
delete char -1 of tList
128+
set the editorValue of me to tList
129+
122130
dispatch "updateProperty"
123131
end editorValueChanged

Toolset/palettes/revdatagridlibrary/behaviorsdatagridbuttonbehavior.livecodescript

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ private command _CreateMobileScroller
324324
(_ControlType() is "table" and \
325325
the dgProps["show hscrollbar"] of me is not false) then
326326
if sScrollerId is empty or sScrollerId is not among the lines of mobileControls() then
327-
mobileControlCreate "scroller"
328-
put the result into sScrollerId
327+
put the long id of me into sScrollerId
328+
mobileControlCreate "scroller", sScrollerId
329329
end if
330330
mobileControlSet sScrollerId, "canBounce", "true"
331331
mobileControlSet sScrollerId, "pagingEnabled", "false"
@@ -3233,6 +3233,10 @@ private command _list.DrawCachedControlList pForceRefresh, pCallback, pCallbackC
32333233
local theSequence
32343234
local theTopLeft
32353235
-----
3236+
3237+
# If controls haven't been cached yet then exit
3238+
if sControlOfIndexA is not an array then return empty
3239+
32363240
put false into noRedrawNeeded
32373241
put empty into theFirstControlHeight
32383242

@@ -5431,7 +5435,7 @@ end uProps
54315435
getprop uProps[pProp]
54325436
if the target is not me then pass uProps
54335437
return the dgProps[pProp] of me
5434-
end uProps[pProp]
5438+
end uProps
54355439
## end temporary aliases
54365440

54375441

@@ -5755,7 +5759,7 @@ setprop dgProps [pProp] pValue
57555759
show group "dgHorizontalComponents" of me
57565760
_table.RegenerateColumns
57575761
-- set the uEffectiveColumnWidths of group "dgHeader" of group "dgHeaderMask" of group "dgHeaderComponents" of me \
5758-
-- to _table.GetEffectiveColumnWidths()
5762+
-- to _table.GetEffectiveColumnWidths()
57595763

57605764
## Set any props that have special settings for table.
57615765
lock messages
@@ -5776,6 +5780,7 @@ setprop dgProps [pProp] pValue
57765780
unlock messages
57775781

57785782
ResizeToFit
5783+
ResetList
57795784
unlock screen
57805785
break
57815786

@@ -5796,7 +5801,7 @@ setprop dgProps [pProp] pValue
57965801
unlock messages
57975802
put empty into sFormattedHeight
57985803
put empty into sControlHeights
5799-
5804+
58005805
DG2_EnsureRowChainedBehavior
58015806
end if
58025807
break
@@ -5837,7 +5842,7 @@ setprop dgProps [pProp] pValue
58375842
case "scroll when vscrollbar is hidden"
58385843
case "scroll when hscrollbar is hidden"
58395844
case "scroll selections into view"
5840-
5845+
58415846
case "animate actions"
58425847
case "enable swipe"
58435848
lock messages
@@ -5859,13 +5864,13 @@ setprop dgProps [pProp] pValue
58595864
lock messages
58605865
set the dgProps[pProp] of me to pValue
58615866
unlock messages
5862-
5867+
58635868
-- We're setting new template controls. Redraw the list to take these new controls into account.
58645869
DG2_CustomisableControlsClearByName pProp
58655870
RefreshList
58665871
end if
58675872
break
5868-
5873+
58695874
case "alternate row colors"
58705875
lock messages
58715876
set the dgProps[pProp] of me to pValue is true
@@ -6013,7 +6018,7 @@ setprop dgProps [pProp] pValue
60136018
-- Update any customisable controls to take into account the row resize.
60146019
DG2_CustomisableControlsResizeDefaults
60156020
DG2_CustomisableControlsClear
6016-
6021+
60176022
ResetList
60186023
unlock screen
60196024
end if
@@ -6927,7 +6932,7 @@ getprop dgDataControlOfIndex [pIndex]
69276932
end if
69286933
end if
69296934
return empty
6930-
end dgDataControlOfIndex[pIndex]
6935+
end dgDataControlOfIndex
69316936

69326937

69336938
function ColumnControlOfIndex pColumn, pIndex
-3.51 KB
Binary file not shown.

Toolset/palettes/script editor/behaviors/revsecommoneditorbehavior.livecodescript

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,7 @@ command scriptFormat pScope, pDontGroup
30843084
if tStart > tEnd then
30853085
put tOldFirstIndent into tOldLastIndent
30863086
else
3087-
put textFormatGetLineIndent(line (tLine + tSelectionLineCount) of tScript) into tOldLastIndent
3087+
put textFormatGetLineIndent(line (tLine + tSelectionLineCount - 1) of tScript) into tOldLastIndent
30883088
end if
30893089

30903090
local tCode
@@ -3111,17 +3111,27 @@ command scriptFormat pScope, pDontGroup
31113111
# The selection offsets are composed of two parts, the difference in the indent of the line that the selection started / ended on
31123112
# and the difference in the number of chars before that line.
31133113
local tFirstSelectionOffset
3114-
put (the number of chars of tNewFirstIndent - the number of chars of tOldFirstIndent) + (the number of chars of line 1 to (tLine - 1) of tNewScript - the number of chars of line 1 to (tLine - 1) of tScript) into tFirstSelectionOffset
3114+
put (the number of chars of line 1 to tLine of tNewScript - the number of chars of line 1 to tLine of tScript) into tFirstSelectionOffset
3115+
3116+
put (the number of chars of line 1 to tLine - 1 of tNewScript) + 2 into tFirstLineChar
3117+
if tLine is 1 then subtract 1 from tFirstLineChar
31153118

31163119
local tLastSelectionOffset
31173120
if tStart > tEnd then
31183121
put tFirstSelectionOffset into tLastSelectionOffset
31193122
else
3120-
put (the number of chars of tNewLastIndent - the number of chars of tOldLastIndent) + (the number of chars of line 1 to (tLine + tSelectionLineCount) of tNewScript - the number of chars of line 1 to (tLine + tSelectionLineCount) of tScript) into tLastSelectionOffset
3121-
end if
3123+
put(the number of chars of line 1 to (tLine + (tSelectionLineCount - 1)) of tNewScript - the number of chars of line 1 to (tLine + (tSelectionLineCount - 1)) of tScript) into tLastSelectionOffset end if
31223124

31233125
if tStart is not empty then
3124-
select char (tStart + tFirstSelectionOffset) to (tEnd + tLastSelectionOffset) of field "Script" of me
3126+
if tStart > tEnd then
3127+
select char (tStart + tFirstSelectionOffset ) to (tEnd + tFirstSelectionOffset ) of field "Script" of me
3128+
else
3129+
put tStart + tFirstSelectionOffset into tStart
3130+
if tStart < tFirstLineChar + (the number of chars of tNewFirstIndent) then
3131+
put tFirstLineChar + (the number of chars of tNewFirstIndent) into tStart
3132+
end if
3133+
select char (tStart) to (tEnd + tLastSelectionOffset) of field "Script" of me
3134+
end if
31253135
end if
31263136
end if
31273137

Toolset/palettes/script editor/behaviors/revseeditorbehavior.livecodescript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,14 +1951,14 @@ command showNextFindResult pQuery, pIsRegExp, pUseWildCards, pWholeMatch, pIgnor
19511951
revSESetCurrentObject tObject, empty, true
19521952
put 1 into tStart
19531953
else
1954-
if tStart is empty then
1954+
if sLastFindLocation is empty then
19551955
# Must be the first iteration
19561956
put tSearch["start"] into tStart
19571957
else
19581958
# Calculate a new search start
19591959
if sLastFindObject is not empty and seGetRuggedId(sLastFindObject) is seGetRuggedId(getObjectID()) and sLastFindLocation is not empty then
19601960
if pInteractive then
1961-
put item 1 of sLastFindLocation into tStart
1961+
put item 2 of sLastFindLocation into tStart
19621962
else
19631963
put item 1 of sLastFindLocation + 1 into tStart
19641964
end if
Binary file not shown.

Toolset/palettes/standalone settings/revstandalonesettingsandroidbehavior.livecodescript

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ on updateAndroidSettingState
127127
set the enabled of group "Android Settings" of me to tEnabled
128128
set the visible of button "Androidchecked" to tEnabled
129129
set the opaque of button "Androidchecked" to false
130+
131+
-- splash screen is not supported in Indy and Business editions
132+
if revLicenseType() is "commercial" \
133+
or revLicenseType() is "professional" then
134+
set the enabled of button "Splash Chooser" of group "Android Settings" of me to false
135+
end if
130136
end updateAndroidSettingState
131137

132138
on updateAndroidArch pArch, pBuild

Toolset/palettes/standalone settings/revstandalonesettingsiosbehavior.livecodescript

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ on updateSettings
181181
put computeDefault(tSettings["ios,iPhone 6 Plus Landscape splash"], empty) into field "iPhone 6 Plus Landscape Splash"
182182
put computeDefault(tSettings["ios,iPhone X Portrait splash"], empty) into field "iPhone X Portrait Splash"
183183
put computeDefault(tSettings["ios,iPhone X Landscape splash"], empty) into field "iPhone X Landscape Splash"
184+
put computeDefault(tSettings["ios,iPhone XR Portrait splash"], empty) into field "iPhone XR Portrait Splash"
185+
put computeDefault(tSettings["ios,iPhone XR Landscape splash"], empty) into field "iPhone XR Landscape Splash"
186+
put computeDefault(tSettings["ios,iPhone XSMAX Portrait splash"], empty) into field "iPhone XSMAX Portrait Splash"
187+
put computeDefault(tSettings["ios,iPhone XSMAX Landscape splash"], empty) into field "iPhone XSMAX Landscape Splash"
184188
put computeDefault(tSettings["ios,ipad portrait splash"], empty) into field "iPad Portrait Splash"
185189
put computeDefault(tSettings["ios,ipad landscape splash"], empty) into field "iPad Landscape Splash"
186190
put computeDefault(tSettings["ios,ipad retina portrait splash"], empty) into field "iPad Retina Portrait Splash"
@@ -361,6 +365,10 @@ command updateOrientationSettings
361365
set the enabled of group "iPhone 6 Plus Landscape Splash" to tInitialOrientation contains "landscape"
362366
set the enabled of group "iPhone X Portrait Splash" to tInitialOrientation contains "portrait"
363367
set the enabled of group "iPhone X Landscape Splash" to tInitialOrientation contains "landscape"
368+
set the enabled of group "iPhone XR Portrait Splash" to tInitialOrientation contains "portrait"
369+
set the enabled of group "iPhone XR Landscape Splash" to tInitialOrientation contains "landscape"
370+
set the enabled of group "iPhone XSMAX Portrait Splash" to tInitialOrientation contains "portrait"
371+
set the enabled of group "iPhone XSMAX Landscape Splash" to tInitialOrientation contains "landscape"
364372
end if
365373
end updateOrientationSettings
366374

@@ -388,6 +396,10 @@ command enableDeviceSpecificSettings pDevices
388396
set the enabled of group "iPhone 6 Plus Landscape Splash" to (1 is among the items of pDevices)
389397
set the enabled of group "iPhone X Portrait Splash" to (1 is among the items of pDevices)
390398
set the enabled of group "iPhone X Landscape Splash" to (1 is among the items of pDevices)
399+
set the enabled of group "iPhone XR Portrait Splash" to (1 is among the items of pDevices)
400+
set the enabled of group "iPhone XR Landscape Splash" to (1 is among the items of pDevices)
401+
set the enabled of group "iPhone XSMAX Portrait Splash" to (1 is among the items of pDevices)
402+
set the enabled of group "iPhone XSMAX Landscape Splash" to (1 is among the items of pDevices)
391403
set the enabled of group "iPad Portrait Splash" to (2 is among the items of pDevices)
392404
set the enabled of group "iPad Landscape Splash" to (2 is among the items of pDevices)
393405
set the enabled of group "iPad Retina Portrait Splash" to (2 is among the items of pDevices)

0 commit comments

Comments
 (0)