Merged revision(s) 49398-49400 #2c96091403-#2c96091403, 49413 #69969cdf74, 49422 #0cc48033bb from trunk:

LazDataDesktop: improved 'Connect to database' form layout
........
LazDataDesktop: cleanup
........
LazDataDesktop: only show submenu for 'New connection' menu item, do not show dialog with rougly the same content, bug 
........
LazDataDesktop: fixed 'New connection' main menu item i18n, also made sure that 'New connection' dialog is accesible with Ctrl+Alt+N shortcut, bug 
........
LazDataDesktop: disabled 'New connection' dialog also in context menu, bug 
........

git-svn-id: branches/fixes_1_4@49450 -
This commit is contained in:
maxim 2015-06-25 21:30:39 +00:00
parent c99735f316
commit 3e7cf074c6
4 changed files with 151 additions and 95 deletions

View File

@ -5,7 +5,7 @@ object MainForm: TMainForm
Width = 666
ActiveControl = PCDD
Caption = 'Lazarus Database Desktop'
ClientHeight = 464
ClientHeight = 460
ClientWidth = 666
Menu = MainMenu1
OnClose = FormClose
@ -15,7 +15,7 @@ object MainForm: TMainForm
OnShow = FormShow
Position = poScreenCenter
SessionProperties = 'Height;Left;Top;Width;WindowState'
LCLVersion = '1.1'
LCLVersion = '1.5'
object TBMain: TToolBar
Left = 0
Height = 26
@ -46,6 +46,7 @@ object MainForm: TMainForm
end
object ToolButton1: TToolButton
Left = 73
Height = 24
Top = 2
Width = 10
Style = tbsSeparator
@ -62,6 +63,7 @@ object MainForm: TMainForm
end
object ToolButton2: TToolButton
Left = 227
Height = 24
Top = 2
Width = 10
Style = tbsSeparator
@ -73,6 +75,7 @@ object MainForm: TMainForm
end
object ToolButton3: TToolButton
Left = 261
Height = 24
Top = 2
Width = 10
Style = tbsSeparator
@ -110,7 +113,7 @@ object MainForm: TMainForm
end
object PCDD: TPageControl
Left = 0
Height = 418
Height = 414
Top = 26
Width = 666
ActivePage = TSRecent
@ -119,11 +122,11 @@ object MainForm: TMainForm
TabOrder = 1
object TSRecent: TTabSheet
Caption = 'Dictionaries'
ClientHeight = 384
ClientHeight = 388
ClientWidth = 658
object LVDicts: TListView
Left = 0
Height = 384
Height = 388
Top = 0
Width = 658
Align = alClient
@ -152,13 +155,13 @@ object MainForm: TMainForm
end
object TSConnections: TTabSheet
Caption = 'Connections'
ClientHeight = 384
ClientHeight = 388
ClientWidth = 658
object LVConnections: TListView
Left = 0
Height = 374
Height = 388
Top = 0
Width = 662
Width = 658
Align = alClient
Columns = <
item
@ -191,7 +194,7 @@ object MainForm: TMainForm
object PStatus: TPanel
Left = 0
Height = 20
Top = 444
Top = 440
Width = 666
Align = alBottom
BevelOuter = bvNone
@ -262,7 +265,6 @@ object MainForm: TMainForm
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000000000
0000000000000000000000000000000000000000000000000000
}
OnClick = ANewExecute
end
object MIOpen: TMenuItem
Action = AOpen
@ -302,7 +304,6 @@ object MainForm: TMainForm
000000000000000000000000000000000000000000FF000000FF000000FF0000
00FF000000000000000000000000000000000000000000000000
}
OnClick = AOpenExecute
end
object MISave: TMenuItem
Action = ASave
@ -342,22 +343,18 @@ object MainForm: TMainForm
01FF010101FF010101FF010101FF010101FF010101FF010101FF010101FF0101
01FF010101FF010101FF010101FF010101FF010101FF010101FF
}
OnClick = ASaveExecute
end
object MISaveAs: TMenuItem
Action = ASaveAs
OnClick = SaveAsExecute
end
object MICloseSep: TMenuItem
Caption = '-'
end
object MIClose: TMenuItem
Action = AClose
OnClick = ACloseExecute
end
object MICloseAll: TMenuItem
Action = ACloseAll
OnClick = ACloseAllExecute
end
object MISep: TMenuItem
Caption = '-'
@ -400,7 +397,6 @@ object MainForm: TMainForm
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF006D9CD4FF6A9AD2FF6697CFFF
}
OnClick = AExitExecute
end
end
object MenuItem2: TMenuItem
@ -462,7 +458,6 @@ object MainForm: TMainForm
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
}
OnClick = ANewTableExecute
end
object MINewField: TMenuItem
Action = ANewField
@ -502,7 +497,6 @@ object MainForm: TMainForm
FF00F0FBFF00F0FBFF00F0FBFF00F0FBFF00F0FBFF00F0FBFF00F0FBFF00F0FB
FF00F0FBFF00F0FBFF00F0FBFF00F0FBFF00F0FBFF00F0FBFF00
}
OnClick = ANewFieldExecute
end
object MenuItem4: TMenuItem
Action = ANewIndex
@ -542,7 +536,6 @@ object MainForm: TMainForm
31FF6C4E31FF6C4E31FF6C4E3100000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
}
OnClick = ANewIndexExecute
end
object MenuItem7: TMenuItem
Action = AAddForeignKey
@ -582,7 +575,6 @@ object MainForm: TMainForm
00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000
0000000000000000000000000000000000000000000000000000
}
OnClick = AAddForeignKeyExecute
end
object MenuItem5: TMenuItem
Action = AAddDomain
@ -622,7 +614,6 @@ object MainForm: TMainForm
FAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFA
FAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFAFAFFFAFAFAFF
}
OnClick = AAddDomainExecute
end
object MenuItem6: TMenuItem
Action = AAddSequence
@ -662,7 +653,6 @@ object MainForm: TMainForm
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
}
OnClick = AAddSequenceExecute
end
object MIDDSep2: TMenuItem
Caption = '-'
@ -705,7 +695,6 @@ object MainForm: TMainForm
00000000000006060600060606000E0E0EFF424242FF4A4A4AFF3E3E3EFF2C2C
2CFF000000FF0606060006060600000000000000000000000000
}
OnClick = ADeleteObjectExecute
end
object MIDDSep3: TMenuItem
Caption = '-'
@ -748,7 +737,6 @@ object MainForm: TMainForm
FFFFC0C0C0FFC0C0C0FFC0C0C0FFC0C0C0FFC0DCC0FFC0DCC0FFC0DCC0FFC0DC
C0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
}
OnClick = AGenerateSQLExecute
end
object MICreateCode: TMenuItem
Action = ACreateCode
@ -788,22 +776,18 @@ object MainForm: TMainForm
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF0000000000000000
}
OnClick = ACreateCodeExecute
end
end
object MIConnection: TMenuItem
Caption = 'Connections'
object MINewConnection: TMenuItem
Action = ANewConnection
OnClick = ANewConnectionExecute
Caption = '&New connection'
end
object MIOpenRecentConnection: TMenuItem
Action = AOpenConnection
OnClick = OpenRecentConnection
end
object MIDeleteRecentConnection: TMenuItem
Action = ADeleteConnection
OnClick = ADeleteConnectionExecute
end
end
end
@ -1511,15 +1495,12 @@ object MainForm: TMainForm
top = 200
object PMIOpenConnection: TMenuItem
Action = AOpenConnection
OnClick = OpenRecentConnection
end
object PMINewConnection: TMenuItem
Action = ANewConnection
OnClick = ANewConnectionExecute
Caption = '&New connection'
end
object PMIDeleteConnection: TMenuItem
Action = ADeleteConnection
OnClick = ADeleteConnectionExecute
end
end
object PMDataDict: TPopupMenu

