[gnome-characters/bilelmoussaoui/gtk4: 72/76] window: track search toggle button as well
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/bilelmoussaoui/gtk4: 72/76] window: track search toggle button as well
- Date: Fri, 26 Nov 2021 08:59:08 +0000 (UTC)
commit cb8f186a67c007e3f8a404e3701694e201b4ccc3
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Thu Nov 25 11:59:02 2021 +0100
window: track search toggle button as well
src/window.js | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/window.js b/src/window.js
index c7292df..9153407 100644
--- a/src/window.js
+++ b/src/window.js
@@ -98,6 +98,15 @@ var MainWindow = GObject.registerClass({
GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.BIDIRECTIONAL,
);
+ this._searchButton.connect('toggled', btn => {
+ if (btn.active)
+ this._searchEntry.grab_focus();
+ else
+ this._searchEntry.set_text('');
+
+ this.searchActive = btn.active;
+ });
+
this._searchEntry.connect('search-changed', entry => this._handleSearchChanged(entry));
this._searchEntry.set_key_capture_widget(this);
this._searchEntry.connect('search-started', () => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]