[gnome-characters/bilelmoussaoui/unfold] sidebar: unselect row if folded
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/bilelmoussaoui/unfold] sidebar: unselect row if folded
- Date: Thu, 27 Jan 2022 17:18:17 +0000 (UTC)
commit 488444e0370b4e7efee545460ae740a9d51caf45
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Thu Jan 27 18:15:15 2022 +0100
sidebar: unselect row if folded
Fixes #95
src/sidebar.js | 4 ++++
src/window.js | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/sidebar.js b/src/sidebar.js
index 0d0d80c..0d586e7 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -92,6 +92,10 @@ var Sidebar = GObject.registerClass({
this._list.select_row(row);
}
+ unselectAll() {
+ this._list.unselect_all();
+ }
+
get list() {
return this._list;
}
diff --git a/src/window.js b/src/window.js
index 6e72d93..d181aba 100644
--- a/src/window.js
+++ b/src/window.js
@@ -116,6 +116,8 @@ var MainWindow = GObject.registerClass({
this._back_button.connect('clicked', () => {
this._leaflet.navigate(Adw.NavigationDirection.BACK);
+ if (this._leaflet.get_folded())
+ this._sidebar.unselectAll();
});
this._charactersView.connect('notify::loading', view => {
@@ -146,7 +148,7 @@ var MainWindow = GObject.registerClass({
set searchActive(v) {
if (v) {
- this._sidebar.list.unselect_all();
+ this._sidebar.unselectAll();
this._windowTitle.title = _('Search Result');
} else {
this._sidebar.restoreSelection();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]