[latexila] Search entry: red background when text not found
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Search entry: red background when text not found
- Date: Fri, 4 Oct 2013 15:28:41 +0000 (UTC)
commit 20f732f3ecc20ff598bffdfe0c2ee4b20ad173e1
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Oct 4 17:19:22 2013 +0200
Search entry: red background when text not found
src/search.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/search.vala b/src/search.vala
index 6741f5e..0eb553f 100644
--- a/src/search.vala
+++ b/src/search.vala
@@ -400,6 +400,16 @@ public class SearchAndReplace : GLib.Object
_search_context = new SourceSearchContext (_main_window.active_document,
_search_settings);
+ _search_context.notify["occurrences-count"].connect (() =>
+ {
+ if (_search_context.occurrences_count == 0 &&
+ _search_settings.get_search_text () != null)
+ ErrorEntry.add_error (_entry_find);
+
+ else if (_search_context.occurrences_count >= 0)
+ ErrorEntry.remove_error (_entry_find);
+ });
+
bool readonly = _main_window.active_document.readonly;
_replace_grid.set_sensitive (! readonly);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]