View File

@ -315,6 +315,8 @@ begin
MIDDSep.Caption:= sld_Separator;
MIDDSep2.Caption:= sld_Separator;
MIDDSep3.Caption:= sld_Separator;
MINewConnection.Caption:= sld_Actionnewconnection;
PMINewConnection.Caption:= sld_Actionnewconnection;
//
ASave.Caption:= sld_Actionsave;
ASave.Hint:= sld_ActionsaveH;

View File

@ -1,34 +1,45 @@
object SQLConnectionForm: TSQLConnectionForm
Left = 547
Height = 215
Top = 454
Width = 395
Left = 394
Height = 196
Top = 397
Width = 470
ActiveControl = EHostName
AutoSize = True
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'Connect to a database'
ClientHeight = 215
ClientWidth = 395
ClientHeight = 196
ClientWidth = 470
Constraints.MinWidth = 470
OnCreate = FormCreate
LCLVersion = '0.9.27'
LCLVersion = '1.5'
object LEHostName: TLabel
Left = 8
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = EHostName
AnchorSideTop.Side = asrCenter
Left = 6
Height = 23
Top = 6
Width = 97
Top = 5
Width = 122
Alignment = taRightJustify
AutoSize = False
BorderSpacing.Left = 6
Caption = '&Host'
FocusControl = EHostName
Layout = tlCenter
ParentColor = False
end
object LEDatabaseName: TLabel
Left = 8
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = EDatabaseName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 40
Width = 97
Top = 32
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Database'
FocusControl = EDatabaseName
@ -36,11 +47,17 @@ object SQLConnectionForm: TSQLConnectionForm
ParentColor = False
end
object LEUserName: TLabel
Left = 8
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = EUserName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 72
Width = 97
Top = 59
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Username'
FocusControl = EUserName
@ -48,11 +65,17 @@ object SQLConnectionForm: TSQLConnectionForm
ParentColor = False
end
object LEPassword: TLabel
Left = 8
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = EPassword
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 104
Width = 97
Top = 86
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Password'
FocusControl = EPassword
@ -60,11 +83,17 @@ object SQLConnectionForm: TSQLConnectionForm
ParentColor = False
end
object LCharset: TLabel
Left = 44
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = ECharset
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21
Top = 139
Width = 60
Top = 114
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Charset'
FocusControl = ECharset
@ -72,52 +101,111 @@ object SQLConnectionForm: TSQLConnectionForm
ParentColor = False
end
object EHostName: TEdit
Left = 112
Height = 27
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 134
Height = 21
Top = 6
Width = 274
Width = 330
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 0
end
object EDatabaseName: TEdit
Left = 112
Height = 27
Top = 40
Width = 274
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EHostName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 134
Height = 21
Top = 33
Width = 330
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 1
end
object EUserName: TEdit
Left = 113
Height = 27
Top = 72
Width = 273
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EDatabaseName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 134
Height = 21
Top = 60
Width = 330
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 2
end
object EPassword: TEdit
Left = 112
Height = 27
Top = 104
Width = 274
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EUserName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 134
Height = 21
Top = 87
Width = 330
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
EchoMode = emPassword
PasswordChar = '*'
TabOrder = 3
end
object BPButtons: TButtonPanel
AnchorSideTop.Control = ECharset
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 35
Top = 174
Width = 383
Height = 49
Top = 141
Width = 458
Anchors = [akTop, akLeft, akRight]
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 4
ShowButtons = [pbOK, pbCancel]
end
object ECharset: TEdit
Left = 112
Height = 27
Top = 136
Width = 61
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EPassword
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = BPButtons
Left = 134
Height = 21
Top = 114
Width = 330
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 5
end
end

