mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Introduce tree favorites:
* Add a button right besides db/table filter for hiding non-favorites * Add an icon on the very left of table nodes, showing whether they are favorites Fixes issue #3366
This commit is contained in:
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: HeidiSQL\n"
|
"Project-Id-Version: HeidiSQL\n"
|
||||||
"POT-Creation-Date: 2012-11-05 21:40\n"
|
"POT-Creation-Date: 2012-11-05 21:40\n"
|
||||||
"PO-Revision-Date: 2013-10-10 06:24+0100\n"
|
"PO-Revision-Date: 2013-10-13 07:30+0100\n"
|
||||||
"Last-Translator: Ansgar Becker <heidisql@anse.de>\n"
|
"Last-Translator: Ansgar Becker <heidisql@anse.de>\n"
|
||||||
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/"
|
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/"
|
||||||
"language/en/)\n"
|
"language/en/)\n"
|
||||||
@ -1182,6 +1182,10 @@ msgstr "Table filter"
|
|||||||
msgid "Table filter|Can contain regular expressions, e.g. \"phpbb_\\d\""
|
msgid "Table filter|Can contain regular expressions, e.g. \"phpbb_\\d\""
|
||||||
msgstr "Table filter|Can contain regular expressions, e.g. \"phpbb_\\d\""
|
msgstr "Table filter|Can contain regular expressions, e.g. \"phpbb_\\d\""
|
||||||
|
|
||||||
|
#. Tree favorites button
|
||||||
|
msgid "Hide non-favorite marked tree items"
|
||||||
|
msgstr "Hide non-favorite marked tree items"
|
||||||
|
|
||||||
#. MainForm..panelTop..pnlLeft..DBtree......WideText
|
#. MainForm..panelTop..pnlLeft..DBtree......WideText
|
||||||
#. MainForm..panelTop..pnlRight..PageControlMain..tabDatabase..ListTables......WideText
|
#. MainForm..panelTop..pnlRight..PageControlMain..tabDatabase..ListTables......WideText
|
||||||
#. frmRoutineEditor..PageControlMain..tabParameters..listParameters......WideText
|
#. frmRoutineEditor..PageControlMain..tabParameters..listParameters......WideText
|
||||||
|
BIN
res/icons/bullet_star_gray.png
Normal file
BIN
res/icons/bullet_star_gray.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
@ -25,6 +25,7 @@ type
|
|||||||
function GetObjType: String;
|
function GetObjType: String;
|
||||||
function GetImageIndex: Integer;
|
function GetImageIndex: Integer;
|
||||||
function GetOverlayImageIndex: Integer;
|
function GetOverlayImageIndex: Integer;
|
||||||
|
function GetPath: String;
|
||||||
function GetCreateCode: String;
|
function GetCreateCode: String;
|
||||||
procedure SetCreateCode(Value: String);
|
procedure SetCreateCode(Value: String);
|
||||||
public
|
public
|
||||||
@ -47,6 +48,7 @@ type
|
|||||||
property ObjType: String read GetObjType;
|
property ObjType: String read GetObjType;
|
||||||
property ImageIndex: Integer read GetImageIndex;
|
property ImageIndex: Integer read GetImageIndex;
|
||||||
property OverlayImageIndex: Integer read GetOverlayImageIndex;
|
property OverlayImageIndex: Integer read GetOverlayImageIndex;
|
||||||
|
property Path: String read GetPath;
|
||||||
property CreateCode: String read GetCreateCode write SetCreateCode;
|
property CreateCode: String read GetCreateCode write SetCreateCode;
|
||||||
property WasSelected: Boolean read FWasSelected write FWasSelected;
|
property WasSelected: Boolean read FWasSelected write FWasSelected;
|
||||||
property Connection: TDBConnection read FConnection;
|
property Connection: TDBConnection read FConnection;
|
||||||
@ -5205,6 +5207,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TDBObject.GetPath: String;
|
||||||
|
begin
|
||||||
|
Result := Database + DELIM + Schema + DELIM + Name;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TDBObject.GetCreateCode: String;
|
function TDBObject.GetCreateCode: String;
|
||||||
begin
|
begin
|
||||||
if not FCreateCodeFetched then try
|
if not FCreateCodeFetched then try
|
||||||
|
@ -176,7 +176,7 @@ type
|
|||||||
asActionShortcut1, asActionShortcut2, asHighlighterForeground, asHighlighterBackground, asHighlighterStyle,
|
asActionShortcut1, asActionShortcut2, asHighlighterForeground, asHighlighterBackground, asHighlighterStyle,
|
||||||
asListColWidths, asListColsVisible, asListColPositions, asListColSort, asSessionFolder,
|
asListColWidths, asListColsVisible, asListColPositions, asListColSort, asSessionFolder,
|
||||||
asRecentFilter, asTimestampColumns, asDateTimeEditorCursorPos, asAppLanguage, asAutoExpand, asForeignDropDown, asQueryHistoryEnabled,
|
asRecentFilter, asTimestampColumns, asDateTimeEditorCursorPos, asAppLanguage, asAutoExpand, asForeignDropDown, asQueryHistoryEnabled,
|
||||||
asColumnSelectorWidth, asColumnSelectorHeight, asDonatedEmail,
|
asColumnSelectorWidth, asColumnSelectorHeight, asDonatedEmail, asFavoriteObjects,
|
||||||
asUnused);
|
asUnused);
|
||||||
TAppSetting = record
|
TAppSetting = record
|
||||||
Name: String;
|
Name: String;
|
||||||
@ -3373,6 +3373,7 @@ begin
|
|||||||
InitSetting(asColumnSelectorWidth, 'ColumnSelectorWidth', 200, False, '');
|
InitSetting(asColumnSelectorWidth, 'ColumnSelectorWidth', 200, False, '');
|
||||||
InitSetting(asColumnSelectorHeight, 'ColumnSelectorHeight', 270, False, '');
|
InitSetting(asColumnSelectorHeight, 'ColumnSelectorHeight', 270, False, '');
|
||||||
InitSetting(asDonatedEmail, 'DonatedEmail', 0, False, '');
|
InitSetting(asDonatedEmail, 'DonatedEmail', 0, False, '');
|
||||||
|
InitSetting(asFavoriteObjects, 'FavoriteObjects', 0, False, '', True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
246
source/main.dfm
246
source/main.dfm
@ -645,9 +645,9 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
object DBtree: TVirtualStringTree
|
object DBtree: TVirtualStringTree
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 25
|
Top = 22
|
||||||
Width = 169
|
Width = 169
|
||||||
Height = 228
|
Height = 231
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Constraints.MinWidth = 40
|
Constraints.MinWidth = 40
|
||||||
DragMode = dmAutomatic
|
DragMode = dmAutomatic
|
||||||
@ -667,9 +667,10 @@ object MainForm: TMainForm
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
PopupMenu = popupDB
|
PopupMenu = popupDB
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 0
|
||||||
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toThemeAware, toUseBlendedImages, toGhostedIfUnfocused, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toThemeAware, toUseBlendedImages, toGhostedIfUnfocused, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect, toRightClickSelect]
|
TreeOptions.SelectionOptions = [toFullRowSelect, toRightClickSelect]
|
||||||
|
OnAfterCellPaint = DBtreeAfterCellPaint
|
||||||
OnBeforeCellPaint = DBtreeBeforeCellPaint
|
OnBeforeCellPaint = DBtreeBeforeCellPaint
|
||||||
OnChange = DBtreeChange
|
OnChange = DBtreeChange
|
||||||
OnDblClick = DBtreeDblClick
|
OnDblClick = DBtreeDblClick
|
||||||
@ -685,10 +686,11 @@ object MainForm: TMainForm
|
|||||||
OnGetNodeDataSize = DBtreeGetNodeDataSize
|
OnGetNodeDataSize = DBtreeGetNodeDataSize
|
||||||
OnInitChildren = DBtreeInitChildren
|
OnInitChildren = DBtreeInitChildren
|
||||||
OnInitNode = DBtreeInitNode
|
OnInitNode = DBtreeInitNode
|
||||||
|
OnNodeClick = DBtreeNodeClick
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Position = 0
|
Position = 0
|
||||||
Width = 110
|
Width = 165
|
||||||
WideText = 'Name'
|
WideText = 'Name'
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
@ -708,7 +710,7 @@ object MainForm: TMainForm
|
|||||||
Height = 100
|
Height = 100
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 2
|
TabOrder = 1
|
||||||
Visible = False
|
Visible = False
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
169
|
169
|
||||||
@ -773,36 +775,22 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pnlTreeFilter: TPanel
|
object ToolBarTree: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 169
|
Width = 169
|
||||||
Height = 25
|
Height = 22
|
||||||
Align = alTop
|
Caption = 'ToolBarTree'
|
||||||
BevelOuter = bvNone
|
|
||||||
Caption = 'pnlTreeFilter'
|
|
||||||
ShowCaption = False
|
|
||||||
TabOrder = 0
|
|
||||||
object editTableFilter: TButtonedEdit
|
|
||||||
Left = 78
|
|
||||||
Top = 2
|
|
||||||
Width = 89
|
|
||||||
Height = 21
|
|
||||||
Hint = 'Table filter|Can contain regular expressions, e.g. "phpbb_\d"'
|
|
||||||
Images = ImageListMain
|
Images = ImageListMain
|
||||||
LeftButton.ImageIndex = 14
|
ParentShowHint = False
|
||||||
LeftButton.Visible = True
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 2
|
||||||
TextHint = 'Table filter'
|
Wrapable = False
|
||||||
OnChange = editDatabaseTableFilterChange
|
|
||||||
OnExit = editDatabaseTableFilterExit
|
|
||||||
OnLeftButtonClick = editDatabaseTableFilterLeftButtonClick
|
|
||||||
end
|
|
||||||
object editDatabaseFilter: TButtonedEdit
|
object editDatabaseFilter: TButtonedEdit
|
||||||
Left = 3
|
Left = 0
|
||||||
Top = 2
|
Top = 0
|
||||||
Width = 75
|
Width = 50
|
||||||
Height = 21
|
Height = 22
|
||||||
Hint =
|
Hint =
|
||||||
'Database filter|A list of databases, separated by semicolon. Can' +
|
'Database filter|A list of databases, separated by semicolon. Can' +
|
||||||
' contain regular expressions, e.g. "mydb;test.*;project\d+".'
|
' contain regular expressions, e.g. "mydb;test.*;project\d+".'
|
||||||
@ -815,6 +803,26 @@ object MainForm: TMainForm
|
|||||||
OnExit = editDatabaseTableFilterExit
|
OnExit = editDatabaseTableFilterExit
|
||||||
OnLeftButtonClick = editDatabaseTableFilterLeftButtonClick
|
OnLeftButtonClick = editDatabaseTableFilterLeftButtonClick
|
||||||
end
|
end
|
||||||
|
object editTableFilter: TButtonedEdit
|
||||||
|
Left = 50
|
||||||
|
Top = 0
|
||||||
|
Width = 50
|
||||||
|
Height = 22
|
||||||
|
Hint = 'Table filter|Can contain regular expressions, e.g. "phpbb_\d"'
|
||||||
|
Images = ImageListMain
|
||||||
|
LeftButton.ImageIndex = 14
|
||||||
|
LeftButton.Visible = True
|
||||||
|
TabOrder = 1
|
||||||
|
TextHint = 'Table filter'
|
||||||
|
OnChange = editDatabaseTableFilterChange
|
||||||
|
OnExit = editDatabaseTableFilterExit
|
||||||
|
OnLeftButtonClick = editDatabaseTableFilterLeftButtonClick
|
||||||
|
end
|
||||||
|
object btnTreeFavorites: TToolButton
|
||||||
|
Left = 100
|
||||||
|
Top = 0
|
||||||
|
Action = actTreeFavorites
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pnlRight: TPanel
|
object pnlRight: TPanel
|
||||||
@ -2905,6 +2913,14 @@ object MainForm: TMainForm
|
|||||||
Enabled = False
|
Enabled = False
|
||||||
OnExecute = actUnixTimestampColumnExecute
|
OnExecute = actUnixTimestampColumnExecute
|
||||||
end
|
end
|
||||||
|
object actTreeFavorites: TAction
|
||||||
|
Category = 'Various'
|
||||||
|
AutoCheck = True
|
||||||
|
Caption = 'actTreeFavorites'
|
||||||
|
Hint = 'Hide non-favorite marked tree items'
|
||||||
|
ImageIndex = 112
|
||||||
|
OnExecute = editDatabaseTableFilterChange
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object menuConnections: TPopupMenu
|
object menuConnections: TPopupMenu
|
||||||
AutoHotkeys = maManual
|
AutoHotkeys = maManual
|
||||||
@ -2919,73 +2935,201 @@ object MainForm: TMainForm
|
|||||||
Left = 504
|
Left = 504
|
||||||
Top = 104
|
Top = 104
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
494C0101B7005001E40210001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600
|
494C0101B80050011C0310001000FFFFFFFF2110FFFFFFFFFFFFFFFF424D3600
|
||||||
000000000000360000002800000040000000E0020000010020000000000000E0
|
000000000000360000002800000040000000F0020000010020000000000000F0
|
||||||
0200000000000000000000000000000000000000000000000000000000000000
|
0200000000000000000000000000000000000000000000000000000000000000
|
||||||
|
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
|
||||||
|
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
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006DFFFFFFFFFFFFFFFFFFFF
|
0000000000000000000000000000000000000000006DFFFFFFFFFFFFFFFFFFFF
|
||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFF0000006D0000000000000000000000000000
|
FFFFFFFFFFFFFFFFFFFFFFFFFFFF0000006D0000000000000000000000000000
|
||||||
00000000000000000000000000000000000000000000000000000200011A3300
|
00000000000000000000000000000000000000000000000000000200011A3300
|
||||||
1A80870043D57E003DD5270012800100001A0000000000000000000000000000
|
1A80870043D57E003DD5270012800100001A0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000C09
|
0000000000000000000000000000000000000000000000000000000000000C09
|
||||||
07497D6047D6BA8F66FF7A583DDA0D0A074C0000000000000000000000000000
|
07497D6047D6BA8F66FF7A583DDA0D0A074C0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
000000000000000000000000000000000000000000001A1A1A5D363636870000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
001200000012323232871717175D000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006DFCFCFCFF0F0F0F6D0F0F
|
0000000000000000000000000000000000000000006DFCFCFCFF0F0F0F6D0F0F
|
||||||
0F6D0F0F0F6D0F0F0F6DFCFCFCFF0000006D0000000000000000000000000000
|
0F6D0F0F0F6D0F0F0F6DFCFCFCFF0000006D0000000000000000000000000000
|
||||||
000000000000000000000000000000000000000000000000000039001E80EE7A
|
000000000000000000000000000000000000000000000000000039001E80EE7A
|
||||||
B8FFF58FC9FFF384C2FFE476B0FF280012800000000000000000000000000000
|
B8FFF58FC9FFF384C2FFE476B0FF280012800000000000000000000000000000
|
||||||
000000000000000000000000000000000000000000000B100B561B2C1D87C4A0
|
000000000000000000000000000000000000000000000B100B561B2C1D87C4A0
|
||||||
7EFFD6BCA1FFC4A07AFFB78C5FFFB08054FF0000000000000000000000000000
|
7EFFD6BCA1FFC4A07AFFB78C5FFFB08054FF0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000010101048CCCCCCFFADAD
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
ADF3A9A9A9F3C0C0C0FF0E0E0E48000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006DFCFCFCFFFFFFFFFFFFFF
|
0000000000000000000000000000000000000000006DFCFCFCFFFFFFFFFFFFFF
|
||||||
FFFFFFFFFFFFFFFFFFFFFBFBFBFF0000006D0000000000000000000000000000
|
FFFFFFFFFFFFFFFFFFFFFBFBFBFF0000006D0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000A70059D5F8A8
|
0000000000000000000000000000000000000000000000000000A70059D5F8A8
|
||||||
D6FFF56EBCFFF465B6FFF385C1FF820040D50000000000000000000000000000
|
D6FFF56EBCFFF465B6FFF385C1FF820040D50000000000000000000000000000
|
||||||
0000000000000000000000000000000000004B684EC88FBD96FF84B78BFFC7A4
|
0000000000000000000000000000000000004B684EC88FBD96FF84B78BFFC7A4
|
||||||
82FFC9A98BFFCBA782FFB88C61FFB48558FF0000000000000000000000000000
|
82FFC9A98BFFCBA782FFB88C61FFB48558FF0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
000000000000000000000000000000000000000000000606062DCCCCCCFFDBDB
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
DBFFD7D7D7FFBEBEBEFF0505052D000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006DFCFCFCFF0F0F0F6D0F0F
|
0000000000000000000000000000000000000000006DFCFCFCFF0F0F0F6D0F0F
|
||||||
0F6D0F0F0F6D0F0F0F6DFAFAFAFF0000006D0000000000000000000000000000
|
0F6D0F0F0F6D0F0F0F6DFAFAFAFF0000006D0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000AD005ED5FBB7
|
0000000000000000000000000000000000000000000000000000AD005ED5FBB7
|
||||||
DFFFF87CC7FFF56CBBFFF590C9FF8D0047D50000000000000000000000000000
|
DFFFF87CC7FFF56CBBFFF590C9FF8D0047D50000000000000000000000000000
|
||||||
00000000000000000000000000000000000091BD97FFABCFB1FF79A29DFF6765
|
00000000000000000000000000000000000091BD97FFABCFB1FF79A29DFF6765
|
||||||
C3FF6367E8FF605FC2FFA48B8CFFA17F5CF10000000000000000000000000000
|
C3FF6367E8FF605FC2FFA48B8CFFA17F5CF10000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
00000000000000000000000000000000000000000003636363B1D7D7D7FFDEDE
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
DEFFDBDBDBFFCDCDCDFF595959B1000000030000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006DFFFFFFFFFFFFFFFFFFFF
|
0000000000000000000000000000000000000000006DFFFFFFFFFFFFFFFFFFFF
|
||||||
FFFFFFFFFFFFFFFFFFFFF6F6F6FF0000006D0000000000000000000000000000
|
FFFFFFFFFFFFFFFFFFFFF6F6F6FF0000006D0000000000000000000000000000
|
||||||
000000000000000000000000000000000000000000000000000040002380FD7E
|
000000000000000000000000000000000000000000000000000040002380FD7E
|
||||||
C3FFFBB8DFFFFAB0DBFFF07BBAFF36001C800000000000000000000000000000
|
C3FFFBB8DFFFFAB0DBFFF07BBAFF36001C800000000000000000000000000000
|
||||||
0000000000000000000000000000000000007EB386FF80B588FF6D71E9FF9493
|
0000000000000000000000000000000000007EB386FF80B588FF6D71E9FF9493
|
||||||
F4FF7174ECFF5B5FE8FF5057E2FF0101021F0000000000000000000000000000
|
F4FF7174ECFF5B5FE8FF5057E2FF0101021F0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000004B4B4B99D5D5D5FFD7D7D7FFDEDE
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
DEFFDADADAFFCCCCCCFFC0C0C0FF414141990000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006DFBFBFBFF0F0F0F6D0F0F
|
0000000000000000000000000000000000000000006DFBFBFBFF0F0F0F6D0F0F
|
||||||
0F6D0F0F0F6DF4F4F4FFF7F7F7FF0000006D0000000000000000000000000000
|
0F6D0F0F0F6DF4F4F4FFF7F7F7FF0000006D0000000000000000000000000000
|
||||||
00000000000000000000000000000000000000000000000000000200011A4000
|
00000000000000000000000000000000000000000000000000000200011A4000
|
||||||
2380AF005ED5AB005BD53B0020800200011A0000000000000000000000000000
|
2380AF005ED5AB005BD53B0020800200011A0000000000000000000000000000
|
||||||
0000000000000000000000000000000000001F2C21834D7554D67A7CECFF7072
|
0000000000000000000000000000000000001F2C21834D7554D67A7CECFF7072
|
||||||
EEFF8281F2FF5E61E8FF555BE5FF000101180000000000000000000000000000
|
EEFF8281F2FF5E61E8FF555BE5FF000101180000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
000000000000000000000000000000000000000000090C0C0C3F37373784D3D3
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
D3FFCFCFCFFF353535870B0B0B3F000000090000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006DF8F8F8FFF7F7F7FFF4F4
|
0000000000000000000000000000000000000000006DF8F8F8FFF7F7F7FFF4F4
|
||||||
F4FFEDEDEDFFF5F5F5FF0000006D000000090000000000000000000000000000
|
F4FFEDEDEDFFF5F5F5FF0000006D000000090000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
00000000000000000000000000000000000000000000000000005F61CBF16E6F
|
00000000000000000000000000000000000000000000000000005F61CBF16E6F
|
||||||
EDFF6265EAFF6F70EDFF5D60CAF10000000A0000000000000000000000000000
|
EDFF6265EAFF6F70EDFF5D60CAF10000000A0000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000007F7F
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
7FC97C7C7CC90000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000006D0000006D0000006D0000
|
0000000000000000000000000000000000000000006D0000006D0000006D0000
|
||||||
006D0000006D0000006D00000009000000000000000000000000000000000000
|
006D0000006D0000006D00000009000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000110B0B
|
0000000000000000000000000000000000000000000000000000000000110B0B
|
||||||
1957141538800B0B195700000011000000000000000000000000000000000000
|
1957141538800B0B195700000011000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000D0D
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0D420D0D0D420000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
@ -8810,7 +8954,7 @@ object MainForm: TMainForm
|
|||||||
000000000000000000000000000000000000854F2FAAA46B43CEB1764ADEAE74
|
000000000000000000000000000000000000854F2FAAA46B43CEB1764ADEAE74
|
||||||
48DBAF7448DBAE7349DBA46A3FD054331B6E0603020800000000000000000000
|
48DBAF7448DBAE7349DBA46A3FD054331B6E0603020800000000000000000000
|
||||||
000000000000000000000000000000000000424D3E000000000000003E000000
|
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||||
2800000040000000E00200000100010000000000001700000000000000000000
|
2800000040000000F00200000100010000000000801700000000000000000000
|
||||||
000000000000000000000000FFFFFF0000000000000000000000000000000000
|
000000000000000000000000FFFFFF0000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
@ -8996,6 +9140,10 @@ object MainForm: TMainForm
|
|||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
000000000000}
|
000000000000}
|
||||||
end
|
end
|
||||||
object PopupQueryLoad: TPopupMenu
|
object PopupQueryLoad: TPopupMenu
|
||||||
|
158
source/main.pas
158
source/main.pas
@ -561,9 +561,6 @@ type
|
|||||||
Explainanalyzerforcurrentquery1: TMenuItem;
|
Explainanalyzerforcurrentquery1: TMenuItem;
|
||||||
menuAutoExpand: TMenuItem;
|
menuAutoExpand: TMenuItem;
|
||||||
menuTreeOptions: TMenuItem;
|
menuTreeOptions: TMenuItem;
|
||||||
pnlTreeFilter: TPanel;
|
|
||||||
editTableFilter: TButtonedEdit;
|
|
||||||
editDatabaseFilter: TButtonedEdit;
|
|
||||||
menuClearDataTabFilter: TMenuItem;
|
menuClearDataTabFilter: TMenuItem;
|
||||||
actUnixTimestampColumn: TAction;
|
actUnixTimestampColumn: TAction;
|
||||||
actTimestampColumn1: TMenuItem;
|
actTimestampColumn1: TMenuItem;
|
||||||
@ -572,6 +569,11 @@ type
|
|||||||
Save1: TMenuItem;
|
Save1: TMenuItem;
|
||||||
Saveassnippet1: TMenuItem;
|
Saveassnippet1: TMenuItem;
|
||||||
imgDonate: TImage;
|
imgDonate: TImage;
|
||||||
|
ToolBarTree: TToolBar;
|
||||||
|
editDatabaseFilter: TButtonedEdit;
|
||||||
|
editTableFilter: TButtonedEdit;
|
||||||
|
btnTreeFavorites: TToolButton;
|
||||||
|
actTreeFavorites: TAction;
|
||||||
procedure actCreateDBObjectExecute(Sender: TObject);
|
procedure actCreateDBObjectExecute(Sender: TObject);
|
||||||
procedure menuConnectionsPopup(Sender: TObject);
|
procedure menuConnectionsPopup(Sender: TObject);
|
||||||
procedure actExitApplicationExecute(Sender: TObject);
|
procedure actExitApplicationExecute(Sender: TObject);
|
||||||
@ -909,6 +911,11 @@ type
|
|||||||
procedure imgDonateClick(Sender: TObject);
|
procedure imgDonateClick(Sender: TObject);
|
||||||
procedure DBtreeExpanded(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
procedure DBtreeExpanded(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||||
procedure ApplicationDeActivate(Sender: TObject);
|
procedure ApplicationDeActivate(Sender: TObject);
|
||||||
|
procedure DBtreeAfterCellPaint(Sender: TBaseVirtualTree;
|
||||||
|
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||||
|
CellRect: TRect);
|
||||||
|
procedure DBtreeNodeClick(Sender: TBaseVirtualTree;
|
||||||
|
const HitInfo: THitInfo);
|
||||||
private
|
private
|
||||||
// Executable file details
|
// Executable file details
|
||||||
FAppVerMajor: Integer;
|
FAppVerMajor: Integer;
|
||||||
@ -2827,11 +2834,15 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TMainForm.pnlLeftResize(Sender: TObject);
|
procedure TMainForm.pnlLeftResize(Sender: TObject);
|
||||||
|
var
|
||||||
|
WidthAvail: Integer;
|
||||||
begin
|
begin
|
||||||
|
WidthAvail := editDatabaseFilter.Parent.Width - btnTreeFavorites.Width;
|
||||||
editDatabaseFilter.Left := 0;
|
editDatabaseFilter.Left := 0;
|
||||||
editDatabaseFilter.Width := (editDatabaseFilter.Parent.Width div 2) - 1;
|
editDatabaseFilter.Width := (WidthAvail div 2) - 1;
|
||||||
editTableFilter.Width := editDatabaseFilter.Width;
|
editTableFilter.Width := editDatabaseFilter.Width;
|
||||||
editTableFilter.Left := editDatabaseFilter.Width + 2;
|
editTableFilter.Left := editDatabaseFilter.Width + 1;
|
||||||
|
btnTreeFavorites.Left := editTableFilter.Left + editTableFilter.Width + 1;
|
||||||
spltPreview.OnMoved(Sender);
|
spltPreview.OnMoved(Sender);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7797,8 +7808,7 @@ procedure TMainForm.DBtreeExpanded(Sender: TBaseVirtualTree;
|
|||||||
begin
|
begin
|
||||||
// Table and database filter both need initialized children
|
// Table and database filter both need initialized children
|
||||||
Sender.ReinitChildren(Node, False);
|
Sender.ReinitChildren(Node, False);
|
||||||
if edittablefilter.Text <> '' then
|
editDatabaseTableFilterChange(Self);
|
||||||
editTableFilter.OnChange(editTableFilter);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -9687,51 +9697,72 @@ end;
|
|||||||
|
|
||||||
procedure TMainForm.editDatabaseTableFilterChange(Sender: TObject);
|
procedure TMainForm.editDatabaseTableFilterChange(Sender: TObject);
|
||||||
var
|
var
|
||||||
Edit: TButtonedEdit;
|
|
||||||
Node: PVirtualNode;
|
Node: PVirtualNode;
|
||||||
Obj: PDBObject;
|
Obj: PDBObject;
|
||||||
rx: TRegExpr;
|
rxdb, rxtable: TRegExpr;
|
||||||
FilterError, NodeMatches: Boolean;
|
NodeMatches: Boolean;
|
||||||
VisibleCount: Cardinal;
|
Errors, Favorites: TStringList;
|
||||||
begin
|
begin
|
||||||
// Immediately apply database filter
|
// Immediately apply database filter
|
||||||
LogSQL('editDatabaseTableFilterChange', lcDebug);
|
LogSQL('editDatabaseTableFilterChange', lcDebug);
|
||||||
Edit := Sender as TButtonedEdit;
|
|
||||||
rx := TRegExpr.Create;
|
rxdb := TRegExpr.Create;
|
||||||
rx.ModifierI := True;
|
rxdb.ModifierI := True;
|
||||||
rx.Expression := '('+StringReplace(Edit.Text, ';', '|', [rfReplaceAll])+')';
|
rxdb.Expression := '('+StringReplace(editDatabaseFilter.Text, ';', '|', [rfReplaceAll])+')';
|
||||||
VisibleCount := 0;
|
rxtable := TRegExpr.Create;
|
||||||
FilterError := False;
|
rxtable.ModifierI := True;
|
||||||
|
rxtable.Expression := '('+StringReplace(editTableFilter.Text, ';', '|', [rfReplaceAll])+')';
|
||||||
|
|
||||||
|
Errors := TStringList.Create;
|
||||||
|
Favorites := nil;
|
||||||
|
|
||||||
DBtree.BeginUpdate;
|
DBtree.BeginUpdate;
|
||||||
Node := DBtree.GetFirst;
|
Node := DBtree.GetFirst;
|
||||||
while Assigned(Node) do begin
|
while Assigned(Node) do begin
|
||||||
Obj := DBtree.GetNodeData(Node);
|
Obj := DBtree.GetNodeData(Node);
|
||||||
if ((Edit = editDatabaseFilter) and (Obj.NodeType = lntDb))
|
|
||||||
or
|
|
||||||
((Edit = editTableFilter) and (Obj.NodeType in [lntTable..lntEvent]))
|
|
||||||
then begin
|
|
||||||
try
|
|
||||||
NodeMatches := rx.Exec(DBtree.Text[Node, 0]);
|
|
||||||
except
|
|
||||||
FilterError := True;
|
|
||||||
NodeMatches := True;
|
NodeMatches := True;
|
||||||
|
try
|
||||||
|
case Obj.NodeType of
|
||||||
|
lntNone: begin
|
||||||
|
// Get favorite paths from session settings
|
||||||
|
if Favorites <> nil then
|
||||||
|
Favorites.Free;
|
||||||
|
AppSettings.SessionPath := FConnections[Node.Index].Parameters.SessionPath;
|
||||||
|
Favorites := Explode(CRLF, AppSettings.ReadString(asFavoriteObjects));
|
||||||
|
end;
|
||||||
|
lntDb: begin
|
||||||
|
// Match against database filter
|
||||||
|
if editDatabaseFilter.Text <> '' then
|
||||||
|
NodeMatches := rxdb.Exec(DBtree.Text[Node, 0]);
|
||||||
|
end;
|
||||||
|
lntTable..lntEvent: begin
|
||||||
|
// Match against table filter
|
||||||
|
if editTableFilter.Text <> '' then
|
||||||
|
NodeMatches := rxtable.Exec(DBtree.Text[Node, 0]);
|
||||||
|
if actTreeFavorites.Checked then
|
||||||
|
// Hide non-favorite object path
|
||||||
|
NodeMatches := NodeMatches and (Favorites.IndexOf(Obj.Path) > -1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
on E:Exception do begin
|
||||||
|
// Log regex errors, but avoid duplicate messages
|
||||||
|
if Errors.IndexOf(E.Message) = -1 then begin
|
||||||
|
LogSQL(E.Message);
|
||||||
|
Errors.Add(E.Message);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
DBtree.IsVisible[Node] := NodeMatches;
|
DBtree.IsVisible[Node] := NodeMatches;
|
||||||
if NodeMatches then
|
|
||||||
Inc(VisibleCount);
|
|
||||||
end;
|
|
||||||
Node := DBtree.GetNextInitialized(Node);
|
Node := DBtree.GetNextInitialized(Node);
|
||||||
end;
|
end;
|
||||||
DBtree.EndUpdate;
|
DBtree.EndUpdate;
|
||||||
|
|
||||||
rx.Free;
|
rxdb.Free;
|
||||||
if VisibleCount = 0 then
|
rxtable.Free;
|
||||||
FilterError := True;
|
if Favorites <> nil then
|
||||||
if FilterError then
|
Favorites.Free;
|
||||||
Edit.Color := clWebPink
|
|
||||||
else
|
|
||||||
Edit.Color := clWindow;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -10466,6 +10497,63 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMainForm.DBtreeAfterCellPaint(Sender: TBaseVirtualTree;
|
||||||
|
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||||
|
CellRect: TRect);
|
||||||
|
var
|
||||||
|
Obj: PDBObject;
|
||||||
|
Favorites: TStringList;
|
||||||
|
begin
|
||||||
|
// Paint favorite icon on table node
|
||||||
|
if Column <> 0 then
|
||||||
|
Exit;
|
||||||
|
Obj := Sender.GetNodeData(Node);
|
||||||
|
if Obj.NodeType in [lntTable..lntEvent] then begin
|
||||||
|
AppSettings.SessionPath := Obj.Connection.Parameters.SessionPath;
|
||||||
|
Favorites := Explode(CRLF, AppSettings.ReadString(asFavoriteObjects));
|
||||||
|
if Favorites.IndexOf(Obj.Path) > -1 then
|
||||||
|
ImageListMain.Draw(TargetCanvas, CellRect.Left, CellRect.Top, 168)
|
||||||
|
else if Node = Sender.HotNode then
|
||||||
|
ImageListMain.Draw(TargetCanvas, CellRect.Left, CellRect.Top, 183);
|
||||||
|
Favorites.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMainForm.DBtreeNodeClick(Sender: TBaseVirtualTree; const HitInfo: THitInfo);
|
||||||
|
var
|
||||||
|
Obj: PDBObject;
|
||||||
|
Favorites: TStringList;
|
||||||
|
idx: Integer;
|
||||||
|
begin
|
||||||
|
// Watch out for clicks on favorite icon
|
||||||
|
// Add or remove object path from favorite list on click
|
||||||
|
if (HitInfo.HitColumn <> 0)
|
||||||
|
or (not Assigned(HitInfo.HitNode))
|
||||||
|
then Exit;
|
||||||
|
if
|
||||||
|
(not (hiOnItem in HitInfo.HitPositions))
|
||||||
|
or (hiOnItemLabel in HitInfo.HitPositions)
|
||||||
|
or (hiOnItemRight in HitInfo.HitPositions)
|
||||||
|
or (hiOnNormalIcon in HitInfo.HitPositions)
|
||||||
|
then Exit;
|
||||||
|
|
||||||
|
Obj := Sender.GetNodeData(HitInfo.HitNode);
|
||||||
|
if Obj.NodeType in [lntTable..lntEvent] then begin
|
||||||
|
AppSettings.SessionPath := Obj.Connection.Parameters.SessionPath;
|
||||||
|
Favorites := TStringList.Create;
|
||||||
|
Favorites.Text := AppSettings.ReadString(asFavoriteObjects);
|
||||||
|
idx := Favorites.IndexOf(Obj.Path);
|
||||||
|
if idx > -1 then
|
||||||
|
Favorites.Delete(idx)
|
||||||
|
else
|
||||||
|
Favorites.Add(Obj.Path);
|
||||||
|
AppSettings.WriteString(asFavoriteObjects, Favorites.Text);
|
||||||
|
Favorites.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMainForm.DBtreeBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
|
procedure TMainForm.DBtreeBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas;
|
||||||
Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect;
|
Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect;
|
||||||
var ContentRect: TRect);
|
var ContentRect: TRect);
|
||||||
|
Reference in New Issue
Block a user