[vte] app: Fix search button sensitivity
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] app: Fix search button sensitivity
- Date: Sat, 17 Sep 2016 18:34:09 +0000 (UTC)
commit a2e7874286b885d8bb678f0ffad496cddc441788
Author: Christian Persch <chpe src gnome org>
Date: Sat Sep 17 20:33:47 2016 +0200
app: Fix search button sensitivity
src/app.vala | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index b43a275..58698f9 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -37,8 +37,7 @@ class SearchPopover : Gtk.Popover
private bool regex_caseless = false;
private string? regex_pattern = null;
- private GLib.Regex? regex_gregex = null;
- private Vte.Regex? regex_regex = null;
+ private bool has_regex = false;
public SearchPopover(Vte.Terminal term,
Gtk.Widget relative_to)
@@ -70,8 +69,7 @@ class SearchPopover : Gtk.Popover
private bool have_regex()
{
- return regex_gregex != null ||
- regex_regex != null;
+ return has_regex;
}
private void update_sensitivity()
@@ -150,10 +148,13 @@ class SearchPopover : Gtk.Popover
search_entry.set_tooltip_text(null);
}
- if (!App.Options.no_pcre)
+ if (!App.Options.no_pcre) {
+ has_regex = regex != null;
terminal.search_set_regex(regex, 0);
- else
+ } else {
+ has_regex = gregex != null;
terminal.search_set_gregex(gregex, 0);
+ }
update_sensitivity();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]