[polari] roomList: Resort when header names are changed
- From: Florian MĂźllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] roomList: Resort when header names are changed
- Date: Tue, 13 Oct 2015 23:03:19 +0000 (UTC)
commit f796456528163bf09133068302ddc7d2617f71ad
Author: Cody Welsh <codyw protonmail com>
Date: Mon Oct 12 22:07:54 2015 -0700
roomList: Resort when header names are changed
When a user updates a connection's name, the header will also change
its name. However, the room list will not resort in case the headers
are then out of order. This patch attempts to resort the room list
every time the display name is changed.
https://bugzilla.gnome.org/show_bug.cgi?id=756319
src/roomList.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index dfba764..5035b41 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -184,6 +184,15 @@ const RoomListHeader = new Lang.Class({
_onDisplayNameChanged: function() {
this._label.label = this._account.display_name;
+
+ let parent;
+ do
+ parent = this.get_parent();
+ while (parent && !(parent instanceof Gtk.ListBox));
+
+ if (parent)
+ parent.invalidate_sort();
+
let accessibleName = _("Connection %s has an error").format(this._account.display_name);
this.get_accessible().set_name(accessibleName);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]