implement Default traits

This commit is contained in:
yggverse 2025-01-12 14:08:30 +02:00
parent 1a0b31e695
commit 9b214b1469
55 changed files with 330 additions and 0 deletions

View File

@ -5,6 +5,12 @@ pub struct About {
gobject: AboutDialog, gobject: AboutDialog,
} }
impl Default for About {
fn default() -> Self {
Self::new()
}
}
impl About { impl About {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -33,6 +33,12 @@ pub struct Action {
pub simple_action_group: SimpleActionGroup, pub simple_action_group: SimpleActionGroup,
} }
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action { impl Action {
// Constructors // Constructors

View File

@ -5,6 +5,12 @@ pub struct About {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for About {
fn default() -> Self {
Self::new()
}
}
impl About { impl About {
// Constructors // Constructors

View File

@ -5,6 +5,12 @@ pub struct Close {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Close {
fn default() -> Self {
Self::new()
}
}
impl Close { impl Close {
// Constructors // Constructors

View File

@ -5,6 +5,12 @@ pub struct Debug {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Debug {
fn default() -> Self {
Self::new()
}
}
impl Debug { impl Debug {
// Constructors // Constructors

View File

@ -9,6 +9,12 @@ pub struct Escape {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Escape {
fn default() -> Self {
Self::new()
}
}
impl Escape { impl Escape {
// Constructors // Constructors

View File

@ -5,6 +5,12 @@ pub struct Profile {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Profile {
fn default() -> Self {
Self::new()
}
}
impl Profile { impl Profile {
// Constructors // Constructors

View File

@ -9,6 +9,12 @@ pub struct Update {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Update {
fn default() -> Self {
Self::new()
}
}
impl Update { impl Update {
// Constructors // Constructors

View File

@ -56,6 +56,12 @@ pub struct Action {
pub simple_action_group: SimpleActionGroup, pub simple_action_group: SimpleActionGroup,
} }
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action { impl Action {
// Constructors // Constructors

View File

@ -40,6 +40,12 @@ pub struct Append {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Append {
fn default() -> Self {
Self::new()
}
}
impl Append { impl Append {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Bookmark {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Bookmark {
fn default() -> Self {
Self::new()
}
}
impl Bookmark { impl Bookmark {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Close {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Close {
fn default() -> Self {
Self::new()
}
}
impl Close { impl Close {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct CloseAll {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for CloseAll {
fn default() -> Self {
Self::new()
}
}
impl CloseAll { impl CloseAll {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Find {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Find {
fn default() -> Self {
Self::new()
}
}
impl Find { impl Find {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct HistoryBack {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for HistoryBack {
fn default() -> Self {
Self::new()
}
}
impl HistoryBack { impl HistoryBack {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct HistoryForward {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for HistoryForward {
fn default() -> Self {
Self::new()
}
}
impl HistoryForward { impl HistoryForward {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Home {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Home {
fn default() -> Self {
Self::new()
}
}
impl Home { impl Home {
// Constructors // Constructors

View File

@ -11,6 +11,12 @@ pub struct Open {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Open {
fn default() -> Self {
Self::new()
}
}
impl Open { impl Open {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Pin {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Pin {
fn default() -> Self {
Self::new()
}
}
impl Pin { impl Pin {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Reload {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Reload {
fn default() -> Self {
Self::new()
}
}
impl Reload { impl Reload {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct SaveAs {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for SaveAs {
fn default() -> Self {
Self::new()
}
}
impl SaveAs { impl SaveAs {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Source {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Source {
fn default() -> Self {
Self::new()
}
}
impl Source { impl Source {
// Constructors // Constructors

View File

@ -6,6 +6,12 @@ pub struct Control {
pub window_controls: WindowControls, pub window_controls: WindowControls,
} }
impl Default for Control {
fn default() -> Self {
Self::new()
}
}
impl Control { impl Control {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -12,6 +12,12 @@ pub struct Action {
pub load: Rc<Load>, pub load: Rc<Load>,
} }
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action { impl Action {
// Constructors // Constructors

View File

@ -5,6 +5,12 @@ pub struct Ident {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Ident {
fn default() -> Self {
Self::new()
}
}
impl Ident { impl Ident {
// Constructors // Constructors

View File

@ -9,6 +9,12 @@ pub struct Load {
pub simple_action: SimpleAction, pub simple_action: SimpleAction,
} }
impl Default for Load {
fn default() -> Self {
Self::new()
}
}
impl Load { impl Load {
// Constructors // Constructors

View File

@ -8,6 +8,12 @@ pub struct Action {
pub update: Rc<Update>, pub update: Rc<Update>,
} }
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action { impl Action {
// Constructors // Constructors

View File

@ -5,6 +5,12 @@ pub struct Update {
pub gobject: SimpleAction, pub gobject: SimpleAction,
} }
impl Default for Update {
fn default() -> Self {
Self::new()
}
}
impl Update { impl Update {
// Constructors // Constructors

View File

@ -8,6 +8,12 @@ pub struct Unsupported {
widget: Rc<Widget>, widget: Rc<Widget>,
} }
impl Default for Unsupported {
fn default() -> Self {
Self::new()
}
}
impl Unsupported { impl Unsupported {
// Construct // Construct

View File

@ -12,6 +12,12 @@ pub struct Widget {
gobject: AlertDialog, gobject: AlertDialog,
} }
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget { impl Widget {
// Constructors // Constructors

View File

@ -15,6 +15,12 @@ pub struct Client {
// other clients.. // other clients..
} }
impl Default for Client {
fn default() -> Self {
Self::new()
}
}
impl Client { impl Client {
// Constructors // Constructors

View File

@ -15,6 +15,12 @@ pub struct Action {
pub update: Rc<Update>, pub update: Rc<Update>,
} }
impl Default for Action {
fn default() -> Self {
Self::new()
}
}
impl Action { impl Action {
// Constructors // Constructors

View File

@ -11,6 +11,12 @@ pub struct Cancel {
pub action: SimpleAction, pub action: SimpleAction,
} }
impl Default for Cancel {
fn default() -> Self {
Self::new()
}
}
impl Cancel { impl Cancel {
// Constructors // Constructors

View File

@ -11,6 +11,12 @@ pub struct Complete {
pub action: SimpleAction, pub action: SimpleAction,
} }
impl Default for Complete {
fn default() -> Self {
Self::new()
}
}
impl Complete { impl Complete {
// Constructors // Constructors

View File

@ -11,6 +11,12 @@ pub struct Update {
pub action: SimpleAction, pub action: SimpleAction,
} }
impl Default for Update {
fn default() -> Self {
Self::new()
}
}
impl Update { impl Update {
// Constructors // Constructors

View File

@ -11,6 +11,12 @@ pub struct Cancel {
pub button: Button, pub button: Button,
} }
impl Default for Cancel {
fn default() -> Self {
Self::new()
}
}
impl Cancel { impl Cancel {
// Constructors // Constructors

View File

@ -11,6 +11,12 @@ pub struct Open {
pub button: Button, pub button: Button,
} }
impl Default for Open {
fn default() -> Self {
Self::new()
}
}
impl Open { impl Open {
// Constructors // Constructors

View File

@ -9,6 +9,12 @@ pub struct Progress {
pub spinner: Spinner, pub spinner: Spinner,
} }
impl Default for Progress {
fn default() -> Self {
Self::new()
}
}
impl Progress { impl Progress {
// Constructors // Constructors

View File

@ -14,6 +14,12 @@ pub struct Status {
pub label: Label, pub label: Label,
} }
impl Default for Status {
fn default() -> Self {
Self::new()
}
}
impl Status { impl Status {
// Constructors // Constructors

View File

@ -6,6 +6,12 @@ pub struct Tag {
pub text_tag: TextTag, pub text_tag: TextTag,
} }
impl Default for Tag {
fn default() -> Self {
Self::new()
}
}
impl Tag { impl Tag {
// Constructors // Constructors

View File

@ -35,6 +35,12 @@ pub struct Syntax {
theme_set: ThemeSet, theme_set: ThemeSet,
} }
impl Default for Syntax {
fn default() -> Self {
Self::new()
}
}
impl Syntax { impl Syntax {
// Constructors // Constructors

View File

@ -6,6 +6,12 @@ pub struct Tag {
pub text_tag: TextTag, pub text_tag: TextTag,
} }
impl Default for Tag {
fn default() -> Self {
Self::new()
}
}
impl Tag { impl Tag {
// Constructors // Constructors

View File

@ -20,6 +20,12 @@ pub struct Tag {
pub plain: TextTag, pub plain: TextTag,
} }
impl Default for Tag {
fn default() -> Self {
Self::new()
}
}
impl Tag { impl Tag {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -4,6 +4,12 @@ pub struct Reader {
widget: Label, widget: Label,
} }
impl Default for Reader {
fn default() -> Self {
Self::new()
}
}
impl Reader { impl Reader {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -14,6 +14,12 @@ pub struct Input {
pub widget: Rc<Widget>, pub widget: Rc<Widget>,
} }
impl Default for Input {
fn default() -> Self {
Self::new()
}
}
impl Input { impl Input {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -8,6 +8,12 @@ pub struct Counter {
pub widget: Rc<Widget>, pub widget: Rc<Widget>,
} }
impl Default for Counter {
fn default() -> Self {
Self::new()
}
}
impl Counter { impl Counter {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -4,6 +4,12 @@ pub struct Widget {
pub label: Label, pub label: Label,
} }
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget { impl Widget {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -7,6 +7,12 @@ pub struct Widget {
pub clamp: Clamp, pub clamp: Clamp,
} }
impl Default for Widget {
fn default() -> Self {
Self::new()
}
}
impl Widget { impl Widget {
// Construct // Construct
pub fn new() -> Self { pub fn new() -> Self {

View File

@ -20,6 +20,12 @@ pub struct Search {
pub g_box: Box, pub g_box: Box,
} }
impl Default for Search {
fn default() -> Self {
Self::new()
}
}
impl Search { impl Search {
// Constructors // Constructors

View File

@ -10,6 +10,12 @@ pub struct Input {
pub entry: Entry, pub entry: Entry,
} }
impl Default for Input {
fn default() -> Self {
Self::new()
}
}
impl Input { impl Input {
// Constructors // Constructors

View File

@ -22,6 +22,12 @@ pub struct Navigation {
model: RefCell<Model<(TextIter, TextIter)>>, model: RefCell<Model<(TextIter, TextIter)>>,
} }
impl Default for Navigation {
fn default() -> Self {
Self::new()
}
}
impl Navigation { impl Navigation {
// Constructors // Constructors

View File

@ -4,6 +4,12 @@ pub struct Back {
pub button: Button, pub button: Button,
} }
impl Default for Back {
fn default() -> Self {
Self::new()
}
}
impl Back { impl Back {
// Constructors // Constructors

View File

@ -4,6 +4,12 @@ pub struct Forward {
pub button: Button, pub button: Button,
} }
impl Default for Forward {
fn default() -> Self {
Self::new()
}
}
impl Forward { impl Forward {
// Constructors // Constructors

View File

@ -6,6 +6,12 @@ pub struct Result {
pub label: Label, pub label: Label,
} }
impl Default for Result {
fn default() -> Self {
Self::new()
}
}
impl Result { impl Result {
// Constructors // Constructors

View File

@ -6,6 +6,12 @@ pub struct Placeholder {
pub label: Label, pub label: Label,
} }
impl Default for Placeholder {
fn default() -> Self {
Self::new()
}
}
impl Placeholder { impl Placeholder {
// Constructors // Constructors