ecode: Added notification center.

This commit is contained in:
Martín Lucas Golini
2021-01-05 00:17:30 -03:00
parent a0d2f73864
commit 92cb3ce12a
9 changed files with 81 additions and 8 deletions

View File

@@ -70,7 +70,9 @@ void DocSearchController::initSearchBar( UISearchBar* searchBar ) {
} );
mSearchBarLayout->addCommand( "repeat-find", [this] { findNextText( mSearchState ); } );
mSearchBarLayout->addCommand( "replace-all", [this, replaceInput] {
replaceAll( mSearchState, replaceInput->getText() );
size_t count = replaceAll( mSearchState, replaceInput->getText() );
mApp->getNotificationCenter()->addNotification(
String::format( "Replaced %zu occurrences.", count ) );
replaceInput->setFocus();
} );
mSearchBarLayout->addCommand( "find-and-replace", [this, replaceInput] {