@@ -161,7 +161,7 @@ - (void)scheduleClose;
161
161
- (void )handleBrowseForFile : (NSDictionary *)attr ;
162
162
- (void )handleShowDialog : (NSDictionary *)attr ;
163
163
- (void )handleDeleteSign : (NSDictionary *)attr ;
164
- - (void )setToolTipDelay : ( NSTimeInterval ) seconds ;
164
+ - (void )setToolTipDelay ;
165
165
@end
166
166
167
167
@@ -219,6 +219,8 @@ - (id)initWithBackend:(id)backend pid:(int)processIdentifier
219
219
220
220
[mainMenu addItem: appMenuItem];
221
221
222
+ [self setToolTipDelay ];
223
+
222
224
isInitialized = YES ;
223
225
224
226
// After MMVimController's initialization is completed,
@@ -1006,11 +1008,6 @@ - (void)handleMessage:(int)msgid data:(NSData *)data
1006
1008
[textView setToolTipAtMousePoint: toolTip];
1007
1009
else
1008
1010
[textView setToolTipAtMousePoint: nil ];
1009
- } else if (SetTooltipDelayMsgID == msgid) {
1010
- NSDictionary *dict = [NSDictionary dictionaryWithData: data];
1011
- NSNumber *delay = dict ? [dict objectForKey: @" delay" ] : nil ;
1012
- if (delay)
1013
- [self setToolTipDelay: [delay floatValue ]];
1014
1011
} else if (AddToMRUMsgID == msgid) {
1015
1012
NSDictionary *dict = [NSDictionary dictionaryWithData: data];
1016
1013
NSArray *filenames = dict ? [dict objectForKey: @" filenames" ] : nil ;
@@ -1906,18 +1903,15 @@ - (void)handleDeleteSign:(NSDictionary *)attr
1906
1903
[view deleteSign: [attr objectForKey: @" imgName" ]];
1907
1904
}
1908
1905
1909
- - (void )setToolTipDelay : ( NSTimeInterval ) seconds
1906
+ - (void )setToolTipDelay
1910
1907
{
1911
1908
// HACK! NSToolTipManager is an AppKit private class.
1912
1909
static Class TTM = nil ;
1913
1910
if (!TTM)
1914
1911
TTM = NSClassFromString (@" NSToolTipManager" );
1915
1912
1916
- if (seconds < 0 )
1917
- seconds = 0 ;
1918
-
1919
1913
if (TTM) {
1920
- [[TTM sharedToolTipManager ] setInitialToolTipDelay: seconds ];
1914
+ [[TTM sharedToolTipManager ] setInitialToolTipDelay: 1e-6 ];
1921
1915
} else {
1922
1916
ASLogNotice (@" Failed to get NSToolTipManager" );
1923
1917
}
0 commit comments