[polari] roomList: Use dedicated disconnected icon



commit 884b38a97b6766293b3268c9ecb9adc9d7126e3f
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Aug 17 22:49:44 2016 +0200

    roomList: Use dedicated disconnected icon
    
    We indicate both connection attempts and failures in the room list
    headers, but we currently don't differentiate between the online and
    (non-error) offline case. As the functionality in the latter case is
    fairly limited though, it makes sense to have a clearer distinction
    than just making entries insensitive, so use an appropriate icon in
    the room list header.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770751

 data/resources/room-list-header.ui |    9 +++++++++
 src/roomList.js                    |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/data/resources/room-list-header.ui b/data/resources/room-list-header.ui
index fed89c5..9b42d30 100644
--- a/data/resources/room-list-header.ui
+++ b/data/resources/room-list-header.ui
@@ -34,6 +34,15 @@
             <property name="visible">True</property>
             <child>
               <object class="GtkImage">
+                <property name="icon-name">network-offline-symbolic</property>
+                <property name="visible">True</property>
+              </object>
+              <packing>
+                <property name="name">disconnected</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkImage">
                 <property name="icon_name">dialog-error-symbolic</property>
                 <property name="visible">True</property>
               </object>
diff --git a/src/roomList.js b/src/roomList.js
index 07ed7a7..7741be1 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -261,6 +261,8 @@ const RoomListHeader = new Lang.Class({
             child = 'connecting';
         else if (isError)
             child = isAuth ? 'auth' : 'error';
+        else if (status == Tp.ConnectionStatus.DISCONNECTED)
+            child = 'disconnected';
 
         this._iconStack.visible_child_name = child;
         this._spinner.active = (child == 'connecting');


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