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 | |
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
-rw-r--r-- | Interfaces/English.lproj/FieldEditorSheet.xib | 167 | ||||
-rw-r--r-- | Source/SPFieldEditorController.h | 1 | ||||
-rw-r--r-- | Source/SPFieldEditorController.m | 4 | ||||
-rw-r--r-- | Source/SPTooltip.m | 3 |
4 files changed, 165 insertions, 10 deletions
diff --git a/Interfaces/English.lproj/FieldEditorSheet.xib b/Interfaces/English.lproj/FieldEditorSheet.xib index cbd17782..727a7bef 100644 --- a/Interfaces/English.lproj/FieldEditorSheet.xib +++ b/Interfaces/English.lproj/FieldEditorSheet.xib @@ -8,7 +8,6 @@ <string key="IBDocument.HIToolboxVersion">353.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="2"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -55,6 +54,7 @@ <int key="NSvFlags">34</int> <string key="NSFrame">{{0, 48}, {667, 5}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -89,6 +89,7 @@ <int key="NSvFlags">257</int> <string key="NSFrame">{{581, 13}, {66, 25}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <int key="NSTag">1</int> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="630700737"> @@ -104,7 +105,7 @@ <reference key="NSControlView" ref="315097820"/> <int key="NSButtonFlags">-2038284033</int> <int key="NSButtonFlags2">35</int> - <object class="NSFont" key="NSAlternateImage"> + <object class="NSFont" key="NSAlternateImage" id="584363783"> <string key="NSName">Helvetica</string> <double key="NSSize">1.100000e+01</double> <int key="NSfFlags">16</int> @@ -115,11 +116,36 @@ <int key="NSPeriodicInterval">25</int> </object> </object> + <object class="NSButton" id="1049865951"> + <reference key="NSNextResponder" ref="559857537"/> + <int key="NSvFlags">-2147483391</int> + <string key="NSFrame">{{581, 13}, {66, 25}}</string> + <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> + <int key="NSTag">1</int> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="605249070"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">134348800</int> + <string key="NSContents">Close</string> + <reference key="NSSupport" ref="26"/> + <int key="NSTag">1</int> + <reference key="NSControlView" ref="1049865951"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">35</int> + <reference key="NSAlternateImage" ref="584363783"/> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> <object class="NSButton" id="760872156"> <reference key="NSNextResponder" ref="559857537"/> <int key="NSvFlags">257</int> <string key="NSFrame">{{507, 13}, {66, 25}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="617021739"> <int key="NSCellFlags">67239424</int> @@ -145,6 +171,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{94, 13}, {66, 25}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1054617135"> <int key="NSCellFlags">67239424</int> @@ -166,6 +193,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{20, 13}, {66, 25}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="369856023"> <int key="NSCellFlags">67239424</int> @@ -187,6 +215,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{328, 13}, {48, 25}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="583599991"> <int key="NSCellFlags">71433792</int> @@ -335,6 +364,7 @@ <int key="NSvFlags">292</int> <string key="NSFrame">{{183, 16}, {137, 19}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSSegmentedCell" key="NSCell" id="772630454"> <int key="NSCellFlags">-2080244224</int> @@ -398,8 +428,9 @@ <string>NeXT TIFF v4.0 pasteboard type</string> </object> </object> - <string key="NSFrameSize">{667, 0}</string> + <string key="NSFrameSize">{667, 14}</string> <reference key="NSSuperview" ref="1068411389"/> + <reference key="NSWindow"/> <object class="NSTextContainer" key="NSTextContainer" id="222392072"> <object class="NSLayoutManager" key="NSLayoutManager"> <object class="NSTextStorage" key="NSTextStorage"> @@ -464,6 +495,7 @@ </object> <string key="NSFrameSize">{667, 349}</string> <reference key="NSSuperview" ref="983787914"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="459839028"/> <reference key="NSDocView" ref="459839028"/> <reference key="NSBGColor" ref="940290613"/> @@ -478,6 +510,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{220, 1}, {11, 141}}</string> <reference key="NSSuperview" ref="983787914"/> + <reference key="NSWindow"/> <int key="NSsFlags">256</int> <reference key="NSTarget" ref="983787914"/> <string key="NSAction">_doScroller:</string> @@ -488,6 +521,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{-100, -100}, {87, 18}}</string> <reference key="NSSuperview" ref="983787914"/> + <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="983787914"/> <string key="NSAction">_doScroller:</string> @@ -497,6 +531,7 @@ </object> <string key="NSFrame">{{0, 51}, {667, 349}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="1068411389"/> <int key="NSsFlags">528</int> <reference key="NSVScroller" ref="977735067"/> @@ -520,6 +555,7 @@ </object> <string key="NSFrame">{{0, 51}, {667, 349}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="521189288"> <int key="NSCellFlags">270663168</int> @@ -567,8 +603,9 @@ <string>WebURLsWithTitlesPboardType</string> </object> </object> - <string key="NSFrameSize">{667, 1}</string> + <string key="NSFrameSize">{667, 14}</string> <reference key="NSSuperview" ref="967441740"/> + <reference key="NSWindow"/> <object class="NSTextContainer" key="NSTextContainer" id="872196016"> <object class="NSLayoutManager" key="NSLayoutManager"> <object class="NSTextStorage" key="NSTextStorage"> @@ -637,6 +674,7 @@ </object> <string key="NSFrameSize">{667, 349}</string> <reference key="NSSuperview" ref="604699677"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="702566211"/> <reference key="NSDocView" ref="702566211"/> <reference key="NSBGColor" ref="940290613"/> @@ -648,6 +686,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{639, 2}, {11, 359}}</string> <reference key="NSSuperview" ref="604699677"/> + <reference key="NSWindow"/> <int key="NSsFlags">256</int> <reference key="NSTarget" ref="604699677"/> <string key="NSAction">_doScroller:</string> @@ -658,6 +697,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{-100, -100}, {87, 18}}</string> <reference key="NSSuperview" ref="604699677"/> + <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="604699677"/> <string key="NSAction">_doScroller:</string> @@ -667,6 +707,7 @@ </object> <string key="NSFrame">{{0, 51}, {667, 349}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="967441740"/> <int key="NSsFlags">528</int> <reference key="NSVScroller" ref="699979333"/> @@ -679,6 +720,7 @@ <object class="NSPSMatrix" key="NSDrawMatrix"/> <string key="NSFrame">{{325, 232}, {32, 32}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <int key="NSpiFlags">28682</int> <double key="NSMinValue">1.600000e+01</double> <double key="NSMaxValue">1.000000e+02</double> @@ -688,6 +730,7 @@ <int key="NSvFlags">10</int> <string key="NSFrame">{{0, 398}, {667, 5}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -710,6 +753,7 @@ <int key="NSvFlags">266</int> <string key="NSFrame">{{9, 408}, {649, 14}}</string> <reference key="NSSuperview" ref="559857537"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="581551870"> <int key="NSCellFlags">67239488</int> @@ -734,6 +778,7 @@ </object> <string key="NSFrameSize">{667, 428}</string> <reference key="NSSuperview"/> + <reference key="NSWindow"/> </object> <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string> <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> @@ -999,6 +1044,22 @@ </object> <int key="connectionID">75</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">editSheetIsNotEditableCancelButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="1049865951"/> + </object> + <int key="connectionID">78</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">closeEditSheet:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="1049865951"/> + </object> + <int key="connectionID">79</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -1057,6 +1118,7 @@ <reference ref="315097820"/> <reference ref="92171076"/> <reference ref="730447074"/> + <reference ref="1049865951"/> </object> <reference key="parent" ref="172882781"/> </object> @@ -1311,6 +1373,20 @@ <reference key="object" ref="581551870"/> <reference key="parent" ref="730447074"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">76</int> + <reference key="object" ref="1049865951"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="605249070"/> + </object> + <reference key="parent" ref="559857537"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">77</int> + <reference key="object" ref="605249070"/> + <reference key="parent" ref="1049865951"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -1381,6 +1457,9 @@ <string>7.ImportedFromIB2</string> <string>73.IBPluginDependency</string> <string>74.IBPluginDependency</string> + <string>76.IBPluginDependency</string> + <string>76.ImportedFromIB2</string> + <string>77.IBPluginDependency</string> <string>8.IBAttributePlaceholdersKey</string> <string>8.IBPluginDependency</string> <string>9.IBPluginDependency</string> @@ -1392,8 +1471,8 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{507, 251}, {667, 428}}</string> - <string>{{507, 251}, {667, 428}}</string> + <string>{{211, 454}, {667, 428}}</string> + <string>{{211, 454}, {667, 428}}</string> <reference ref="9"/> <integer value="0" id="8"/> <boolean value="NO"/> @@ -1453,6 +1532,9 @@ <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference ref="9"/> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSMutableDictionary"> <string key="NS.key.0">ToolTip</string> <object class="IBToolTipAttribute" key="NS.object.0"> @@ -1487,7 +1569,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">75</int> + <int key="maxID">79</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -1680,6 +1762,77 @@ </object> </object> </object> + <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="IBPartialClassDescription"> + <string key="className">SPFieldEditorController</string> + <string key="superclassName">NSWindowController</string> + <object class="NSMutableDictionary" key="actions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>closeEditSheet:</string> + <string>dropImage:</string> + <string>openEditSheet:</string> + <string>quickLookFormatButton:</string> + <string>saveEditSheet:</string> + <string>segmentControllerChanged:</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + </object> + </object> + <object class="NSMutableDictionary" key="outlets"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>editImage</string> + <string>editSheet</string> + <string>editSheetCancelButton</string> + <string>editSheetFieldName</string> + <string>editSheetIsNotEditableCancelButton</string> + <string>editSheetOkButton</string> + <string>editSheetOpenButton</string> + <string>editSheetProgressBar</string> + <string>editSheetQuickLookButton</string> + <string>editSheetSegmentControl</string> + <string>editTextScrollView</string> + <string>editTextView</string> + <string>hexTextScrollView</string> + <string>hexTextView</string> + <string>sheetEditData</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + </object> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBDocumentRelativeSource</string> + <string key="minorKey">../../Source/SPFieldEditorController.h</string> + </object> + </object> + </object> </object> <int key="IBDocument.localizationMode">0</int> <string key="IBDocument.LastKnownRelativeProjectPath">../../sequel-pro.xcodeproj</string> 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]; |