remove deprecated feature

This commit is contained in:
yggverse 2025-01-27 15:00:58 +02:00
parent 50158c2f64
commit ee8f7f69af
4 changed files with 3 additions and 25 deletions

View File

@ -10,19 +10,13 @@ use crate::Profile;
use action::Action;
use adw::TabView;
use client::Client;
use gtk::{
glib::{uuid_string_random, GString},
prelude::{ActionMapExt, Cast, EditableExt},
};
use gtk::prelude::{ActionMapExt, Cast, EditableExt};
use page::Page;
use sqlite::Transaction;
use std::rc::Rc;
use widget::Widget;
pub struct Item {
// Auto-generated unique item ID
// useful as widget name in GTK actions callback
pub id: Rc<GString>,
// Multi-protocol handler
pub client: Rc<Client>,
// Components
@ -52,9 +46,6 @@ impl Item {
bool,
),
) -> Self {
// Generate unique ID for new page components
let id = Rc::new(uuid_string_random());
// Init components
let action = Rc::new(Action::new());
@ -70,13 +61,11 @@ impl Item {
.add_action(&action.history.forward);
let page = Rc::new(Page::build(
&id,
profile,
(browser_action, window_action, tab_action, &action),
));
let widget = Rc::new(Widget::build(
id.as_str(),
tab_view,
&page.widget.g_box,
None,
@ -146,7 +135,6 @@ impl Item {
}
// Done
Self {
id,
client,
page,
widget,

View File

@ -15,12 +15,11 @@ use widget::Widget;
use super::{Action as ItemAction, BrowserAction, Profile, TabAction, WindowAction};
use gtk::{glib::GString, prelude::EditableExt};
use gtk::prelude::EditableExt;
use sqlite::Transaction;
use std::rc::Rc;
pub struct Page {
pub id: Rc<GString>,
pub profile: Rc<Profile>,
// Actions
pub browser_action: Rc<BrowserAction>,
@ -38,7 +37,6 @@ impl Page {
// Constructors
pub fn build(
id: &Rc<GString>,
profile: &Rc<Profile>,
(browser_action, window_action, tab_action, item_action): (
&Rc<BrowserAction>,
@ -60,7 +58,6 @@ impl Page {
let input = Rc::new(Input::new());
let widget = Rc::new(Widget::build(
id,
&navigation.widget.g_box,
&content.g_box,
&search.g_box,
@ -69,7 +66,6 @@ impl Page {
// Done
Self {
id: id.clone(),
profile: profile.clone(),
// Actions
browser_action: browser_action.clone(),

View File

@ -12,7 +12,6 @@ impl Widget {
/// Build new `Self`
pub fn build(
name: &str,
// Components
navigation: &impl IsA<gtk::Widget>,
content: &impl IsA<gtk::Widget>,
@ -20,10 +19,7 @@ impl Widget {
input: &impl IsA<gtk::Widget>,
) -> Self {
// Init self
let g_box = Box::builder()
.orientation(Orientation::Vertical)
.name(name)
.build();
let g_box = Box::builder().orientation(Orientation::Vertical).build();
g_box.append(navigation);
g_box.append(content);

View File

@ -16,7 +16,6 @@ impl Widget {
/// Build new `Self`
pub fn build(
keyword: &str, // ID
tab_view: &TabView,
child: &impl IsA<gtk::Widget>,
title: Option<&str>,
@ -38,7 +37,6 @@ impl Widget {
// Setup
tab_page.set_needs_attention(is_attention);
tab_page.set_keyword(keyword);
tab_page.set_title(match title {
Some(value) => value,
None => DEFAULT_TITLE,