@@ -1541,7 +1541,7 @@ - (void) enableTaskCancellationWithTitle:(NSString *)buttonTitle callbackObject:
1541
1541
/**
1542
1542
* Disable task cancellation. Called automatically at the end of a task.
1543
1543
*/
1544
- - (void) disableTaskCancellation
1544
+ - (void)disableTaskCancellation
1545
1545
{
1546
1546
#ifndef SP_CODA
1547
1547
// Ensure call on the main thread
@@ -1560,7 +1560,7 @@ - (void) disableTaskCancellation
1560
1560
/**
1561
1561
* Action sent by the cancel button when it's active.
1562
1562
*/
1563
- - (IBAction) cancelTask:(id)sender
1563
+ - (IBAction)cancelTask:(id)sender
1564
1564
{
1565
1565
#ifndef SP_CODA
1566
1566
if (!taskCanBeCancelled) return;
@@ -1586,23 +1586,23 @@ - (IBAction) cancelTask:(id)sender
1586
1586
* Returns whether the document is busy performing a task - allows UI or actions
1587
1587
* to be restricted as appropriate.
1588
1588
*/
1589
- - (BOOL) isWorking
1589
+ - (BOOL)isWorking
1590
1590
{
1591
1591
return (_isWorkingLevel > 0);
1592
1592
}
1593
1593
1594
1594
/**
1595
1595
* Set whether the database list is selectable or not during the task process.
1596
1596
*/
1597
- - (void) setDatabaseListIsSelectable:(BOOL)isSelectable
1597
+ - (void)setDatabaseListIsSelectable:(BOOL)isSelectable
1598
1598
{
1599
1599
databaseListIsSelectable = isSelectable;
1600
1600
}
1601
1601
1602
1602
/**
1603
1603
* Reposition the task window within the main window.
1604
1604
*/
1605
- - (void) centerTaskWindow
1605
+ - (void)centerTaskWindow
1606
1606
{
1607
1607
#ifndef SP_CODA
1608
1608
NSPoint newBottomLeftPoint;
@@ -1620,7 +1620,7 @@ - (void) centerTaskWindow
1620
1620
* Support pausing and restarting the task progress indicator.
1621
1621
* Only works while the indicator is in indeterminate mode.
1622
1622
*/
1623
- - (void) setTaskIndicatorShouldAnimate:(BOOL)shouldAnimate
1623
+ - (void)setTaskIndicatorShouldAnimate:(BOOL)shouldAnimate
1624
1624
{
1625
1625
#ifndef SP_CODA
1626
1626
if (shouldAnimate) {
@@ -3599,13 +3599,13 @@ - (IBAction) makeTableListFilterHaveFocus:(id)sender
3599
3599
3600
3600
/**
3601
3601
* Menu item validation.
3602
- */
3602
+ */
3603
3603
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
3604
3604
{
3605
3605
SEL action = [menuItem action];
3606
3606
3607
- if ([menuItem menu] == chooseDatabaseButton ) {
3608
- return ( _isConnected && databaseListIsSelectable) ;
3607
+ if (action == @selector(chooseDatabase:) ) {
3608
+ return _isConnected && databaseListIsSelectable;
3609
3609
}
3610
3610
3611
3611
if (!_isConnected || _isWorkingLevel) {
@@ -3616,7 +3616,6 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
3616
3616
);
3617
3617
}
3618
3618
3619
- #ifndef SP_CODA
3620
3619
if (action == @selector(openCurrentConnectionInNewWindow:))
3621
3620
{
3622
3621
if ([self isUntitled]) {
@@ -3628,7 +3627,6 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
3628
3627
return YES;
3629
3628
}
3630
3629
}
3631
- #endif
3632
3630
3633
3631
// Data export
3634
3632
if (action == @selector(export:)) {
@@ -3709,7 +3707,6 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
3709
3707
return YES;
3710
3708
}
3711
3709
3712
- #ifndef SP_CODA
3713
3710
if (action == @selector(printDocument:)) {
3714
3711
return (
3715
3712
([self database] != nil && [[tablesListInstance valueForKeyPath:@"tablesListView"] numberOfSelectedRows] == 1) ||
@@ -3719,7 +3716,6 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
3719
3716
[self currentlySelectedView] == SPTableViewCustomQuery
3720
3717
);
3721
3718
}
3722
- #endif
3723
3719
3724
3720
if (action == @selector(chooseEncoding:)) {
3725
3721
return [self supportsEncoding];
@@ -3738,7 +3734,6 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
3738
3734
return [[[tablesListInstance valueForKeyPath:@"tablesListView"] selectedRowIndexes] count];
3739
3735
}
3740
3736
3741
- #ifndef SP_CODA
3742
3737
if (action == @selector(addConnectionToFavorites:)) {
3743
3738
return ![connectionController selectedFavorite] || [connectionController isEditingConnection];
3744
3739
}
@@ -3752,7 +3747,6 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem
3752
3747
if ((action == @selector(backForwardInHistory:)) && ([menuItem tag] == 1)) {
3753
3748
return (([[spHistoryControllerInstance history] count]) && (([spHistoryControllerInstance historyPosition] + 1) < [[spHistoryControllerInstance history] count]));
3754
3749
}
3755
- #endif
3756
3750
3757
3751
// Show/hide console
3758
3752
if (action == @selector(toggleConsole:)) {
0 commit comments