Commit dc83201d authored by Julian Sparber's avatar Julian Sparber

roomsettings: add invite button

https://gitlab.gnome.org/World/fractal/issues/19
parent 544fc52f
......@@ -232,7 +232,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Notification</property>
<property name="label" translatable="yes">Notifications</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -875,20 +875,51 @@
</packing>
</child>
<child>
<object class="GtkFrame">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<property name="margin_bottom">24</property>
<child type="label">
<property name="margin-bottom">12</property>
<child>
<object class="GtkLabel" id="room_settings_member_list_title">
<property name="visible">True</property>
<property name="label" translatable="yes">members</property>
<property name="margin-bottom">12</property>
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="room_settings_invite">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="action_name">app.room_invite</property>
<property name="label" translatable="yes">Invite new member</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">12</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<property name="margin_bottom">24</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
......@@ -927,7 +958,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">12</property>
<property name="position">13</property>
</packing>
</child>
</object>
......
......@@ -349,10 +349,14 @@ impl AppOp {
let b = self.ui.builder
.get_object::<gtk::Frame>("room_settings_members_list")
.expect("Can't find room_settings_members_list in ui file.");
let label = self.ui.builder
.get_object::<gtk::Label>("room_settings_member_list_title")
.expect("Can't find room_settings_member_list_title in ui file.");
for w in b.get_children().iter() {
b.remove(w);
}
label.set_text(&format!("{} members", members.len()));
let list = widgets::MembersList::new(members, entry);
let w = list.create()?;
b.add(&w);
......
......@@ -96,7 +96,6 @@ fn load_row_content(member: Member) -> gtk::Box {
let b = gtk::Box::new(gtk::Orientation::Horizontal, 12);
let avatar_path = cache_path(&member.uid).unwrap_or(String::from(""));
let avatar = widgets::Avatar::circle_avatar(avatar_path, Some(40));
let menu = gtk::Image::new_from_icon_name("view-more-symbolic", 1);
let user_box = gtk::Box::new(gtk::Orientation::Vertical, 0);
let username = gtk::Label::new(Some(member.get_alias().as_str()));
b.set_margin_start(12);
......@@ -109,7 +108,6 @@ fn load_row_content(member: Member) -> gtk::Box {
* user_box.pack_end(&state, true, true, 0); */
b.pack_start(&avatar, false, true, 0);
b.pack_start(&user_box, false, true, 0);
b.pack_end(&menu, false, false, 0);
b.show_all();
b
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment