adium 3538:42f17d17845e: Patch from ShawnRisk to remove an extra...
commits at adium.im
commits at adium.im
Tue Nov 16 05:35:18 UTC 2010
details: http://hg.adium.im/adium/rev/42f17d17845e
revision: 3538:42f17d17845e
author: Frank Dowsett <wixardy at adium.im>
date: Tue Nov 16 00:02:03 2010 -0500
Patch from ShawnRisk to remove an extra "Remove Link" on 10.6. Fixes #14454
Subject: adium 3539:cb4b3615b47b: Remove reference to a favourites editor that has been gone for six years.
details: http://hg.adium.im/adium/rev/cb4b3615b47b
revision: 3539:cb4b3615b47b
author: Frank Dowsett <wixardy at adium.im>
date: Tue Nov 16 00:02:03 2010 -0500
Remove reference to a favourites editor that has been gone for six years.
Subject: adium 3540:a72717d2473e: OBOEs--
details: http://hg.adium.im/adium/rev/a72717d2473e
revision: 3540:a72717d2473e
author: Frank Dowsett <wixardy at adium.im>
date: Tue Nov 16 00:02:03 2010 -0500
OBOEs--
diffs (82 lines):
diff -r 865132b79f23 -r a72717d2473e Plugins/Link Management/SHLinkEditorWindowController.h
--- a/Plugins/Link Management/SHLinkEditorWindowController.h Mon Nov 15 20:37:31 2010 -0600
+++ b/Plugins/Link Management/SHLinkEditorWindowController.h Tue Nov 16 00:02:03 2010 -0500
@@ -42,7 +42,7 @@
id target;
}
-+ (void)showLinkEditorForTextView:(NSTextView *)inTextView onWindow:(NSWindow *)parentWindow showFavorites:(BOOL)showFavorites notifyingTarget:(id)inTarget;
++ (void)showLinkEditorForTextView:(NSTextView *)inTextView onWindow:(NSWindow *)parentWindow notifyingTarget:(id)inTarget;
- (IBAction)cancel:(id)sender;
diff -r 865132b79f23 -r a72717d2473e Plugins/Link Management/SHLinkEditorWindowController.m
--- a/Plugins/Link Management/SHLinkEditorWindowController.m Mon Nov 15 20:37:31 2010 -0600
+++ b/Plugins/Link Management/SHLinkEditorWindowController.m Tue Nov 16 00:02:03 2010 -0500
@@ -23,7 +23,6 @@
#import <AIUtilities/AIAutoScrollView.h>
#define LINK_EDITOR_NIB_NAME @"LinkEditor"
-#define FAVS_EDITOR_NIB_NAME @"FavsEditor"
@interface SHLinkEditorWindowController ()
- (id)initWithWindowNibName:(NSString *)windowNibName forTextView:(NSTextView *)inTextView notifyingTarget:(id)inTarget;
@@ -42,9 +41,9 @@
//Init methods ---------------------------------------------------------------------------------------------------------
#pragma mark Init methods
-+ (void)showLinkEditorForTextView:(NSTextView *)inTextView onWindow:(NSWindow *)parentWindow showFavorites:(BOOL)showFavorites notifyingTarget:(id)inTarget
++ (void)showLinkEditorForTextView:(NSTextView *)inTextView onWindow:(NSWindow *)parentWindow notifyingTarget:(id)inTarget
{
- SHLinkEditorWindowController *editorWindow = [[self alloc] initWithWindowNibName:(showFavorites ? LINK_EDITOR_NIB_NAME : FAVS_EDITOR_NIB_NAME)
+ SHLinkEditorWindowController *editorWindow = [[self alloc] initWithWindowNibName:LINK_EDITOR_NIB_NAME
forTextView:inTextView
notifyingTarget:inTarget];
@@ -95,7 +94,7 @@
id linkURL = nil;
//Get the selected link (We have to be careful when the selection is at the very end of our text view)
- if (selectedRange.location != NSNotFound && NSMaxRange(selectedRange) < [[textView textStorage] length]) {
+ if (selectedRange.location != NSNotFound && NSMaxRange(selectedRange) <= [[textView textStorage] length]) {
linkURL = [[textView textStorage] attribute:NSLinkAttributeName
atIndex:selectedRange.location
effectiveRange:&rangeOfLinkAttribute];
diff -r 865132b79f23 -r a72717d2473e Plugins/Link Management/SHLinkManagementPlugin.m
--- a/Plugins/Link Management/SHLinkManagementPlugin.m Mon Nov 15 20:37:31 2010 -0600
+++ b/Plugins/Link Management/SHLinkManagementPlugin.m Tue Nov 16 00:02:03 2010 -0500
@@ -24,6 +24,7 @@
#import <AIUtilities/AIToolbarUtilities.h>
#import <AIUtilities/AIImageAdditions.h>
#import <AIUtilities/AIWindowAdditions.h>
+#import <AIUtilities/AIApplicationAdditions.h>
#define ADD_LINK_TITLE [AILocalizedString(@"Add Link",nil) stringByAppendingEllipsis]
#define EDIT_LINK_TITLE [AILocalizedString(@"Edit Link",nil) stringByAppendingEllipsis]
@@ -58,11 +59,13 @@
[self registerToolbarItem];
//rm link context
- menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:RM_LINK_TITLE
- target:self
- action:@selector(removeFormattedLink:)
- keyEquivalent:@""] autorelease];
- [adium.menuController addContextualMenuItem:menuItem toLocation:Context_TextView_LinkEditing];
+ if (![NSApp isOnSnowLeopardOrBetter]) {
+ menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:RM_LINK_TITLE
+ target:self
+ action:@selector(removeFormattedLink:)
+ keyEquivalent:@""] autorelease];
+ [adium.menuController addContextualMenuItem:menuItem toLocation:Context_TextView_LinkEditing];
+ }
}
- (void)uninstallPlugin
@@ -100,7 +103,6 @@
![[keyWin windowController] isKindOfClass:[SHLinkEditorWindowController class]]) {
[SHLinkEditorWindowController showLinkEditorForTextView:earliestTextView
onWindow:keyWin
- showFavorites:YES
notifyingTarget:nil];
}
}
More information about the commits
mailing list