diff --git a/Frameworks/Find/src/FindWindowController.mm b/Frameworks/Find/src/FindWindowController.mm index defa55cf..04d3660a 100644 --- a/Frameworks/Find/src/FindWindowController.mm +++ b/Frameworks/Find/src/FindWindowController.mm @@ -312,7 +312,7 @@ static NSButton* OakCreateStopSearchButton () [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(userDefaultsDidChange:) name:NSUserDefaultsDidChangeNotification object:[NSUserDefaults standardUserDefaults]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(findClipboardDidChange:) name:OakPasteboardDidChangeNotification object:[OakPasteboard pasteboardWithName:NSFindPboard]]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(replaceClipboardDidChange:) name:OakPasteboardDidChangeNotification object:[OakPasteboard pasteboardWithName:NSReplacePboard]]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(replaceClipboardDidChange:) name:OakPasteboardDidChangeNotification object:[OakPasteboard pasteboardWithName:OakReplacePboard]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textViewWillPerformFindOperation:) name:@"OakTextViewWillPerformFindOperation" object:nil]; [self.window addObserver:self forKeyPath:@"firstResponder" options:0 context:NULL]; @@ -486,7 +486,7 @@ static NSButton* OakCreateStopSearchButton () - (void)replaceClipboardDidChange:(NSNotification*)aNotification { - self.replaceString = [[[OakPasteboard pasteboardWithName:NSReplacePboard] current] string]; + self.replaceString = [[[OakPasteboard pasteboardWithName:OakReplacePboard] current] string]; } - (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context @@ -543,9 +543,9 @@ static NSButton* OakCreateStopSearchButton () if(_replaceString) { - NSString* oldReplacement = [[[OakPasteboard pasteboardWithName:NSReplacePboard] current] string]; + NSString* oldReplacement = [[[OakPasteboard pasteboardWithName:OakReplacePboard] current] string]; if(!oldReplacement || ![oldReplacement isEqualToString:_replaceString]) - [[OakPasteboard pasteboardWithName:NSReplacePboard] addEntryWithString:_replaceString]; + [[OakPasteboard pasteboardWithName:OakReplacePboard] addEntryWithString:_replaceString]; } return res; @@ -659,7 +659,7 @@ static NSButton* OakCreateStopSearchButton () - (IBAction)showReplaceHistory:(id)sender { if(![[[OakPasteboardSelector sharedInstance] window] isVisible]) - [[OakPasteboard pasteboardWithName:NSReplacePboard] selectItemForControl:self.replaceTextField]; + [[OakPasteboard pasteboardWithName:OakReplacePboard] selectItemForControl:self.replaceTextField]; // if the panel is visible it will automatically be hidden due to the mouse click } diff --git a/Frameworks/HTMLOutput/src/helpers/WebView Additions.mm b/Frameworks/HTMLOutput/src/helpers/WebView Additions.mm index c6d22e17..82c467a7 100644 --- a/Frameworks/HTMLOutput/src/helpers/WebView Additions.mm +++ b/Frameworks/HTMLOutput/src/helpers/WebView Additions.mm @@ -38,7 +38,7 @@ - (IBAction)copySelectionToReplacePboard:(id)sender { if(NSString* str = [self selection]) - [[OakPasteboard pasteboardWithName:NSReplacePboard] addEntryWithString:str]; + [[OakPasteboard pasteboardWithName:OakReplacePboard] addEntryWithString:str]; else NSBeep(); } diff --git a/Frameworks/OakAppKit/src/OakPasteboard.h b/Frameworks/OakAppKit/src/OakPasteboard.h index fb8b1568..ed2e067e 100644 --- a/Frameworks/OakAppKit/src/OakPasteboard.h +++ b/Frameworks/OakAppKit/src/OakPasteboard.h @@ -1,7 +1,7 @@ #import #import // for find::options_t -extern PUBLIC NSString* const NSReplacePboard; +extern PUBLIC NSString* const OakReplacePboard; extern PUBLIC NSString* const OakPasteboardDidChangeNotification; extern PUBLIC NSString* const kUserDefaultsFindWrapAround; diff --git a/Frameworks/OakAppKit/src/OakPasteboard.mm b/Frameworks/OakAppKit/src/OakPasteboard.mm index 18699e4d..ae822a57 100644 --- a/Frameworks/OakAppKit/src/OakPasteboard.mm +++ b/Frameworks/OakAppKit/src/OakPasteboard.mm @@ -9,7 +9,7 @@ OAK_DEBUG_VAR(Pasteboard); -NSString* const NSReplacePboard = @"NSReplacePboard"; +NSString* const OakReplacePboard = @"NSReplacePboard"; NSString* const OakPasteboardDidChangeNotification = @"OakClipboardDidChangeNotification"; NSString* const OakPasteboardOptionsPboardType = @"OakPasteboardOptionsPboardType"; diff --git a/Frameworks/OakTextView/src/OakTextView.mm b/Frameworks/OakTextView/src/OakTextView.mm index 34fd4b68..fa811b10 100644 --- a/Frameworks/OakTextView/src/OakTextView.mm +++ b/Frameworks/OakTextView/src/OakTextView.mm @@ -518,7 +518,7 @@ static std::string shell_quote (std::vector paths) } - (NSString*)findString { return [[OakPasteboard pasteboardWithName:NSFindPboard] current].string; } -- (NSString*)replaceString { return [[OakPasteboard pasteboardWithName:NSReplacePboard] current].string; } +- (NSString*)replaceString { return [[OakPasteboard pasteboardWithName:OakReplacePboard] current].string; } - (void)didFind:(NSUInteger)aNumber occurrencesOf:(NSString*)aFindString atPosition:(text::pos_t const&)aPosition wrapped:(BOOL)didWrap { @@ -701,7 +701,7 @@ static std::string shell_quote (std::vector paths) editor->set_clipboard(get_clipboard(NSGeneralPboard)); editor->set_find_clipboard(get_clipboard(NSFindPboard)); - editor->set_replace_clipboard(get_clipboard(NSReplacePboard)); + editor->set_replace_clipboard(get_clipboard(OakReplacePboard)); ng::index_t visibleIndex = document->visible_index(); if(document->selection() != NULL_STR) @@ -2259,7 +2259,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac if(findOperation == kFindOperationReplace || findOperation == kFindOperationReplaceAndFind) { std::string replacement = to_s(aFindServer.replaceString); - if(NSDictionary* captures = [OakPasteboard pasteboardWithName:NSReplacePboard].auxiliaryOptionsForCurrent) + if(NSDictionary* captures = [OakPasteboard pasteboardWithName:OakReplacePboard].auxiliaryOptionsForCurrent) { std::map variables; for(NSString* key in [captures allKeys]) @@ -2280,7 +2280,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac case kFindOperationFind: case kFindOperationCount: { - [OakPasteboard pasteboardWithName:NSReplacePboard].auxiliaryOptionsForCurrent = nil; + [OakPasteboard pasteboardWithName:OakReplacePboard].auxiliaryOptionsForCurrent = nil; bool isCounting = findOperation == kFindOperationCount || findOperation == kFindOperationCountInSelection; std::string const findStr = to_s(aFindServer.findString); @@ -2351,7 +2351,7 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac NSMutableDictionary* captures = [NSMutableDictionary dictionary]; for(auto pair : allMatches[res.last()]) captures[[NSString stringWithCxxString:pair.first]] = [NSString stringWithCxxString:pair.second]; - [OakPasteboard pasteboardWithName:NSReplacePboard].auxiliaryOptionsForCurrent = captures; + [OakPasteboard pasteboardWithName:OakReplacePboard].auxiliaryOptionsForCurrent = captures; } }