mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 15:49:32 +01:00 
			
		
		
		
	IDE: Fix tab orders in Desktop Manager. Cleanup. Issue #28426, patch from Alexey Torgashin.
git-svn-id: trunk@49713 -
This commit is contained in:
		
							parent
							
								
									da24388dc4
								
							
						
					
					
						commit
						0e075dc2d9
					
				@ -39,9 +39,7 @@ uses
 | 
			
		||||
  // LazUtils
 | 
			
		||||
  LConvEncoding, FileUtil, LazFileUtils, LazUTF8, LazUTF8Classes,
 | 
			
		||||
  // IDEIntf
 | 
			
		||||
  ComponentReg, LazIDEIntf, PackageIntf, ProjectIntf,
 | 
			
		||||
  // IDEIntf
 | 
			
		||||
  IDEDialogs,
 | 
			
		||||
  ComponentReg, LazIDEIntf, PackageIntf, ProjectIntf, IDEDialogs,
 | 
			
		||||
  // IDE
 | 
			
		||||
  IDEProcs, DialogProcs, EditorOptions, CompilerOptions,
 | 
			
		||||
  ProjPackBase, Project, ProjectDefs, PackageDefs, PackageSystem, PackageEditor,
 | 
			
		||||
 | 
			
		||||
@ -1,12 +1,12 @@
 | 
			
		||||
object DesktopForm: TDesktopForm
 | 
			
		||||
  Left = 670
 | 
			
		||||
  Height = 291
 | 
			
		||||
  Top = 382
 | 
			
		||||
  Width = 432
 | 
			
		||||
  Left = 684
 | 
			
		||||
  Height = 341
 | 
			
		||||
  Top = 339
 | 
			
		||||
  Width = 418
 | 
			
		||||
  BorderIcons = [biSystemMenu]
 | 
			
		||||
  Caption = 'DesktopForm'
 | 
			
		||||
  ClientHeight = 291
 | 
			
		||||
  ClientWidth = 432
 | 
			
		||||
  ClientHeight = 341
 | 
			
		||||
  ClientWidth = 418
 | 
			
		||||
  OnCreate = FormCreate
 | 
			
		||||
  Position = poScreenCenter
 | 
			
		||||
  LCLVersion = '1.5'
 | 
			
		||||
@ -15,10 +15,10 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    AnchorSideTop.Control = DesktopListBox
 | 
			
		||||
    AnchorSideRight.Control = DeleteBitBtn
 | 
			
		||||
    AnchorSideRight.Side = asrBottom
 | 
			
		||||
    Left = 271
 | 
			
		||||
    Height = 23
 | 
			
		||||
    Left = 234
 | 
			
		||||
    Height = 29
 | 
			
		||||
    Top = 14
 | 
			
		||||
    Width = 155
 | 
			
		||||
    Width = 178
 | 
			
		||||
    Anchors = [akTop, akLeft, akRight]
 | 
			
		||||
    BorderSpacing.Top = 6
 | 
			
		||||
    Caption = 'Save current desktop'
 | 
			
		||||
@ -28,8 +28,8 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
  object ButtonPanel1: TButtonPanel
 | 
			
		||||
    Left = 6
 | 
			
		||||
    Height = 37
 | 
			
		||||
    Top = 248
 | 
			
		||||
    Width = 420
 | 
			
		||||
    Top = 298
 | 
			
		||||
    Width = 406
 | 
			
		||||
    OKButton.Name = 'OKButton'
 | 
			
		||||
    OKButton.Caption = 'Close and use selected desktop'
 | 
			
		||||
    OKButton.DefaultCaption = False
 | 
			
		||||
