Display number of room members

This commit is contained in:
Alexandre Franke 2018-05-18 22:32:31 +01:00
parent 0cce5a47ab
commit e29db88366
2 changed files with 24 additions and 2 deletions

View file

@ -1196,10 +1196,27 @@
<property name="receives_default">True</property>
<property name="popover">members_popover</property>
<child>
<object class="GtkImage">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">system-users-symbolic</property>
<property name="orientation">horizontal</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="members_count">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">?</property>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">system-users-symbolic</property>
</object>
</child>
</object>
</child>
<accessibility>

View file

@ -92,6 +92,11 @@ impl AppOp {
} else {
self.more_members_btn.hide();
}
let members_count = self.ui.builder
.get_object::<gtk::Label>("members_count")
.expect("Can't find member_count in ui file.");
members_count.set_text(&format!("{}", members.len()));
}
pub fn show_all_members(&self) {