remove direct memory access

This commit is contained in:
yggverse 2025-03-14 12:51:33 +02:00
parent 33369e31ea
commit 19a07cdf1d
32 changed files with 112 additions and 111 deletions

View file

@ -3,18 +3,18 @@ use gtk::{
prelude::{ActionExt, ButtonExt, EditableExt, WidgetExt},
Button, Entry,
};
use std::rc::Rc;
use std::{rc::Rc, sync::Arc};
const ICON_NAME: (&str, &str) = ("non-starred-symbolic", "starred-symbolic");
const TOOLTIP_TEXT: (&str, &str) = ("Add Bookmark", "Remove Bookmark");
pub trait Bookmark {
fn bookmark(action: &Rc<WindowAction>, profile: &Rc<Profile>, request: &Entry) -> Self;
fn bookmark(action: &Rc<WindowAction>, profile: &Arc<Profile>, request: &Entry) -> Self;
fn update(&self, profile: &Profile, request: &Entry);
}
impl Bookmark for Button {
fn bookmark(action: &Rc<WindowAction>, profile: &Rc<Profile>, request: &Entry) -> Self {
fn bookmark(action: &Rc<WindowAction>, profile: &Arc<Profile>, request: &Entry) -> Self {
let button = Button::builder()
.action_name(format!(
"{}.{}",