diff --git a/res/icons/overlay_bullet_purple.png b/res/icons/overlay_bullet_purple.png new file mode 100644 index 00000000..c01aecd0 Binary files /dev/null and b/res/icons/overlay_bullet_purple.png differ diff --git a/res/icons/overlay_lightbulb.png b/res/icons/overlay_lightbulb.png new file mode 100644 index 00000000..3bd20d9c Binary files /dev/null and b/res/icons/overlay_lightbulb.png differ diff --git a/res/icons/overlay_mariadb.png b/res/icons/overlay_mariadb.png new file mode 100644 index 00000000..9acb4ac2 Binary files /dev/null and b/res/icons/overlay_mariadb.png differ diff --git a/res/icons/overlay_page_white_text.png b/res/icons/overlay_page_white_text.png new file mode 100644 index 00000000..b84fe5d0 Binary files /dev/null and b/res/icons/overlay_page_white_text.png differ diff --git a/res/icons/overlay_world.png b/res/icons/overlay_world.png new file mode 100644 index 00000000..54000b8a Binary files /dev/null and b/res/icons/overlay_world.png differ diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 7e62c4fb..204494d0 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -23,6 +23,7 @@ type FConnection: TDBConnection; function GetObjType: String; function GetImageIndex: Integer; + function GetOverlayImageIndex: Integer; function GetCreateCode: String; procedure SetCreateCode(Value: String); public @@ -38,6 +39,7 @@ type function QuotedColumn(AlwaysQuote: Boolean=True): String; property ObjType: String read GetObjType; property ImageIndex: Integer read GetImageIndex; + property OverlayImageIndex: Integer read GetOverlayImageIndex; property CreateCode: String read GetCreateCode write SetCreateCode; property Connection: TDBConnection read FConnection; end; @@ -4882,6 +4884,41 @@ begin end; +function TDBObject.GetOverlayImageIndex: Integer; +var + EngineUpper: String; +begin + // Detect small overlay icon index for specified table engine + Result := -1; + case NodeType of + lntNone: begin + if not Connection.Active then + Result := 158; + end; + + lntDb: begin + if Database = Connection.Database then + Result := ICONINDEX_HIGHLIGHTMARKER; + end; + + lntTable: begin + EngineUpper := UpperCase(Engine); + if EngineUpper = 'FEDERATED' then + Result := 177 + else if EngineUpper = 'MEMORY' then + Result := 178 + else if EngineUpper = 'ARIA' then + Result := 179 + else if EngineUpper = 'CSV' then + Result := 180 + else if EngineUpper = 'PERFORMANCE_SCHEMA' then + Result := 181; + end; + + end; +end; + + function TDBObject.GetCreateCode: String; begin if not FCreateCodeFetched then try diff --git a/source/main.dfm b/source/main.dfm index a83b034a..507acaa6 100644 --- a/source/main.dfm +++ b/source/main.dfm @@ -2610,9 +2610,67 @@ object MainForm: TMainForm Left = 104 Top = 160 Bitmap = { - 494C0101B1005001880210001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600 - 000000000000360000002800000040000000D0020000010020000000000000D0 + 494C0101B6005001C80210001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600 + 000000000000360000002800000040000000E0020000010020000000000000E0 0200000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFF0000006D0000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000200011A3300 + 1A80870043D57E003DD5270012800100001A0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DFCFCFCFF0F0F0F6D0F0F + 0F6D0F0F0F6D0F0F0F6DFCFCFCFF0000006D0000000000000000000000000000 + 000000000000000000000000000000000000000000000000000039001E80EE7A + B8FFF58FC9FFF384C2FFE476B0FF280012800000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DFCFCFCFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFFBFBFBFF0000006D0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000A70059D5F8A8 + D6FFF56EBCFFF465B6FFF385C1FF820040D50000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DFCFCFCFF0F0F0F6D0F0F + 0F6D0F0F0F6D0F0F0F6DFAFAFAFF0000006D0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000AD005ED5FBB7 + DFFFF87CC7FFF56CBBFFF590C9FF8D0047D50000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFF6F6F6FF0000006D0000000000000000000000000000 + 000000000000000000000000000000000000000000000000000040002380FD7E + C3FFFBB8DFFFFAB0DBFFF07BBAFF36001C800000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DFBFBFBFF0F0F0F6D0F0F + 0F6D0F0F0F6DF4F4F4FFF7F7F7FF0000006D0000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000200011A4000 + 2380AF005ED5AB005BD53B0020800200011A0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006DF8F8F8FFF7F7F7FFF4F4 + F4FFEDEDEDFFF5F5F5FF0000006D000000090000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000006D0000006D0000006D0000 + 006D0000006D0000006D00000009000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -2628,55 +2686,125 @@ object MainForm: TMainForm 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080FF808080FF8080 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000002050231315834C16D93 + 61F66B9765F62B5531C502050236000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000010101171011 + 127D0E10107D0101021B00000000000000000000000000000000000000000000 + 00001815137B24272D9F0302022F0000000000000000000000002018149D1915 + 158C000000010000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000205033067AB7AF4A8CF98FFCBAF + 72FFC5A76BFF74BA88FF599868F6020502360000000000000000000000000000 + 00000000000000000000000000000000000000000000000000001013146ABCBA + B9FFA7A4A3FF0C0E107200000000000000000000000000000000000000000000 + 00001514136124282D914E6177E62A3139A81C1E238D20252CA1383131D45674 + 96FF2F2118B4362E2FD2000000090000000000000000808080FF808080FF8080 80FF808080FF808080FF808080FF808080FF808080FF808080FF808080FF8080 80FF808080FF808080FF00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080FFC0C0C0FFFFFF + 000000000000000000000000000000000000396942BD90D39AFFA5B96DFFD6A7 + 57FFD09D4EFFA09F55FF7DB386FF2B5531C60000000000000000000000000000 + 000000000000000000000000000000000000000000000000000D395F7ECB50B0 + CCFF48A4BEFF1C466ECC00000112000000000000000000000000000000000000 + 0000000000000000000008070745829DB6F96E9CC5FF6896C0FF6591BBFF698F + B1FF6189AFFF373134CE000000000000000000000000808080FFC0C0C0FFFFFF FFFFC0C0C0FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0C0FFFFFF FFFFC0C0C0FF808080FF00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080FFFFFFFFFFC0C0 + 00000000000000000000000000000000000082C796F690D580FFC4BC73FFD4A9 + 58FFBEAA5CFFB4A256FF72A564FF67A375F70000000000000000000000000000 + 00000000000000000000000000000000000000000001416680BC87C7F3FF6FE2 + F6FF6BE1F6FF6EBAF0FF396A99D3000000090000000000000000000000000000 + 0000000000000000000000000000040302313F4244AB6C7F91ED7EA4C6FF6D9B + C5FF6B9AC4FF556E89FA0000000D0000000000000000808080FFFFFFFFFFC0C0 C0FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0 C0FFFFFFFFFF808080FF00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080FFC0C0C0FFFFFF + 00000000000000000000000000000000000082C898F58BE087FFCCE7AFFFCAB3 + 65FFA7D670FF69D446FF65BC64FF6AA77AF70000000000000000000000000000 + 0000000000000000000000000000000000000E181D5BC4EAF9FF68D1F4FF6ACA + F3FF61C5F2FF49C7F1FFA7DDF5FF0B1A286E0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000002060403394C54 + 5DC56D9CC5FF628EB8FF070504480000000000000000808080FFC0C0C0FFFFFF FFFFC0C0C0FFFFFFFFFF808080FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0C0FFFFFF FFFFC0C0C0FF808080FF00000000000000000000000000000000000000000000 + 0000000000000000000000000000000000003B6C46B9B6EFC1FFC3EDB4FFD7D5 + 9AFFCCBD72FFA5CD73FF93DD9EFF325E3AC10000000000000000000000000000 + 0000000000000000000000000000000000001B2B3477D5F5FDFFDCF8FDFFE0F8 + FDFFDAF6FDFFB9F2FBFFB1ECFAFF0C21347D0000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080FFFFFFFFFFC0C0 + 000D526172DE6A99C3FF1B1D21850000000000000000808080FFFFFFFFFFC0C0 C0FFFFFFFFFF808080FF808080FF808080FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0 C0FFFFFFFFFF808080FF00000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000205032B7FC293F0CFF1DBFFD1E4 + BDFFD8D7A4FFCDCA98FF7AB581F4020503310000000000000000000000000000 + 00000000000000000000000000000000000003040525ACD2E0F2E0F9FDFFE3FA + FEFFDEF9FDFFD2F7FDFF87C2E8FB030609330000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080FFC0C0C0FFFFFF + 0000070605466B90B4FE607A93F40908094B00000000808080FFC0C0C0FFFFFF FFFF808080FF808080FF808080FF808080FF808080FFFFFFFFFFC0C0C0FFFFFF FFFFC0C0C0FF808080FF00000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000000205022A3E6B46B885C3 + 8DF489C388F8406E46BD03060331000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000007090A346C8793C4ACD6 + E6F6A5D4EAF95A8AA6D4060C0F43000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000808080FFFFFFFFFF8080 + 0000000000000D0C0B56464341BB4F4138DC00000000808080FFFFFFFFFF8080 80FF808080FF808080FFFFFFFFFF808080FF808080FF808080FFFFFFFFFFC0C0 C0FFFFFFFFFF808080FF00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -8373,7 +8501,7 @@ object MainForm: TMainForm 000000000000000000000000000000000000854F2FAAA46B43CEB1764ADEAE74 48DBAF7448DBAE7349DBA46A3FD054331B6E0603020800000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000D00200000100010000000000801600000000000000000000 + 2800000040000000E00200000100010000000000001700000000000000000000 000000000000000000000000FFFFFF0000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -8555,6 +8683,10 @@ object MainForm: TMainForm 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 000000000000} end object PopupQueryLoad: TPopupMenu diff --git a/source/main.pas b/source/main.pas index 0d5f2058..6d8ac58c 100644 --- a/source/main.pas +++ b/source/main.pas @@ -4620,12 +4620,15 @@ procedure TMainForm.ListTablesGetImageIndex(Sender: TBaseVirtualTree; Node: PVir var Obj: PDBObject; begin - if not (Kind in [ikNormal, ikSelected]) then - Exit; if Column <> (Sender as TVirtualStringTree).Header.MainColumn then Exit; Obj := Sender.GetNodeData(Node); - ImageIndex := Obj.ImageIndex; + case Kind of + ikNormal, ikSelected: + ImageIndex := Obj.ImageIndex; + ikOverlay: + ImageIndex := Obj.OverlayImageIndex; + end; end; @@ -6979,13 +6982,7 @@ begin ); end; ikOverlay: - if DBObj.NodeType = lntNone then begin - if not DBObj.Connection.Active then - ImageIndex := 158; - end else if DBObj.NodeType = lntDb then begin - if (DBObj.Database = DBObj.Connection.Database) then - ImageIndex := ICONINDEX_HIGHLIGHTMARKER; - end; + ImageIndex := DBObj.OverlayImageIndex; end; end;