From 429eeda612ba1418ea0e84a2a55b831da9f23ca5 Mon Sep 17 00:00:00 2001 From: juha Date: Wed, 3 Nov 2010 09:38:35 +0000 Subject: [PATCH] Build Profiles: improve layout git-svn-id: trunk@28052 - --- ide/buildlazdialog.lfm | 201 ++++++++++++++++++++++++----------------- ide/buildlazdialog.pas | 11 ++- 2 files changed, 130 insertions(+), 82 deletions(-) diff --git a/ide/buildlazdialog.lfm b/ide/buildlazdialog.lfm index e7eb9a02fe..aeb7e44b58 100644 --- a/ide/buildlazdialog.lfm +++ b/ide/buildlazdialog.lfm @@ -1,13 +1,13 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg Left = 333 - Height = 692 + Height = 699 Top = 99 - Width = 633 + Width = 584 VertScrollBar.Visible = False BorderIcons = [biSystemMenu] Caption = 'ConfigureBuildLazarusDlg' - ClientHeight = 692 - ClientWidth = 633 + ClientHeight = 699 + ClientWidth = 584 Constraints.MinHeight = 400 Constraints.MinWidth = 305 OnCreate = FormCreate @@ -17,12 +17,12 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg LCLVersion = '0.9.29' object DetailsPanel: TPanel Left = 0 - Height = 648 + Height = 655 Top = 0 - Width = 633 + Width = 584 Align = alClient - ClientHeight = 648 - ClientWidth = 633 + ClientHeight = 655 + ClientWidth = 584 TabOrder = 0 object BuildProfileLabel: TLabel Left = 8 @@ -41,9 +41,9 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideBottom.Control = MakeModeListBox AnchorSideBottom.Side = asrBottom Left = 398 - Height = 240 + Height = 231 Top = 50 - Width = 234 + Width = 185 Anchors = [akTop, akLeft, akRight, akBottom] AutoFill = True BorderSpacing.Left = 6 @@ -61,49 +61,50 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg end object DetailSettingPanel: TPanel Left = 1 - Height = 351 - Top = 296 - Width = 631 + Height = 367 + Top = 287 + Width = 582 Align = alBottom BevelOuter = bvNone - ClientHeight = 351 - ClientWidth = 631 + ClientHeight = 367 + ClientWidth = 582 TabOrder = 1 object OptionsLabel: TLabel - AnchorSideLeft.Control = DetailSettingPanel - AnchorSideTop.Control = OptionsMemo - Left = 7 + AnchorSideLeft.Control = TargetDirectoryLabel + AnchorSideTop.Control = TargetCPULabel + AnchorSideTop.Side = asrBottom + Left = 5 Height = 16 - Top = 94 + Top = 91 Width = 49 Alignment = taRightJustify - BorderSpacing.Left = 7 + BorderSpacing.Top = 9 Caption = 'Options' Layout = tlBottom ParentColor = False end object TargetOSLabel: TLabel - AnchorSideLeft.Control = OptionsLabel + AnchorSideLeft.Control = TargetDirectoryLabel AnchorSideTop.Control = TargetOSComboBox AnchorSideTop.Side = asrCenter - Left = 7 + Left = 5 Height = 16 - Top = 42 + Top = 39 Width = 63 Alignment = taRightJustify Caption = 'Target OS' ParentColor = False end object TargetDirectoryLabel: TLabel - AnchorSideLeft.Control = TargetOSLabel + AnchorSideLeft.Control = DetailSettingPanel AnchorSideTop.Control = TargetDirectoryComboBox AnchorSideTop.Side = asrCenter - Left = 7 + Left = 5 Height = 16 - Top = 15 + Top = 12 Width = 102 Alignment = taRightJustify - Anchors = [akTop] + BorderSpacing.Left = 5 Caption = 'Target Directory' ParentColor = False end @@ -111,9 +112,9 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideLeft.Control = TargetDirectoryLabel AnchorSideTop.Control = TargetCPUComboBox AnchorSideTop.Side = asrCenter - Left = 7 + Left = 5 Height = 16 - Top = 69 + Top = 66 Width = 69 Alignment = taRightJustify Caption = 'Target CPU' @@ -121,12 +122,12 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg end object TargetDirectoryComboBox: TComboBox AnchorSideTop.Control = DetailSettingPanel - Left = 135 + Left = 127 Height = 21 - Top = 13 - Width = 429 + Top = 10 + Width = 389 Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 13 + BorderSpacing.Top = 10 ItemHeight = 0 TabOrder = 0 end @@ -139,9 +140,9 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = TargetDirectoryComboBox AnchorSideBottom.Side = asrBottom - Left = 576 + Left = 528 Height = 23 - Top = 12 + Top = 9 Width = 44 BorderSpacing.Left = 12 BorderSpacing.Right = 6 @@ -154,10 +155,10 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideTop.Control = TargetOSComboBox AnchorSideTop.Side = asrBottom AnchorSideRight.Side = asrBottom - Left = 135 + Left = 127 Height = 21 - Top = 67 - Width = 226 + Top = 64 + Width = 208 BorderSpacing.Top = 6 BorderSpacing.Right = 6 ItemHeight = 0 @@ -169,12 +170,15 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideTop.Side = asrBottom Left = 7 Height = 20 - Top = 267 + Hint = 'Restart Lazarus automatically after building the IDE. Has no effect when building other parts' + Top = 286 Width = 189 BorderSpacing.Left = 7 BorderSpacing.Top = 10 BorderSpacing.Bottom = 6 Caption = 'RestartAfterBuildCheckBox' + ParentShowHint = False + ShowHint = True TabOrder = 3 end object ConfirmBuildCheckBox: TCheckBox @@ -183,10 +187,13 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideTop.Side = asrBottom Left = 7 Height = 20 - Top = 293 + Hint = 'Show confirmation dialog when building directly from Tools menu' + Top = 312 Width = 159 BorderSpacing.Top = 6 Caption = 'ConfirmBuildCheckBox' + ParentShowHint = False + ShowHint = True TabOrder = 4 end object CleanAllCheckBox: TCheckBox @@ -196,12 +203,15 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideRight.Side = asrBottom Left = 7 Height = 20 - Top = 177 + Hint = 'Like "make clean" on cmd line' + Top = 196 Width = 132 BorderSpacing.Left = 7 - BorderSpacing.Top = 10 + BorderSpacing.Top = 13 BorderSpacing.Bottom = 6 Caption = 'CleanAllCheckBox' + ParentShowHint = False + ShowHint = True TabOrder = 5 end object WithStaticPackagesCheckBox: TCheckBox @@ -211,21 +221,24 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideBottom.Side = asrBottom Left = 7 Height = 20 - Top = 203 + Hint = 'Compile selected static packages into Lazarus binary' + Top = 222 Width = 206 BorderSpacing.Top = 6 Caption = 'WithStaticPackagesCheckBox' + ParentShowHint = False + ShowHint = True TabOrder = 6 end object TargetOSComboBox: TComboBox - AnchorSideLeft.Control = OptionsMemo + AnchorSideLeft.Control = TargetDirectoryComboBox AnchorSideTop.Control = TargetDirectoryComboBox AnchorSideTop.Side = asrBottom AnchorSideRight.Side = asrBottom - Left = 135 + Left = 127 Height = 21 - Top = 40 - Width = 226 + Top = 37 + Width = 208 BorderSpacing.Top = 6 BorderSpacing.Right = 6 ItemHeight = 0 @@ -233,16 +246,18 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg end object UpdateRevisionIncCheckBox: TCheckBox AnchorSideLeft.Control = DetailSettingPanel - AnchorSideTop.Control = OptionsMemo - AnchorSideTop.Side = asrBottom + AnchorSideTop.Control = CleanAllCheckBox + AnchorSideTop.Side = asrCenter AnchorSideBottom.Side = asrBottom - Left = 210 + Left = 180 Height = 20 - Top = 177 + Hint = 'Increment revision? (ToDo: get a better hint)' + Top = 196 Width = 198 - BorderSpacing.Left = 210 - BorderSpacing.Top = 10 + BorderSpacing.Left = 180 Caption = 'UpdateRevisionIncCheckBox' + ParentShowHint = False + ShowHint = True TabOrder = 8 end object CommonsDividerBevel: TDividerBevel @@ -251,8 +266,8 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideTop.Side = asrBottom Left = 7 Height = 17 - Top = 240 - Width = 616 + Top = 259 + Width = 567 Caption = 'CommonsDividerBevel' Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 7 @@ -261,36 +276,49 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg ParentFont = False end object OptionsMemo: TMemo - AnchorSideLeft.Control = TargetDirectoryComboBox - AnchorSideTop.Control = TargetCPUComboBox + AnchorSideLeft.Control = OptionsLabel + AnchorSideTop.Control = OptionsLabel AnchorSideTop.Side = asrBottom - Left = 135 + Left = 5 Height = 73 - Top = 94 - Width = 226 - BorderSpacing.Top = 6 + Hint = 'Options passed to compiler' + Top = 110 + Width = 330 + BorderSpacing.Top = 3 Lines.Strings = ( '' ) + PopupMenu = OptionsPopupMenu + ParentShowHint = False ScrollBars = ssAutoBoth + ShowHint = True TabOrder = 9 end object DefinesListBox: TCheckListBox - AnchorSideTop.Control = TargetOSComboBox - Left = 447 + AnchorSideLeft.Control = DefinesLabel + AnchorSideTop.Control = DefinesLabel + AnchorSideTop.Side = asrBottom + Left = 367 Height = 193 - Top = 40 - Width = 176 - Anchors = [akLeft, akRight] + Hint = 'Defines without -d' + Top = 56 + Width = 207 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 3 ItemHeight = 0 + ParentShowHint = False + PopupMenu = OptionsPopupMenu + ShowHint = True TabOrder = 10 end object DefinesLabel: TLabel - AnchorSideTop.Control = DefinesListBox - Left = 383 + AnchorSideTop.Control = TargetDirectoryComboBox + AnchorSideTop.Side = asrBottom + Left = 367 Height = 16 - Top = 40 + Top = 37 Width = 47 + BorderSpacing.Top = 6 Caption = 'Defines' ParentColor = False end @@ -299,14 +327,17 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideTop.Side = asrBottom AnchorSideRight.Control = DefinesListBox AnchorSideRight.Side = asrCenter - Left = 482 + Left = 417 Height = 25 - Top = 264 + Hint = 'Edit list of defines which can be used by any profile' + Top = 283 Width = 106 Anchors = [akTop, akRight] BorderSpacing.Top = 7 Caption = 'Edit Defines' OnClick = DefinesButtonClick + ParentShowHint = False + ShowHint = True TabOrder = 11 end end @@ -331,7 +362,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = DetailSettingPanel Left = 1 - Height = 215 + Height = 206 Top = 75 Width = 391 Anchors = [akTop, akLeft, akRight, akBottom] @@ -355,7 +386,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg Height = 21 Hint = 'Name of the active profile.' Top = 15 - Width = 459 + Width = 410 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Right = 6 @@ -372,7 +403,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideRight.Control = DetailsPanel AnchorSideRight.Side = asrBottom AnchorSideBottom.Side = asrBottom - Left = 551 + Left = 502 Height = 25 Hint = 'Manage profiles' Top = 13 @@ -392,16 +423,16 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg AnchorSideTop.Side = asrBottom Left = 0 Height = 44 - Top = 648 - Width = 633 + Top = 655 + Width = 584 Align = alBottom AutoSize = True BevelOuter = bvNone ClientHeight = 44 - ClientWidth = 633 + ClientWidth = 584 TabOrder = 1 object CancelButton: TBitBtn - Left = 550 + Left = 501 Height = 32 Top = 6 Width = 77 @@ -416,7 +447,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg TabOrder = 0 end object SaveSettingsButton: TBitBtn - Left = 449 + Left = 400 Height = 32 Top = 6 Width = 95 @@ -429,7 +460,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg TabOrder = 1 end object CompileButton: TBitBtn - Left = 238 + Left = 189 Height = 32 Top = 6 Width = 75 @@ -456,7 +487,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg TabOrder = 3 end object CompileAdvancedButton: TBitBtn - Left = 319 + Left = 270 Height = 32 Top = 6 Width = 124 @@ -469,4 +500,12 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg TabOrder = 4 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 diff --git a/ide/buildlazdialog.pas b/ide/buildlazdialog.pas index 939341750a..103f76fd0d 100644 --- a/ide/buildlazdialog.pas +++ b/ide/buildlazdialog.pas @@ -46,7 +46,7 @@ interface uses Classes, SysUtils, LCLProc, LConvEncoding, Forms, Controls, LCLType, LCLIntf, Graphics, GraphType, StdCtrls, ExtCtrls, Buttons, FileUtil, Dialogs, Types, - InterfaceBase, Themes, ComCtrls, CheckLst, + InterfaceBase, Themes, ComCtrls, CheckLst, Menus, DefineTemplates, Laz_XMLCfg, DividerBevel, LazarusIDEStrConsts, TransferMacros, LazConf, IDEProcs, DialogProcs, IDEMsgIntf, IDEContextHelpEdit, IDEImagesIntf, MainBar, @@ -81,6 +81,7 @@ type CompileAdvancedButton: TBitBtn; ConfirmBuildCheckBox: TCheckBox; DefinesLabel: TLabel; + ShowOptsMenuItem: TMenuItem; OptionsMemo: TMemo; DetailsPanel: TPanel; CommonsDividerBevel: TDividerBevel; @@ -91,6 +92,7 @@ type LCLInterfaceRadioGroup: TRadioGroup; OptionsLabel: TLabel; DetailSettingPanel: TPanel; + OptionsPopupMenu: TPopupMenu; RestartAfterBuildCheckBox: TCheckBox; Panel2: TPanel; SaveSettingsButton: TBitBtn; @@ -121,6 +123,7 @@ type procedure MakeModeListBoxMouseDown(Sender: TOBject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure MakeModeListBoxShowHint(Sender: TObject; HintInfo: PHintInfo); + procedure ShowOptsMenuItemClick(Sender: TObject); procedure SaveSettingsButtonClick(Sender: TObject); procedure TargetDirectoryButtonClick(Sender: TObject); private @@ -966,6 +969,12 @@ begin end; end; +procedure TConfigureBuildLazarusDlg.ShowOptsMenuItemClick(Sender: TObject); +begin + CopyUIToProfile(Profiles.Current); + ShowMessage(fProfiles.Current.ExtraOptions); +end; + procedure TConfigureBuildLazarusDlg.TargetDirectoryButtonClick(Sender: TObject); var AFilename: String;