mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
drop Arc from SimpleAction #1
This commit is contained in:
parent
08ad677ba4
commit
920721412e
40 changed files with 162 additions and 175 deletions
|
|
@ -24,14 +24,14 @@ pub struct Response {
|
|||
impl Response {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
action_page_open: Arc<SimpleAction>,
|
||||
action_page_open: SimpleAction,
|
||||
base: Uri,
|
||||
title: Option<&str>,
|
||||
size_limit: Option<usize>,
|
||||
) -> Arc<Self> {
|
||||
// Init local actions
|
||||
let action_update = Arc::new(SimpleAction::new(&uuid_string_random(), None));
|
||||
let action_send = Arc::new(SimpleAction::new(&uuid_string_random(), None));
|
||||
let action_update = SimpleAction::new(&uuid_string_random(), None);
|
||||
let action_send = SimpleAction::new(&uuid_string_random(), None);
|
||||
|
||||
// Init components
|
||||
let control = Control::new_arc(action_send.clone());
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ pub struct Control {
|
|||
|
||||
impl Control {
|
||||
// Construct
|
||||
pub fn new_arc(action_send: Arc<SimpleAction>) -> Arc<Self> {
|
||||
pub fn new_arc(action_send: SimpleAction) -> Arc<Self> {
|
||||
// Init components
|
||||
let counter = Counter::new_arc();
|
||||
let send = Send::new_arc(action_send);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pub struct Send {
|
|||
|
||||
impl Send {
|
||||
// Construct
|
||||
pub fn new_arc(action_send: Arc<SimpleAction>) -> Arc<Self> {
|
||||
pub fn new_arc(action_send: SimpleAction) -> Arc<Self> {
|
||||
// Init widget
|
||||
let widget = Widget::new_arc(action_send);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pub struct Widget {
|
|||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc(action_send: Arc<SimpleAction>) -> Arc<Self> {
|
||||
pub fn new_arc(action_send: SimpleAction) -> Arc<Self> {
|
||||
// Init gobject
|
||||
let gobject = Button::builder()
|
||||
//.css_classes(["accent"])
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pub struct Form {
|
|||
|
||||
impl Form {
|
||||
// Construct
|
||||
pub fn new_arc(action_update: Arc<SimpleAction>) -> Arc<Self> {
|
||||
pub fn new_arc(action_update: SimpleAction) -> Arc<Self> {
|
||||
// Init widget
|
||||
let widget = Widget::new_arc(action_update);
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub struct Widget {
|
|||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc(action_update: Arc<SimpleAction>) -> Arc<Self> {
|
||||
pub fn new_arc(action_update: SimpleAction) -> Arc<Self> {
|
||||
// Init gobject
|
||||
let gobject = TextView::builder()
|
||||
.bottom_margin(MARGIN)
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@ pub struct Sensitive {
|
|||
impl Sensitive {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
action_page_open: Arc<SimpleAction>,
|
||||
action_page_open: SimpleAction,
|
||||
base: Uri,
|
||||
title: Option<&str>,
|
||||
max_length: Option<i32>,
|
||||
) -> Arc<Self> {
|
||||
// Init local actions
|
||||
let action_send = Arc::new(SimpleAction::new(&uuid_string_random(), None));
|
||||
let action_send = SimpleAction::new(&uuid_string_random(), None);
|
||||
|
||||
// Init components
|
||||
let form = Form::new_arc(
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ pub struct Form {
|
|||
impl Form {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
action_send: Arc<SimpleAction>,
|
||||
action_send: SimpleAction,
|
||||
title: Option<&str>,
|
||||
max_length: Option<i32>,
|
||||
) -> Arc<Self> {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ pub struct Widget {
|
|||
impl Widget {
|
||||
// Construct
|
||||
pub fn new_arc(
|
||||
action_send: Arc<SimpleAction>,
|
||||
action_send: SimpleAction,
|
||||
title: Option<&str>,
|
||||
max_length: Option<i32>,
|
||||
) -> Arc<Self> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue