- Timestamp:
- Jul 16, 2012, 4:11:47 PM (12 years ago)
- Location:
- trunk/IDE
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.lfm
r54 r57 1 1 object FormMain: TFormMain 2 Left = 2172 Left = 140 3 3 Height = 501 4 Top = 1044 Top = 52 5 5 Width = 695 6 6 Caption = 'Transpascal IDE' -
trunk/IDE/Forms/UFormMessages.lfm
r45 r57 7 7 ClientHeight = 251 8 8 ClientWidth = 415 9 LCLVersion = ' 0.9.31'9 LCLVersion = '1.1' 10 10 object ListView1: TListView 11 11 Left = 0 -
trunk/IDE/Forms/UFormMessages.pas
r53 r57 72 72 ProjectFile := Project.Files.SearchFile(FileName); 73 73 if Assigned(ProjectFile) then 74 SynEditSource.Lines.Assign(ProjectFile.Source); 74 SynEditSource.Lines.Assign(ProjectFile.Source) 75 else if FileExistsUTF8(FileName) then 76 SynEditSource.Lines.LoadFromFile(FileName); 75 77 SynEditSource.CaretXY := Position; 76 78 TForm(SynEditSource.Owner).Show; -
trunk/IDE/Forms/UFormProject.lfm
r56 r57 1 1 object FormProject: TFormProject 2 Left = 50 52 Left = 507 3 3 Height = 253 4 Top = 19 54 Top = 197 5 5 Width = 331 6 6 Caption = 'Project manager' -
trunk/IDE/Forms/UFormProjectNew.lfm
r48 r57 8 8 ClientWidth = 519 9 9 OnShow = FormShow 10 LCLVersion = ' 0.9.31'10 LCLVersion = '1.1' 11 11 object ButtonOk: TButton 12 12 Left = 424 … … 40 40 ViewStyle = vsIcon 41 41 OnChange = ListView1Change 42 OnDblClick = ListView1DblClick 42 43 OnSelectItem = ListView1SelectItem 43 44 end -
trunk/IDE/Forms/UFormProjectNew.pas
r53 r57 20 20 procedure ListView1Change(Sender: TObject; Item: TListItem; 21 21 Change: TItemChange); 22 procedure ListView1DblClick(Sender: TObject); 22 23 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 23 24 Selected: Boolean); … … 52 53 end; 53 54 55 procedure TFormProjectNew.ListView1DblClick(Sender: TObject); 56 begin 57 ButtonOk.Click; 58 end; 59 54 60 procedure TFormProjectNew.ListView1SelectItem(Sender: TObject; Item: TListItem; 55 61 Selected: Boolean); -
trunk/IDE/Forms/UFormSourceCode.lfm
r53 r57 1 1 object FormSourceCode: TFormSourceCode 2 Left = 35 22 Left = 353 3 3 Height = 426 4 Top = 9 54 Top = 97 5 5 Width = 535 6 6 Caption = 'Source code' -
trunk/IDE/Forms/UFormSourceCode.pas
r54 r57 40 40 procedure TFormSourceCode.SynEditSourceChange(Sender: TObject); 41 41 begin 42 if Assigned(Core.Project) then42 if Assigned(Core.Project) and Assigned(ProjectFile) then 43 43 ProjectFile.Modified := True; 44 44 end; -
trunk/IDE/Forms/UFormTargetProject.lfm
r53 r57 1 1 object FormTargetProject: TFormTargetProject 2 Left = 25 62 Left = 258 3 3 Height = 240 4 Top = 8 14 Top = 83 5 5 Width = 320 6 6 Caption = 'FormTargetProject' -
trunk/IDE/Transpascal.lpi
r55 r57 150 150 <IsPartOfProject Value="True"/> 151 151 <ComponentName Value="FormMessages"/> 152 <HasResources Value="True"/> 152 153 <ResourceBaseClass Value="Form"/> 153 154 <UnitName Value="UFormMessages"/> … … 202 203 <IsPartOfProject Value="True"/> 203 204 <ComponentName Value="FormProjectNew"/> 205 <HasResources Value="True"/> 204 206 <ResourceBaseClass Value="Form"/> 205 207 <UnitName Value="UFormProjectNew"/> -
trunk/IDE/UCore.lfm
r55 r57 4 4 OldCreateOrder = False 5 5 Height = 290 6 HorizontalOffset = 30 87 VerticalOffset = 7 56 HorizontalOffset = 309 7 VerticalOffset = 77 8 8 Width = 347 9 9 object LastOpenedFiles: TLastOpenedList -
trunk/IDE/UCore.pas
r55 r57 28 28 procedure LastOpenedFilesChange(Sender: TObject); 29 29 private 30 procedure ProjectChange(Sender: TObject); 30 31 public 31 32 ReopenLastOpenedFile: Boolean; … … 68 69 Project := TProject.Create; 69 70 Project.FileName := SNewProject; 71 Project.OnChange := ProjectChange; 70 72 end; 71 73 … … 109 111 LastOpenedFiles.LoadToMenuItem(FormMain.PopupMenu1.Items, 110 112 FormMain.OpenRecentClick); 113 end; 114 115 procedure TCore.ProjectChange(Sender: TObject); 116 begin 117 FormMain.UpdateInterface; 111 118 end; 112 119 -
trunk/IDE/UProject.pas
r54 r57 73 73 TProject = class 74 74 private 75 FActive: Boolean;76 75 FModified: Boolean; 77 76 FOnChange: TNotifyEvent; … … 239 238 var 240 239 I: Integer; 241 begin 240 ParentDir: string; 241 begin 242 ParentDir := ExtractFileDir(Parent.FileName); 243 if Copy(FileName, 1, Length(ParentDir)) = ParentDir then 244 System.Delete(FileName, 1, Length(ParentDir) + 1); 242 245 I := 0; 243 246 while (I < Count) and (TProjectFile(Items[I]).FileName <> FileName) do Inc(I); … … 309 312 procedure TProjectFile.Save; 310 313 begin 311 if Modified then 312 Source.SaveToFile(FileName); 314 Source.SaveToFile(AbsoluteFileName); 313 315 end; 314 316 … … 319 321 if FModified = AValue then Exit; 320 322 FModified := AValue; 323 if Assigned(FOnChange) then FOnChange(Self); 321 324 end; 322 325 … … 364 367 begin 365 368 Doc := TXMLDocument.Create; 369 Self.FileName := FileName; 366 370 with Doc do try 367 371 RootNode := CreateElement('Project'); … … 395 399 396 400 procedure TProject.Save; 401 var 402 I: Integer; 397 403 begin 398 404 Files.Save; 399 405 Packages.Save; 406 for I := 0 to Files.Count - 1 do 407 TProjectFile(Files[I]).Modified := False; 408 Modified := False; 400 409 end; 401 410
Note:
See TracChangeset
for help on using the changeset viewer.