Commit 988bb75f authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Shade "Configure..." when boot was unsuccessful.

When BootResources$Path is unset the option to run the configure plugin is no longer available.
Shared a "Filer_Run " string in 3x places.
Replaced most occurrences of calling XOS_ReadModeVariable of the current mode's XEig and YEig factors to use the cached copy sitting unloved in the workspace. Should thrash less during redraw.

Version 0.93. Tagged as 'Pinboard-0_93'
parent d905f03e
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.92"
Module_Version SETA 92
Module_MajorVersion SETS "0.93"
Module_Version SETA 93
Module_MinorVersion SETS ""
Module_Date SETS "19 Sep 2011"
Module_ApplicationDate SETS "19-Sep-11"
Module_Date SETS "24 Sep 2011"
Module_ApplicationDate SETS "24-Sep-11"
Module_ComponentName SETS "Pinboard"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Pinboard"
Module_FullVersion SETS "0.92"
Module_HelpVersion SETS "0.92 (19 Sep 2011)"
Module_FullVersion SETS "0.93"
Module_HelpVersion SETS "0.93 (24 Sep 2011)"
END
/* (0.92)
/* (0.93)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.92
#define Module_MajorVersion_CMHG 0.93
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Sep 2011
#define Module_Date_CMHG 24 Sep 2011
#define Module_MajorVersion "0.92"
#define Module_Version 92
#define Module_MajorVersion "0.93"
#define Module_Version 93
#define Module_MinorVersion ""
#define Module_Date "19 Sep 2011"
#define Module_Date "24 Sep 2011"
#define Module_ApplicationDate "19-Sep-11"
#define Module_ApplicationDate "24-Sep-11"
#define Module_ComponentName "Pinboard"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Pinboard"
#define Module_FullVersion "0.92"
#define Module_HelpVersion "0.92 (19 Sep 2011)"
#define Module_LibraryVersionInfo "0:92"
#define Module_FullVersion "0.93"
#define Module_HelpVersion "0.93 (24 Sep 2011)"
#define Module_LibraryVersionInfo "0:93"
......@@ -95,7 +95,7 @@ ModeChange
ADR r1,dataarea
LDR r0,icon_bar_height
STR r0 ,[r1,#8] ; Don't cover icon bar
STR r0 ,[r1,#8] ; Don't cover icon bar
MOV r6,#-2
ADD r0,r1,#20
STMIA r0,{r4,r5,r6}
......@@ -103,7 +103,8 @@ ModeChange
Pull "PC",VS
Debug bd,"Opened window"
MOV r0,#-1
MOV r0,#-1 ; Current mode
MOV r1,#VduExt_XWindLimit
SWI XOS_ReadModeVariable
MOVVC r3,r2
......@@ -112,17 +113,16 @@ ModeChange
MOVVC r3,r3,ASL r2
STRVC r3,Screen_x1
STRVC r2,XEig
Pull "PC",VS
MOV r0,#-1
MOV r1,#VduExt_YWindLimit
SWI XOS_ReadModeVariable
MOVVC r1,#VduExt_YWindLimit
SWIVC XOS_ReadModeVariable
MOVVC r3,r2
MOVVC r1,#VduExt_YEigFactor
SWIVC XOS_ReadModeVariable
MOVVC r3,r3,ASL r2
STRVC r3,Screen_y1
STRVC r2,YEig
Pull "PC",VS
LDR r0,backdrop_options
......@@ -360,22 +360,18 @@ Int_CacheBackdropSprite ROUT
; Sprite is scaled, get screen size (r4 = width, r5 = height, r2 = memory req.)
MOV r0,#-1 ; Use current mode
MOV r1,#VduExt_XWindLimit ; Screen width in pixels
SWI XOS_ReadModeVariable
Pull "PC",VS
ADD r4,r2,#1
STR r4,scale_x1
MOV r0,#-1 ; Use current mode
MOV r1,#VduExt_YWindLimit ; Screen height in pixels
MOV r1,#VduExt_XWindLimit ; Screen width in pixels
SWI XOS_ReadModeVariable
Pull "PC",VS
ADD r5,r2,#1
STR r5,scale_y1
MOV r0,#-1 ; Current mode.
MOV r1,#VduExt_ScreenSize
SWI XOS_ReadModeVariable ; R2= screen size in bytes
ADDVC r4,r2,#1
STRVC r4,scale_x1
MOVVC r1,#VduExt_YWindLimit ; Screen height in pixels
SWIVC XOS_ReadModeVariable
ADDVC r5,r2,#1
STRVC r5,scale_y1
MOVVC r1,#VduExt_ScreenSize
SWIVC XOS_ReadModeVariable ; R2= screen size in bytes
Pull "PC",VS
B %FT10 ; Go allocate memory etc.
......@@ -452,27 +448,20 @@ Int_CacheBackdropSprite ROUT
MOV r4,r4, ASL r2 ; Width in OS units in sprites mode
; Now convert back to pixels for current mode
MOV r0,#-1 ; Use current mode
MOV r1,#VduExt_YEigFactor ; YEig
SWI XOS_ReadModeVariable
Pull "PC",VS
LDR r2, YEig
MOVS r5,r5, LSR r2 ; Height in pixels
MOVEQ r5,#1 ; Must be minimum of 1 pixel
MOV r2,r5, LSL r2 ; Height in OS units in current mode
STR r2,scale_y1
Debug bd,"Height in OS units is ",r2
MOV r1,#VduExt_XEigFactor ; XEig
SWI XOS_ReadModeVariable
Pull "PC",VS
LDR r2, XEig
MOVS r4,r4, LSR r2 ; Width in pixels
MOVEQ r4,#1 ; Must be minimum of 1 pixel
MOV r2,r4, LSL r2 ; Width in OS units in current mode
STR r2,scale_x1
Debug bd,"Width in OS units is ",r4
MOV r0,#-1
MOV r1,#VduExt_Log2BPP
SWI XOS_ReadModeVariable ; Get Log2BPP for current mode
......@@ -670,24 +659,17 @@ LoadedOK
BEQ %FT01
; Scaled sprite, x1,y1 are screen x1,y1
MOV r0,#-1
MOV r1,#VduExt_XEigFactor
SWI XOS_ReadModeVariable ; Get XEig
Pull "PC",VS
LDR r2, XEig ; Get XEig
LDR r0,scale_x1
MOV r0,r0,ASL R2
MOV r0,r0,ASL r2
MOV r0,r0,ASL #8
STR r0,[r6,#8]
STR r0,[r6,#16]
Debug bd,"x1 = ",r0
MOV r0,#-1
MOV r1,#VduExt_YEigFactor
SWI XOS_ReadModeVariable ; Get YEig
Pull "PC",VS
LDR r2, YEig ; Get YEig
LDR r0,scale_y1
MOV r0,r0,ASL R2
MOV r0,r0,ASL r2
MOV r0,r0,ASL #8
STR r0,[r6,#4]
STR r0,[r6,#12]
......@@ -770,24 +752,22 @@ LoadedOK
TST r0,#bd_OptionTiled
Pull "PC",NE ; For tiled sprites, compute at redraw time.
MOV r0,#-1
MOV r0,#-1 ; Current mode
MOV r1,#VduExt_XWindLimit ; Screen width in pixels
SWI XOS_ReadModeVariable
Pull "PC",VS
ADD r4,r2,#1
MOV r1,#VduExt_XEigFactor ; XEig
SWI XOS_ReadModeVariable
Pull "PC",VS
MOV r4,r4,ASL r2 ; Screen width in OS Units
ADDVC r4,r2,#1
LDRVC r2,XEig ; XEig
MOVVC r4,r4,ASL r2 ; Screen width in OS Units
MOVVC r1,#VduExt_YWindLimit ; Screen height in pixels
SWIVC XOS_ReadModeVariable
ADDVC r5,r2,#1
LDRVC r2,YEig ; YEig
MOVVC r5,r5,ASL r2 ; Screen height in OS Units
MOV r1,#VduExt_YWindLimit ; Screen height in pixels
SWI XOS_ReadModeVariable
Pull "PC",VS
ADD r5,r2,#1
MOV r1,#VduExt_YEigFactor ; YEig
SWI XOS_ReadModeVariable
Pull "PC",VS
MOV r5,r5,ASL r2 ; Screen height in OS Units
LDR r1,icon_bar_height
SUB r5,r5,r1
......@@ -893,16 +873,11 @@ Int_CacheJPEG Entry
MOV r4, r2
MOV r5, r3
; Read YEig and calculate height in OS units
MOV r0,#-1
MOV r1,#VduExt_YEigFactor
SWI XOS_ReadModeVariable
EXIT VS
LDR r2, YEig
MOV r2,r5, LSL r2
STR r2,scale_y1
; Read XEig and calculate width in OS units
MOV r1,#VduExt_XEigFactor
SWI XOS_ReadModeVariable
EXIT VS
LDR r2, XEig
MOV r2,r4, LSL r2
STR r2,scale_x1
; Are we scaling?
......
......@@ -119,9 +119,9 @@ Int_AddTinyDirs
Debug sa,"Sprite found"
MOVVC r0, r6 ; creation mode of sprite
MOVVC r1, #VduExt_XEigFactor
SWIVC XOS_ReadModeVariable
MOV r0, r6 ; creation mode of sprite
MOV r1, #VduExt_XEigFactor
SWI XOS_ReadModeVariable
MOVVC r5, r3, LSL r2
MOVVC r3, #0
MOVVC r1, #VduExt_YEigFactor
......
......@@ -661,7 +661,7 @@ Run_Selection ROUT
Debug pi,"Selected icons = ",r0
ADR r1,dataarea
ADR r0,Run_command
ADRL r0,FilerRunCom
BL Copy_r0r1
ADD r0,r10,#ic_path
BL Copy_r0r1
......@@ -673,9 +673,6 @@ Run_Selection ROUT
LDR r10,[r10,#ic_next]
B %BT01
Run_command DCB "Filer_Run ",0
ALIGN
LTORG
LNK Menu.s
......@@ -30,11 +30,6 @@ HelpRequest ROUT
LDR r2,[r1,#36] ; Icon
LDR r1,[r1,#32] ; Window
;LDR r14,info_dbox_handle
;TEQ r1,r14
;ADREQ r1,InfoDboxToken
;BEQ SendHelp
LDR r14,saveas_handle
TEQ r1,r14
Pull "PC",EQ
......
......@@ -243,9 +243,6 @@ TinyDirsIcon_Menu ROUT
SWI XMessageTrans_MakeMenus
Pull "PC",VS
;LDR r14,info_dbox_handle ; Point info entry at info box.
;STR r14,menu_store+28+tim_info*24+4
ADR r1,menu_store
SUB r2,r10,#64
MOV r3,#96+1*44
......@@ -345,12 +342,22 @@ recreate_pinboard_menu
SWI XMessageTrans_MakeMenus
Pull "PC",VS
;LDR r14,info_dbox_handle ; Point info entry at info box.
;STR r14,menu_store+28+pm_info*24+4
LDR r14,saveas_handle ; Point save entry at save box.
STR r14,menu_store+28+pm_save*24+4
Push "r4"
ADRL r0, OpenCfgPath
MOV r2, #-1
MOV r3, #0
MOV r4, #VarType_Expanded
SWI XOS_ReadVarVal ; Has !Boot been run (to have a !PinSetup)
Pull "r4"
TEQ r2, #0
LDR r14, menu_store+28+pm_configure*24+8
ORREQ r14, r14, #is_shaded ; Shade the 'Configure...' entry
BICNE r14, r14, #is_shaded
STR r14, menu_store+28+pm_configure*24+8
LDR r0, Window_Icons
LDR r14, Iconbar_Icons
SUB r0, r0, r14
......@@ -362,11 +369,6 @@ recreate_pinboard_menu
BICNE r14, r14, #is_shaded
STR r14, menu_store+28+pm_selectall*24+8
;LDR r14,menu_store+28+pm_select_all*24+8 ; Shade 'Select all' if no icons.
;ORREQ r14,r14,#is_shaded
;BICNE r14,r14,#is_shaded
;STR r14,menu_store+28+pm_select_all*24+8
LDR r0,Pinboard_Selected
LDR r14, Windows_Selected
ADDS r0, r0, r14 ; Are there any selected icons on the pinboard ?
......@@ -381,45 +383,8 @@ recreate_pinboard_menu
BICNE r14,r14,#is_shaded
STR r14,menu_store+28+pm_clear_selection*24+8
;LDR r14,menu_store+28+pm_remove*24+8 ; Shade 'Remove icon' if no selected icons.
;ORREQ r14,r14,#is_shaded
;BICNE r14,r14,#is_shaded
;STR r14,menu_store+28+pm_remove*24+8
CMP r0,#1 ; Is there more than one selected icon ?
;BLE %FT01
;ADR r0,message_file_block+4 ; Change to remove selection if more than
;ADR r1,remove_selection_token ; one selected icon.
;ADRL r2,menu_store+400
;MOV r3,#menu_space-400
;ADRL r2,menu_store+1024-112
;MOV r3,#112
;SWI XMessageTrans_Lookup
;Pull "PC",VS
;MOV r1,#12
;ADD r1, r1, r3, LSL #4
;LDR r4, menu_store+16
;CMP r1, r4
;STRGT r1, menu_store+16
;DebugS pi,"String is ",r2
;CMP r2,#0
;STR r2,menu_store+28+pm_remove*24+12
;ADD r3,r3,#1
;STR r3,menu_store+28+pm_remove*24+20
;MOV r2,#0
;STR r2,menu_store+28+pm_remove*24+16
;LDR r14,menu_store+28+pm_remove*24+8
;ORR r14,r14,#if_indirected
;STR r14,menu_store+28+pm_remove*24+8
01
[ show_backdrop_options
CMP r0,#1 ; Is there more than one selected icon ?
LDR r14,menu_store+28+pm_backdrop*24+8 ; Shade 'Make Backdrop' if not 1 icon selected.
ORRNE r14,r14,#is_shaded
BICEQ r14,r14,#is_shaded
......
......@@ -277,6 +277,7 @@ OpenConfigure
SWI XWimp_StartTask ; (FG) start command as a task
Pull "PC" ; (FG) say bye bye
OpenCfgPath DCB "BootResources$Path",0
OpenCfgCmd DCB "IfThere BootResources:Configure.!PinSetup Then Filer_Run BootResources:Configure.!PinSetup",0
ALIGN
......
......@@ -995,10 +995,10 @@ got_task_name
LDR r0, backdrop_handle
[ iconise_to_iconbar
LDR lr, Pinboard_options
TST lr, #PinboardOption_IconiseToIconBar
SUBNE r6, r6, #16
MOVNE r4, #-16
LDR lr, Pinboard_options
TST lr, #PinboardOption_IconiseToIconBar
SUBNE r6, r6, #16
MOVNE r4, #-16
]
STMIA r1!, {r0,r3,r4,r5,r6}
......@@ -1106,18 +1106,18 @@ got_task_name
STR r0, [r11, #w_icon_id] ; store window handle
STRVC r8, [r11,#w_icon_handle] ; store icon handle
; Reset IconizeAtFlags
MOV r0, #Default_IconizeAtFlags
STR r0, IconizeAtFlags
; Reset IconizeAtFlags
MOV r0, #Default_IconizeAtFlags
STR r0, IconizeAtFlags
; (r11=Pointer) Link to list.
LDR r0,iconized_ptr
STR r0,[r11,#w_next_ptr]
CMP r0,#0 ; If next exsists link to it.
STRNE r11,[r0,#w_prev_ptr]
STR r11,iconized_ptr ; First on the list.
MOV r0,#0
STR r0,[r11,#w_prev_ptr] ; No previous.
; (r11=Pointer) Link to list.
LDR r0,iconized_ptr
STR r0,[r11,#w_next_ptr]
CMP r0,#0 ; If next exsists link to it.
STRNE r11,[r0,#w_prev_ptr]
STR r11,iconized_ptr ; First on the list.
MOV r0,#0
STR r0,[r11,#w_prev_ptr] ; No previous.
; Install icon (Zoom ?)
[ drag_on_iconise
......@@ -1127,10 +1127,10 @@ got_task_name
LDMVCIA r1, {r10,r11} ; Get current pointer position.
BVC Iconized_Drag ; Start drag.
]
LDR r0, Window_Icons
ADD r0, r0, #1
STR r0, Window_Icons
Pull "PC"
LDR r0, Window_Icons
ADD r0, r0, #1
STR r0, Window_Icons
Pull "PC"
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -1145,12 +1145,12 @@ Int_close_window ; fake close window ( r5=handle )
; close_window
close_window
LDR R0, [r1,#ms_myref]
STR R0, [r1,#ms_yourref]
MOV R0, #19 ; Ack the message.
LDR R2, [r1,#ms_taskhandle]
SWI XWimp_SendMessage
Pull "PC",VS
LDR R0, [r1,#ms_myref]
STR R0, [r1,#ms_yourref]
MOV R0, #19 ; Ack the message.
LDR R2, [r1,#ms_taskhandle]
SWI XWimp_SendMessage
Pull "PC",VS
LDR r5,[r1,#ms_data]
......
......@@ -326,7 +326,7 @@ SelectDoubleClick
BNE IconizedReopen
01
ADR r0,FilerRun_command
ADRL r0,FilerRunCom
ADR r1,dataarea
BL Copy_r0r1
ADD r0,r2,#ic_path
......@@ -359,10 +359,6 @@ SelectDoubleClick
Pull "PC"
FilerRun_command DCB "Filer_Run ",0
ALIGN
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Claim input focus (make a note of who had it before us).
; Fail silently.
......@@ -425,17 +421,9 @@ Select_Drag
01
[ {TRUE}
MOV r0,#VduExt_XEigFactor
MOV r1,#VduExt_YEigFactor
MOV r2,#-1
Push "r0-r2"
SUB sp,sp,#8
ADD r0,sp,#8
MOV r1,sp
SWI XOS_ReadVduVariables
Pull "r2-r3"
ADD sp,sp,#12
MOV r0,#1
LDR r2,XEig
LDR r3,YEig
MOV r2,r0,LSL r2 ; pixel width
MOV r3,r0,LSL r3 ; pixel height
ADR r1,dataarea
......@@ -446,7 +434,6 @@ Select_Drag
STMIA r1!,{r0,r14}
SUB r1,r1,#8*3
|
; MOV r0,r1
ADR r1,dataarea
LDR r14,[r1]
STR r14,[r1,#8] ; Initial x0
......
......@@ -215,7 +215,6 @@ workspace RN R12
^ 0,workspace
wsorigin # 0
mytaskhandle # 4 ; put here so we know where it is
;info_dbox_handle # 4 ; handle for ingo dbox.
saveas_handle # 4 ; handle of saveas dbox
bounding_box # 4*4 ; Screen x0 y0 x1 y1
backdrop_handle # 4 ; Backdrop window's handle
......
......@@ -185,7 +185,7 @@ Save_DragEnd ROUT
STR r0,[r1,#ms_size]
MOV r6,#0
STR r6,[r1,#ms_yourref]
LDR r7,=&FEB
LDR r7,=FileType_Obey
ADD r14,r1,#ms_data
STMIA r14!,{r2,r3,r4,r5,r6,r7} ; Window, icon , x , y
......@@ -248,11 +248,6 @@ Save_DataSaveAck ROUT
LDRNE r1,save_filename_address
BLNE Copy_r0r1
;MOV r0,#18 ; SMC: set filetype even if unsafe
;MOV r1,r2 ; SMC: r2->file name from above
;LDR r2,=&FEB
;SWI XOS_File
MOVVC r1,#-1
SWIVC XWimp_CreateMenu
......
......@@ -201,21 +201,6 @@ Start
BLVS CloseWimp
SWIVS OS_GenerateError
;ADR r1, dataarea ; Get template for info box.
;LDR r2, =indirected_data_offset
;ADD r2,r2,r12
;ADD r3, r2, #indirected_space
;MOV r4, #-1
;ADR r5, info_name
;MOV r6, #0
;SWI XWimp_LoadTemplate
;BLVS CloseWimp
;SWIVS OS_GenerateError
;ADR r1, dataarea ; Create the info window
;SWI XWimp_CreateWindow
;STRVC r0, info_dbox_handle
ADR r1, dataarea ; Get template for saveas box.
LDR r2, =save_filename_offset
ADD r2,r2,r12
......@@ -360,7 +345,7 @@ Key_Press_Event ROUT
Pull "R0, R10, LR"
BNE Save_KeyPressed
LDR R0, [R1, #24] ; Pass-on any non-escape keys
SWI XWimp_ProcessKey
SWI XWimp_ProcessKey
MOV PC, LR
......
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