IDE: added window option to show only one taskbar for IDE windows, bug #16310

git-svn-id: trunk@24825 -
This commit is contained in:
mattias 2010-04-22 19:16:14 +00:00
parent 40e225dab2
commit e598482148
5 changed files with 78 additions and 70 deletions

View File

@ -160,7 +160,7 @@ type
// window layout
FIDEWindowLayoutList: TIDEWindowLayoutList;
FIDEDialogLayoutList: TIDEDialogLayoutList;
FMinimizeAllOnMinimizeMain: boolean;
FSingleTaskBarButton: boolean;
FHideIDEOnRun: boolean;
FHideMessagesIcons: boolean;
FComponentPaletteVisible: boolean;
@ -336,8 +336,8 @@ type
read FIDEWindowLayoutList write FIDEWindowLayoutList;
property IDEDialogLayoutList: TIDEDialogLayoutList
read FIDEDialogLayoutList write FIDEDialogLayoutList;
property MinimizeAllOnMinimizeMain: boolean read FMinimizeAllOnMinimizeMain
write FMinimizeAllOnMinimizeMain;
property SingleTaskBarButton: boolean read FSingleTaskBarButton
write FSingleTaskBarButton;
property HideIDEOnRun: boolean read FHideIDEOnRun write FHideIDEOnRun;
property HideMessagesIcons: boolean read fHideMessagesIcons write fHideMessagesIcons;
property IDETitleStartsWithProject: boolean read FIDETitleStartsWithProject
@ -665,7 +665,7 @@ begin
FIDEDialogLayoutList:=TIDEDialogLayoutList.Create;
if IDEWindowIntf.IDEDialogLayoutList=nil then
IDEWindowIntf.IDEDialogLayoutList:=FIDEDialogLayoutList;
FMinimizeAllOnMinimizeMain:=false;
FSingleTaskBarButton:=false;
FHideIDEOnRun:=false;
FHideMessagesIcons:=false;
FIDETitleStartsWithProject:=false;
@ -917,8 +917,8 @@ begin
Path+'Desktop/');
FIDEDialogLayoutList.LoadFromConfig(FConfigStore,
Path+'Desktop/Dialogs/');
FMinimizeAllOnMinimizeMain:=XMLConfig.GetValue(
Path+'Desktop/MinimizeAllOnMinimizeMain/Value',true);
FSingleTaskBarButton := XMLConfig.GetValue(
Path+'Desktop/SingleTaskBarButton/Value', False);
FHideIDEOnRun:=XMLConfig.GetValue(
Path+'Desktop/HideIDEOnRun/Value',false);
FHideMessagesIcons:=XMLConfig.GetValue(
@ -1205,8 +1205,8 @@ begin
// windows
FIDEWindowLayoutList.SaveToXMLConfig(XMLConfig,Path+'Desktop/');
FIDEDialogLayoutList.SaveToConfig(FConfigStore,Path+'Desktop/Dialogs/');
XMLConfig.SetDeleteValue(Path+'Desktop/MinimizeAllOnMinimizeMain/Value',
FMinimizeAllOnMinimizeMain,true);
XMLConfig.SetDeleteValue(Path+'Desktop/SingleTaskBarButton/Value',
FSingleTaskBarButton, False);
XMLConfig.SetDeleteValue(Path+'Desktop/HideIDEOnRun/Value',FHideIDEOnRun,
false);
XMLConfig.SetDeleteValue(Path+'Desktop/HideMessagesIcons/Value',FHideMessagesIcons,

View File

@ -7,27 +7,27 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
Visible = False
DesignLeft = 319
DesignTop = 171
object MinimizeAllOnMinimizeMainCheckBox: TCheckBox[0]
object SingleTaskBarButtonCheckBox: TCheckBox[0]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 0
Height = 22
Top = 0
Width = 262
Caption = 'MinimizeAllOnMinimizeMainCheckBox'
Width = 196
Caption = 'SingleTaskBarButtonCheckBox'
Enabled = False
TabOrder = 0
end
object HideIDEOnRunCheckBox: TCheckBox[1]
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = MinimizeAllOnMinimizeMainCheckBox
AnchorSideTop.Control = SingleTaskBarButtonCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 0
Height = 22
Top = 22
Width = 178
Width = 159
Caption = 'HideIDEOnRunCheckBox'
TabOrder = 1
end
@ -46,7 +46,7 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 6
Caption = 'WindowPositionsGroupBox'
ClientHeight = 338
ClientHeight = 342
ClientWidth = 562
TabOrder = 2
object Bevel1: TBevel
@ -55,7 +55,7 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrCenter
Left = 6
Height = 3
Top = 169
Top = 167
Width = 50
BorderSpacing.Left = 6
end
@ -66,10 +66,10 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = WindowPositionsGroupBox
AnchorSideRight.Side = asrBottom
Left = 210
Left = 195
Height = 3
Top = 169
Width = 346
Top = 167
Width = 361
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Right = 6
@ -79,9 +79,9 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = WindowPositionsListBox
AnchorSideTop.Side = asrBottom
Left = 70
Height = 18
Height = 14
Top = 161
Width = 134
Width = 119
BorderSpacing.Left = 70
BorderSpacing.Top = 6
Caption = 'lblWindowCaption'
@ -93,10 +93,10 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = LeftEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LeftEdit
Left = 314
Height = 18
Top = 189
Width = 59
Left = 321
Height = 14
Top = 185
Width = 52
Anchors = [akTop, akRight]
BorderSpacing.Right = 3
Caption = 'LeftLabel'
@ -106,10 +106,10 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = TopEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = TopEdit
Left = 317
Height = 18
Top = 222
Width = 56
Left = 323
Height = 14
Top = 214
Width = 50
Anchors = [akTop, akRight]
BorderSpacing.Right = 3
Caption = 'TopLabel'
@ -119,10 +119,10 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = WidthEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = WidthEdit
Left = 423
Height = 18
Top = 189
Width = 70
Left = 432
Height = 14
Top = 185
Width = 61
Anchors = [akTop, akRight]
BorderSpacing.Right = 3
Caption = 'WidthLabel'
@ -132,10 +132,10 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = HeightEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = HeightEdit
Left = 416
Height = 18
Top = 222
Width = 77
Left = 426
Height = 14
Top = 214
Width = 67
Anchors = [akTop, akRight]
BorderSpacing.Right = 3
Caption = 'HeightLabel'
@ -163,8 +163,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
Left = 6
Height = 22
Top = 185
Width = 276
Top = 181
Width = 245
BorderSpacing.Around = 6
Caption = 'UseWindowManagerSettingRadioButton'
Checked = True
@ -177,8 +177,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
Left = 6
Height = 22
Top = 213
Width = 148
Top = 209
Width = 132
BorderSpacing.Around = 6
Caption = 'DefaultRadioButton'
TabOrder = 2
@ -190,8 +190,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
Left = 6
Height = 22
Top = 241
Width = 261
Top = 237
Width = 234
BorderSpacing.Around = 6
Caption = 'RestoreWindowGeometryRadioButton'
TabOrder = 3
@ -203,8 +203,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
Left = 6
Height = 22
Top = 269
Width = 202
Top = 265
Width = 181
BorderSpacing.Around = 6
Caption = 'CustomPositionRadioButton'
TabOrder = 4
@ -215,8 +215,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = WidthEdit
Left = 376
Height = 27
Top = 185
Height = 23
Top = 181
Width = 60
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
@ -229,8 +229,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = HeightEdit
Left = 376
Height = 27
Top = 218
Height = 23
Top = 210
Width = 60
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
@ -244,8 +244,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideRight.Control = WindowPositionsGroupBox
AnchorSideRight.Side = asrBottom
Left = 496
Height = 27
Top = 185
Height = 23
Top = 181
Width = 60
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
@ -259,8 +259,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideRight.Control = WindowPositionsGroupBox
AnchorSideRight.Side = asrBottom
Left = 496
Height = 27
Top = 218
Height = 23
Top = 210
Width = 60
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
@ -272,10 +272,10 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Control = TopEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ApplyButton
Left = 285
Height = 29
Top = 251
Width = 175
Left = 315
Height = 25
Top = 239
Width = 156
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
@ -289,10 +289,10 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = WindowPositionsGroupBox
AnchorSideRight.Side = asrBottom
Left = 466
Height = 29
Top = 251
Width = 90
Left = 477
Height = 25
Top = 239
Width = 79
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
@ -307,8 +307,8 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
AnchorSideTop.Side = asrBottom
Left = 6
Height = 22
Top = 297
Width = 150
Top = 293
Width = 133
BorderSpacing.Around = 6
Caption = 'DockedRadioButton'
TabOrder = 11
@ -322,7 +322,7 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
Left = 0
Height = 22
Top = 44
Width = 213
Width = 192
Caption = 'HideMessagesIconsCheckBox'
TabOrder = 3
end
@ -333,7 +333,7 @@ inherited WindowOptionsFrame: TWindowOptionsFrame
Left = 0
Height = 22
Top = 66
Width = 223
Width = 200
Caption = 'TitleStartsWithProjectCheckBox'
ParentShowHint = False
ShowHint = True

View File

@ -27,7 +27,7 @@ interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, StdCtrls, ExtCtrls,
Spin, EnvironmentOpts, LazarusIDEStrConsts, IDEOptionDefs, ObjectInspector,
IDEOptionsIntf;
IDEOptionsIntf, InterfaceBase;
type
{ TWindowOptionsFrame }
@ -47,7 +47,7 @@ type
lblWindowCaption: TLabel;
LeftEdit: TSpinEdit;
LeftLabel: TLabel;
MinimizeAllOnMinimizeMainCheckBox: TCheckBox;
SingleTaskBarButtonCheckBox: TCheckBox;
RestoreWindowGeometryRadioButton: TRadioButton;
TitleStartsWithProjectCheckBox: TCheckBox;
TopEdit: TSpinEdit;
@ -94,7 +94,9 @@ var
i: Integer;
begin
// windows
MinimizeAllOnMinimizeMainCheckBox.Caption := dlgMinimizeAllOnMinimizeMain;
SingleTaskBarButtonCheckBox.Caption := dlgSingleTaskBarButton;
SingleTaskBarButtonCheckBox.Enabled :=
WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) = LCL_CAPABILITY_YES;
HideIDEOnRunCheckBox.Caption := dlgHideIDEOnRun;
HideMessagesIconsCheckBox.Caption := dlgHideMessagesIcons;
TitleStartsWithProjectCheckBox.Caption:=lisIDETitleStartsWithProjectName;
@ -139,7 +141,7 @@ begin
SetWindowPositionsItem(0);
// window minimizing and hiding
MinimizeAllOnMinimizeMainCheckBox.Checked := MinimizeAllOnMinimizeMain;
SingleTaskBarButtonCheckBox.Checked := SingleTaskBarButton;
HideIDEOnRunCheckBox.Checked := HideIDEOnRun;
HideMessagesIconsCheckBox.Checked := HideMessagesIcons;
TitleStartsWithProjectCheckBox.Checked:=IDETitleStartsWithProject;
@ -152,7 +154,7 @@ begin
begin
SaveLayout;
// window minimizing
MinimizeAllOnMinimizeMain:=MinimizeAllOnMinimizeMainCheckBox.Checked;
SingleTaskBarButton := SingleTaskBarButtonCheckBox.Checked;
HideIDEOnRun:=HideIDEOnRunCheckBox.Checked;
HideMessagesIcons:=HideMessagesIconsCheckBox.Checked;
IDETitleStartsWithProject:=TitleStartsWithProjectCheckBox.Checked;

View File

@ -1019,7 +1019,7 @@ resourcestring
dlgDesktopFiles = 'Desktop files';
dlgSaveDFile = 'Save desktop settings to file';
dlgLoadDFile = 'Load desktop settings from file';
dlgMinimizeAllOnMinimizeMain = 'Minimize all on minimize main';
dlgSingleTaskBarButton = 'Show single button in TaskBar';
dlgHideIDEOnRun = 'Hide IDE windows on run';
dlgHideMessagesIcons = 'Hide Messages Icons';
lisIDETitleStartsWithProjectName = 'IDE title starts with project name';

View File

@ -1281,6 +1281,8 @@ begin
CreatePrimaryConfigPath;
StartProtocol;
LoadGlobalOptions;
if EnvironmentOptions.SingleTaskBarButton then
Application.TaskBarBehavior := tbSingleButton;
// set the IDE mode to none (= editing mode)
ToolStatus:=itNone;
@ -4316,6 +4318,10 @@ begin
IDEOptionsDialog.WriteAll;
UpdateHighlighters(True);
SourceEditorManager.ReloadEditorOptions;
if EnvironmentOptions.SingleTaskBarButton then
Application.TaskBarBehavior := tbSingleButton
else
Application.TaskBarBehavior := tbDefault;
end;
finally
IDEOptionsDialog.Free;