[gnome-characters/bilelmoussaoui/gtk4] 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] window: track search toggle button as well
- Date: Thu, 25 Nov 2021 10:59:07 +0000 (UTC)
commit ecd179a117ecb5089c2a4bbb1019ec4db57554e2
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]