Changeset 49
- Timestamp:
 - Jan 10, 2007, 8:49:18 PM (19 years ago)
 - Location:
 - trunk
 - Files:
 - 
      
- 2 edited
 
- 
          
  NewView/MainForm.pas (modified) (8 diffs)
 - 
          
  test/tests.cmd (modified) (5 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/NewView/MainForm.pas
r44 r49 2262 2262 Procedure TMainForm.DebugShowParamsMIOnClick (Sender: TObject); 2263 2263 var 2264 i: integer;2265 tmpRc : Integer;2266 2264 tmpWindowPosition : TWindowPosition; 2267 2265 Begin … … 3823 3821 var 3824 3822 tmpCmdLine: String; 3825 tmpRc : Integer;3826 3823 Begin 3827 3824 LogEvent(LogStartup, 'MainFormOnCreate'); … … 4193 4190 LogEvent(LogStartup, 'Showing usage'); 4194 4191 ShowUsage; 4192 4193 if FileExists( GetOwnHelpFileName ) then 4194 OpenFile( GetOwnHelpFileName, '', true ); 4195 4195 4196 exit; 4196 4197 end; … … 4199 4200 HelpManagerWindows.Add( pointer( CmdLineParameters.getHelpManagerWindow ) ); 4200 4201 4201 if length(CmdLineParameters.getFileNames) > 0then4202 if CmdLineParameters.getFileNames <> '' then 4202 4203 begin 4203 4204 // open specified files 4204 4205 Filenames := TStringList.Create; 4205 4206 4206 // TODO rbri remove type conversion4207 // TODO use StrExtractStrings 4207 4208 StringToList(cmdLineParameters.getFileNames, Filenames, '+' ); 4208 4209 … … 4210 4211 4211 4212 OpenFirstTopic := true; 4213 4212 4214 if ( CmdLineParameters.getSearchText <> '' ) 4213 4215 or CmdLineParameters.getSearchFlag then … … 4216 4218 4217 4219 if CmdLineParameters.getHelpManagerFlag then 4220 begin 4218 4221 // don't open first topic if we're online help 4219 4222 // in case we are wanting to show a specific topic 4220 4223 // - saves time/flicker 4221 4224 OpenFirstTopic := false; 4222 4225 end; 4226 4227 if NOT ( CmdLineParameters.getGlobalSearchFlag 4228 AND (CmdLineParameters.getSearchText = '') 4229 ) 4230 then 4231 begin 4223 4232 OpenFiles( Filenames, 4224 4233 CmdLineParameters.getWindowTitle, 4225 4234 OpenFirstTopic ); 4235 end; 4226 4236 4227 4237 Filenames.Destroy; 4228 4238 4229 if CmdLineParameters.getSearchText <> '' then 4239 if not CmdLineParameters.getSearchFlag 4240 and not CmdLineParameters.getGlobalSearchFlag 4241 and (CmdLineParameters.getSearchText <> '') then 4230 4242 begin 4231 4243 // search in contents only! … … 4247 4259 begin 4248 4260 // Global search 4249 LogEvent(LogStartup, 'Do global search: ' + CmdLineParameters.getSearchText ); 4250 DoGlobalSearch( CmdLineParameters.getSearchText ); 4261 if (CmdLineParameters.getSearchText = '') 4262 AND (CmdLineParameters.getFileNamesRaw <> '') 4263 then 4264 begin 4265 LogEvent(LogStartup, 'Do global search: ' + CmdLineParameters.getFileNamesRaw ); 4266 DoGlobalSearch( CmdLineParameters.getFileNamesRaw ); 4267 end 4268 else 4269 begin 4270 LogEvent(LogStartup, 'Do global search: ' + CmdLineParameters.getSearchText ); 4271 DoGlobalSearch( CmdLineParameters.getSearchText ); 4272 end; 4251 4273 end; 4252 4274 … … 4260 4282 if FileExists( GetOwnHelpFileName ) then 4261 4283 OpenFile( GetOwnHelpFileName, '', true ); 4262 end;4263 4264 if CurrentOpenFiles.Count = 0 then4265 begin4266 // maybe...4267 // EnsureGlobalSearchFormLoaded;4268 4269 // GlobalSearchForm.Parent := DisplayPanel;4270 // GlobalSearchForm.Show;4271 // GlobalSearchForm.WindowState := wsMaximized;4272 4273 4284 end; 4274 4285  - 
      
trunk/test/tests.cmd
r47 r49 21 21 say "* - 'Introduction' is selected and visible at the right *" 22 22 say "*************************************************************************" 23 "start newview"23 "start ..\build\newview\newview" 24 24 pull 25 25 … … 35 35 say "* - 'Introduction' is selected and visible at the right *" 36 36 say "*************************************************************************" 37 "start newview cmdref"37 "start ..\build\newview\newview cmdref" 38 38 pull 39 39 … … 49 49 say "* and 'COPY' is selected *" 50 50 say "*************************************************************************" 51 "start newview cmdref copy"51 "start ..\build\newview\newview cmdref copy" 52 52 pull 53 53 … … 64 64 say "* and 'COPY' is selected *" 65 65 say "*************************************************************************" 66 "start newview /s:copy cmdref" 66 "start ..\build\newview\newview /s cmdref copy" 67 pull 68 69 70 say "*************************************************************************" 71 say "* newview /s cmdref *" 72 say "* *" 73 say "* Expected *" 74 say "* NewView start and shows the 'Command Reference' help *" 75 say "* - left navigation is shown *" 76 say "* - no hits visible and the right part is empty *" 77 say "* - 'COPY' is selected and visible at the right *" 78 say "* - all contents are collapsed *" 79 say "*************************************************************************" 80 "start ..\build\newview\newview /s cmdref" 81 pull 82 83 84 say "*************************************************************************" 85 say "* newview /s cmdref net access *" 86 say "* *" 87 say "* Expected *" 88 say "* NewView start and shows the 'Command Reference' help *" 89 say "* - left navigation is shown *" 90 say "* - search tab is selected *" 91 say "* ('net access' is visible in the search entry field) *" 92 say "* - search was done for net OR access *" 93 say "* - 'NET ACCESS' is selected and visible at the right *" 94 say "* - on contents tab only 'LAN Server Commands' is expanded *" 95 say "* and 'NET ACCESS' is selected *" 96 say "*************************************************************************" 97 "start ..\build\newview\newview /s cmdref net access" 98 pull 99 100 101 say "*************************************************************************" 102 say "* newview /s cmdref net access *" 103 say "* *" 104 say "* Expected *" 105 say "* NewView start and shows the 'Command Reference' help *" 106 say "* - left navigation is shown *" 107 say "* - search tab is selected *" 108 say "* ('""net access""' is visible in the search entry field) *" 109 say "* - search was done for net AND access *" 110 say "* - 'NET ACCESS' is selected and visible at the right *" 111 say "* - on contents tab only 'LAN Server Commands' is expanded *" 112 say "* and 'NET ACCESS' is selected *" 113 say "*************************************************************************" 114 'start ..\build\newview\newview /s cmdref "net access"' 67 115 pull 68 116 … … 79 127 say "* - The 'Search all fieles' dialog is opend and searches for copy *" 80 128 say "*************************************************************************" 81 "start newview /g:copy cmdref"129 "start ..\build\newview\newview /g cmdref copy" 82 130 pull 83 131 132 133 say "*************************************************************************" 134 say "* newview /g copy *" 135 say "* *" 136 say "* Expected *" 137 say "* NewView start and shows the 'Command Reference' help *" 138 say "* - left navigation is shown *" 139 say "* - contents tab is selected *" 140 say "* - all contents are collapsed *" 141 say "* - 'Introduction' is selected and visible at the right *" 142 say "* - The 'Search all fieles' dialog is opend and searches for copy *" 143 say "*************************************************************************" 144 "start ..\build\newview\newview /g copy" 145 pull 146 147 148 say "*************************************************************************" 149 say "* newview -h *" 150 say "* *" 151 say "* Expected *" 152 say "* NewView start and shows the NewView help. *" 153 say "* - command line dialog is shown *" 154 say "* - left navigation is shown *" 155 say "* - contents tab is selected *" 156 say "* - all contents are collapsed *" 157 say "* - 'Introduction' is selected and visible at the right *" 158 say "*************************************************************************" 159 "start ..\build\newview\newview -h" 160 pull 161 162 163  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  