room-details: Rename MemberPage to MembersPage

This commit is contained in:
Kévin Commaille 2023-11-15 11:07:27 +01:00
parent 09fb83a27c
commit 96b870bd3f
No known key found for this signature in database
GPG key ID: 29A48C1F03620416
16 changed files with 36 additions and 36 deletions

View file

@ -70,12 +70,12 @@ src/session/view/content/room_details/history_viewer/media.ui
src/session/view/content/room_details/invite_subpage/invitee_list.rs src/session/view/content/room_details/invite_subpage/invitee_list.rs
src/session/view/content/room_details/invite_subpage/mod.rs src/session/view/content/room_details/invite_subpage/mod.rs
src/session/view/content/room_details/invite_subpage/mod.ui src/session/view/content/room_details/invite_subpage/mod.ui
src/session/view/content/room_details/member_page/members_list_view/extra_lists.rs src/session/view/content/room_details/members_page/members_list_view/extra_lists.rs
src/session/view/content/room_details/member_page/members_list_view/member_row.ui src/session/view/content/room_details/members_page/members_list_view/member_row.ui
src/session/view/content/room_details/member_page/members_list_view/membership_subpage_row.rs src/session/view/content/room_details/members_page/members_list_view/membership_subpage_row.rs
src/session/view/content/room_details/member_page/member_menu.ui src/session/view/content/room_details/members_page/member_menu.ui
src/session/view/content/room_details/member_page/mod.rs src/session/view/content/room_details/members_page/mod.rs
src/session/view/content/room_details/member_page/mod.ui src/session/view/content/room_details/members_page/mod.ui
src/session/view/content/room_details/mod.ui src/session/view/content/room_details/mod.ui
src/session/view/content/room_history/event_actions.ui src/session/view/content/room_history/event_actions.ui
src/session/view/content/room_history/item_row.rs src/session/view/content/room_history/item_row.rs

View file

