mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 03:48:27 +02:00
IDE: Add to Toolbar/coolbar options window a message about saving current desktop manually. Issue #34659, patch from FTurtle.
git-svn-id: trunk@59788 -
This commit is contained in:
parent
f4544c2ac8
commit
607ce76498
@ -21,7 +21,7 @@ object EditorToolbarOptionsFrame: TEditorToolbarOptionsFrame
|
||||
TabOrder = 0
|
||||
object dbGeneralSettings: TDividerBevel
|
||||
Left = 0
|
||||
Height = 15
|
||||
Height = 13
|
||||
Top = 5
|
||||
Width = 503
|
||||
Caption = 'Editor Toolbars Settings'
|
||||
@ -37,9 +37,9 @@ object EditorToolbarOptionsFrame: TEditorToolbarOptionsFrame
|
||||
AnchorSideTop.Control = dbGeneralSettings
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 32
|
||||
Width = 108
|
||||
Height = 17
|
||||
Top = 30
|
||||
Width = 96
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Toolbar is visible'
|
||||
OnClick = cbCoolBarVisibleClick
|
||||
@ -61,11 +61,11 @@ object EditorToolbarOptionsFrame: TEditorToolbarOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 25
|
||||
Height = 23
|
||||
Top = 65
|
||||
Width = 79
|
||||
Width = 73
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 14
|
||||
BorderSpacing.Top = 18
|
||||
Caption = 'Configure'
|
||||
OnClick = bConfigClick
|
||||
TabOrder = 2
|
||||
@ -77,10 +77,10 @@ object EditorToolbarOptionsFrame: TEditorToolbarOptionsFrame
|
||||
AnchorSideRight.Control = cbPos
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 25
|
||||
Left = 155
|
||||
Height = 23
|
||||
Top = 65
|
||||
Width = 110
|
||||
Width = 106
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
@ -93,10 +93,10 @@ object EditorToolbarOptionsFrame: TEditorToolbarOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbCoolBarVisible
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 140
|
||||
Height = 15
|
||||
Top = 34
|
||||
Width = 32
|
||||
Left = 128
|
||||
Height = 13
|
||||
Top = 32
|
||||
Width = 27
|
||||
BorderSpacing.Left = 32
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'lblpos'
|
||||
@ -108,12 +108,12 @@ object EditorToolbarOptionsFrame: TEditorToolbarOptionsFrame
|
||||
AnchorSideTop.Control = lblpos
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 23
|
||||
Top = 30
|
||||
Left = 161
|
||||
Height = 21
|
||||
Top = 28
|
||||
Width = 100
|
||||
BorderSpacing.Bottom = 6
|
||||
ItemHeight = 15
|
||||
ItemHeight = 13
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Top'
|
||||
@ -126,6 +126,25 @@ object EditorToolbarOptionsFrame: TEditorToolbarOptionsFrame
|
||||
TabOrder = 1
|
||||
Text = 'Top'
|
||||
end
|
||||
object lblNoAutoSaveActiveDesktop: TLabel
|
||||
AnchorSideLeft.Control = cbCoolBarVisible
|
||||
AnchorSideTop.Control = bConfig
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = pnTop
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 13
|
||||
Top = 94
|
||||
Width = 503
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'lblNoAutoSaveActiveDesktop'
|
||||
Font.Color = clInactiveCaption
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
WordWrap = True
|
||||
end
|
||||
end
|
||||
object imButtons: TImageList
|
||||
left = 304
|
||||
|
@ -49,6 +49,7 @@ type
|
||||
cbPos: TComboBox;
|
||||
imButtons: TImageList;
|
||||
dbGeneralSettings: TDividerBevel;
|
||||
lblNoAutoSaveActiveDesktop: TLabel;
|
||||
lblpos: TLabel;
|
||||
pnTopCenterLabel: TLabel;
|
||||
pnTop: TPanel;
|
||||
@ -105,6 +106,7 @@ begin
|
||||
for i := 0 to high(sLocalizedPosValues) do
|
||||
cbPos.Items[i] := sLocalizedPosValues[i]; // localized
|
||||
cbPos.Caption := cbPos.Items[cbPos.ItemIndex];
|
||||
lblNoAutoSaveActiveDesktop.Caption := lisNoAutoSaveActiveDesktop;
|
||||
|
||||
dbGeneralSettings.Caption := lisEditorToolbarSettings; // ToDo: Will be removed ...
|
||||
cbCoolBarVisible.Caption := lisEditorToolbarVisible;
|
||||
@ -122,6 +124,7 @@ begin
|
||||
Opts := (AOptions as TEnvironmentOptions).Desktop.EditorToolBarOptions;
|
||||
cbCoolBarVisible.Checked := Opts.Visible;
|
||||
cbPos.ItemIndex := IndexFromEnglish(Opts.Position);
|
||||
lblNoAutoSaveActiveDesktop.Visible := not EnvironmentOptions.AutoSaveActiveDesktop;
|
||||
// Disable controls when toolbar is hidden.
|
||||
cbPos.Enabled := Opts.Visible;
|
||||
bConfig.Enabled := Opts.Visible;
|
||||
|
@ -17,26 +17,26 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 251
|
||||
Top = 200
|
||||
Height = 264
|
||||
Top = 187
|
||||
Width = 520
|
||||
Align = alClient
|
||||
BorderSpacing.Top = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 251
|
||||
ClientHeight = 264
|
||||
ClientWidth = 520
|
||||
Constraints.MinHeight = 115
|
||||
TabOrder = 1
|
||||
object pnButtons: TPanel
|
||||
AnchorSideLeft.Control = pnBottom
|
||||
AnchorSideRight.Control = pnBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
AnchorSideBottom.Control = lblNoAutoSaveActiveDesktop
|
||||
Left = 0
|
||||
Height = 35
|
||||
Top = 216
|
||||
Top = 210
|
||||
Width = 520
|
||||
Align = alBottom
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 35
|
||||
@ -48,9 +48,9 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideBottom.Control = pnButtons
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 2
|
||||
Width = 36
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 45
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
@ -64,10 +64,10 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnButtons
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 105
|
||||
Height = 27
|
||||
Top = 2
|
||||
Width = 50
|
||||
Left = 120
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 57
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
@ -81,10 +81,10 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnButtons
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 48
|
||||
Height = 27
|
||||
Top = 2
|
||||
Width = 51
|
||||
Left = 57
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 57
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
@ -98,10 +98,10 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnButtons
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 459
|
||||
Height = 27
|
||||
Top = 2
|
||||
Width = 55
|
||||
Left = 453
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 61
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
@ -112,15 +112,21 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
end
|
||||
end
|
||||
object sbCoolBar: TScrollBox
|
||||
AnchorSideLeft.Control = pnBottom
|
||||
AnchorSideTop.Control = pnBottom
|
||||
AnchorSideRight.Control = pnBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnButtons
|
||||
Left = 0
|
||||
Height = 188
|
||||
Height = 198
|
||||
Top = 0
|
||||
Width = 520
|
||||
HorzScrollBar.Page = 75
|
||||
VertScrollBar.Page = 22
|
||||
VertScrollBar.Page = 25
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Bottom = 12
|
||||
BorderStyle = bsNone
|
||||
ClientHeight = 188
|
||||
ClientHeight = 198
|
||||
ClientWidth = 520
|
||||
Constraints.MinHeight = 75
|
||||
TabOrder = 0
|
||||
@ -146,22 +152,40 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
OnResize = CoolbarResize
|
||||
end
|
||||
end
|
||||
object lblNoAutoSaveActiveDesktop: TLabel
|
||||
AnchorSideLeft.Control = pnBottom
|
||||
AnchorSideRight.Control = pnBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 13
|
||||
Top = 245
|
||||
Width = 520
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'lblNoAutoSaveActiveDesktop'
|
||||
Font.Color = clInactiveCaption
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
WordWrap = True
|
||||
end
|
||||
end
|
||||
object pnTop: TPanel
|
||||
Left = 0
|
||||
Height = 179
|
||||
Height = 168
|
||||
Top = 0
|
||||
Width = 520
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 179
|
||||
ClientHeight = 168
|
||||
ClientWidth = 520
|
||||
Constraints.MinWidth = 350
|
||||
TabOrder = 0
|
||||
object dbGeneralSettings: TDividerBevel
|
||||
Left = 0
|
||||
Height = 15
|
||||
Height = 13
|
||||
Top = 5
|
||||
Width = 520
|
||||
Caption = 'General Coolbars Settings'
|
||||
@ -178,25 +202,25 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = pnTopCenterLabel
|
||||
Left = 0
|
||||
Height = 80
|
||||
Top = 60
|
||||
Height = 78
|
||||
Top = 55
|
||||
Width = 257
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 3
|
||||
Caption = 'Grab Style'
|
||||
ClientHeight = 64
|
||||
ClientWidth = 255
|
||||
ClientHeight = 60
|
||||
ClientWidth = 253
|
||||
TabOrder = 1
|
||||
object lbGrabWidth: TLabel
|
||||
AnchorSideTop.Control = spGrabWidth
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = spGrabWidth
|
||||
Left = 94
|
||||
Height = 15
|
||||
Top = 40
|
||||
Width = 73
|
||||
Left = 107
|
||||
Height = 13
|
||||
Top = 37
|
||||
Width = 58
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Grab Width:'
|
||||
@ -207,9 +231,9 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = gbGrabStyle
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 173
|
||||
Left = 171
|
||||
Height = 21
|
||||
Top = 37
|
||||
Top = 33
|
||||
Width = 76
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -225,12 +249,12 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideRight.Control = gbGrabStyle
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 25
|
||||
Height = 21
|
||||
Top = 6
|
||||
Width = 243
|
||||
Width = 241
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
ItemHeight = 13
|
||||
ItemIndex = 1
|
||||
Items.Strings = (
|
||||
'gsSimple'
|
||||
@ -253,10 +277,10 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = pnTop
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 459
|
||||
Height = 27
|
||||
Top = 146
|
||||
Width = 55
|
||||
Left = 453
|
||||
Height = 23
|
||||
Top = 139
|
||||
Width = 61
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -269,9 +293,9 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideTop.Control = dbGeneralSettings
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 32
|
||||
Width = 123
|
||||
Height = 17
|
||||
Top = 30
|
||||
Width = 97
|
||||
BorderSpacing.Top = 12
|
||||
Caption = 'Coolbar is visible'
|
||||
OnClick = cbCoolBarVisibleClick
|
||||
@ -286,15 +310,15 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideBottom.Control = gbGrabStyle
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 263
|
||||
Height = 80
|
||||
Top = 60
|
||||
Height = 78
|
||||
Top = 55
|
||||
Width = 257
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'Band Border Style'
|
||||
ClientHeight = 64
|
||||
ClientWidth = 255
|
||||
ClientHeight = 60
|
||||
ClientWidth = 253
|
||||
TabOrder = 2
|
||||
object cbBorderStyle: TComboBox
|
||||
AnchorSideLeft.Control = gbBorderStyle
|
||||
@ -302,12 +326,12 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideRight.Control = gbBorderStyle
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 25
|
||||
Height = 21
|
||||
Top = 6
|
||||
Width = 243
|
||||
Width = 241
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
ItemHeight = 13
|
||||
ItemIndex = 1
|
||||
Items.Strings = (
|
||||
'None'
|
||||
@ -324,10 +348,10 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = cbCoolBarVisible
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 155
|
||||
Height = 15
|
||||
Top = 36
|
||||
Width = 83
|
||||
Left = 129
|
||||
Height = 13
|
||||
Top = 32
|
||||
Width = 66
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 32
|
||||
Caption = 'Coolbar width'
|
||||
@ -338,9 +362,9 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = lbCoolBarWidth
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 244
|
||||
Left = 201
|
||||
Height = 21
|
||||
Top = 33
|
||||
Top = 28
|
||||
Width = 64
|
||||
BorderSpacing.Left = 6
|
||||
MaxValue = 5000
|
||||
@ -366,8 +390,8 @@ object IdeCoolbarOptionsFrame: TIdeCoolbarOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 179
|
||||
Height = 13
|
||||
Top = 168
|
||||
Width = 520
|
||||
Caption = 'Add/Config/Delete Toolbar(s)'
|
||||
Align = alTop
|
||||
|
@ -57,6 +57,7 @@ type
|
||||
imButtons: TImageList;
|
||||
dbAddConfigDelete: TDividerBevel;
|
||||
dbGeneralSettings: TDividerBevel;
|
||||
lblNoAutoSaveActiveDesktop: TLabel;
|
||||
pnTopCenterLabel: TLabel;
|
||||
lbGrabWidth: TLabel;
|
||||
lbCoolBarWidth: TLabel;
|
||||
@ -162,6 +163,7 @@ begin
|
||||
IDEImages.AssignImage(bDelete, 'laz_delete');
|
||||
bDefaultToolbar.Caption := lisCoolbarRestoreDefaults;
|
||||
IDEImages.AssignImage(bDefaultToolbar, 'restore_defaults');
|
||||
lblNoAutoSaveActiveDesktop.Caption := lisNoAutoSaveActiveDesktop;
|
||||
end;
|
||||
|
||||
procedure TIdeCoolbarOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
@ -190,6 +192,7 @@ begin
|
||||
cbBorderStyle.ItemIndex := Opts.BorderStyle;
|
||||
FTempCoolBar.Coolbar.BandBorderStyle := TBorderStyle(Opts.BorderStyle);
|
||||
EnableDisableGeneralButtons;
|
||||
lblNoAutoSaveActiveDesktop.Visible := not EnvironmentOptions.AutoSaveActiveDesktop;
|
||||
|
||||
// ToDo: More tests?
|
||||
if Opts.ToolBars.Count = 0 then
|
||||
|
@ -4840,6 +4840,7 @@ resourcestring
|
||||
lisEditorToolbarVisible = 'Editor Toolbar is &visible';
|
||||
lisEditorToolbarSettings = 'Editor Toolbar Settings';
|
||||
lisPosition = 'Position';
|
||||
lisNoAutoSaveActiveDesktop = 'You need save current desktop manually for next sessions because option ''Auto save active desktop'' is turned off';
|
||||
|
||||
// components palette settings and list form
|
||||
lisCmpPages = 'Pages';
|
||||
|
Loading…
Reference in New Issue
Block a user