From f5660ba83e34fb8e2766c46a29452426e0ee29e2 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Sat, 14 Sep 2024 21:39:53 +0200 Subject: [PATCH] widgets: Rename Window* to *Window --- src/widgets.rs | 8 +++---- .../{window_edit.rs => edit_window.rs} | 22 ++++++++--------- .../{window_edit.ui => edit_window.ui} | 2 +- .../{window_image.rs => image_window.rs} | 24 +++++++++---------- .../{window_image.ui => image_window.ui} | 2 +- .../{window_image => image_window}/actions.rs | 4 ++-- .../controls.rs | 2 +- src/window.rs | 14 +++++------ src/window.ui | 4 ++-- 9 files changed, 41 insertions(+), 41 deletions(-) rename src/widgets/{window_edit.rs => edit_window.rs} (76%) rename src/widgets/{window_edit.ui => edit_window.ui} (90%) rename src/widgets/{window_image.rs => image_window.rs} (98%) rename src/widgets/{window_image.ui => image_window.ui} (99%) rename src/widgets/{window_image => image_window}/actions.rs (99%) rename src/widgets/{window_image => image_window}/controls.rs (99%) diff --git a/src/widgets.rs b/src/widgets.rs index 3de4f91..c422f8e 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -28,8 +28,8 @@ mod properties_view; mod shy_bin; mod sliding_view; mod window_content; -mod window_edit; -mod window_image; +mod edit_window; +mod image_window; pub use drag_overlay::LpDragOverlay; pub use error_details::LpErrorDetails; @@ -42,5 +42,5 @@ pub use properties_view::LpPropertiesView; pub use shy_bin::LpShyBin; pub use sliding_view::LpSlidingView; pub use window_content::LpWindowContent; -pub use window_edit::LpWindowEdit; -pub use window_image::LpWindowImage; +pub use edit_window::LpImageEdit; +pub use image_window::LpImageWindow; diff --git a/src/widgets/window_edit.rs b/src/widgets/edit_window.rs similarity index 76% rename from src/widgets/window_edit.rs rename to src/widgets/edit_window.rs index 1b0c15b..288a11d 100644 --- a/src/widgets/window_edit.rs +++ b/src/widgets/edit_window.rs @@ -22,17 +22,17 @@ use adw::{glib, gtk}; mod imp { use super::*; #[derive(Debug, Default, gtk::CompositeTemplate, glib::Properties)] - #[properties(wrapper_type = super::LpWindowEdit)] - #[template(file = "window_edit.ui")] - pub struct LpWindowEdit { + #[properties(wrapper_type = super::LpImageEdit)] + #[template(file = "edit_window.ui")] + pub struct LpImageEdit { #[property(get)] example: u64, } #[glib::object_subclass] - impl ObjectSubclass for LpWindowEdit { - const NAME: &'static str = "LpWindowEdit"; - type Type = super::LpWindowEdit; + impl ObjectSubclass for LpImageEdit { + const NAME: &'static str = "LpImageEdit"; + type Type = super::LpImageEdit; type ParentType = adw::Bin; fn class_init(klass: &mut Self::Class) { @@ -45,22 +45,22 @@ mod imp { } #[glib::derived_properties] - impl ObjectImpl for LpWindowEdit { + impl ObjectImpl for LpImageEdit { fn constructed(&self) { self.parent_constructed(); } } - impl WidgetImpl for LpWindowEdit {} - impl BinImpl for LpWindowEdit {} + impl WidgetImpl for LpImageEdit {} + impl BinImpl for LpImageEdit {} } glib::wrapper! { - pub struct LpWindowEdit(ObjectSubclass) + pub struct LpImageEdit(ObjectSubclass) @extends gtk::Widget, adw::Bin; } -impl LpWindowEdit { +impl LpImageEdit { pub fn new() -> Self { glib::Object::new() } diff --git a/src/widgets/window_edit.ui b/src/widgets/edit_window.ui similarity index 90% rename from src/widgets/window_edit.ui rename to src/widgets/edit_window.ui index d16d64d..76b041d 100644 --- a/src/widgets/window_edit.ui +++ b/src/widgets/edit_window.ui @@ -1,6 +1,6 @@ -