[polari] serverRoomList: Don't use filter text as room name to join



commit 7f30cee0158962f0757218aef6faca388490a406
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Mar 11 01:43:32 2017 +0100

    serverRoomList: Don't use filter text as room name to join
    
    Now that the entry is used for filtering the room list, it is extremely
    weird to also use its text as room name that is joined along the selected
    rooms from the list - it means the user either has to enter the complete
    room name (in which case selecting rooms from the list becomes pointless),
    or remember to clear the entry after selecting a room.
    
    Just remove the conflicting functionality for now, we will bring back
    the ability to enter custom room names in a way that is compatible with
    filtering soon.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779960

 src/serverRoomManager.js |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/src/serverRoomManager.js b/src/serverRoomManager.js
index b59a2d1..9d479ac 100644
--- a/src/serverRoomManager.js
+++ b/src/serverRoomManager.js
@@ -143,7 +143,6 @@ const ServerRoomList = new Lang.Class({
             return this._filterTerms.every((term) => name.indexOf(term) != -1);
         });
 
-        this._filterEntry.connect('changed', () => { this.notify('can-join'); });
         this._filterEntry.connect('search-changed', () => {
             if (!Utils.updateTerms(this._filterTerms, this._filterEntry.text))
                 return;
@@ -171,9 +170,6 @@ const ServerRoomList = new Lang.Class({
     },
 
     get can_join() {
-        if (this._filterEntry.get_text_length() > 0)
-            return true;
-
         let canJoin = false;
         this._store.foreach((model, path, iter) => {
             canJoin = model.get_value(iter, RoomListColumn.SENSITIVE) &&
@@ -185,10 +181,6 @@ const ServerRoomList = new Lang.Class({
 
     get selectedRooms() {
         let rooms = [];
-
-        if (this._filterEntry.get_text_length() > 0)
-            rooms.push(this._filterEntry.get_text());
-
         let [valid, iter] = this._store.get_iter_first();
         for (; valid; valid = this._store.iter_next(iter)) {
             if (!this._store.get_value(iter, RoomListColumn.SENSITIVE) ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]