View File

@ -57,7 +57,6 @@
<Unit0>
<Filename Value="lazdatadesktop.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="lazdatadesktop"/>
</Unit0>
<Unit1>
<Filename Value="frmmain.pp"/>
@ -65,12 +64,10 @@
<ComponentName Value="MainForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="frmmain"/>
</Unit1>
<Unit2>
<Filename Value="dicteditor.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="dicteditor"/>
</Unit2>
<Unit3>
<Filename Value="frmimportdd.pp"/>
@ -78,7 +75,6 @@
<ComponentName Value="ImportDDform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="frmimportdd"/>
</Unit3>
<Unit4>
<Filename Value="frmgeneratesql.pp"/>
@ -86,34 +82,30 @@
<ComponentName Value="GenerateSQLForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="frmgeneratesql"/>
</Unit4>
<Unit5>
<Filename Value="frmsqlconnect.pp"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SQLConnectionForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="frmSQLConnect"/>
</Unit5>
<Unit6>
<Filename Value="ddfiles.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="ddfiles"/>
</Unit6>
<Unit7>
<Filename Value="conneditor.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="conneditor"/>
</Unit7>
<Unit8>
<Filename Value="datapanel.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="datapanel"/>
</Unit8>
<Unit9>
<Filename Value="querypanel.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="querypanel"/>
</Unit9>
<Unit10>
<Filename Value="README.txt"/>
@ -123,13 +115,12 @@
<Filename Value="frmselectconnectiontype.pp"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SelectConnectionTypeForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="frmselectconnectiontype"/>
</Unit11>
<Unit12>
<Filename Value="lazdatadeskstr.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="lazdatadeskstr"/>
</Unit12>
</Units>
</ProjectOptions>
@ -153,11 +144,5 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>