mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Make insertion of node text on double click customizable, per tree style options menu. See http://www.heidisql.com/forum.php?t=16104
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: 2015-11-03 07:26+0100\n"
|
"PO-Revision-Date: 2015-11-11 21:25+0100\n"
|
||||||
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
|
"Last-Translator: Ansgar Becker <anse@heidisql.com>\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"
|
||||||
@ -5966,3 +5966,6 @@ msgstr "GUI font (requires restart):"
|
|||||||
|
|
||||||
msgid "Default system font"
|
msgid "Default system font"
|
||||||
msgstr "Default system font"
|
msgstr "Default system font"
|
||||||
|
|
||||||
|
msgid "Doubleclick inserts node text"
|
||||||
|
msgstr "Doubleclick inserts node text"
|
||||||
|
@ -167,7 +167,7 @@ type
|
|||||||
asFieldEditorSet, asFieldNullBackground, asRowBackgroundEven, asRowBackgroundOdd, asGroupTreeObjects, asDisplayObjectSizeColumn, asSQLfile,
|
asFieldEditorSet, asFieldNullBackground, asRowBackgroundEven, asRowBackgroundOdd, asGroupTreeObjects, asDisplayObjectSizeColumn, asSQLfile,
|
||||||
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, asDoubleClickInsertsNodeText, asForeignDropDown, asQueryHistoryEnabled,
|
||||||
asColumnSelectorWidth, asColumnSelectorHeight, asDonatedEmail, asFavoriteObjects, asFavoriteObjectsOnly, asFullTableStatus, asLineBreakStyle,
|
asColumnSelectorWidth, asColumnSelectorHeight, asDonatedEmail, asFavoriteObjects, asFavoriteObjectsOnly, asFullTableStatus, asLineBreakStyle,
|
||||||
asUnused);
|
asUnused);
|
||||||
TAppSetting = record
|
TAppSetting = record
|
||||||
@ -3350,6 +3350,7 @@ begin
|
|||||||
InitSetting(asDateTimeEditorCursorPos, 'DateTimeEditor_CursorPos_Type%s', 0);
|
InitSetting(asDateTimeEditorCursorPos, 'DateTimeEditor_CursorPos_Type%s', 0);
|
||||||
InitSetting(asAppLanguage, 'Language', 0, False, '');
|
InitSetting(asAppLanguage, 'Language', 0, False, '');
|
||||||
InitSetting(asAutoExpand, 'AutoExpand', 0, False);
|
InitSetting(asAutoExpand, 'AutoExpand', 0, False);
|
||||||
|
InitSetting(asDoubleClickInsertsNodeText, 'DoubleClickInsertsNodeText', 0, True);
|
||||||
InitSetting(asForeignDropDown, 'ForeignDropDown', 0, True);
|
InitSetting(asForeignDropDown, 'ForeignDropDown', 0, True);
|
||||||
InitSetting(asQueryHistoryEnabled, 'QueryHistory', 0, True);
|
InitSetting(asQueryHistoryEnabled, 'QueryHistory', 0, True);
|
||||||
InitSetting(asColumnSelectorWidth, 'ColumnSelectorWidth', 200, False, '');
|
InitSetting(asColumnSelectorWidth, 'ColumnSelectorWidth', 200, False, '');
|
||||||
|
@ -164,6 +164,7 @@ object MainForm: TMainForm
|
|||||||
OnAfterCellPaint = DBtreeAfterCellPaint
|
OnAfterCellPaint = DBtreeAfterCellPaint
|
||||||
OnBeforeCellPaint = DBtreeBeforeCellPaint
|
OnBeforeCellPaint = DBtreeBeforeCellPaint
|
||||||
OnChange = DBtreeChange
|
OnChange = DBtreeChange
|
||||||
|
OnDblClick = DBtreeDblClick
|
||||||
OnExpanded = DBtreeExpanded
|
OnExpanded = DBtreeExpanded
|
||||||
OnExpanding = DBtreeExpanding
|
OnExpanding = DBtreeExpanding
|
||||||
OnFocusChanged = DBtreeFocusChanged
|
OnFocusChanged = DBtreeFocusChanged
|
||||||
@ -9239,6 +9240,10 @@ object MainForm: TMainForm
|
|||||||
Caption = 'Auto expand on click'
|
Caption = 'Auto expand on click'
|
||||||
OnClick = menuAutoExpandClick
|
OnClick = menuAutoExpandClick
|
||||||
end
|
end
|
||||||
|
object menuDoubleClickInsertsNodeText: TMenuItem
|
||||||
|
Caption = 'Doubleclick inserts node text'
|
||||||
|
OnClick = menuDoubleClickInsertsNodeTextClick
|
||||||
|
end
|
||||||
object menuSelectBGColor: TMenuItem
|
object menuSelectBGColor: TMenuItem
|
||||||
Action = actSelectTreeBackground
|
Action = actSelectTreeBackground
|
||||||
end
|
end
|
||||||
|
@ -614,6 +614,7 @@ type
|
|||||||
DataGUIDwobraces: TMenuItem;
|
DataGUIDwobraces: TMenuItem;
|
||||||
N11: TMenuItem;
|
N11: TMenuItem;
|
||||||
N12: TMenuItem;
|
N12: TMenuItem;
|
||||||
|
menuDoubleClickInsertsNodeText: TMenuItem;
|
||||||
procedure actCreateDBObjectExecute(Sender: TObject);
|
procedure actCreateDBObjectExecute(Sender: TObject);
|
||||||
procedure menuConnectionsPopup(Sender: TObject);
|
procedure menuConnectionsPopup(Sender: TObject);
|
||||||
procedure actExitApplicationExecute(Sender: TObject);
|
procedure actExitApplicationExecute(Sender: TObject);
|
||||||
@ -970,6 +971,8 @@ type
|
|||||||
procedure actSaveSynMemoToTextfileExecute(Sender: TObject);
|
procedure actSaveSynMemoToTextfileExecute(Sender: TObject);
|
||||||
procedure ApplicationEvents1Idle(Sender: TObject; var Done: Boolean);
|
procedure ApplicationEvents1Idle(Sender: TObject; var Done: Boolean);
|
||||||
procedure editDatabaseTableFilterRightButtonClick(Sender: TObject);
|
procedure editDatabaseTableFilterRightButtonClick(Sender: TObject);
|
||||||
|
procedure menuDoubleClickInsertsNodeTextClick(Sender: TObject);
|
||||||
|
procedure DBtreeDblClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
// Executable file details
|
// Executable file details
|
||||||
FAppVerMajor: Integer;
|
FAppVerMajor: Integer;
|
||||||
@ -1720,6 +1723,8 @@ begin
|
|||||||
menuShowSizeColumn.Click;
|
menuShowSizeColumn.Click;
|
||||||
if AppSettings.ReadBool(asAutoExpand) then
|
if AppSettings.ReadBool(asAutoExpand) then
|
||||||
menuAutoExpand.Click;
|
menuAutoExpand.Click;
|
||||||
|
if AppSettings.ReadBool(asDoubleClickInsertsNodeText) then
|
||||||
|
menuDoubleClickInsertsNodeText.Click;
|
||||||
|
|
||||||
// Restore width of columns of all VirtualTrees
|
// Restore width of columns of all VirtualTrees
|
||||||
RestoreListSetup(ListDatabases);
|
RestoreListSetup(ListDatabases);
|
||||||
@ -6683,6 +6688,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMainForm.menuDoubleClickInsertsNodeTextClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
Item: TMenuItem;
|
||||||
|
begin
|
||||||
|
// Activate doubleclick node feature
|
||||||
|
Item := Sender as TMenuItem;
|
||||||
|
Item.Checked := not Item.Checked;
|
||||||
|
AppSettings.ResetPath;
|
||||||
|
AppSettings.WriteBool(asDoubleClickInsertsNodeText, Item.Checked);
|
||||||
|
end;
|
||||||
|
|
||||||
{**
|
{**
|
||||||
Load snippet at cursor
|
Load snippet at cursor
|
||||||
}
|
}
|
||||||
@ -7957,6 +7973,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TMainForm.DBtreeDblClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
DBObj: PDBObject;
|
||||||
|
m: TSynMemo;
|
||||||
|
begin
|
||||||
|
// Paste DB or table name into query window on treeview double click.
|
||||||
|
if AppSettings.ReadBool(asDoubleClickInsertsNodeText) and QueryTabActive and Assigned(DBtree.FocusedNode) then begin
|
||||||
|
DBObj := DBtree.GetNodeData(DBtree.FocusedNode);
|
||||||
|
if DBObj.NodeType in [lntDb, lntTable..lntEvent] then begin
|
||||||
|
m := ActiveQueryMemo;
|
||||||
|
m.DragDrop(Sender, m.CaretX, m.CaretY);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TMainForm.DBtreeExpanded(Sender: TBaseVirtualTree;
|
procedure TMainForm.DBtreeExpanded(Sender: TBaseVirtualTree;
|
||||||
Node: PVirtualNode);
|
Node: PVirtualNode);
|
||||||
begin
|
begin
|
||||||
|
Reference in New Issue
Block a user