@ -40,16 +40,16 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    CancelButton.Name = 'CancelButton'
 | 
			
		||||
    CancelButton.Caption = 'Close'
 | 
			
		||||
    CancelButton.DefaultCaption = False
 | 
			
		||||
    TabOrder = 5
 | 
			
		||||
    TabOrder = 7
 | 
			
		||||
    ShowButtons = [pbOK, pbCancel]
 | 
			
		||||
    ShowGlyphs = [pbOK, pbClose, pbHelp]
 | 
			
		||||
  end
 | 
			
		||||
  object DesktopListBox: TListBox
 | 
			
		||||
    AnchorSideRight.Control = SaveBitBtn
 | 
			
		||||
    Left = 11
 | 
			
		||||
    Height = 236
 | 
			
		||||
    Height = 286
 | 
			
		||||
    Top = 8
 | 
			
		||||
    Width = 250
 | 
			
		||||
    Width = 213
 | 
			
		||||
    Anchors = [akTop, akLeft, akRight, akBottom]
 | 
			
		||||
    BorderSpacing.Right = 10
 | 
			
		||||
    ItemHeight = 0
 | 
			
		||||
@ -57,8 +57,10 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    OnDrawItem = DesktopListBoxDrawItem
 | 
			
		||||
    OnKeyPress = DesktopListBoxKeyPress
 | 
			
		||||
    OnSelectionChange = DesktopListBoxSelectionChange
 | 
			
		||||
    ScrollWidth = 211
 | 
			
		||||
    Style = lbOwnerDrawFixed
 | 
			
		||||
    TabOrder = 0
 | 
			
		||||
    TopIndex = -1
 | 
			
		||||
  end
 | 
			
		||||
  object DeleteBitBtn: TBitBtn
 | 
			
		||||
    AnchorSideLeft.Control = SetDebugDesktopBitBtn
 | 
			
		||||
@ -66,10 +68,10 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    AnchorSideTop.Side = asrBottom
 | 
			
		||||
    AnchorSideRight.Control = SetDebugDesktopBitBtn
 | 
			
		||||
    AnchorSideRight.Side = asrBottom
 | 
			
		||||
    Left = 271
 | 
			
		||||
    Height = 23
 | 
			
		||||
    Top = 132
 | 
			
		||||
    Width = 155
 | 
			
		||||
    Left = 234
 | 
			
		||||
    Height = 29
 | 
			
		||||
    Top = 144
 | 
			
		||||
    Width = 178
 | 
			
		||||
    Anchors = [akTop, akLeft, akRight]
 | 
			
		||||
    BorderSpacing.Top = 4
 | 
			
		||||
    Caption = 'Delete'
 | 
			
		||||
@ -80,10 +82,10 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    AnchorSideTop.Control = SelectedDesktopLabel
 | 
			
		||||
    AnchorSideTop.Side = asrBottom
 | 
			
		||||
    AnchorSideRight.Side = asrBottom
 | 
			
		||||
    Left = 271
 | 
			
		||||
    Left = 234
 | 
			
		||||
    Height = 29
 | 
			
		||||
    Top = 70
 | 
			
		||||
    Width = 155
 | 
			
		||||
    Top = 76
 | 
			
		||||
    Width = 178
 | 
			
		||||
    Anchors = [akTop, akRight]
 | 
			
		||||
    AutoSize = True
 | 
			
		||||
    BorderSpacing.Top = 6
 | 
			
		||||
@ -95,10 +97,10 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    AnchorSideLeft.Control = SaveBitBtn
 | 
			
		||||
    AnchorSideTop.Control = SaveBitBtn
 | 
			
		||||
    AnchorSideTop.Side = asrBottom
 | 
			
		||||
    Left = 271
 | 
			
		||||
    Left = 234
 | 
			
		||||
    Height = 17
 | 
			
		||||
    Top = 47
 | 
			
		||||
    Width = 100
 | 
			
		||||
    Top = 53
 | 
			
		||||
    Width = 121
 | 
			
		||||
    BorderSpacing.Top = 10
 | 
			
		||||
    Caption = 'Selected desktop:'
 | 
			
		||||
    ParentColor = False
 | 
			
		||||
