Changeset 4
- Timestamp:
- Sep 1, 2014, 7:10:03 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormBrowse.lfm
r3 r4 1 1 object FormBrowse: TFormBrowse 2 Left = 3512 Left = 554 3 3 Height = 526 4 Top = 1474 Top = 269 5 5 Width = 722 6 6 Caption = 'Browse' 7 7 ClientHeight = 526 8 8 ClientWidth = 722 9 LCLVersion = '1. 1'9 LCLVersion = '1.3' 10 10 object TreeView1: TTreeView 11 11 Left = 0 … … 14 14 Width = 241 15 15 Align = alLeft 16 DefaultItemHeight = 24 16 17 TabOrder = 0 17 18 end … … 43 44 item 44 45 Caption = 'Status' 45 Width = 25 646 Width = 259 46 47 end> 47 48 ReadOnly = True -
trunk/Forms/UFormMain.lfm
r3 r4 5 5 Width = 667 6 6 Caption = 'VCSCommander' 7 ClientHeight = 47 27 ClientHeight = 471 8 8 ClientWidth = 667 9 9 Menu = MainMenu1 10 LCLVersion = '1. 1'10 LCLVersion = '1.3' 11 11 object ToolBarMain: TToolBar 12 12 Left = 0 … … 15 15 Width = 667 16 16 Caption = 'ToolBarMain' 17 Images = ImageList118 17 ParentShowHint = False 19 18 ShowHint = True … … 22 21 object StatusBar1: TStatusBar 23 22 Left = 0 24 Height = 2 125 Top = 4 5123 Height = 26 24 Top = 445 26 25 Width = 667 27 26 Panels = <> 28 27 end 29 28 object MainMenu1: TMainMenu 30 Images = ImageList131 29 left = 232 32 30 top = 88 33 31 object MenuItemFile: TMenuItem 34 32 Caption = 'File' 33 object MenuItem8: TMenuItem 34 Action = Core.AProjectOpen 35 end 36 object MenuItem10: TMenuItem 37 Action = Core.AProjectClose 38 end 39 object MenuItem9: TMenuItem 40 Caption = '-' 41 end 35 42 object MenuItemQuit: TMenuItem 36 Action = AQuit43 Action = Core.AQuit 37 44 end 38 45 end … … 40 47 Caption = 'View' 41 48 object MenuItem7: TMenuItem 42 Action = AViewFavorites49 Caption = 'Favorites' 43 50 end 44 51 end … … 46 53 Caption = 'General' 47 54 object MenuItem2: TMenuItem 48 Action = ASettings55 Action = Core.ASettings 49 56 end 50 57 end 51 58 object MenuItem3: TMenuItem 52 Caption = 'Help'59 Action = Core.AHelp 53 60 object MenuItem5: TMenuItem 54 Action = AHelp61 Caption = 'Help' 55 62 end 56 63 object MenuItem4: TMenuItem 57 Action = AAbout64 Action = Core.AAbout 58 65 end 59 66 end 60 67 end 61 object ActionList1: TActionList62 Images = ImageList163 left = 23264 top = 14465 object AQuit: TAction66 Caption = 'Quit'67 Hint = 'Quit'68 OnExecute = AQuitExecute69 end70 object ASettings: TAction71 Caption = 'Settings'72 end73 object AAbout: TAction74 Caption = 'About'75 end76 object AHelp: TAction77 Caption = 'Help'78 end79 object AViewFavorites: TAction80 Caption = 'Favorites'81 end82 end83 object ImageList1: TImageList84 left = 23285 top = 20086 end87 68 end -
trunk/Forms/UFormMain.pas
r3 r4 14 14 15 15 TFormMain = class(TForm) 16 AViewFavorites: TAction;17 AHelp: TAction;18 ASettings: TAction;19 AAbout: TAction;20 AQuit: TAction;21 ActionList1: TActionList;22 ImageList1: TImageList;23 16 MainMenu1: TMainMenu; 24 17 MenuItem1: TMenuItem; 18 MenuItem10: TMenuItem; 25 19 MenuItem2: TMenuItem; 26 20 MenuItem3: TMenuItem; … … 29 23 MenuItem6: TMenuItem; 30 24 MenuItem7: TMenuItem; 25 MenuItem8: TMenuItem; 26 MenuItem9: TMenuItem; 31 27 MenuItemQuit: TMenuItem; 32 28 MenuItemFile: TMenuItem; 33 29 StatusBar1: TStatusBar; 34 30 ToolBarMain: TToolBar; 35 procedure AQuitExecute(Sender: TObject);36 31 private 37 32 { private declarations } 38 33 public 39 { public declarations }34 procedure UpdateInterface; 40 35 end; 41 36 … … 47 42 {$R *.lfm} 48 43 44 uses 45 UCore; 46 49 47 { TFormMain } 50 48 51 procedure TFormMain.AQuitExecute(Sender: TObject); 49 procedure TFormMain.UpdateInterface; 50 const 51 AppName = 'VCSCommander'; 52 52 begin 53 Close; 53 if Assigned(Core.Project) then 54 Caption := Core.Project.Directory + ' - ' + AppName 55 else Caption := AppName 54 56 end; 55 57 -
trunk/UCore.lfm
r3 r4 1 1 object Core: TCore 2 OnCreate = DataModuleCreate 3 OnDestroy = DataModuleDestroy 2 4 OldCreateOrder = False 3 5 Height = 346 … … 5 7 VerticalOffset = 265 6 8 Width = 447 9 object ActionList1: TActionList 10 left = 260 11 top = 172 12 object AQuit: TAction 13 Caption = 'Quit' 14 Hint = 'Quit' 15 OnExecute = AQuitExecute 16 end 17 object ASettings: TAction 18 Caption = 'Settings' 19 end 20 object AAbout: TAction 21 Caption = 'About' 22 end 23 object AHelp: TAction 24 Caption = 'Help' 25 end 26 object AViewFavorites: TAction 27 Caption = 'Favorites' 28 end 29 object AProjectOpen: TAction 30 Caption = 'Open...' 31 OnExecute = AProjectOpenExecute 32 ShortCut = 16463 33 end 34 object AProjectClose: TAction 35 Caption = 'Close' 36 OnExecute = AProjectCloseExecute 37 end 38 end 39 object ImageList1: TImageList 40 left = 260 41 top = 228 42 end 43 object OpenDialog1: TOpenDialog 44 left = 396 45 top = 113 46 end 7 47 end -
trunk/UCore.pas
r1 r4 1 1 unit UCore; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils, FileUtil; 8 Classes, SysUtils, FileUtil, ActnList, Controls, UVCS, UProject, Forms, 9 Dialogs; 9 10 10 11 type 12 13 { TCore } 14 11 15 TCore = class(TDataModule) 16 AAbout: TAction; 17 AProjectClose: TAction; 18 ActionList1: TActionList; 19 AHelp: TAction; 20 AProjectOpen: TAction; 21 AQuit: TAction; 22 ASettings: TAction; 23 AViewFavorites: TAction; 24 ImageList1: TImageList; 25 OpenDialog1: TOpenDialog; 26 procedure AProjectCloseExecute(Sender: TObject); 27 procedure AProjectOpenExecute(Sender: TObject); 28 procedure AQuitExecute(Sender: TObject); 29 procedure DataModuleCreate(Sender: TObject); 30 procedure DataModuleDestroy(Sender: TObject); 12 31 private 13 { private declarations }32 procedure UpdateInterface; 14 33 public 15 { public declarations }34 Project: TProject; 16 35 end; 17 36 … … 23 42 {$R *.lfm} 24 43 44 uses 45 UFormMain; 46 47 { TCore } 48 49 procedure TCore.AQuitExecute(Sender: TObject); 50 begin 51 Application.Terminate; 52 end; 53 54 procedure TCore.DataModuleCreate(Sender: TObject); 55 begin 56 UpdateInterface; 57 end; 58 59 procedure TCore.DataModuleDestroy(Sender: TObject); 60 begin 61 Project.Free; 62 end; 63 64 procedure TCore.UpdateInterface; 65 begin 66 AProjectClose.Enabled := Assigned(Project); 67 FormMain.UpdateInterface; 68 end; 69 70 procedure TCore.AProjectOpenExecute(Sender: TObject); 71 var 72 Dir: string; 73 OldDir: string; 74 begin 75 if Assigned(Project) then OldDir := Project.Directory 76 else OldDir := ''; 77 if SelectDirectory('Open project', OldDir, Dir) then begin 78 AProjectClose.Execute; 79 Project := TProject.Create; 80 Project.Directory := Dir; 81 UpdateInterface; 82 end; 83 end; 84 85 procedure TCore.AProjectCloseExecute(Sender: TObject); 86 begin 87 FreeAndNil(Project); 88 UpdateInterface; 89 end; 90 25 91 end. 26 92 -
trunk/Units/USubversion.pas
r3 r4 12 12 { TSubversion } 13 13 14 TSubversion = class(T VCS)15 procedure Checkout; 16 procedure Update; 17 procedure CleanUp; 18 procedure Commit; 19 procedure Move; 20 procedure Merge; 14 TSubversion = class(TWorkingCopy) 15 procedure Checkout; override; 16 procedure Update; override; 17 procedure CleanUp; override; 18 procedure Commit; override; 19 procedure Move; override; 20 procedure Merge; override; 21 21 end; 22 22 -
trunk/Units/UVCS.pas
r2 r4 9 9 10 10 type 11 12 { TWorkingCopy } 13 11 14 TWorkingCopy = class 12 Path: string; 15 private 16 FPath: string; 17 procedure SetPath(AValue: string); 18 public 19 procedure Checkout; virtual; 20 procedure Update; virtual; 21 procedure CleanUp; virtual; 22 procedure Commit; virtual; 23 procedure Move; virtual; 24 procedure Merge; virtual; 25 procedure Refresh; virtual; 26 property Path: string read FPath write SetPath; 13 27 end; 14 28 … … 17 31 end; 18 32 33 19 34 implementation 35 36 37 { TWorkingCopy } 38 39 procedure TWorkingCopy.SetPath(AValue: string); 40 begin 41 if FPath=AValue then Exit; 42 FPath := AValue; 43 Refresh; 44 end; 45 46 procedure TWorkingCopy.Checkout; 47 begin 48 49 end; 50 51 procedure TWorkingCopy.Update; 52 begin 53 54 end; 55 56 procedure TWorkingCopy.CleanUp; 57 begin 58 59 end; 60 61 procedure TWorkingCopy.Commit; 62 begin 63 64 end; 65 66 procedure TWorkingCopy.Move; 67 begin 68 69 end; 70 71 procedure TWorkingCopy.Merge; 72 begin 73 74 end; 75 76 procedure TWorkingCopy.Refresh; 77 begin 78 79 end; 20 80 21 81 end. -
trunk/VCSCommander.lpi
r3 r4 1 <?xml version="1.0" ?>1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 3 <ProjectOptions> … … 54 54 </Options> 55 55 </Linking> 56 <Other>57 <CompilerMessages>58 <MsgFileName Value=""/>59 </CompilerMessages>60 <CompilerPath Value="$(CompPath)"/>61 </Other>62 56 </CompilerOptions> 63 57 </Item2> … … 71 65 <local> 72 66 <FormatVersion Value="1"/> 73 <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>74 67 </local> 75 68 </RunParams> … … 79 72 </Item1> 80 73 </RequiredPackages> 81 <Units Count=" 8">74 <Units Count="9"> 82 75 <Unit0> 83 76 <Filename Value="VCSCommander.lpr"/> 84 77 <IsPartOfProject Value="True"/> 85 <UnitName Value="VCSCommander"/>86 78 </Unit0> 87 79 <Unit1> … … 118 110 <IsPartOfProject Value="True"/> 119 111 <ComponentName Value="FormFavorites"/> 112 <HasResources Value="True"/> 120 113 <ResourceBaseClass Value="Form"/> 121 114 <UnitName Value="UFormFavorites"/> … … 125 118 <IsPartOfProject Value="True"/> 126 119 <ComponentName Value="FormSettings"/> 120 <HasResources Value="True"/> 127 121 <ResourceBaseClass Value="Form"/> 128 122 <UnitName Value="UFormSettings"/> … … 133 127 <UnitName Value="USubversion"/> 134 128 </Unit7> 129 <Unit8> 130 <Filename Value="Units/UProject.pas"/> 131 <IsPartOfProject Value="True"/> 132 <UnitName Value="UProject"/> 133 </Unit8> 135 134 </Units> 136 135 </ProjectOptions> … … 160 159 <StackChecks Value="True"/> 161 160 </Checks> 162 <VerifyObjMethodCallValidity Value="True"/>163 161 </CodeGeneration> 164 162 <Linking> … … 172 170 </Options> 173 171 </Linking> 174 <Other>175 <CompilerMessages>176 <MsgFileName Value=""/>177 </CompilerMessages>178 <CompilerPath Value="$(CompPath)"/>179 </Other>180 172 </CompilerOptions> 181 173 <Debugging> -
trunk/VCSCommander.lpr
r3 r4 9 9 Interfaces, // this includes the LCL widgetset 10 10 Forms, UFormMain, UCore, UFormBrowse, UVCS, UFormFavorites, UFormSettings, 11 USubversion 11 USubversion, UProject 12 12 { you can add units after this }; 13 13
Note:
See TracChangeset
for help on using the changeset viewer.