From 3e6f95833d83c13643a715e4f09ea6a1a9f3e34e Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 16 Nov 2024 14:52:37 +0200 Subject: [PATCH] rename identity widget --- .../browser/window/tab/item/page/navigation.rs | 18 +++++++++--------- .../page/navigation/{auth.rs => identity.rs} | 6 +++--- .../navigation/{auth => identity}/widget.rs | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) rename src/app/browser/window/tab/item/page/navigation/{auth.rs => identity.rs} (83%) rename src/app/browser/window/tab/item/page/navigation/{auth => identity}/widget.rs (95%) diff --git a/src/app/browser/window/tab/item/page/navigation.rs b/src/app/browser/window/tab/item/page/navigation.rs index 210d0a82..1dd08805 100644 --- a/src/app/browser/window/tab/item/page/navigation.rs +++ b/src/app/browser/window/tab/item/page/navigation.rs @@ -1,16 +1,16 @@ -mod auth; mod bookmark; mod database; mod history; mod home; +mod identity; mod reload; mod request; mod widget; -use auth::Auth; use bookmark::Bookmark; use history::History; use home::Home; +use identity::Identity; use reload::Reload; use request::Request; use widget::Widget; @@ -24,11 +24,11 @@ use sqlite::Transaction; use std::rc::Rc; pub struct Navigation { - auth: Rc, - profile: Rc, bookmark: Rc, history: Rc, home: Rc, + identity: Rc, + profile: Rc, reload: Rc, request: Rc, widget: Rc, @@ -40,7 +40,7 @@ impl Navigation { action: (Rc, Rc, Rc), ) -> Self { // Init components - let auth = Rc::new(Auth::new(action.2.clone())); + let identity = Rc::new(Identity::new(action.2.clone())); let home = Rc::new(Home::new(action.1.clone())); let history = Rc::new(History::new(action.1.clone())); let reload = Rc::new(Reload::new(action.1.clone())); @@ -49,7 +49,7 @@ impl Navigation { // Init widget let widget = Rc::new(Widget::new( - auth.widget().gobject(), + identity.widget().gobject(), home.widget().gobject(), history.widget().gobject(), reload.widget().gobject(), @@ -59,11 +59,11 @@ impl Navigation { // Done Self { - auth, - profile, bookmark, history, home, + identity, + profile, reload, request, widget, @@ -75,7 +75,7 @@ impl Navigation { pub fn update(&self, progress_fraction: Option) { let request = self.request.widget().gobject().text(); - self.auth.update(); + self.identity.update(); self.bookmark .update(self.profile.bookmark.get(&request).is_ok()); self.history.update(); diff --git a/src/app/browser/window/tab/item/page/navigation/auth.rs b/src/app/browser/window/tab/item/page/navigation/identity.rs similarity index 83% rename from src/app/browser/window/tab/item/page/navigation/auth.rs rename to src/app/browser/window/tab/item/page/navigation/identity.rs index 2d84fd37..b56cdbc1 100644 --- a/src/app/browser/window/tab/item/page/navigation/auth.rs +++ b/src/app/browser/window/tab/item/page/navigation/identity.rs @@ -4,11 +4,11 @@ use widget::Widget; use crate::app::browser::window::tab::item::Action; use std::rc::Rc; -pub struct Auth { +pub struct Identity { widget: Rc, } -impl Auth { +impl Identity { // Construct pub fn new(action: Rc) -> Self { Self { @@ -18,7 +18,7 @@ impl Auth { // Actions pub fn update(&self) { - // @TODO + self.widget.update(false) // @TODO } // Getters diff --git a/src/app/browser/window/tab/item/page/navigation/auth/widget.rs b/src/app/browser/window/tab/item/page/navigation/identity/widget.rs similarity index 95% rename from src/app/browser/window/tab/item/page/navigation/auth/widget.rs rename to src/app/browser/window/tab/item/page/navigation/identity/widget.rs index 225ea59b..424d1f25 100644 --- a/src/app/browser/window/tab/item/page/navigation/auth/widget.rs +++ b/src/app/browser/window/tab/item/page/navigation/identity/widget.rs @@ -15,7 +15,7 @@ impl Widget { // Init gobject let gobject = Button::builder() .icon_name("avatar-default-symbolic") - .tooltip_text("Auth") + .tooltip_text("Identity") .sensitive(false) .build();