From 664266e7d0b78bccc0b6ccd4467c9325e7533962 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 9 Aug 2014 17:18:31 +0100 Subject: maximus: refactored some code, moving from main form to various classes Moved some functionality from the main form unit, into the unitlist.pas unit. --- examples/apps/ide/src/frm_main.pas | 26 +++++++++++++------------- examples/apps/ide/src/unitlist.pas | 26 ++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 15 deletions(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/frm_main.pas b/examples/apps/ide/src/frm_main.pas index fe903c31..65985631 100644 --- a/examples/apps/ide/src/frm_main.pas +++ b/examples/apps/ide/src/frm_main.pas @@ -1,7 +1,7 @@ { fpGUI IDE - Maximus - Copyright (C) 2012 - 2013 Graeme Geldenhuys + Copyright (C) 2012 - 2014 Graeme Geldenhuys See the file COPYING.modifiedLGPL, included in this distribution, for details about redistributing fpGUI. @@ -541,18 +541,18 @@ var r: TfpgTreeNode; n: TfpgTreeNode; begin - u := TUnit.Create; - u.FileName := AUnitName; - u.Opened := True; - GProject.UnitList.Add(u); - // add reference to tabsheet - pcEditor.ActivePage.TagPointer := u; - s := fpgExtractRelativepath(GProject.ProjectDir, u.FileName); - r := GetUnitsNode; - n := r.AppendText(s); - // add reference to treenode - n.Data := u; - tvProject.Invalidate; + u := GProject.UnitList.AddFilename(AUnitName); + if Assigned(n) then + begin + // add reference to tabsheet + pcEditor.ActivePage.TagPointer := u; + s := u.GetRelativePath; + r := GetUnitsNode; + n := r.AppendText(s); + // add reference to treenode + n.Data := u; + tvProject.Invalidate; + end; end; procedure TMainForm.miProjectAddUnitToProject(Sender: TObject); diff --git a/examples/apps/ide/src/unitlist.pas b/examples/apps/ide/src/unitlist.pas index 827326e7..37e9a9cd 100644 --- a/examples/apps/ide/src/unitlist.pas +++ b/examples/apps/ide/src/unitlist.pas @@ -1,7 +1,7 @@ { fpGUI IDE - Maximus - Copyright (C) 2012 - 2013 Graeme Geldenhuys + Copyright (C) 2012 - 2014 Graeme Geldenhuys See the file COPYING.modifiedLGPL, included in this distribution, for details about redistributing fpGUI. @@ -31,6 +31,7 @@ type function GetUnitName: TfpgString; public constructor Create; + function GetRelativePath: TfpgString; property FileName: TfpgString read FFilename write FFilename; property UnitName: TfpgString read GetUnitName; property Opened: Boolean read FOpened write FOpened; @@ -48,6 +49,7 @@ type function Count: integer; function FindByName(const AUnitName: TfpgString): TUnit; function FileExists(const AFilename: TfpgString): Boolean; + function AddFileName(const AFilename: TfpgString): TUnit; procedure Add(NewUnit: TUnit); procedure Clear; procedure Delete(AIndex: integer); @@ -58,7 +60,8 @@ type implementation uses - fpg_utils; + fpg_utils, + project; { TUnitList } @@ -128,6 +131,20 @@ begin end; end; +function TUnitList.AddFileName(const AFilename: TfpgString): TUnit; +var + u: TUnit; +begin + if not FileExists(AFilename) then + begin + u := TUnit.Create; + u.FileName := AFilename; + u.Opened := True; + Add(u); + Result := u; + end; +end; + procedure TUnitList.Add(NewUnit: TUnit); var l: Integer; @@ -176,6 +193,11 @@ begin Result := fpgExtractFileName(Filename); end; +function TUnit.GetRelativePath: TfpgString; +begin + Result := fpgExtractRelativepath(GProject.ProjectDir, FileName); +end; + constructor TUnit.Create; begin inherited Create; -- cgit v1.2.3-70-g09d2 From 27f18ffb0223c1f8186e9614083b2bfcb6c4d261 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 9 Aug 2014 17:59:36 +0100 Subject: maximus: New method to remove an item from the UnitList --- examples/apps/ide/src/unitlist.pas | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/unitlist.pas b/examples/apps/ide/src/unitlist.pas index 37e9a9cd..e6c09a69 100644 --- a/examples/apps/ide/src/unitlist.pas +++ b/examples/apps/ide/src/unitlist.pas @@ -50,6 +50,7 @@ type function FindByName(const AUnitName: TfpgString): TUnit; function FileExists(const AFilename: TfpgString): Boolean; function AddFileName(const AFilename: TfpgString): TUnit; + function Remove(AUnit: TUnit): integer; procedure Add(NewUnit: TUnit); procedure Clear; procedure Delete(AIndex: integer); @@ -145,6 +146,11 @@ begin end; end; +function TUnitList.Remove(AUnit: TUnit): integer; +begin + Result := FList.Remove(AUnit); +end; + procedure TUnitList.Add(NewUnit: TUnit); var l: Integer; -- cgit v1.2.3-70-g09d2 From 641f24b2cbccbb3b8c8629f89b1b9d61196ae950 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 9 Aug 2014 18:01:57 +0100 Subject: maximus: Adds the ability to remove a unit from the project tree Simply select the node in the Project tree "Units" list, and press the DEL key. If you don't save the project, the unit will still be part of the project (easy undo feature). If you save the project the project file will be updated - minus that unit. --- examples/apps/ide/src/frm_main.pas | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/frm_main.pas b/examples/apps/ide/src/frm_main.pas index 65985631..6391ceba 100644 --- a/examples/apps/ide/src/frm_main.pas +++ b/examples/apps/ide/src/frm_main.pas @@ -118,6 +118,7 @@ type procedure AddUnitToProject(const AUnitName: TfpgString); procedure miProjectAddUnitToProject(Sender: TObject); procedure tvProjectDoubleClick(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); + procedure tvProjectKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); procedure grdMessageKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean); procedure TabSheetClosing(Sender: TObject; ATabSheet: TfpgTabSheet); procedure BuildTerminated(Sender: TObject); @@ -587,6 +588,38 @@ begin end; end; +procedure TMainForm.tvProjectKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); +var + r: TfpgTreeNode; + n: TfpgTreeNode; + i: integer; +begin + if keyCode = keyDelete then + begin + r := GetUnitsNode; + if r.FindSubNode(tvProject.Selection.Text, False) = tvProject.Selection then + begin + // remove from project, then from tree view + n := tvProject.Selection; + tvProject.GotoNextNodeUp; + r.Remove(n); + tvProject.Invalidate; + GProject.UnitList.Remove(TUnit(n.Data)); + + for i := 0 to pcEditor.PageCount-1 do + begin + if pcEditor.Pages[i].TagPointer = n.Data then + begin + pcEditor.Pages[i].TagPointer := nil; + break + end; + end; + TUnit(n.Data).Free; + n.Free; + end; + end; +end; + procedure TMainForm.grdMessageKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean); var cr: TClipboardKeyType; @@ -1478,6 +1511,7 @@ begin Hint := ''; TabOrder := 20; OnDoubleClick := @tvProjectDoubleClick; + OnKeyPress := @tvProjectKeyPressed; end; tsFiles := TfpgTabSheet.Create(pnlTool); -- cgit v1.2.3-70-g09d2 From 7ee7fdc34ac81b6fa8384cbc3f6b4698d5694c73 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 9 Aug 2014 18:27:19 +0100 Subject: maximus: ESC key now cancels the Project Options dialog. --- examples/apps/ide/src/frm_configureide.pas | 4 ++-- examples/apps/ide/src/frm_projectoptions.pas | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/frm_configureide.pas b/examples/apps/ide/src/frm_configureide.pas index fad0418f..51061a42 100644 --- a/examples/apps/ide/src/frm_configureide.pas +++ b/examples/apps/ide/src/frm_configureide.pas @@ -1,7 +1,7 @@ { fpGUI IDE - Maximus - Copyright (C) 2012 - 2013 Graeme Geldenhuys + Copyright (C) 2012 - 2014 Graeme Geldenhuys See the file COPYING.modifiedLGPL, included in this distribution, for details about redistributing fpGUI. @@ -229,7 +229,6 @@ constructor TConfigureIDEForm.Create(AOwner: TComponent); begin inherited Create(AOwner); FInternalMacroList := TIDEMacroList.Create; - OnKeyPress := @FormKeyPressed; end; destructor TConfigureIDEForm.Destroy; @@ -248,6 +247,7 @@ begin Hint := ''; ShowHint := True; WindowPosition := wpOneThirdDown; + OnKeyPress := @FormKeyPressed; btnCancel := TfpgButton.Create(self); with btnCancel do diff --git a/examples/apps/ide/src/frm_projectoptions.pas b/examples/apps/ide/src/frm_projectoptions.pas index 1e1c318a..a3e43d6a 100644 --- a/examples/apps/ide/src/frm_projectoptions.pas +++ b/examples/apps/ide/src/frm_projectoptions.pas @@ -1,7 +1,7 @@ { fpGUI IDE - Maximus - Copyright (C) 2012 - 2013 Graeme Geldenhuys + Copyright (C) 2012 - 2014 Graeme Geldenhuys See the file COPYING.modifiedLGPL, included in this distribution, for details about redistributing fpGUI. @@ -103,6 +103,7 @@ type procedure CleanupCompilerDirs; procedure CleanupUserMacrosGrid; procedure SaveToMacroList(AList: TIDEMacroList); + procedure FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; @@ -582,6 +583,12 @@ begin // AList.SetValue(cMacro_FPCSrcDir, edtFPCSrcDir.Directory); end; +procedure TProjectOptionsForm.FormKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); +begin + if KeyCode = keyEscape then + Close; +end; + constructor TProjectOptionsForm.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -603,6 +610,7 @@ begin WindowTitle := 'Project Options'; Hint := ''; ShowHint := True; + OnKeyPress := @FormKeyPressed; btnCancel := TfpgButton.Create(self); with btnCancel do -- cgit v1.2.3-70-g09d2 From 1969656ef4847ebae9dc4af326b7d047edab7ea4 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 19 Aug 2014 23:58:42 +0100 Subject: maximus: remap a keyboard shortcut to a more common one. --- examples/apps/ide/src/frm_main.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/frm_main.pas b/examples/apps/ide/src/frm_main.pas index 6391ceba..8a8f3c12 100644 --- a/examples/apps/ide/src/frm_main.pas +++ b/examples/apps/ide/src/frm_main.pas @@ -1631,7 +1631,7 @@ begin begin Name := 'mnuProject'; SetPosition(476, 140, 172, 20); - AddMenuItem('Options...', rsKeyCtrl+rsKeyShift+'O', @miProjectOptions); + AddMenuItem('Options...', rsKeyCtrl+rsKeyShift+'F11', @miProjectOptions); AddMenuItem('-', '', nil); AddMenuItem('New (empty)...', '', @miProjectNew); AddMenuItem('New from Template...', '', @miProjectNewFromTemplate); -- cgit v1.2.3-70-g09d2 From 1abbcc014af1a0e42d6c37bbb4a9e73c2501472f Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 20 Aug 2014 23:04:22 +0100 Subject: Maximus Lazarus project file had incorrect case of unit name in project. mpaslax.pas -> mPasLex.pas --- examples/apps/ide/src/maximus.lpi | 33 ++++++++++----------------------- examples/apps/ide/src/maximus.lpr | 1 - 2 files changed, 10 insertions(+), 24 deletions(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/maximus.lpi b/examples/apps/ide/src/maximus.lpi index accb3570..01a377d7 100644 --- a/examples/apps/ide/src/maximus.lpi +++ b/examples/apps/ide/src/maximus.lpi @@ -42,7 +42,6 @@ - @@ -52,7 +51,6 @@ - @@ -67,7 +65,6 @@ - @@ -77,7 +74,6 @@ - @@ -97,47 +93,42 @@ - - - - + - + - + - - + - + - + - - + - + - + - + @@ -162,11 +153,7 @@ - - - - diff --git a/examples/apps/ide/src/maximus.lpr b/examples/apps/ide/src/maximus.lpr index cf9c439f..13a2047e 100644 --- a/examples/apps/ide/src/maximus.lpr +++ b/examples/apps/ide/src/maximus.lpr @@ -39,7 +39,6 @@ uses ideimages, stringhelpers, frm_procedurelist, - mPasLex, filemonitor, SynRegExpr, fpg_textedit, -- cgit v1.2.3-70-g09d2 From 5b441338c772a2fb5b7d95ae1b45997bac8b5d5a Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 2 Feb 2015 10:06:44 +0000 Subject: Updated TODO file with completed tasks. --- examples/apps/ide/TODO | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/TODO b/examples/apps/ide/TODO index 9a90c33e..72b9f0db 100644 --- a/examples/apps/ide/TODO +++ b/examples/apps/ide/TODO @@ -1,6 +1,6 @@ Personal todo list for fpGUI IDE project - + Legend ====== @@ -22,8 +22,8 @@ fpGUI IDE [ ] Assembly window [ ] CPU window [x] Syntax highlighting with descent speed. -[ ] Basic Search dialog -[x] Find in Files dialog +[x] Basic Search dialog +[ ] Find in Files dialog [ ] Regex support in all search dialogs [ ] External Tools setup and usage [ ] Keyboard Shortcuts dialog @@ -36,7 +36,7 @@ fpGUI IDE [ ] Unit Testing framework integration (with DUnit2 project) [ ] Code Templates support [o] File Browser tabsheet implementation. File navigation and opening of files. -[ ] GoTo Line Number dialog +[x] GoTo Line Number dialog [ ] Converting all UI to MiG Layout Manager based dialogs. [ ] TextEdit: enable line drawing functionality. eg: some key combination with the cursor (arrow) keys allows line drawing. Double and single line -- cgit v1.2.3-70-g09d2 From c65bc9d741728b349859397bba2c769987899030 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 2 Feb 2015 10:07:35 +0000 Subject: IDE: config setting to help with compiling from command line --- examples/apps/ide/src/extrafpc.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/extrafpc.cfg b/examples/apps/ide/src/extrafpc.cfg index 2132065d..3622b5cf 100644 --- a/examples/apps/ide/src/extrafpc.cfg +++ b/examples/apps/ide/src/extrafpc.cfg @@ -1,4 +1,4 @@ --FUunits +-FUunits/$fpctarget -Fu../../../../lib/$fpctarget -Fi. -Xs -- cgit v1.2.3-70-g09d2 From 220186f205ae4155c4462a02ee5709d9cba896fc Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 4 Feb 2015 18:53:53 +0000 Subject: ide: recreate directory hierachy on checkout That way if we build maximus for the first time after a fresh clone of the repository, we will not get any compiler error about the output directory not existing. --- examples/apps/ide/src/units/i386-freebsd/.gitignore | 1 + examples/apps/ide/src/units/i386-linux/.gitignore | 1 + examples/apps/ide/src/units/i386-win32/.gitignore | 1 + examples/apps/ide/src/units/x86_64-freebsd/.gitignore | 1 + examples/apps/ide/src/units/x86_64-linux/.gitignore | 1 + 5 files changed, 5 insertions(+) create mode 100644 examples/apps/ide/src/units/i386-freebsd/.gitignore create mode 100644 examples/apps/ide/src/units/i386-linux/.gitignore create mode 100644 examples/apps/ide/src/units/i386-win32/.gitignore create mode 100644 examples/apps/ide/src/units/x86_64-freebsd/.gitignore create mode 100644 examples/apps/ide/src/units/x86_64-linux/.gitignore (limited to 'examples/apps') diff --git a/examples/apps/ide/src/units/i386-freebsd/.gitignore b/examples/apps/ide/src/units/i386-freebsd/.gitignore new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/examples/apps/ide/src/units/i386-freebsd/.gitignore @@ -0,0 +1 @@ +* diff --git a/examples/apps/ide/src/units/i386-linux/.gitignore b/examples/apps/ide/src/units/i386-linux/.gitignore new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/examples/apps/ide/src/units/i386-linux/.gitignore @@ -0,0 +1 @@ +* diff --git a/examples/apps/ide/src/units/i386-win32/.gitignore b/examples/apps/ide/src/units/i386-win32/.gitignore new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/examples/apps/ide/src/units/i386-win32/.gitignore @@ -0,0 +1 @@ +* diff --git a/examples/apps/ide/src/units/x86_64-freebsd/.gitignore b/examples/apps/ide/src/units/x86_64-freebsd/.gitignore new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/examples/apps/ide/src/units/x86_64-freebsd/.gitignore @@ -0,0 +1 @@ +* diff --git a/examples/apps/ide/src/units/x86_64-linux/.gitignore b/examples/apps/ide/src/units/x86_64-linux/.gitignore new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/examples/apps/ide/src/units/x86_64-linux/.gitignore @@ -0,0 +1 @@ +* -- cgit v1.2.3-70-g09d2 From eb3fd7a82cf077db2e13e7ffc146837ea333123a Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 26 Feb 2015 11:04:30 +0000 Subject: fpcunit: cleaned up uses clause As per compiler hints, I removed all unused entries in the uses clause. --- examples/apps/fpcunit/fpg_guitestrunner.pas | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'examples/apps') diff --git a/examples/apps/fpcunit/fpg_guitestrunner.pas b/examples/apps/fpcunit/fpg_guitestrunner.pas index ca1a7f81..b29150ca 100644 --- a/examples/apps/fpcunit/fpg_guitestrunner.pas +++ b/examples/apps/fpcunit/fpg_guitestrunner.pas @@ -7,11 +7,10 @@ interface uses SysUtils, Classes, // fpGUI toolkit - fpg_base, fpg_main, fpg_edit, fpg_widget, fpg_form, fpg_label, fpg_button, - fpg_listbox, fpg_memo, fpg_combobox, fpg_basegrid, fpg_grid, - fpg_dialogs, fpg_checkbox, fpg_tree, fpg_trackbar, fpg_progressbar, - fpg_radiobutton, fpg_tab, fpg_menu, fpg_panel, fpg_popupcalendar, - fpg_gauge, fpg_splitter, fpg_imagelist, + fpg_base, fpg_main, fpg_form, fpg_label, fpg_button, + fpg_memo, + fpg_dialogs, fpg_tree, fpg_progressbar, + fpg_menu, fpg_panel, fpg_splitter, fpg_imagelist, // FPCUnit support fpcunit, testregistry, testdecorator; -- cgit v1.2.3-70-g09d2 From 62e66eb3df4848919d3e564b2818b90cc8e1c874 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 26 Feb 2015 11:06:21 +0000 Subject: fpcunit: fixes the bug where the treeview is partiall obscured The panel containing the treeview is set to alClient alignment, and it was set before any of the other non-client aligned panels. This was the wrong order of doing things. --- examples/apps/fpcunit/fpg_guitestrunner.pas | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'examples/apps') diff --git a/examples/apps/fpcunit/fpg_guitestrunner.pas b/examples/apps/fpcunit/fpg_guitestrunner.pas index b29150ca..ecd8e9d5 100644 --- a/examples/apps/fpcunit/fpg_guitestrunner.pas +++ b/examples/apps/fpcunit/fpg_guitestrunner.pas @@ -473,16 +473,6 @@ begin SetPosition(305, 196, 530, 547); WindowTitle := 'GUI Test Runner'; - bvlTree := TfpgBevel.Create(self); - with bvlTree do - begin - Name := 'bvlTree'; - SetPosition(4, 8, 512, 364); - Shape := bsSpacer; - MinHeight := 200; - Align := alClient; - end; - bvlButtons := TfpgBevel.Create(self); with bvlButtons do begin @@ -510,6 +500,16 @@ begin Align := alBottom; end; + bvlTree := TfpgBevel.Create(self); + with bvlTree do + begin + Name := 'bvlTree'; + SetPosition(4, 8, 512, 364); + Shape := bsSpacer; + MinHeight := 200; + Align := alClient; + end; + pbName1 := TfpgProgressBar.Create(bvlTree); with pbName1 do begin -- cgit v1.2.3-70-g09d2 From fa5b0fac1f187cc3fd6c1f342e9575b3b744f2c6 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 26 Feb 2015 11:07:20 +0000 Subject: fpcunit: on running the tests, first expand the tree This means we can observe how the tests are progressing. --- examples/apps/fpcunit/fpg_guitestrunner.pas | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/apps') diff --git a/examples/apps/fpcunit/fpg_guitestrunner.pas b/examples/apps/fpcunit/fpg_guitestrunner.pas index ecd8e9d5..400fa0d1 100644 --- a/examples/apps/fpcunit/fpg_guitestrunner.pas +++ b/examples/apps/fpcunit/fpg_guitestrunner.pas @@ -309,6 +309,7 @@ end; procedure TGUITestRunnerForm.btnRunClicked(Sender: TObject); begin + tvTests.FullExpand; if tvTests.Selection = nil then begin TfpgMessageDialog.Critical('No selection', 'Please select a test case first.'); -- cgit v1.2.3-70-g09d2 From 6c692d963dcfe14d2f0f86da064605c7f66325d8 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sun, 1 Mar 2015 16:16:10 +0000 Subject: Minor tweak to the compiler settings --- examples/apps/ide/src/extrafpc.cfg | 3 --- src/extrafpc.cfg | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/extrafpc.cfg b/examples/apps/ide/src/extrafpc.cfg index 3622b5cf..7d50b94c 100644 --- a/examples/apps/ide/src/extrafpc.cfg +++ b/examples/apps/ide/src/extrafpc.cfg @@ -1,9 +1,6 @@ -FUunits/$fpctarget -Fu../../../../lib/$fpctarget -Fi. --Xs --XX --CX #ifdef mswindows -WG #endif diff --git a/src/extrafpc.cfg b/src/extrafpc.cfg index d1600da1..c645739c 100644 --- a/src/extrafpc.cfg +++ b/src/extrafpc.cfg @@ -34,7 +34,6 @@ # For a debug version compile with debuginfo and all codegeneration checks on #IFDEF DEBUG -g - -Crtoi -B #WRITE Compiling Debug Version #ENDIF @@ -91,13 +90,13 @@ # Unit output path -FU../lib/$fpctarget/ -# Generate debugging information for GDI (slows down the compiling process) +# Generate debugging information (slows down the compiling process) # Enable debug info and use the line info unit by default -#-gl +-gl # Always strip debuginfo from the executable --Xs +#-Xs # Write always a nice FPC logo ;) -- cgit v1.2.3-70-g09d2 From 8dfc12915479cb72117d5a07f6dbe209c025a541 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sun, 1 Mar 2015 18:41:22 +0000 Subject: bug: fixes deleting extra character after Cut-To-Clipboard it TextEdit widget Using the keyboard combination to cut to the clipboard deleted an extra character that was not selected. --- examples/apps/ide/src/fpg_textedit.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'examples/apps') diff --git a/examples/apps/ide/src/fpg_textedit.pas b/examples/apps/ide/src/fpg_textedit.pas index 3e88f3d1..6acea537 100644 --- a/examples/apps/ide/src/fpg_textedit.pas +++ b/examples/apps/ide/src/fpg_textedit.pas @@ -1583,17 +1583,20 @@ begin ckCopy: begin CopyToClipboard; + consumed := True; end; ckPaste: begin // if not ReadOnly then PasteFromClipboard; + consumed := True; end; ckCut: begin CutToClipboard; + consumed := True; end; end; @@ -1611,6 +1614,8 @@ begin SLine := FLines[CaretPos.Y]; + if not consumed then + begin case keycode of keyBackspace: begin @@ -1728,7 +1733,8 @@ begin end; consumed := True; end; - end; + end; // case keycode + end; // if not consumed if CaretScroll then begin -- cgit v1.2.3-70-g09d2 From f452c162099feccf452846a53f9cfa9e1f607504 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 4 Apr 2015 15:41:29 +0100 Subject: Fixes time formatting constants for FormateDateTime() call. --- examples/apps/debugserver/frm_main.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/apps') diff --git a/examples/apps/debugserver/frm_main.pas b/examples/apps/debugserver/frm_main.pas index 436a170c..27ac382c 100644 --- a/examples/apps/debugserver/frm_main.pas +++ b/examples/apps/debugserver/frm_main.pas @@ -307,7 +307,7 @@ begin //else // grdMessages.Items.InsertItem(LI, 0); grdMessages.Cells[0, r] := IntToStr(AMsg.MsgType); - grdMessages.Cells[1, r] := FormatDateTime('HH:mm:ss', AMsg.MsgTimeStamp); + grdMessages.Cells[1, r] := FormatDateTime('HH:nn:ss', AMsg.MsgTimeStamp); grdMessages.Cells[2, r] := AMsg.Msg; grdMessages.FocusCol := 0; grdMessages.FocusRow := grdMessages.RowCount-1; -- cgit v1.2.3-70-g09d2