Skip to content

Commit

Permalink
Refactor currentSelection: to currentTextSelection:. The former clash…
Browse files Browse the repository at this point in the history
…es with PDFKit, which we will have to include if we want to fix this: http://tinyurl.com/y8eu8wd
  • Loading branch information
mstroeck committed Dec 30, 2009
1 parent c884982 commit a3749de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions AppController.m
Expand Up @@ -2330,8 +2330,8 @@ -(IBAction)localPerformFindPanelAction:(id)sender
{
case NSFindPanelActionSetFindString:
[self setFocusToSearchField:self];
[searchField setStringValue:[NSApp currentSelection]];
[searchPanel setSearchString:[NSApp currentSelection]];
[searchField setStringValue:[NSApp currentTextSelection]];
[searchPanel setSearchString:[NSApp currentTextSelection]];
break;

case NSFindPanelActionShowFindPanel:
Expand Down Expand Up @@ -3407,12 +3407,12 @@ -(void)blogWithExternalEditor:(NSString *)externalEditorBundleIdentifier;
// If the active tab is a web view, blog the URL
NSView<BaseView> * theView = [browserView activeTabItemView];
if ([theView isKindOfClass:[BrowserPane class]])
[self sendBlogEvent:externalEditorBundleIdentifier title:[browserView tabItemViewTitle:[browserView activeTabItemView]] url:[theView viewLink] body:[NSApp currentSelection] author:@"" guid:@""];
[self sendBlogEvent:externalEditorBundleIdentifier title:[browserView tabItemViewTitle:[browserView activeTabItemView]] url:[theView viewLink] body:[NSApp currentTextSelection] author:@"" guid:@""];
else
{
// Get the currently selected articles from the ArticleView and iterate over them.
for (Article * currentArticle in [mainArticleView markedArticleRange])
[self sendBlogEvent:externalEditorBundleIdentifier title:[currentArticle title] url:[currentArticle link] body:[NSApp currentSelection] author:[currentArticle author] guid:[currentArticle guid]];
[self sendBlogEvent:externalEditorBundleIdentifier title:[currentArticle title] url:[currentArticle link] body:[NSApp currentTextSelection] author:[currentArticle author] guid:[currentArticle guid]];
}
}

Expand Down
2 changes: 1 addition & 1 deletion ViennaApp.h
Expand Up @@ -56,7 +56,7 @@ OSStatus keyPressed(EventHandlerCallRef nextHandler, EventRef theEvent, void *us
-(NSArray *)folders;
-(BOOL)isRefreshing;
-(int)totalUnreadCount;
-(NSString *)currentSelection;
-(NSString *)currentTextSelection;
-(NSString *)documentHTMLSource;

// Change folder selection
Expand Down
2 changes: 1 addition & 1 deletion ViennaApp.m
Expand Up @@ -267,7 +267,7 @@ -(int)totalUnreadCount
* Returns the current selected text from the article view or an empty
* string if there is no selection.
*/
-(NSString *)currentSelection
-(NSString *)currentTextSelection
{
NSView<BaseView> * theView = [[[self delegate] browserView] activeTabItemView];
WebView * webPane = nil;
Expand Down

0 comments on commit a3749de

Please sign in to comment.