File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 4040
4141#import < SPMySQL/SPMySQL.h>
4242
43+ #if __MAC_OS_X_VERSION_MAX_ALLOWED < __MAC_10_7
44+ @interface NSTextView (LionPlus)
45+ - (void )setUsesFindBar : (BOOL )value ;
46+ - (BOOL )usesFindBar ;
47+ @end
48+ #endif
49+
4350typedef enum {
4451 TextSegment = 0 ,
4552 ImageSegment,
@@ -93,9 +100,18 @@ - (id)init
93100 // Allow the user to enter cmd+return to close the edit sheet in addition to fn+return
94101 [editSheetOkButton setKeyEquivalentModifierMask: NSCommandKeyMask ];
95102
96- // Permit the field edit sheet to become main if necessary; this allows fields within the sheet to
97- // support full interactivity, for example use of the NSFindPanel inside NSTextViews.
98- [editSheet setIsSheetWhichCanBecomeMain: YES ];
103+ if ([editTextView respondsToSelector: @selector (setUsesFindBar: )])
104+ // 10.7+
105+ // Stealing the main window from the actual main window will cause
106+ // a UI bug with the tab bar and the find panel was really the only
107+ // thing that had an issue with not working with sheets.
108+ // The find bar works fine without hackery.
109+ [editTextView setUsesFindBar: YES ];
110+ else {
111+ // Permit the field edit sheet to become main if necessary; this allows fields within the sheet to
112+ // support full interactivity, for example use of the NSFindPanel inside NSTextViews.
113+ [editSheet setIsSheetWhichCanBecomeMain: YES ];
114+ }
99115
100116 allowUndo = NO ;
101117 selectionChanged = NO ;
You can’t perform that action at this time.
0 commit comments