@@ -114,7 +114,7 @@ - (void)scheduleClose;
114114- (void )handleBrowseForFile : (NSDictionary *)attr ;
115115- (void )handleShowDialog : (NSDictionary *)attr ;
116116- (void )handleDeleteSign : (NSDictionary *)attr ;
117- - (void )setToolTipDelay : ( NSTimeInterval ) seconds ;
117+ - (void )setToolTipDelay ;
118118@end
119119
120120
@@ -174,6 +174,8 @@ - (id)initWithBackend:(id)backend pid:(int)processIdentifier
174174
175175 [mainMenu addItem: appMenuItem];
176176
177+ [self setToolTipDelay ];
178+
177179 isInitialized = YES ;
178180
179181 // After MMVimController's initialization is completed,
@@ -965,11 +967,6 @@ - (void)handleMessage:(int)msgid data:(NSData *)data
965967 [textView setToolTipAtMousePoint: toolTip];
966968 else
967969 [textView setToolTipAtMousePoint: nil ];
968- } else if (SetTooltipDelayMsgID == msgid) {
969- NSDictionary *dict = [NSDictionary dictionaryWithData: data];
970- NSNumber *delay = dict ? [dict objectForKey: @" delay" ] : nil ;
971- if (delay)
972- [self setToolTipDelay: [delay floatValue ]];
973970 } else if (AddToMRUMsgID == msgid) {
974971 NSDictionary *dict = [NSDictionary dictionaryWithData: data];
975972 NSArray *filenames = dict ? [dict objectForKey: @" filenames" ] : nil ;
@@ -1697,18 +1694,15 @@ - (void)handleDeleteSign:(NSDictionary *)attr
16971694 [view deleteSign: [attr objectForKey: @" imgName" ]];
16981695}
16991696
1700- - (void )setToolTipDelay:( NSTimeInterval )seconds
1697+ - (void )setToolTipDelay
17011698{
17021699 // HACK! NSToolTipManager is an AppKit private class.
17031700 static Class TTM = nil ;
17041701 if (!TTM)
17051702 TTM = NSClassFromString (@" NSToolTipManager" );
17061703
1707- if (seconds < 0 )
1708- seconds = 0 ;
1709-
17101704 if (TTM) {
1711- [[TTM sharedToolTipManager ] setInitialToolTipDelay: seconds ];
1705+ [[TTM sharedToolTipManager ] setInitialToolTipDelay: 1e-6 ];
17121706 } else {
17131707 ASLogNotice (@" Failed to get NSToolTipManager" );
17141708 }
0 commit comments