[vte/vte-0-46] app: Fix search button sensitivity
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-46] app: Fix search button sensitivity
- Date: Sun, 18 Sep 2016 15:09:46 +0000 (UTC)
commit 606a8c81612161c75b6507b585e5b5f4012609b5
Author: Christian Persch <chpe src gnome org>
Date: Sun Sep 18 17:05:09 2016 +0200
app: Fix search button sensitivity
(cherry picked from commit a2e7874286b885d8bb678f0ffad496cddc441788)
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]