@ -126,7 +126,7 @@ impl MemberMenu {
fn popover_menu(&self) -> &gtk::PopoverMenu { fn popover_menu(&self) -> &gtk::PopoverMenu {
self.imp().popover.get_or_init(|| { self.imp().popover.get_or_init(|| {
gtk::PopoverMenu::from_model(Some( gtk::PopoverMenu::from_model(Some(
&gtk::Builder::from_resource("/org/gnome/Fractal/ui/session/view/content/room_details/member_page/member_menu.ui") &gtk::Builder::from_resource("/org/gnome/Fractal/ui/session/view/content/room_details/members_page/member_menu.ui")
.object::<gio::MenuModel>("menu_model") .object::<gio::MenuModel>("menu_model")
.unwrap(), .unwrap(),
)) ))

View file

@ -1,7 +1,7 @@
use adw::subclass::prelude::BinImpl; use adw::subclass::prelude::BinImpl;
use gtk::{glib, glib::clone, prelude::*, subclass::prelude::*, CompositeTemplate}; use gtk::{glib, glib::clone, prelude::*, subclass::prelude::*, CompositeTemplate};
use super::super::{MemberMenu, MemberPage}; use super::super::{MemberMenu, MembersPage};
use crate::{ use crate::{
components::{Avatar, Badge}, components::{Avatar, Badge},
session::model::Member, session::model::Member,
@ -17,7 +17,7 @@ mod imp {
#[derive(Debug, Default, CompositeTemplate)] #[derive(Debug, Default, CompositeTemplate)]
#[template( #[template(
resource = "/org/gnome/Fractal/ui/session/view/content/room_details/member_page/members_list_view/member_row.ui" resource = "/org/gnome/Fractal/ui/session/view/content/room_details/members_page/members_list_view/member_row.ui"
)] )]
pub struct MemberRow { pub struct MemberRow {
pub member: RefCell<Option<Member>>, pub member: RefCell<Option<Member>>,
@ -123,8 +123,8 @@ impl MemberRow {
fn member_menu(&self) -> Option<MemberMenu> { fn member_menu(&self) -> Option<MemberMenu> {
let member_page = self let member_page = self
.ancestor(MemberPage::static_type()) .ancestor(MembersPage::static_type())
.and_downcast::<MemberPage>()?; .and_downcast::<MembersPage>()?;
Some(member_page.member_menu().clone()) Some(member_page.member_menu().clone())
} }
} }

View file

@ -20,7 +20,7 @@ mod imp {
#[glib::object_subclass] #[glib::object_subclass]
impl ObjectSubclass for MembershipSubpageItem { impl ObjectSubclass for MembershipSubpageItem {
const NAME: &'static str = "ContentMemberPageMembershipSubpageItem"; const NAME: &'static str = "MembersPageMembershipSubpageItem";
type Type = super::MembershipSubpageItem; type Type = super::MembershipSubpageItem;
} }

View file

@ -14,7 +14,7 @@ mod imp {
#[derive(Debug, Default, CompositeTemplate)] #[derive(Debug, Default, CompositeTemplate)]
#[template( #[template(
resource = "/org/gnome/Fractal/ui/session/view/content/room_details/member_page/members_list_view/membership_subpage_row.ui" resource = "/org/gnome/Fractal/ui/session/view/content/room_details/members_page/members_list_view/membership_subpage_row.ui"
)] )]
pub struct MembershipSubpageRow { pub struct MembershipSubpageRow {
/// The item of this row. /// The item of this row.
@ -27,7 +27,7 @@ mod imp {
#[glib::object_subclass] #[glib::object_subclass]
impl ObjectSubclass for MembershipSubpageRow { impl ObjectSubclass for MembershipSubpageRow {
const NAME: &'static str = "ContentMemberPageMembershipSubpageRow"; const NAME: &'static str = "MembersPageMembershipSubpageRow";
type Type = super::MembershipSubpageRow; type Type = super::MembershipSubpageRow;
type ParentType = adw::ActionRow; type ParentType = adw::ActionRow;

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<template class="ContentMemberPageMembershipSubpageRow" parent="AdwActionRow"> <template class="MembersPageMembershipSubpageRow" parent="AdwActionRow">
<property name="title" bind-source="ContentMemberPageMembershipSubpageRow" bind-property="label" bind-flags="sync-create"/> <property name="title" bind-source="MembersPageMembershipSubpageRow" bind-property="label" bind-flags="sync-create"/>
<property name="icon-name">users-symbolic</property> <property name="icon-name">users-symbolic</property>
<property name="activatable">True</property> <property name="activatable">True</property>
<property name="margin-top">6</property> <property name="margin-top">6</property>

View file

@ -23,7 +23,7 @@ mod imp {
#[derive(Debug, Default, CompositeTemplate)] #[derive(Debug, Default, CompositeTemplate)]
#[template( #[template(
resource = "/org/gnome/Fractal/ui/session/view/content/room_details/member_page/members_list_view/mod.ui" resource = "/org/gnome/Fractal/ui/session/view/content/room_details/members_page/members_list_view/mod.ui"
)] )]
pub struct MembersListView { pub struct MembersListView {
#[template_child] #[template_child]

View file

@ -33,9 +33,9 @@ mod imp {
#[derive(Debug, Default, CompositeTemplate)] #[derive(Debug, Default, CompositeTemplate)]
#[template( #[template(
resource = "/org/gnome/Fractal/ui/session/view/content/room_details/member_page/mod.ui" resource = "/org/gnome/Fractal/ui/session/view/content/room_details/members_page/mod.ui"
)] )]
pub struct MemberPage { pub struct MembersPage {
pub room: glib::WeakRef<Room>, pub room: glib::WeakRef<Room>,
#[template_child] #[template_child]
pub members_search_entry: TemplateChild<gtk::SearchEntry>, pub members_search_entry: TemplateChild<gtk::SearchEntry>,
@ -50,9 +50,9 @@ mod imp {
} }
#[glib::object_subclass] #[glib::object_subclass]
impl ObjectSubclass for MemberPage { impl ObjectSubclass for MembersPage {
const NAME: &'static str = "ContentMemberPage"; const NAME: &'static str = "MembersPage";
type Type = super::MemberPage; type Type = super::MembersPage;
type ParentType = adw::NavigationPage; type ParentType = adw::NavigationPage;
fn class_init(klass: &mut Self::Class) { fn class_init(klass: &mut Self::Class) {
@ -90,7 +90,7 @@ mod imp {
} }
} }
impl ObjectImpl for MemberPage { impl ObjectImpl for MembersPage {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
@ -138,16 +138,16 @@ mod imp {
} }
} }
impl WidgetImpl for MemberPage {} impl WidgetImpl for MembersPage {}
impl NavigationPageImpl for MemberPage {} impl NavigationPageImpl for MembersPage {}
} }
glib::wrapper! { glib::wrapper! {
pub struct MemberPage(ObjectSubclass<imp::MemberPage>) pub struct MembersPage(ObjectSubclass<imp::MembersPage>)
@extends gtk::Widget, adw::NavigationPage; @extends gtk::Widget, adw::NavigationPage;
} }
impl MemberPage { impl MembersPage {
pub fn new(room: &Room) -> Self { pub fn new(room: &Room) -> Self {
glib::Object::builder().property("room", room).build() glib::Object::builder().property("room", room).build()
} }

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<template class="ContentMemberPage" parent="AdwNavigationPage"> <template class="MembersPage" parent="AdwNavigationPage">
<property name="title">Room Members</property> <property name="title">Room Members</property>
<child> <child>
<object class="AdwToolbarView"> <object class="AdwToolbarView">

View file

@ -1,7 +1,7 @@
mod general_page; mod general_page;
mod history_viewer; mod history_viewer;
mod invite_subpage; mod invite_subpage;
mod member_page; mod members_page;
use std::convert::From; use std::convert::From;
@ -12,7 +12,7 @@ pub use self::{
general_page::GeneralPage, general_page::GeneralPage,
history_viewer::{AudioHistoryViewer, FileHistoryViewer, MediaHistoryViewer}, history_viewer::{AudioHistoryViewer, FileHistoryViewer, MediaHistoryViewer},
invite_subpage::InviteSubpage, invite_subpage::InviteSubpage,
member_page::MemberPage, members_page::MembersPage,
}; };
use crate::session::model::Room; use crate::session::model::Room;
@ -160,7 +160,7 @@ impl RoomDetails {
let mut subpages = imp.subpages.borrow_mut(); let mut subpages = imp.subpages.borrow_mut();
let subpage = subpages.entry(name).or_insert_with(|| match name { let subpage = subpages.entry(name).or_insert_with(|| match name {
SubpageName::Members => MemberPage::new(room).upcast(), SubpageName::Members => MembersPage::new(room).upcast(),
SubpageName::Invite => InviteSubpage::new(room).upcast(), SubpageName::Invite => InviteSubpage::new(room).upcast(),
SubpageName::MediaHistory => MediaHistoryViewer::new(room).upcast(), SubpageName::MediaHistory => MediaHistoryViewer::new(room).upcast(),
SubpageName::FileHistory => FileHistoryViewer::new(room).upcast(), SubpageName::FileHistory => FileHistoryViewer::new(room).upcast(),

View file

@ -54,11 +54,11 @@
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/history_viewer/media_item.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/history_viewer/media_item.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/invite_subpage/invitee_row.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/invite_subpage/invitee_row.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/invite_subpage/mod.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/invite_subpage/mod.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/member_page/member_menu.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/members_page/member_menu.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/member_page/members_list_view/member_row.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/members_page/members_list_view/member_row.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/member_page/members_list_view/membership_subpage_row.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/members_page/members_list_view/membership_subpage_row.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/member_page/members_list_view/mod.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/members_page/members_list_view/mod.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/member_page/mod.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/members_page/mod.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/mod.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_details/mod.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_history/divider_row.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_history/divider_row.ui</file>
<file compressed="true" preprocess="xml-stripblanks">session/view/content/room_history/event_actions.ui</file> <file compressed="true" preprocess="xml-stripblanks">session/view/content/room_history/event_actions.ui</file>