Build Profiles: improve layout

git-svn-id: trunk@28052 -
This commit is contained in:
juha 2010-11-03 09:38:35 +00:00
parent c94957e49b
commit 429eeda612
2 changed files with 130 additions and 82 deletions

View File

@ -1,13 +1,13 @@
object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
Left = 333 Left = 333
Height = 692 Height = 699
Top = 99 Top = 99
Width = 633 Width = 584
VertScrollBar.Visible = False VertScrollBar.Visible = False
BorderIcons = [biSystemMenu] BorderIcons = [biSystemMenu]
Caption = 'ConfigureBuildLazarusDlg' Caption = 'ConfigureBuildLazarusDlg'
ClientHeight = 692 ClientHeight = 699
ClientWidth = 633 ClientWidth = 584
Constraints.MinHeight = 400 Constraints.MinHeight = 400
Constraints.MinWidth = 305 Constraints.MinWidth = 305
OnCreate = FormCreate OnCreate = FormCreate
@ -17,12 +17,12 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
LCLVersion = '0.9.29' LCLVersion = '0.9.29'
object DetailsPanel: TPanel object DetailsPanel: TPanel
Left = 0 Left = 0
Height = 648 Height = 655
Top = 0 Top = 0
Width = 633 Width = 584
Align = alClient Align = alClient
ClientHeight = 648 ClientHeight = 655
ClientWidth = 633 ClientWidth = 584
TabOrder = 0 TabOrder = 0
object BuildProfileLabel: TLabel object BuildProfileLabel: TLabel
Left = 8 Left = 8
@ -41,9 +41,9 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideBottom.Control = MakeModeListBox AnchorSideBottom.Control = MakeModeListBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 398 Left = 398
Height = 240 Height = 231
Top = 50 Top = 50
Width = 234 Width = 185
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
AutoFill = True AutoFill = True
BorderSpacing.Left = 6 BorderSpacing.Left = 6
@ -61,49 +61,50 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
end end
object DetailSettingPanel: TPanel object DetailSettingPanel: TPanel
Left = 1 Left = 1
Height = 351 Height = 367
Top = 296 Top = 287
Width = 631 Width = 582
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 351 ClientHeight = 367
ClientWidth = 631 ClientWidth = 582
TabOrder = 1 TabOrder = 1
object OptionsLabel: TLabel object OptionsLabel: TLabel
AnchorSideLeft.Control = DetailSettingPanel AnchorSideLeft.Control = TargetDirectoryLabel
AnchorSideTop.Control = OptionsMemo AnchorSideTop.Control = TargetCPULabel
Left = 7 AnchorSideTop.Side = asrBottom
Left = 5
Height = 16 Height = 16
Top = 94 Top = 91
Width = 49 Width = 49
Alignment = taRightJustify Alignment = taRightJustify
BorderSpacing.Left = 7 BorderSpacing.Top = 9
Caption = 'Options' Caption = 'Options'
Layout = tlBottom Layout = tlBottom
ParentColor = False ParentColor = False
end end
object TargetOSLabel: TLabel object TargetOSLabel: TLabel
AnchorSideLeft.Control = OptionsLabel AnchorSideLeft.Control = TargetDirectoryLabel
AnchorSideTop.Control = TargetOSComboBox AnchorSideTop.Control = TargetOSComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 7 Left = 5
Height = 16 Height = 16
Top = 42 Top = 39
Width = 63 Width = 63
Alignment = taRightJustify Alignment = taRightJustify
Caption = 'Target OS' Caption = 'Target OS'
ParentColor = False ParentColor = False
end end
object TargetDirectoryLabel: TLabel object TargetDirectoryLabel: TLabel
AnchorSideLeft.Control = TargetOSLabel AnchorSideLeft.Control = DetailSettingPanel
AnchorSideTop.Control = TargetDirectoryComboBox AnchorSideTop.Control = TargetDirectoryComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 7 Left = 5
Height = 16 Height = 16
Top = 15 Top = 12
Width = 102 Width = 102
Alignment = taRightJustify Alignment = taRightJustify
Anchors = [akTop] BorderSpacing.Left = 5
Caption = 'Target Directory' Caption = 'Target Directory'
ParentColor = False ParentColor = False
end end
@ -111,9 +112,9 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideLeft.Control = TargetDirectoryLabel AnchorSideLeft.Control = TargetDirectoryLabel
AnchorSideTop.Control = TargetCPUComboBox AnchorSideTop.Control = TargetCPUComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 7 Left = 5
Height = 16 Height = 16
Top = 69 Top = 66
Width = 69 Width = 69
Alignment = taRightJustify Alignment = taRightJustify
Caption = 'Target CPU' Caption = 'Target CPU'
@ -121,12 +122,12 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
end end
object TargetDirectoryComboBox: TComboBox object TargetDirectoryComboBox: TComboBox
AnchorSideTop.Control = DetailSettingPanel AnchorSideTop.Control = DetailSettingPanel
Left = 135 Left = 127
Height = 21 Height = 21
Top = 13 Top = 10
Width = 429 Width = 389
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 13 BorderSpacing.Top = 10
ItemHeight = 0 ItemHeight = 0
TabOrder = 0 TabOrder = 0
end end
@ -139,9 +140,9 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = TargetDirectoryComboBox AnchorSideBottom.Control = TargetDirectoryComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 576 Left = 528
Height = 23 Height = 23
Top = 12 Top = 9
Width = 44 Width = 44
BorderSpacing.Left = 12 BorderSpacing.Left = 12
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -154,10 +155,10 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideTop.Control = TargetOSComboBox AnchorSideTop.Control = TargetOSComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 135 Left = 127
Height = 21 Height = 21
Top = 67 Top = 64
Width = 226 Width = 208
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
ItemHeight = 0 ItemHeight = 0
@ -169,12 +170,15 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 7 Left = 7
Height = 20 Height = 20
Top = 267 Hint = 'Restart Lazarus automatically after building the IDE. Has no effect when building other parts'
Top = 286
Width = 189 Width = 189
BorderSpacing.Left = 7 BorderSpacing.Left = 7
BorderSpacing.Top = 10 BorderSpacing.Top = 10
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
Caption = 'RestartAfterBuildCheckBox' Caption = 'RestartAfterBuildCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 3 TabOrder = 3
end end
object ConfirmBuildCheckBox: TCheckBox object ConfirmBuildCheckBox: TCheckBox
@ -183,10 +187,13 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 7 Left = 7
Height = 20 Height = 20
Top = 293 Hint = 'Show confirmation dialog when building directly from Tools menu'
Top = 312
Width = 159 Width = 159
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'ConfirmBuildCheckBox' Caption = 'ConfirmBuildCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 4 TabOrder = 4
end end
object CleanAllCheckBox: TCheckBox object CleanAllCheckBox: TCheckBox
@ -196,12 +203,15 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 7 Left = 7
Height = 20 Height = 20
Top = 177 Hint = 'Like "make clean" on cmd line'
Top = 196
Width = 132 Width = 132
BorderSpacing.Left = 7 BorderSpacing.Left = 7
BorderSpacing.Top = 10 BorderSpacing.Top = 13
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
Caption = 'CleanAllCheckBox' Caption = 'CleanAllCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 5 TabOrder = 5
end end
object WithStaticPackagesCheckBox: TCheckBox object WithStaticPackagesCheckBox: TCheckBox
@ -211,21 +221,24 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 7 Left = 7
Height = 20 Height = 20
Top = 203 Hint = 'Compile selected static packages into Lazarus binary'
Top = 222
Width = 206 Width = 206
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'WithStaticPackagesCheckBox' Caption = 'WithStaticPackagesCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 6 TabOrder = 6
end end
object TargetOSComboBox: TComboBox object TargetOSComboBox: TComboBox
AnchorSideLeft.Control = OptionsMemo AnchorSideLeft.Control = TargetDirectoryComboBox
AnchorSideTop.Control = TargetDirectoryComboBox AnchorSideTop.Control = TargetDirectoryComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 135 Left = 127
Height = 21 Height = 21
Top = 40 Top = 37
Width = 226 Width = 208
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
ItemHeight = 0 ItemHeight = 0
@ -233,16 +246,18 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
end end
object UpdateRevisionIncCheckBox: TCheckBox object UpdateRevisionIncCheckBox: TCheckBox
AnchorSideLeft.Control = DetailSettingPanel AnchorSideLeft.Control = DetailSettingPanel
AnchorSideTop.Control = OptionsMemo AnchorSideTop.Control = CleanAllCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrCenter
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 210 Left = 180
Height = 20 Height = 20
Top = 177 Hint = 'Increment revision? (ToDo: get a better hint)'
Top = 196
Width = 198 Width = 198
BorderSpacing.Left = 210 BorderSpacing.Left = 180
BorderSpacing.Top = 10
Caption = 'UpdateRevisionIncCheckBox' Caption = 'UpdateRevisionIncCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 8 TabOrder = 8
end end
object CommonsDividerBevel: TDividerBevel object CommonsDividerBevel: TDividerBevel
@ -251,8 +266,8 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 7 Left = 7
Height = 17 Height = 17
Top = 240 Top = 259
Width = 616 Width = 567
Caption = 'CommonsDividerBevel' Caption = 'CommonsDividerBevel'
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 7 BorderSpacing.Left = 7
@ -261,36 +276,49 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
ParentFont = False ParentFont = False
end end
object OptionsMemo: TMemo object OptionsMemo: TMemo
AnchorSideLeft.Control = TargetDirectoryComboBox AnchorSideLeft.Control = OptionsLabel
AnchorSideTop.Control = TargetCPUComboBox AnchorSideTop.Control = OptionsLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 135 Left = 5
Height = 73 Height = 73
Top = 94 Hint = 'Options passed to compiler'
Width = 226 Top = 110
BorderSpacing.Top = 6 Width = 330
BorderSpacing.Top = 3
Lines.Strings = ( Lines.Strings = (
'' ''
) )
PopupMenu = OptionsPopupMenu
ParentShowHint = False
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
ShowHint = True
TabOrder = 9 TabOrder = 9
end end
object DefinesListBox: TCheckListBox object DefinesListBox: TCheckListBox
AnchorSideTop.Control = TargetOSComboBox AnchorSideLeft.Control = DefinesLabel
Left = 447 AnchorSideTop.Control = DefinesLabel
AnchorSideTop.Side = asrBottom
Left = 367
Height = 193 Height = 193
Top = 40 Hint = 'Defines without -d'
Width = 176 Top = 56
Anchors = [akLeft, akRight] Width = 207
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
ItemHeight = 0 ItemHeight = 0
ParentShowHint = False
PopupMenu = OptionsPopupMenu
ShowHint = True
TabOrder = 10 TabOrder = 10
end end
object DefinesLabel: TLabel object DefinesLabel: TLabel
AnchorSideTop.Control = DefinesListBox AnchorSideTop.Control = TargetDirectoryComboBox
Left = 383 AnchorSideTop.Side = asrBottom
Left = 367
Height = 16 Height = 16
Top = 40 Top = 37
Width = 47 Width = 47
BorderSpacing.Top = 6
Caption = 'Defines' Caption = 'Defines'
ParentColor = False ParentColor = False
end end
@ -299,14 +327,17 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DefinesListBox AnchorSideRight.Control = DefinesListBox
AnchorSideRight.Side = asrCenter AnchorSideRight.Side = asrCenter
Left = 482 Left = 417
Height = 25 Height = 25
Top = 264 Hint = 'Edit list of defines which can be used by any profile'
Top = 283
Width = 106 Width = 106
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Top = 7 BorderSpacing.Top = 7
Caption = 'Edit Defines' Caption = 'Edit Defines'
OnClick = DefinesButtonClick OnClick = DefinesButtonClick
ParentShowHint = False
ShowHint = True
TabOrder = 11 TabOrder = 11
end end
end end
@ -331,7 +362,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DetailSettingPanel AnchorSideBottom.Control = DetailSettingPanel
Left = 1 Left = 1
Height = 215 Height = 206
Top = 75 Top = 75
Width = 391 Width = 391
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
@ -355,7 +386,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
Height = 21 Height = 21
Hint = 'Name of the active profile.' Hint = 'Name of the active profile.'
Top = 15 Top = 15
Width = 459 Width = 410
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -372,7 +403,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideRight.Control = DetailsPanel AnchorSideRight.Control = DetailsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 551 Left = 502
Height = 25 Height = 25
Hint = 'Manage profiles' Hint = 'Manage profiles'
Top = 13 Top = 13
@ -392,16 +423,16 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 44 Height = 44
Top = 648 Top = 655
Width = 633 Width = 584
Align = alBottom Align = alBottom
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 44 ClientHeight = 44
ClientWidth = 633 ClientWidth = 584
TabOrder = 1 TabOrder = 1
object CancelButton: TBitBtn object CancelButton: TBitBtn
Left = 550 Left = 501
Height = 32 Height = 32
Top = 6 Top = 6
Width = 77 Width = 77
@ -416,7 +447,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
TabOrder = 0 TabOrder = 0
end end
object SaveSettingsButton: TBitBtn object SaveSettingsButton: TBitBtn
Left = 449 Left = 400
Height = 32 Height = 32
Top = 6 Top = 6
Width = 95 Width = 95
@ -429,7 +460,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
TabOrder = 1 TabOrder = 1
end end
object CompileButton: TBitBtn object CompileButton: TBitBtn
Left = 238 Left = 189
Height = 32 Height = 32
Top = 6 Top = 6
Width = 75 Width = 75
@ -456,7 +487,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
TabOrder = 3 TabOrder = 3
end end
object CompileAdvancedButton: TBitBtn object CompileAdvancedButton: TBitBtn
Left = 319 Left = 270
Height = 32 Height = 32
Top = 6 Top = 6
Width = 124 Width = 124
@ -469,4 +500,12 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
TabOrder = 4 TabOrder = 4
end end
end end
object OptionsPopupMenu: TPopupMenu
left = 328
top = 536
object ShowOptsMenuItem: TMenuItem
Caption = 'Show options and defines for cmd line'
OnClick = ShowOptsMenuItemClick
end
end
end end

View File

@ -46,7 +46,7 @@ interface
uses uses
Classes, SysUtils, LCLProc, LConvEncoding, Forms, Controls, LCLType, LCLIntf, Classes, SysUtils, LCLProc, LConvEncoding, Forms, Controls, LCLType, LCLIntf,
Graphics, GraphType, StdCtrls, ExtCtrls, Buttons, FileUtil, Dialogs, Types, Graphics, GraphType, StdCtrls, ExtCtrls, Buttons, FileUtil, Dialogs, Types,
InterfaceBase, Themes, ComCtrls, CheckLst, InterfaceBase, Themes, ComCtrls, CheckLst, Menus,
DefineTemplates, Laz_XMLCfg, DividerBevel, DefineTemplates, Laz_XMLCfg, DividerBevel,
LazarusIDEStrConsts, TransferMacros, LazConf, IDEProcs, DialogProcs, LazarusIDEStrConsts, TransferMacros, LazConf, IDEProcs, DialogProcs,
IDEMsgIntf, IDEContextHelpEdit, IDEImagesIntf, MainBar, IDEMsgIntf, IDEContextHelpEdit, IDEImagesIntf, MainBar,
@ -81,6 +81,7 @@ type
CompileAdvancedButton: TBitBtn; CompileAdvancedButton: TBitBtn;
ConfirmBuildCheckBox: TCheckBox; ConfirmBuildCheckBox: TCheckBox;
DefinesLabel: TLabel; DefinesLabel: TLabel;
ShowOptsMenuItem: TMenuItem;
OptionsMemo: TMemo; OptionsMemo: TMemo;
DetailsPanel: TPanel; DetailsPanel: TPanel;
CommonsDividerBevel: TDividerBevel; CommonsDividerBevel: TDividerBevel;
@ -91,6 +92,7 @@ type
LCLInterfaceRadioGroup: TRadioGroup; LCLInterfaceRadioGroup: TRadioGroup;
OptionsLabel: TLabel; OptionsLabel: TLabel;
DetailSettingPanel: TPanel; DetailSettingPanel: TPanel;
OptionsPopupMenu: TPopupMenu;
RestartAfterBuildCheckBox: TCheckBox; RestartAfterBuildCheckBox: TCheckBox;
Panel2: TPanel; Panel2: TPanel;
SaveSettingsButton: TBitBtn; SaveSettingsButton: TBitBtn;
@ -121,6 +123,7 @@ type
procedure MakeModeListBoxMouseDown(Sender: TOBject; Button: TMouseButton; procedure MakeModeListBoxMouseDown(Sender: TOBject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer); Shift: TShiftState; X, Y: Integer);
procedure MakeModeListBoxShowHint(Sender: TObject; HintInfo: PHintInfo); procedure MakeModeListBoxShowHint(Sender: TObject; HintInfo: PHintInfo);
procedure ShowOptsMenuItemClick(Sender: TObject);
procedure SaveSettingsButtonClick(Sender: TObject); procedure SaveSettingsButtonClick(Sender: TObject);
procedure TargetDirectoryButtonClick(Sender: TObject); procedure TargetDirectoryButtonClick(Sender: TObject);
private private
@ -966,6 +969,12 @@ begin
end; end;
end; end;
procedure TConfigureBuildLazarusDlg.ShowOptsMenuItemClick(Sender: TObject);
begin
CopyUIToProfile(Profiles.Current);
ShowMessage(fProfiles.Current.ExtraOptions);
end;
procedure TConfigureBuildLazarusDlg.TargetDirectoryButtonClick(Sender: TObject); procedure TConfigureBuildLazarusDlg.TargetDirectoryButtonClick(Sender: TObject);
var var
AFilename: String; AFilename: String;