Commit 5283be1f authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Preset Wimp$IconTheme on initialisation to UserIF if not already set

Therefore, when in ROM, the ROM theme can be inferred. When a different theme is selected by the user in the boot sequence, that is respected.
Restore a lost error message for *ICONSPRITES when the file doesn't exist even after trying all the 11/22/23 suffix and prefixes. This seems to have been lost post RISC OS 3.10 when Sprites22 support was added, but it is an error for the file given to not exist at all (cf. *TOOLSPRITES).
Typos in docs ammended.

Version 5.15. Tagged as 'Wimp-5_15'
parent 987daf08
......@@ -307,7 +307,7 @@ Wimp_Initialise
application could provide a set of colour sprites in a file called
"!Sprites", and an alternative monochrome set in a file called
"!Sprites23", and then load one set or the other automatically by using
"*Iconsprites <Obey$Dir>.Sprites".
"*Iconsprites <Obey$Dir>.!Sprites".
* The Wimp now picks up its ROM sprite area from a file inside
Resources: (without copying it into RAM). If the current Wimp mode is
......
......@@ -307,7 +307,7 @@ Wimp_Initialise
application could provide a set of colour sprites in a file called
"!Sprites", and an alternative monochrome set in a file called
"!Sprites23", and then load one set or the other automatically by using
"*Iconsprites <Obey$Dir>.Sprites".
"*Iconsprites <Obey$Dir>.!Sprites".
* The Wimp now picks up its ROM sprite area from a file inside
Resources: (without copying it into RAM). If the current Wimp mode is
......
......@@ -307,7 +307,7 @@ Wimp_Initialise
application could provide a set of colour sprites in a file called
"!Sprites", and an alternative monochrome set in a file called
"!Sprites23", and then load one set or the other automatically by using
"*Iconsprites <Obey$Dir>.Sprites".
"*Iconsprites <Obey$Dir>.!Sprites".
* The Wimp now picks up its ROM sprite area from a file inside
Resources: (without copying it into RAM). If the current Wimp mode is
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.14"
Module_Version SETA 514
Module_MajorVersion SETS "5.15"
Module_Version SETA 515
Module_MinorVersion SETS ""
Module_Date SETS "23 Jan 2012"
Module_ApplicationDate SETS "23-Jan-12"
Module_Date SETS "23 Jun 2012"
Module_ApplicationDate SETS "23-Jun-12"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.14"
Module_HelpVersion SETS "5.14 (23 Jan 2012)"
Module_FullVersion SETS "5.15"
Module_HelpVersion SETS "5.15 (23 Jun 2012)"
END
/* (5.14)
/* (5.15)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.14
#define Module_MajorVersion_CMHG 5.15
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Jan 2012
#define Module_Date_CMHG 23 Jun 2012
#define Module_MajorVersion "5.14"
#define Module_Version 514
#define Module_MajorVersion "5.15"
#define Module_Version 515
#define Module_MinorVersion ""
#define Module_Date "23 Jan 2012"
#define Module_Date "23 Jun 2012"
#define Module_ApplicationDate "23-Jan-12"
#define Module_ApplicationDate "23-Jun-12"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.14"
#define Module_HelpVersion "5.14 (23 Jan 2012)"
#define Module_LibraryVersionInfo "5:14"
#define Module_FullVersion "5.15"
#define Module_HelpVersion "5.15 (23 Jun 2012)"
#define Module_LibraryVersionInfo "5:15"
......@@ -46,6 +46,7 @@ Module_BaseAddr
GET Hdr:NewErrors
GET Hdr:Sprite
GET Hdr:Variables
GET Hdr:FileTypes
GET Hdr:Hourglass
GET Hdr:ResourceFS
GET Hdr:Portable
......
......@@ -2943,21 +2943,6 @@ IconSprites_Code
]
]
[ false
MOV R14,#ms_data ; message block size
STR R14,[sp,#-ms_data]!
MOV R14,#0 ; your_ref
STR R14,[sp,#ms_yourref]
LDR R14,=Message_IconsChanged
STR R14,[sp,#ms_action]
MOV R0,#User_Message
MOV R1,sp
MOV R2,#0 ; broadcast message
BL int_sendmessage_fromwimp
ADD sp,sp,#ms_data
CLRV ; ignore errors
]
[ :LNOT: Medusa ; Medusa uses DA
; this merge bumps the RMA up, compress it again just in case.
MOV R0,#1
......@@ -2965,24 +2950,12 @@ IconSprites_Code
SWI XOS_ChangeDynamicArea
CLRV ; may cause an error, but ok.
]
05
[ Sprites11
Pull "R7-R8,PC"
|
Pull "PC"
]
05
Push "R0"
[ true ; don't send error back
LDR R0,[R0]
LDR R14,=ErrorNumber_WimpBadSprites
TEQ R0,R14 ; not really an error!
CLRV EQ
]
[ Sprites11
Pull "R0,R7-R8,PC"
|
Pull "R0,PC"
]
[ Sprites11
IconThemeSysVar = "<Wimp$IconTheme>"
......@@ -2998,20 +2971,14 @@ IconThemeSysVarLen * . - IconThemeSysVar
; [romspr_suffix..] = suffix to add to filename
; ]
; R1 -> sprite filename
; Out R1 -> <filename><suffix> (in watchdog errorbuffer)
; Out R1 -> <filename><suffix>
; R2 -> start of suffix as added to filename
getspritefname
Push "R0,LR"
[ false
ADRL R2,watchdogerrtxt ; changed from errorbuffer to fix nager:sprites occurring cos
; this was writing over the errorblock before it was presented
; to the user
|
ADRL R2, path_buffer ; watchdogerrtxt isn't big enough for long pathnames, and was getting
; overwritten by the new Service_SwitchingOutputToSprite handler
]
01 LDRB R14,[R1],#1 ; skip leading spaces
CMP R14,#" "
......@@ -3026,11 +2993,8 @@ getspritefname
]
MOV R1,R2
BL copy0 ; copy from R0 to R1
[ false
ADRL R1,watchdogerrtxt
|
ADRL R1, path_buffer
]
DebugS xx,"getspritefname: ",R1
Pull "R0,PC"
......@@ -3136,7 +3100,7 @@ int_merge_sprites
BNE %FT99 ; bound not to work!
MOV R2,R2,LSL # 12
MOV R2,R2,LSR # 20
LDR R14,=&fca ; squashed!
LDR R14,=FileType_Squash
TEQ R2,R14
BEQ %FT99
;
......@@ -3251,8 +3215,11 @@ SWIWimp_BaseOfSprites
; Initialisation - claim work area
;-----------------------------------------------------------------------------
WimpPath DCB "WindowManager$Path", 0
ResourcesColon DCB "Resources:$.Resources.Wimp."
WimpVarPath DCB "WindowManager$Path", 0
WimpDefPath DCB "Resources:$.Resources.Wimp."
DCB 0
WimpVarTheme DCB "Wimp$IconTheme", 0
WimpDefTheme DCB UserIF
DCB 0
ALIGN
......@@ -3265,23 +3232,40 @@ Init
Debug_Open "<Wimp$Debug>1"
]
; initialise Wimp$Path if not already done
; initialise WindowManager$Path if not already done
ADR R0, WimpPath
ADR R0, WimpVarPath
MOV R2, #-1
MOV R3, #0
MOV R4,#0 ; Do not expand, to bypass a bug in OS_ReadVarVal
MOV R4, #VarType_String ; Do not expand, to bypass a bug in OS_ReadVarVal
SWI XOS_ReadVarVal ; returns R2=0 if doesn't exist
CMP R2, #0 ; clears V as well!
ADREQ R0, WimpPath
ADREQ R1, ResourcesColon ; set variable to "Resources:Resources."
MOVEQ R2, #?ResourcesColon
ADREQ R0, WimpVarPath
ADREQ R1, WimpDefPath
MOVEQ R2, #?WimpDefPath
MOVEQ R3, #0
MOVEQ R4, #VarType_String
SWIEQ XOS_SetVarVal
BVS exitinit1
;
[ Sprites11
; initialise Wimp$IconTheme to the build UserIF if not set by the user
ADR R0, WimpVarTheme
MOV R2, #-1
MOV R3, #0
MOV R4, #VarType_String ; Do not expand, to bypass a bug in OS_ReadVarVal
SWI XOS_ReadVarVal ; returns R2=0 if doesn't exist
CMP R2, #0 ; clears V as well!
ADREQ R0, WimpVarTheme
ADREQ R1, WimpDefTheme
MOVEQ R2, #?WimpDefTheme
MOVEQ R3, #0
MOVEQ R4, #VarType_String
SWIEQ XOS_SetVarVal ; Ignore error
]
; claim workspace
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment