diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-08-27 07:54:26 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-08-27 07:54:26 +0000 |
commit | 916b09fc4c96f1c35fb485e849c4dd636e2282fc (patch) | |
tree | f4d449ad52efe481520452b7eec7613c83b3ae82 /Source | |
parent | e03c42246d5b1f926842b900688568776c715cdb (diff) | |
download | sequelpro-916b09fc4c96f1c35fb485e849c4dd636e2282fc.tar.gz sequelpro-916b09fc4c96f1c35fb485e849c4dd636e2282fc.tar.bz2 sequelpro-916b09fc4c96f1c35fb485e849c4dd636e2282fc.zip |
• SPFieldEditorSheet
- ESC and ENTER will close a non-editable sheet
* SPTooltip
- first check if tooltip should be closed and then forward the current event (this fixes an issue if a tooltip is shown while a modal window appears which could block the closing of the tooltip
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPFieldEditorController.h | 1 | ||||
-rw-r--r-- | Source/SPFieldEditorController.m | 4 | ||||
-rw-r--r-- | Source/SPTooltip.m | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPFieldEditorController.h b/Source/SPFieldEditorController.h index 262066a6..97edd4b3 100644 --- a/Source/SPFieldEditorController.h +++ b/Source/SPFieldEditorController.h @@ -36,6 +36,7 @@ IBOutlet id hexTextScrollView; IBOutlet id editSheet; IBOutlet id editSheetCancelButton; + IBOutlet id editSheetIsNotEditableCancelButton; IBOutlet id editSheetOkButton; IBOutlet id editSheetOpenButton; IBOutlet id editSheetFieldName; diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index deb3ce32..de7e87c4 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -97,9 +97,9 @@ [editTextScrollView setHidden:YES]; if(!isEditable) { - [editSheetOkButton setTitle:NSLocalizedString(@"Close", @"close button title")]; - [editSheetOkButton setKeyEquivalent:@"\033"]; // ESC key + [editSheetOkButton setHidden:YES]; [editSheetCancelButton setHidden:YES]; + [editSheetIsNotEditableCancelButton setHidden:NO]; [editSheetOpenButton setEnabled:NO]; } diff --git a/Source/SPTooltip.m b/Source/SPTooltip.m index 64842427..0c84061b 100644 --- a/Source/SPTooltip.m +++ b/Source/SPTooltip.m @@ -389,7 +389,6 @@ static float slow_in_out (float t) int eventType; while(event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES]) { - [NSApp sendEvent:event]; eventType = [event type]; if(eventType == NSKeyDown || eventType == NSLeftMouseDown || eventType == NSRightMouseDown || eventType == NSOtherMouseDown || eventType == NSScrollWheel) break; @@ -402,6 +401,8 @@ static float slow_in_out (float t) if(spTooltipCounter > 1) break; + [NSApp sendEvent:event]; + } [keyWindow setAcceptsMouseMovedEvents:didAcceptMouseMovedEvents]; |