mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Version conditional disabling for menu items in MySQL mode only. See http://www.heidisql.com/forum.php?t=17794
This commit is contained in:
@@ -6085,6 +6085,7 @@ procedure TMainForm.popupDBPopup(Sender: TObject);
|
||||
var
|
||||
Obj: PDBObject;
|
||||
HasFocus, IsDbOrObject: Boolean;
|
||||
Version: Integer;
|
||||
begin
|
||||
// DBtree and ListTables both use popupDB as menu
|
||||
if DBtreeClicked(Sender) then begin
|
||||
@@ -6128,10 +6129,13 @@ begin
|
||||
menuTreeCollapseAll.Enabled := False;
|
||||
menuTreeOptions.Enabled := False;
|
||||
end;
|
||||
actCreateView.Enabled := actCreateView.Enabled and (ActiveConnection.ServerVersionInt >= 50001);
|
||||
actCreateRoutine.Enabled := actCreateRoutine.Enabled and (ActiveConnection.ServerVersionInt >= 50003);
|
||||
actCreateTrigger.Enabled := actCreateTrigger.Enabled and (ActiveConnection.ServerVersionInt >= 50002);
|
||||
actCreateEvent.Enabled := actCreateEvent.Enabled and (ActiveConnection.ServerVersionInt >= 50100);
|
||||
if ActiveConnection.Parameters.IsMySQL then begin
|
||||
Version := ActiveConnection.ServerVersionInt;
|
||||
actCreateView.Enabled := actCreateView.Enabled and (Version >= 50001);
|
||||
actCreateRoutine.Enabled := actCreateRoutine.Enabled and (Version >= 50003);
|
||||
actCreateTrigger.Enabled := actCreateTrigger.Enabled and (Version >= 50002);
|
||||
actCreateEvent.Enabled := actCreateEvent.Enabled and (Version >= 50100);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user