From 9915b358dc414995bfb454781750d99d3cf36117 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Wed, 31 Mar 2010 14:01:18 +0000 Subject: If the user is viewing the triggers table and then switches to either a proc or function disable all interface controls. --- Source/SPTableTriggers.m | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Source') diff --git a/Source/SPTableTriggers.m b/Source/SPTableTriggers.m index 6e8d6873..5c4f13ad 100644 --- a/Source/SPTableTriggers.m +++ b/Source/SPTableTriggers.m @@ -217,6 +217,15 @@ [labelTextField setStringValue:NSLocalizedString(@"This version of MySQL does not support triggers. Support for triggers was added in MySQL 5.0.2", @"triggers not supported label")]; } + + // If a proc or function is selected disable everything. + if (([tablesListInstance tableType] == SPTableTypeProc) || ([tablesListInstance tableType] == SPTableTypeFunc)) { + [addTriggerButton setEnabled:NO]; + [refreshTriggersButton setEnabled:NO]; + [triggersTableView setEnabled:NO]; + + [labelTextField setStringValue:@""]; + } } #pragma mark - -- cgit v1.2.3