@ -109,10 +111,10 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    AnchorSideTop.Side = asrBottom
 | 
			
		||||
    AnchorSideRight.Control = SetDebugDesktopBitBtn
 | 
			
		||||
    AnchorSideRight.Side = asrBottom
 | 
			
		||||
    Left = 271
 | 
			
		||||
    Height = 23
 | 
			
		||||
    Top = 105
 | 
			
		||||
    Width = 155
 | 
			
		||||
    Left = 234
 | 
			
		||||
    Height = 29
 | 
			
		||||
    Top = 111
 | 
			
		||||
    Width = 178
 | 
			
		||||
    Anchors = [akTop, akLeft, akRight]
 | 
			
		||||
    BorderSpacing.Top = 6
 | 
			
		||||
    Caption = 'Rename'
 | 
			
		||||
@ -125,15 +127,15 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    AnchorSideTop.Side = asrBottom
 | 
			
		||||
    AnchorSideRight.Control = DeleteBitBtn
 | 
			
		||||
    AnchorSideRight.Side = asrBottom
 | 
			
		||||
    Left = 271
 | 
			
		||||
    Height = 23
 | 
			
		||||
    Top = 167
 | 
			
		||||
    Width = 155
 | 
			
		||||
    Left = 234
 | 
			
		||||
    Height = 29
 | 
			
		||||
    Top = 185
 | 
			
		||||
    Width = 178
 | 
			
		||||
    Anchors = [akTop, akLeft, akRight]
 | 
			
		||||
    BorderSpacing.Top = 12
 | 
			
		||||
    Caption = 'Export'
 | 
			
		||||
    OnClick = ExportBitBtnClick
 | 
			
		||||
    TabOrder = 6
 | 
			
		||||
    TabOrder = 5
 | 
			
		||||
  end
 | 
			
		||||
  object ImportBitBtn: TBitBtn
 | 
			
		||||
    AnchorSideLeft.Control = ExportBitBtn
 | 
			
		||||
@ -141,14 +143,14 @@ object DesktopForm: TDesktopForm
 | 
			
		||||
    AnchorSideTop.Side = asrBottom
 | 
			
		||||
    AnchorSideRight.Control = ExportBitBtn
 | 
			
		||||
    AnchorSideRight.Side = asrBottom
 | 
			
		||||
    Left = 271
 | 
			
		||||
    Height = 23
 | 
			
		||||
    Top = 194
 | 
			
		||||
    Width = 155
 | 
			
		||||
    Left = 234
 | 
			
		||||
    Height = 29
 | 
			
		||||
    Top = 218
 | 
			
		||||
    Width = 178
 | 
			
		||||
    Anchors = [akTop, akLeft, akRight]
 | 
			
		||||
    BorderSpacing.Top = 4
 | 
			
		||||
    Caption = 'Import'
 | 
			
		||||
    OnClick = ImportBitBtnClick
 | 
			
		||||
    TabOrder = 7
 | 
			
		||||
    TabOrder = 6
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -57,7 +57,7 @@ var
 | 
			
		||||
  xDesktop: TDesktopOpt;
 | 
			
		||||
begin
 | 
			
		||||
  xDesktopName := '';
 | 
			
		||||
  theForm:=TDesktopForm.Create(Nil);
 | 
			
		||||
  theForm := TDesktopForm.Create(Nil);
 | 
			
		||||
  try
 | 
			
		||||
    Result := theForm.ShowModal;
 | 
			
		||||
    if (Result = mrOK) and (theForm.DesktopListBox.ItemIndex >= 0) then
 | 
			
		||||
@ -70,7 +70,7 @@ begin
 | 
			
		||||
    with EnvironmentOptions do
 | 
			
		||||
    begin
 | 
			
		||||
      xDesktop := Desktops.Find(xDesktopName);
 | 
			
		||||
      if xDesktop<>nil then
 | 
			
		||||
      if xDesktop <> nil then
 | 
			
		||||
        EnvironmentOptions.UseDesktop(xDesktop);
 | 
			
		||||
    end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user