From d5101a6465f2ecc1c665049921ddb8f995a78c0d Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 5 Oct 2024 17:10:31 +0300 Subject: [PATCH] rename wrapper mod to window --- src/app/browser.rs | 12 ++++++------ src/app/browser/{wrapper.rs => window.rs} | 4 ++-- src/app/browser/{wrapper => window}/tab.rs | 0 src/app/browser/{wrapper => window}/tab/label.rs | 0 src/app/browser/{wrapper => window}/tab/label/pin.rs | 0 .../browser/{wrapper => window}/tab/label/title.rs | 0 src/app/browser/{wrapper => window}/tab/page.rs | 0 .../browser/{wrapper => window}/tab/page/content.rs | 0 .../{wrapper => window}/tab/page/content/text.rs | 0 .../tab/page/content/text/gemini.rs | 0 .../tab/page/content/text/gemini/reader.rs | 0 .../tab/page/content/text/gemini/reader/default.css | 0 .../tab/page/content/text/gemini/reader/parser.rs | 0 .../page/content/text/gemini/reader/parser/header.rs | 0 .../page/content/text/gemini/reader/parser/link.rs | 0 .../page/content/text/gemini/reader/parser/plain.rs | 0 .../tab/page/content/text/plain/reader.rs | 0 src/app/browser/{wrapper => window}/tab/page/meta.rs | 0 .../{wrapper => window}/tab/page/navigation.rs | 0 .../{wrapper => window}/tab/page/navigation/base.rs | 0 .../tab/page/navigation/bookmark.rs | 0 .../tab/page/navigation/history.rs | 0 .../tab/page/navigation/history/back.rs | 0 .../tab/page/navigation/history/forward.rs | 0 .../tab/page/navigation/reload.rs | 0 .../tab/page/navigation/request.rs | 0 26 files changed, 8 insertions(+), 8 deletions(-) rename src/app/browser/{wrapper.rs => window.rs} (98%) rename src/app/browser/{wrapper => window}/tab.rs (100%) rename src/app/browser/{wrapper => window}/tab/label.rs (100%) rename src/app/browser/{wrapper => window}/tab/label/pin.rs (100%) rename src/app/browser/{wrapper => window}/tab/label/title.rs (100%) rename src/app/browser/{wrapper => window}/tab/page.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/gemini.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/gemini/reader.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/gemini/reader/default.css (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/gemini/reader/parser.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/gemini/reader/parser/header.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/gemini/reader/parser/link.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/gemini/reader/parser/plain.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/content/text/plain/reader.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/meta.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation/base.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation/bookmark.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation/history.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation/history/back.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation/history/forward.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation/reload.rs (100%) rename src/app/browser/{wrapper => window}/tab/page/navigation/request.rs (100%) diff --git a/src/app/browser.rs b/src/app/browser.rs index 20fba8b2..14421940 100644 --- a/src/app/browser.rs +++ b/src/app/browser.rs @@ -1,12 +1,12 @@ mod database; mod header; mod widget; -mod wrapper; +mod window; use database::Database; use header::Header; use widget::Widget; -use wrapper::Wrapper; +use window::Window; use gtk::{ gio::{AppInfo, AppLaunchContext, SimpleAction}, @@ -20,7 +20,7 @@ pub struct Browser { database: Arc, // Components // header: Arc
, - // wrapper: Arc, + // window: Arc, widget: Arc, } @@ -65,7 +65,7 @@ impl Browser { action_tab_pin.clone(), )); - let main = Arc::new(Wrapper::new( + let main = Arc::new(Window::new( action_tab_page_navigation_base.clone(), action_tab_page_navigation_history_back.clone(), action_tab_page_navigation_history_forward.clone(), @@ -254,7 +254,7 @@ impl Browser { // Delegate restore action to childs // @TODO // self.header.restore(record.id); - // self.main.restore(record.id); + // self.window.restore(record.id); self.widget.restore(&record.id); } } @@ -269,7 +269,7 @@ impl Browser { let id = self.database.last_insert_id(); // @TODO // self.header.save(id); - // self.main.save(id); + // self.window.save(id); self.widget.save(&id); } Err(error) => panic!("{error}"), // @TODO diff --git a/src/app/browser/wrapper.rs b/src/app/browser/window.rs similarity index 98% rename from src/app/browser/wrapper.rs rename to src/app/browser/window.rs index e14f3233..31ce31c3 100644 --- a/src/app/browser/wrapper.rs +++ b/src/app/browser/window.rs @@ -6,12 +6,12 @@ use tab::Tab; use gtk::{gio::SimpleAction, glib::GString, prelude::BoxExt, Box, Orientation}; -pub struct Wrapper { +pub struct Window { tab: Arc, widget: Box, } -impl Wrapper { +impl Window { // Construct pub fn new( action_tab_page_navigation_base: Arc, diff --git a/src/app/browser/wrapper/tab.rs b/src/app/browser/window/tab.rs similarity index 100% rename from src/app/browser/wrapper/tab.rs rename to src/app/browser/window/tab.rs diff --git a/src/app/browser/wrapper/tab/label.rs b/src/app/browser/window/tab/label.rs similarity index 100% rename from src/app/browser/wrapper/tab/label.rs rename to src/app/browser/window/tab/label.rs diff --git a/src/app/browser/wrapper/tab/label/pin.rs b/src/app/browser/window/tab/label/pin.rs similarity index 100% rename from src/app/browser/wrapper/tab/label/pin.rs rename to src/app/browser/window/tab/label/pin.rs diff --git a/src/app/browser/wrapper/tab/label/title.rs b/src/app/browser/window/tab/label/title.rs similarity index 100% rename from src/app/browser/wrapper/tab/label/title.rs rename to src/app/browser/window/tab/label/title.rs diff --git a/src/app/browser/wrapper/tab/page.rs b/src/app/browser/window/tab/page.rs similarity index 100% rename from src/app/browser/wrapper/tab/page.rs rename to src/app/browser/window/tab/page.rs diff --git a/src/app/browser/wrapper/tab/page/content.rs b/src/app/browser/window/tab/page/content.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content.rs rename to src/app/browser/window/tab/page/content.rs diff --git a/src/app/browser/wrapper/tab/page/content/text.rs b/src/app/browser/window/tab/page/content/text.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text.rs rename to src/app/browser/window/tab/page/content/text.rs diff --git a/src/app/browser/wrapper/tab/page/content/text/gemini.rs b/src/app/browser/window/tab/page/content/text/gemini.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/gemini.rs rename to src/app/browser/window/tab/page/content/text/gemini.rs diff --git a/src/app/browser/wrapper/tab/page/content/text/gemini/reader.rs b/src/app/browser/window/tab/page/content/text/gemini/reader.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/gemini/reader.rs rename to src/app/browser/window/tab/page/content/text/gemini/reader.rs diff --git a/src/app/browser/wrapper/tab/page/content/text/gemini/reader/default.css b/src/app/browser/window/tab/page/content/text/gemini/reader/default.css similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/gemini/reader/default.css rename to src/app/browser/window/tab/page/content/text/gemini/reader/default.css diff --git a/src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser.rs b/src/app/browser/window/tab/page/content/text/gemini/reader/parser.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser.rs rename to src/app/browser/window/tab/page/content/text/gemini/reader/parser.rs diff --git a/src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser/header.rs b/src/app/browser/window/tab/page/content/text/gemini/reader/parser/header.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser/header.rs rename to src/app/browser/window/tab/page/content/text/gemini/reader/parser/header.rs diff --git a/src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser/link.rs b/src/app/browser/window/tab/page/content/text/gemini/reader/parser/link.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser/link.rs rename to src/app/browser/window/tab/page/content/text/gemini/reader/parser/link.rs diff --git a/src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser/plain.rs b/src/app/browser/window/tab/page/content/text/gemini/reader/parser/plain.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/gemini/reader/parser/plain.rs rename to src/app/browser/window/tab/page/content/text/gemini/reader/parser/plain.rs diff --git a/src/app/browser/wrapper/tab/page/content/text/plain/reader.rs b/src/app/browser/window/tab/page/content/text/plain/reader.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/content/text/plain/reader.rs rename to src/app/browser/window/tab/page/content/text/plain/reader.rs diff --git a/src/app/browser/wrapper/tab/page/meta.rs b/src/app/browser/window/tab/page/meta.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/meta.rs rename to src/app/browser/window/tab/page/meta.rs diff --git a/src/app/browser/wrapper/tab/page/navigation.rs b/src/app/browser/window/tab/page/navigation.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation.rs rename to src/app/browser/window/tab/page/navigation.rs diff --git a/src/app/browser/wrapper/tab/page/navigation/base.rs b/src/app/browser/window/tab/page/navigation/base.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation/base.rs rename to src/app/browser/window/tab/page/navigation/base.rs diff --git a/src/app/browser/wrapper/tab/page/navigation/bookmark.rs b/src/app/browser/window/tab/page/navigation/bookmark.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation/bookmark.rs rename to src/app/browser/window/tab/page/navigation/bookmark.rs diff --git a/src/app/browser/wrapper/tab/page/navigation/history.rs b/src/app/browser/window/tab/page/navigation/history.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation/history.rs rename to src/app/browser/window/tab/page/navigation/history.rs diff --git a/src/app/browser/wrapper/tab/page/navigation/history/back.rs b/src/app/browser/window/tab/page/navigation/history/back.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation/history/back.rs rename to src/app/browser/window/tab/page/navigation/history/back.rs diff --git a/src/app/browser/wrapper/tab/page/navigation/history/forward.rs b/src/app/browser/window/tab/page/navigation/history/forward.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation/history/forward.rs rename to src/app/browser/window/tab/page/navigation/history/forward.rs diff --git a/src/app/browser/wrapper/tab/page/navigation/reload.rs b/src/app/browser/window/tab/page/navigation/reload.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation/reload.rs rename to src/app/browser/window/tab/page/navigation/reload.rs diff --git a/src/app/browser/wrapper/tab/page/navigation/request.rs b/src/app/browser/window/tab/page/navigation/request.rs similarity index 100% rename from src/app/browser/wrapper/tab/page/navigation/request.rs rename to src/app/browser/window/tab/page/navigation/request.rs