rename identity type from default to common

This commit is contained in:
yggverse 2025-01-29 19:28:42 +02:00
parent 873e642b10
commit a6d84908cc
23 changed files with 8 additions and 8 deletions

View file

@ -247,7 +247,7 @@ impl Request for Entry {
fn identity(&self, profile: &Rc<Profile>) { fn identity(&self, profile: &Rc<Profile>) {
if let Some(uri) = self.uri() { if let Some(uri) = self.uri() {
if ["gemini", "titan"].contains(&uri.scheme().as_str()) { if ["gemini", "titan"].contains(&uri.scheme().as_str()) {
return identity::default( return identity::common(
profile, profile,
&uri, &uri,
&Rc::new({ &Rc::new({

View file

@ -1,8 +1,8 @@
mod default; mod common;
mod unsupported; mod unsupported;
use adw::AlertDialog; use adw::AlertDialog;
use default::Default; use common::Common;
use unsupported::Unsupported; use unsupported::Unsupported;
use super::Profile; use super::Profile;
@ -10,12 +10,12 @@ use gtk::glib::Uri;
use std::rc::Rc; use std::rc::Rc;
/// Create new identity widget for Gemini protocol match given URI /// Create new identity widget for Gemini protocol match given URI
pub fn default( pub fn common(
profile: &Rc<Profile>, profile: &Rc<Profile>,
request: &Uri, request: &Uri,
callback: &Rc<impl Fn(bool) + 'static>, callback: &Rc<impl Fn(bool) + 'static>,
) -> Default { ) -> Common {
Default::build(profile, request, callback) Common::build(profile, request, callback)
} }
/// Create new identity widget for unknown request /// Create new identity widget for unknown request

View file

@ -5,12 +5,12 @@ use super::Profile;
use gtk::{glib::Uri, prelude::IsA}; use gtk::{glib::Uri, prelude::IsA};
use std::rc::Rc; use std::rc::Rc;
pub struct Default { pub struct Common {
// profile: Rc<Profile>, // profile: Rc<Profile>,
widget: Rc<Widget>, widget: Rc<Widget>,
} }
impl Default { impl Common {
// Construct // Construct
/// Create new `Self` for given `Profile` /// Create new `Self` for given `Profile`