Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

iss: remove theme selection from installer

Changeset a62a27fcfed8

Parent d0d910085a5a

by Steve Borho

Changes to one file · Browse files at a62a27fcfed8 Showing diff from parent d0d910085a5a Diff from another changeset...

 
58
59
60
61
62
63
64
 
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
 
175
176
177
 
58
59
60
 
61
62
63
 
98
99
100
 
101
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
104
105
106
107
108
 
109
110
111
112
@@ -58,7 +58,6 @@
 Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt  Source: COPYING.txt; DestDir: {app}; DestName: Copying.txt  Source: ..\icons\hgicon.ico; DestDir: {app} -Source: ..\files\gtkrc; DestDir: {app}\gtk\etc\gtk-2.0; AfterInstall: EditOptions()    [INI]  Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://www.selenic.com/mercurial/ @@ -99,79 +98,15 @@
  SaveStringsToFile(InFile, InFileLines, False);  end;   -var ThemePage: TInputOptionWizardPage;  var IsUpgrade: Boolean;   -procedure InitializeWizard; -begin - ThemePage := CreateInputOptionPage(wpSelectComponents, - 'Theme Selection', '', - 'Please select a theme, then click Next.', - True, False); - ThemePage.Add('Neutrino (recommended, especially on Vista)'); - ThemePage.Add('Brushed'); - ThemePage.Add('Blue-Steel'); - ThemePage.Add('MS-Windows (original)'); - - case GetPreviousData('Theme', '') of - 'Neutrino': ThemePage.SelectedValueIndex := 0; - 'Brushed': ThemePage.SelectedValueIndex := 1; - 'Blue-Steel': ThemePage.SelectedValueIndex := 2; - 'MS-Windows': ThemePage.SelectedValueIndex := 3; - else - ThemePage.SelectedValueIndex := 0; - end; -end; - -procedure RegisterPreviousData(PreviousDataKey: Integer); -var - Theme: String; -begin - { Store the settings so we can restore them next time } - case ThemePage.SelectedValueIndex of - 0: Theme := 'Neutrino'; - 1: Theme := 'Brushed'; - 2: Theme := 'Blue-Steel'; - 3: Theme := 'MS-Windows'; - end; - SetPreviousData(PreviousDataKey, 'Theme', Theme); -end; - -procedure SetCommentMarker(var lines: TArrayOfString; option: String; selected: boolean); -var - i : integer; -begin - if selected then exit; - for i := 0 to pred(GetArrayLength(lines)) do - if pos(option, lines[i]) > 0 then - begin - lines[i][1] := '#'; - end; -end; - -procedure EditOptions(); -var - lines : TArrayOfString; - filename : String; -begin - filename := ExpandConstant(CurrentFilename); - LoadStringsFromFile(filename, lines); - - SetCommentMarker(lines, 'gtk-theme-name = "Neutrino"', ThemePage.SelectedValueIndex = 0); - SetCommentMarker(lines, 'gtk-theme-name = "Brushed"', ThemePage.SelectedValueIndex = 1); - SetCommentMarker(lines, 'gtk-theme-name = "Blue-Steel"', ThemePage.SelectedValueIndex = 2); - SetCommentMarker(lines, 'gtk-theme-name = "MS-Windows"', ThemePage.SelectedValueIndex = 3); - - SaveStringsToFile(filename, lines, False); -end; -  function InitializeSetup(): Boolean;  var   ThgSwReg: String;  begin   Result := True;   - {abort installation if TortoiseHg 0.4 or earlier is installed} + {abort installation if TortoiseHg 0.7 or earlier is installed}   if RegQueryStringValue(HKLM, 'Software\TortoiseHg', '', ThgSwReg) then   begin   IsUpgrade := True;