6
6
// This file was created by () byte physics Thomas Braun, [email protected]
7
7
// (c) 2013
8
8
9
- static Constant kPrefsVersion = 105
9
+ static Constant kPrefsVersion = 106
10
10
static StrConstant kPackageName = "CodeBrowser"
11
11
static StrConstant kPrefsFileName = "CodeBrowser.bin"
12
12
static Constant kPrefsRecordID = 0
@@ -19,7 +19,8 @@ Structure CodeBrowserPrefs
19
19
uint32 panelProcedure // last marked procedure in panel
20
20
uint32 panelElement // last marked element in panel
21
21
uint32 panelTopElement // top element in listbox (scrolling)
22
- uint32 reserved[95] // Reserved for future use
22
+ uint32 configCleanOnExit // delete CodeBrowser related data when CodeBrowser exits
23
+ uint32 reserved[94] // Reserved for future use
23
24
EndStructure
24
25
25
26
// DefaultPackagePrefsStruct(prefs)
@@ -47,16 +48,18 @@ static Function DefaultPackagePrefsStruct(prefs)
47
48
prefs. panelElement = 0
48
49
prefs. panelTopElement= 0
49
50
51
+ prefs. configCleanOnExit = 1
52
+
50
53
Variable i
51
- for ( i =0; i <95 ; i +=1 )
54
+ for ( i =0; i <94 ; i +=1 )
52
55
prefs. reserved[ i ] = 0
53
56
endfor
54
57
End
55
58
56
59
// Fill package prefs structures to match state of panel.
57
60
static Function SyncPackagePrefsStruct ( prefs)
58
61
STRUCT CodeBrowserPrefs & prefs
59
- Variable scale, selectedItem
62
+ Variable scale, selectedItem, configItem
60
63
// Panel does exists. Set prefs to match panel settings.
61
64
prefs. version = kPrefsVersion
62
65
@@ -85,6 +88,9 @@ static Function SyncPackagePrefsStruct(prefs)
85
88
86
89
selectedItem = getCurrentItemAsNumeric ( indexTop = 1 )
87
90
prefs. panelTopElement = selectedItem < 0 ? 0 : selectedItem
91
+
92
+ configItem = getGlobalVar ( "cleanOnExit" )
93
+ prefs. configCleanOnExit = configItem < 0 ? 1 : configItem
88
94
End
89
95
90
96
// InitPackagePrefsStruct(prefs)
@@ -125,6 +131,7 @@ Function LoadPackagePrefsFromDisk(prefs)
125
131
prefs. panelCoords[ 2 ] /= scale
126
132
prefs. panelCoords[ 3 ] /= scale
127
133
134
+ setGlobalVar ( "cleanOnExit" , prefs. configCleanOnExit)
128
135
End
129
136
130
137
Function SavePackagePrefsToDisk ( prefs)
0 commit comments