From b41d953e1b582eae28eb0c48d3537ecd9f21d697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 28 Mar 2023 10:53:43 +0200 Subject: [PATCH] sidebar: Move category types into a subfolder --- po/POTFILES.in | 4 ++-- src/session/sidebar/{ => category}/category_row.rs | 0 src/session/sidebar/{ => category}/category_type.rs | 0 .../sidebar/{category.rs => category/mod.rs} | 6 +++++- src/session/sidebar/mod.rs | 13 +++++-------- 5 files changed, 12 insertions(+), 11 deletions(-) rename src/session/sidebar/{ => category}/category_row.rs (100%) rename src/session/sidebar/{ => category}/category_type.rs (100%) rename src/session/sidebar/{category.rs => category/mod.rs} (97%) diff --git a/po/POTFILES.in b/po/POTFILES.in index a08b3cc6..f07245a2 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -93,8 +93,8 @@ src/session/room/mod.rs src/session/room/timeline/timeline_day_divider.rs src/session/room_creation/mod.rs src/session/room_list.rs -src/session/sidebar/category_row.rs -src/session/sidebar/category_type.rs +src/session/sidebar/category/category_row.rs +src/session/sidebar/category/category_type.rs src/session/sidebar/entry_type.rs src/session/verification/identity_verification.rs src/user_facing_error.rs diff --git a/src/session/sidebar/category_row.rs b/src/session/sidebar/category/category_row.rs similarity index 100% rename from src/session/sidebar/category_row.rs rename to src/session/sidebar/category/category_row.rs diff --git a/src/session/sidebar/category_type.rs b/src/session/sidebar/category/category_type.rs similarity index 100% rename from src/session/sidebar/category_type.rs rename to src/session/sidebar/category/category_type.rs diff --git a/src/session/sidebar/category.rs b/src/session/sidebar/category/mod.rs similarity index 97% rename from src/session/sidebar/category.rs rename to src/session/sidebar/category/mod.rs index 43222f31..166a3caf 100644 --- a/src/session/sidebar/category.rs +++ b/src/session/sidebar/category/mod.rs @@ -1,6 +1,10 @@ use gtk::{gio, glib, glib::clone, prelude::*, subclass::prelude::*}; -use super::{CategoryType, SidebarItem, SidebarItemExt, SidebarItemImpl}; +mod category_row; +mod category_type; + +pub use self::{category_row::CategoryRow, category_type::CategoryType}; +use super::{SidebarItem, SidebarItemExt, SidebarItemImpl}; use crate::session::{ room::{Room, RoomType}, room_list::RoomList, diff --git a/src/session/sidebar/mod.rs b/src/session/sidebar/mod.rs index 342ab2c6..4655f7ed 100644 --- a/src/session/sidebar/mod.rs +++ b/src/session/sidebar/mod.rs @@ -1,6 +1,4 @@ mod category; -mod category_row; -mod category_type; mod entry; mod entry_row; mod entry_type; @@ -15,18 +13,17 @@ use adw::{prelude::*, subclass::prelude::*}; use gtk::{gio, glib, glib::clone, CompositeTemplate}; use log::error; +use self::{ + category::CategoryRow, entry_row::EntryRow, room_row::RoomRow, row::Row, selection::Selection, + verification_row::VerificationRow, +}; pub use self::{ - category::Category, - category_type::CategoryType, + category::{Category, CategoryType}, entry::Entry, entry_type::EntryType, item_list::ItemList, sidebar_item::{SidebarItem, SidebarItemExt, SidebarItemImpl}, }; -use self::{ - category_row::CategoryRow, entry_row::EntryRow, room_row::RoomRow, row::Row, - selection::Selection, verification_row::VerificationRow, -}; use crate::{ components::Avatar, session::{