|
|
|
@ -891,7 +891,22 @@ void Window::search_and_replace_entry() { |
|
|
|
replace_entry_it->signal_changed().connect([this, replace_entry_it](){ |
|
|
|
replace_entry_it->signal_changed().connect([this, replace_entry_it](){ |
|
|
|
last_replace=replace_entry_it->get_text(); |
|
|
|
last_replace=replace_entry_it->get_text(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
EntryBox::get().buttons.emplace_back("↑", [this](){ |
|
|
|
|
|
|
|
if(notebook.get_current_page()!=-1) |
|
|
|
|
|
|
|
notebook.get_current_view()->search_backward(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
EntryBox::get().buttons.back().set_tooltip_text("Find previous\n\nShortcut: press Shift+Enter in the search field"); |
|
|
|
|
|
|
|
EntryBox::get().buttons.emplace_back("⇄", [this, replace_entry_it](){ |
|
|
|
|
|
|
|
if(notebook.get_current_page()!=-1) { |
|
|
|
|
|
|
|
notebook.get_current_view()->replace_forward(replace_entry_it->get_text()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
EntryBox::get().buttons.back().set_tooltip_text("Replace current selection\n\nShortcut: press Enter in the replacement field"); |
|
|
|
|
|
|
|
EntryBox::get().buttons.emplace_back("↓", [this](){ |
|
|
|
|
|
|
|
if(notebook.get_current_page()!=-1) |
|
|
|
|
|
|
|
notebook.get_current_view()->search_forward(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
EntryBox::get().buttons.back().set_tooltip_text("Find next\n\nShortcut: press Enter in the search field"); |
|
|
|
EntryBox::get().buttons.emplace_back("Replace all", [this, replace_entry_it](){ |
|
|
|
EntryBox::get().buttons.emplace_back("Replace all", [this, replace_entry_it](){ |
|
|
|
if(notebook.get_current_page()!=-1) |
|
|
|
if(notebook.get_current_page()!=-1) |
|
|
|
notebook.get_current_view()->replace_all(replace_entry_it->get_text()); |
|
|
|
notebook.get_current_view()->replace_all(replace_entry_it->get_text()); |
|
|
|
|