From 084f1e85fac47bf28372ae3d73be989e832e5b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Jan 2020 10:47:47 +0200 Subject: [PATCH 1/4] Update gir --- gir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gir b/gir index 833527295413..83cc9addf972 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 83352729541344ad17d2bc6307335fc8b5890151 +Subproject commit 83cc9addf972e5f413a02b5e5352f6b6d53b0eaa From 9c52f620259882b7b2bcb0c6b842a56caef956c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Jan 2020 10:49:24 +0200 Subject: [PATCH 2/4] Regenerate with latest gir --- src/auto/about_dialog.rs | 76 +-- src/auto/accel_label.rs | 39 +- src/auto/action_bar.rs | 36 +- src/auto/app_chooser_button.rs | 39 +- src/auto/app_chooser_dialog.rs | 63 +- src/auto/app_chooser_widget.rs | 42 +- src/auto/application_window.rs | 60 +- src/auto/aspect_frame.rs | 43 +- src/auto/assistant.rs | 60 +- src/auto/bin.rs | 35 +- src/auto/box_.rs | 39 +- src/auto/button.rs | 40 +- src/auto/calendar.rs | 45 +- src/auto/cell_area.rs | 3 +- src/auto/cell_area_box.rs | 7 +- src/auto/cell_view.rs | 41 +- src/auto/center_box.rs | 37 +- src/auto/check_button.rs | 43 +- src/auto/check_menu_item.rs | 43 +- src/auto/color_button.rs | 39 +- src/auto/color_chooser_dialog.rs | 63 +- src/auto/color_chooser_widget.rs | 42 +- src/auto/combo_box.rs | 45 +- src/auto/combo_box_text.rs | 45 +- src/auto/constants.rs | 963 +++++++++++++------------------ src/auto/container.rs | 35 +- src/auto/dialog.rs | 60 +- src/auto/drawing_area.rs | 37 +- src/auto/entry.rs | 76 +-- src/auto/entry_completion.rs | 13 +- src/auto/expander.rs | 41 +- src/auto/file_chooser_button.rs | 49 +- src/auto/file_chooser_dialog.rs | 71 +-- src/auto/file_chooser_widget.rs | 47 +- src/auto/fixed.rs | 35 +- src/auto/flow_box.rs | 44 +- src/auto/flow_box_child.rs | 35 +- src/auto/font_button.rs | 44 +- src/auto/font_chooser_dialog.rs | 66 +-- src/auto/font_chooser_widget.rs | 41 +- src/auto/frame.rs | 39 +- src/auto/gl_area.rs | 39 +- src/auto/grid.rs | 41 +- src/auto/header_bar.rs | 43 +- src/auto/image.rs | 43 +- src/auto/info_bar.rs | 42 +- src/auto/label.rs | 53 +- src/auto/level_bar.rs | 41 +- src/auto/link_button.rs | 42 +- src/auto/list_box.rs | 39 +- src/auto/list_box_row.rs | 38 +- src/auto/lock_button.rs | 46 +- src/auto/media_controls.rs | 36 +- src/auto/menu.rs | 46 +- src/auto/menu_bar.rs | 36 +- src/auto/menu_button.rs | 47 +- src/auto/menu_item.rs | 40 +- src/auto/menu_shell.rs | 36 +- src/auto/menu_tool_button.rs | 47 +- src/auto/message_dialog.rs | 66 +-- src/auto/model_button.rs | 49 +- src/auto/notebook.rs | 42 +- src/auto/overlay.rs | 35 +- src/auto/paned.rs | 43 +- src/auto/password_entry.rs | 43 +- src/auto/picture.rs | 40 +- src/auto/popover.rs | 41 +- src/auto/popover_menu.rs | 42 +- src/auto/progress_bar.rs | 42 +- src/auto/radio_button.rs | 44 +- src/auto/radio_menu_item.rs | 44 +- src/auto/radio_tool_button.rs | 48 +- src/auto/range.rs | 42 +- src/auto/revealer.rs | 38 +- src/auto/scale.rs | 46 +- src/auto/scale_button.rs | 44 +- src/auto/scrollbar.rs | 37 +- src/auto/scrolled_window.rs | 49 +- src/auto/search_bar.rs | 37 +- src/auto/search_entry.rs | 42 +- src/auto/separator.rs | 36 +- src/auto/separator_menu_item.rs | 40 +- src/auto/separator_tool_item.rs | 41 +- src/auto/shortcut_label.rs | 41 +- src/auto/shortcuts_group.rs | 43 +- src/auto/shortcuts_section.rs | 43 +- src/auto/shortcuts_shortcut.rs | 46 +- src/auto/shortcuts_window.rs | 61 +- src/auto/size_group.rs | 3 +- src/auto/spin_button.rs | 49 +- src/auto/spinner.rs | 36 +- src/auto/stack.rs | 43 +- src/auto/stack_sidebar.rs | 36 +- src/auto/stack_switcher.rs | 40 +- src/auto/statusbar.rs | 35 +- src/auto/switch.rs | 38 +- src/auto/text.rs | 57 +- src/auto/text_view.rs | 60 +- src/auto/toggle_button.rs | 41 +- src/auto/toggle_tool_button.rs | 47 +- src/auto/tool_button.rs | 46 +- src/auto/tool_item.rs | 40 +- src/auto/toolbar.rs | 38 +- src/auto/tree_view.rs | 56 +- src/auto/tree_view_column.rs | 21 +- src/auto/versions.txt | 2 +- src/auto/video.rs | 39 +- src/auto/viewport.rs | 40 +- src/auto/volume_button.rs | 45 +- src/auto/window.rs | 59 +- 110 files changed, 632 insertions(+), 4980 deletions(-) diff --git a/src/auto/about_dialog.rs b/src/auto/about_dialog.rs index a03ec5abf51a..08cd124cae18 100644 --- a/src/auto/about_dialog.rs +++ b/src/auto/about_dialog.rs @@ -53,6 +53,7 @@ impl Default for AboutDialog { } } +#[derive(Clone, Default)] pub struct AboutDialogBuilder { artists: Option>, authors: Option>, @@ -130,80 +131,7 @@ pub struct AboutDialogBuilder { impl AboutDialogBuilder { pub fn new() -> Self { - Self { - artists: None, - authors: None, - comments: None, - copyright: None, - documenters: None, - license: None, - license_type: None, - logo: None, - logo_icon_name: None, - program_name: None, - system_information: None, - translator_credits: None, - version: None, - website: None, - website_label: None, - wrap_license: None, - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - } + Self::default() } pub fn build(self) -> AboutDialog { diff --git a/src/auto/accel_label.rs b/src/auto/accel_label.rs index 54af9139da71..720ea0ec2a8e 100644 --- a/src/auto/accel_label.rs +++ b/src/auto/accel_label.rs @@ -44,6 +44,7 @@ impl AccelLabel { } } +#[derive(Clone, Default)] pub struct AccelLabelBuilder { accel_closure: Option, accel_widget: Option, @@ -84,43 +85,7 @@ pub struct AccelLabelBuilder { impl AccelLabelBuilder { pub fn new() -> Self { - Self { - accel_closure: None, - accel_widget: None, - label: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> AccelLabel { diff --git a/src/auto/action_bar.rs b/src/auto/action_bar.rs index 6a40128bb2e5..95c6b61cf8d4 100644 --- a/src/auto/action_bar.rs +++ b/src/auto/action_bar.rs @@ -43,6 +43,7 @@ impl Default for ActionBar { } } +#[derive(Clone, Default)] pub struct ActionBarBuilder { revealed: Option, can_focus: Option, @@ -80,40 +81,7 @@ pub struct ActionBarBuilder { impl ActionBarBuilder { pub fn new() -> Self { - Self { - revealed: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> ActionBar { diff --git a/src/auto/app_chooser_button.rs b/src/auto/app_chooser_button.rs index b6dde8480c81..ae458a49ebe4 100644 --- a/src/auto/app_chooser_button.rs +++ b/src/auto/app_chooser_button.rs @@ -45,6 +45,7 @@ impl AppChooserButton { } } +#[derive(Clone, Default)] pub struct AppChooserButtonBuilder { heading: Option, show_default_item: Option, @@ -85,43 +86,7 @@ pub struct AppChooserButtonBuilder { impl AppChooserButtonBuilder { pub fn new() -> Self { - Self { - heading: None, - show_default_item: None, - show_dialog_item: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - content_type: None, - } + Self::default() } pub fn build(self) -> AppChooserButton { diff --git a/src/auto/app_chooser_dialog.rs b/src/auto/app_chooser_dialog.rs index b6da995344c9..efc2d1e70d85 100644 --- a/src/auto/app_chooser_dialog.rs +++ b/src/auto/app_chooser_dialog.rs @@ -77,6 +77,7 @@ impl AppChooserDialog { } } +#[derive(Clone, Default)] pub struct AppChooserDialogBuilder { gfile: Option, heading: Option, @@ -141,67 +142,7 @@ pub struct AppChooserDialogBuilder { impl AppChooserDialogBuilder { pub fn new() -> Self { - Self { - gfile: None, - heading: None, - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - content_type: None, - } + Self::default() } pub fn build(self) -> AppChooserDialog { diff --git a/src/auto/app_chooser_widget.rs b/src/auto/app_chooser_widget.rs index ace2b4fbfff1..78bc462b7720 100644 --- a/src/auto/app_chooser_widget.rs +++ b/src/auto/app_chooser_widget.rs @@ -46,6 +46,7 @@ impl AppChooserWidget { } } +#[derive(Clone, Default)] pub struct AppChooserWidgetBuilder { default_text: Option, show_all: Option, @@ -89,46 +90,7 @@ pub struct AppChooserWidgetBuilder { impl AppChooserWidgetBuilder { pub fn new() -> Self { - Self { - default_text: None, - show_all: None, - show_default: None, - show_fallback: None, - show_other: None, - show_recommended: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - content_type: None, - } + Self::default() } pub fn build(self) -> AppChooserWidget { diff --git a/src/auto/application_window.rs b/src/auto/application_window.rs index 75c927911c5a..129f8be01330 100644 --- a/src/auto/application_window.rs +++ b/src/auto/application_window.rs @@ -50,6 +50,7 @@ impl ApplicationWindow { } } +#[derive(Clone, Default)] pub struct ApplicationWindowBuilder { show_menubar: Option, accept_focus: Option, @@ -111,64 +112,7 @@ pub struct ApplicationWindowBuilder { impl ApplicationWindowBuilder { pub fn new() -> Self { - Self { - show_menubar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - } + Self::default() } pub fn build(self) -> ApplicationWindow { diff --git a/src/auto/aspect_frame.rs b/src/auto/aspect_frame.rs index 637e3afe8f1d..c3d106d2b66d 100644 --- a/src/auto/aspect_frame.rs +++ b/src/auto/aspect_frame.rs @@ -57,6 +57,7 @@ impl AspectFrame { } } +#[derive(Clone, Default)] pub struct AspectFrameBuilder { obey_child: Option, ratio: Option, @@ -101,47 +102,7 @@ pub struct AspectFrameBuilder { impl AspectFrameBuilder { pub fn new() -> Self { - Self { - obey_child: None, - ratio: None, - xalign: None, - yalign: None, - label: None, - label_widget: None, - label_xalign: None, - shadow_type: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> AspectFrame { diff --git a/src/auto/assistant.rs b/src/auto/assistant.rs index 0e6e89b0b9ce..d3109d0713a7 100644 --- a/src/auto/assistant.rs +++ b/src/auto/assistant.rs @@ -57,6 +57,7 @@ impl Default for Assistant { } } +#[derive(Clone, Default)] pub struct AssistantBuilder { use_header_bar: Option, accept_focus: Option, @@ -118,64 +119,7 @@ pub struct AssistantBuilder { impl AssistantBuilder { pub fn new() -> Self { - Self { - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - } + Self::default() } pub fn build(self) -> Assistant { diff --git a/src/auto/bin.rs b/src/auto/bin.rs index e7bf35c62953..b799b06f084c 100644 --- a/src/auto/bin.rs +++ b/src/auto/bin.rs @@ -25,6 +25,7 @@ glib_wrapper! { } } +#[derive(Clone, Default)] pub struct BinBuilder { can_focus: Option, can_target: Option, @@ -61,39 +62,7 @@ pub struct BinBuilder { impl BinBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Bin { diff --git a/src/auto/box_.rs b/src/auto/box_.rs index 4ed875ea6114..0e2133da99ef 100644 --- a/src/auto/box_.rs +++ b/src/auto/box_.rs @@ -43,6 +43,7 @@ impl Box { } } +#[derive(Clone, Default)] pub struct BoxBuilder { baseline_position: Option, homogeneous: Option, @@ -83,43 +84,7 @@ pub struct BoxBuilder { impl BoxBuilder { pub fn new() -> Self { - Self { - baseline_position: None, - homogeneous: None, - spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Box { diff --git a/src/auto/button.rs b/src/auto/button.rs index 58955c7b1807..9840aaa6423a 100644 --- a/src/auto/button.rs +++ b/src/auto/button.rs @@ -78,6 +78,7 @@ impl Default for Button { } } +#[derive(Clone, Default)] pub struct ButtonBuilder { icon_name: Option, label: Option, @@ -119,44 +120,7 @@ pub struct ButtonBuilder { impl ButtonBuilder { pub fn new() -> Self { - Self { - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> Button { diff --git a/src/auto/calendar.rs b/src/auto/calendar.rs index 6295ee2a4a11..2780f4224dc0 100644 --- a/src/auto/calendar.rs +++ b/src/auto/calendar.rs @@ -46,6 +46,7 @@ impl Default for Calendar { } } +#[derive(Clone, Default)] pub struct CalendarBuilder { day: Option, detail_height_rows: Option, @@ -92,49 +93,7 @@ pub struct CalendarBuilder { impl CalendarBuilder { pub fn new() -> Self { - Self { - day: None, - detail_height_rows: None, - detail_width_chars: None, - month: None, - no_month_change: None, - show_day_names: None, - show_details: None, - show_heading: None, - show_week_numbers: None, - year: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Calendar { diff --git a/src/auto/cell_area.rs b/src/auto/cell_area.rs index 0256fe1709ca..6d065b2f73d5 100644 --- a/src/auto/cell_area.rs +++ b/src/auto/cell_area.rs @@ -42,13 +42,14 @@ glib_wrapper! { } } +#[derive(Clone, Default)] pub struct CellAreaBuilder { focus_cell: Option, } impl CellAreaBuilder { pub fn new() -> Self { - Self { focus_cell: None } + Self::default() } pub fn build(self) -> CellArea { diff --git a/src/auto/cell_area_box.rs b/src/auto/cell_area_box.rs index 58edfff620f3..2ea5ec43b9e5 100644 --- a/src/auto/cell_area_box.rs +++ b/src/auto/cell_area_box.rs @@ -42,6 +42,7 @@ impl Default for CellAreaBox { } } +#[derive(Clone, Default)] pub struct CellAreaBoxBuilder { spacing: Option, focus_cell: Option, @@ -50,11 +51,7 @@ pub struct CellAreaBoxBuilder { impl CellAreaBoxBuilder { pub fn new() -> Self { - Self { - spacing: None, - focus_cell: None, - orientation: None, - } + Self::default() } pub fn build(self) -> CellAreaBox { diff --git a/src/auto/cell_view.rs b/src/auto/cell_view.rs index b65af7856f5b..95fc94125df7 100644 --- a/src/auto/cell_view.rs +++ b/src/auto/cell_view.rs @@ -93,6 +93,7 @@ impl Default for CellView { } } +#[derive(Clone, Default)] pub struct CellViewBuilder { cell_area: Option, cell_area_context: Option, @@ -135,45 +136,7 @@ pub struct CellViewBuilder { impl CellViewBuilder { pub fn new() -> Self { - Self { - cell_area: None, - cell_area_context: None, - draw_sensitive: None, - fit_model: None, - model: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> CellView { diff --git a/src/auto/center_box.rs b/src/auto/center_box.rs index 8a4ee7337a61..a264d60aa5fd 100644 --- a/src/auto/center_box.rs +++ b/src/auto/center_box.rs @@ -137,6 +137,7 @@ impl Default for CenterBox { } } +#[derive(Clone, Default)] pub struct CenterBoxBuilder { baseline_position: Option, can_focus: Option, @@ -175,41 +176,7 @@ pub struct CenterBoxBuilder { impl CenterBoxBuilder { pub fn new() -> Self { - Self { - baseline_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> CenterBox { diff --git a/src/auto/check_button.rs b/src/auto/check_button.rs index ab4ef7d70ea2..a33c735b1d2e 100644 --- a/src/auto/check_button.rs +++ b/src/auto/check_button.rs @@ -68,6 +68,7 @@ impl Default for CheckButton { } } +#[derive(Clone, Default)] pub struct CheckButtonBuilder { draw_indicator: Option, inconsistent: Option, @@ -112,47 +113,7 @@ pub struct CheckButtonBuilder { impl CheckButtonBuilder { pub fn new() -> Self { - Self { - draw_indicator: None, - inconsistent: None, - active: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> CheckButton { diff --git a/src/auto/check_menu_item.rs b/src/auto/check_menu_item.rs index 303aedb17d33..c275e8f8db93 100644 --- a/src/auto/check_menu_item.rs +++ b/src/auto/check_menu_item.rs @@ -67,6 +67,7 @@ impl Default for CheckMenuItem { } } +#[derive(Clone, Default)] pub struct CheckMenuItemBuilder { active: Option, draw_as_radio: Option, @@ -111,47 +112,7 @@ pub struct CheckMenuItemBuilder { impl CheckMenuItemBuilder { pub fn new() -> Self { - Self { - active: None, - draw_as_radio: None, - inconsistent: None, - accel_path: None, - label: None, - submenu: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> CheckMenuItem { diff --git a/src/auto/color_button.rs b/src/auto/color_button.rs index ec517e4458ed..a92a0512f06a 100644 --- a/src/auto/color_button.rs +++ b/src/auto/color_button.rs @@ -56,6 +56,7 @@ impl Default for ColorButton { } } +#[derive(Clone, Default)] pub struct ColorButtonBuilder { rgba: Option, show_editor: Option, @@ -96,43 +97,7 @@ pub struct ColorButtonBuilder { impl ColorButtonBuilder { pub fn new() -> Self { - Self { - rgba: None, - show_editor: None, - title: None, - use_alpha: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> ColorButton { diff --git a/src/auto/color_chooser_dialog.rs b/src/auto/color_chooser_dialog.rs index caeb47937ca8..cc674e756eca 100644 --- a/src/auto/color_chooser_dialog.rs +++ b/src/auto/color_chooser_dialog.rs @@ -53,6 +53,7 @@ impl ColorChooserDialog { } } +#[derive(Clone, Default)] pub struct ColorChooserDialogBuilder { show_editor: Option, use_header_bar: Option, @@ -117,67 +118,7 @@ pub struct ColorChooserDialogBuilder { impl ColorChooserDialogBuilder { pub fn new() -> Self { - Self { - show_editor: None, - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - rgba: None, - use_alpha: None, - } + Self::default() } pub fn build(self) -> ColorChooserDialog { diff --git a/src/auto/color_chooser_widget.rs b/src/auto/color_chooser_widget.rs index a063c5ce40ea..ab40b5bf1eeb 100644 --- a/src/auto/color_chooser_widget.rs +++ b/src/auto/color_chooser_widget.rs @@ -50,6 +50,7 @@ impl Default for ColorChooserWidget { } } +#[derive(Clone, Default)] pub struct ColorChooserWidgetBuilder { show_editor: Option, baseline_position: Option, @@ -93,46 +94,7 @@ pub struct ColorChooserWidgetBuilder { impl ColorChooserWidgetBuilder { pub fn new() -> Self { - Self { - show_editor: None, - baseline_position: None, - homogeneous: None, - spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - rgba: None, - use_alpha: None, - } + Self::default() } pub fn build(self) -> ColorChooserWidget { diff --git a/src/auto/combo_box.rs b/src/auto/combo_box.rs index 238f29ec7821..03d687b470df 100644 --- a/src/auto/combo_box.rs +++ b/src/auto/combo_box.rs @@ -82,6 +82,7 @@ impl Default for ComboBox { } } +#[derive(Clone, Default)] pub struct ComboBoxBuilder { active: Option, active_id: Option, @@ -128,49 +129,7 @@ pub struct ComboBoxBuilder { impl ComboBoxBuilder { pub fn new() -> Self { - Self { - active: None, - active_id: None, - button_sensitivity: None, - entry_text_column: None, - has_entry: None, - has_frame: None, - id_column: None, - model: None, - popup_fixed_width: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - editing_canceled: None, - } + Self::default() } pub fn build(self) -> ComboBox { diff --git a/src/auto/combo_box_text.rs b/src/auto/combo_box_text.rs index 76d5d8cf65c6..9e669b07a7c9 100644 --- a/src/auto/combo_box_text.rs +++ b/src/auto/combo_box_text.rs @@ -52,6 +52,7 @@ impl Default for ComboBoxText { } } +#[derive(Clone, Default)] pub struct ComboBoxTextBuilder { active: Option, active_id: Option, @@ -98,49 +99,7 @@ pub struct ComboBoxTextBuilder { impl ComboBoxTextBuilder { pub fn new() -> Self { - Self { - active: None, - active_id: None, - button_sensitivity: None, - entry_text_column: None, - has_entry: None, - has_frame: None, - id_column: None, - model: None, - popup_fixed_width: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - editing_canceled: None, - } + Self::default() } pub fn build(self) -> ComboBoxText { diff --git a/src/auto/constants.rs b/src/auto/constants.rs index 0e1ea1c05891..dc3edb0026bc 100644 --- a/src/auto/constants.rs +++ b/src/auto/constants.rs @@ -5,950 +5,817 @@ use gtk_sys; use std::ffi::CStr; -lazy_static! { - pub static ref IM_MODULE_EXTENSION_POINT_NAME: &'static str = unsafe { +pub static IM_MODULE_EXTENSION_POINT_NAME: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_IM_MODULE_EXTENSION_POINT_NAME) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref LEVEL_BAR_OFFSET_FULL: &'static str = unsafe { + }); +pub static LEVEL_BAR_OFFSET_FULL: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_LEVEL_BAR_OFFSET_FULL) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref LEVEL_BAR_OFFSET_HIGH: &'static str = unsafe { + }); +pub static LEVEL_BAR_OFFSET_HIGH: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_LEVEL_BAR_OFFSET_HIGH) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref LEVEL_BAR_OFFSET_LOW: &'static str = unsafe { + }); +pub static LEVEL_BAR_OFFSET_LOW: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_LEVEL_BAR_OFFSET_LOW) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref MEDIA_FILE_EXTENSION_POINT_NAME: &'static str = unsafe { + }); +pub static MEDIA_FILE_EXTENSION_POINT_NAME: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_MEDIA_FILE_EXTENSION_POINT_NAME) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PAPER_NAME_A3: &'static str = - unsafe { CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_A3).to_str().unwrap() }; -} -lazy_static! { - pub static ref PAPER_NAME_A4: &'static str = - unsafe { CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_A4).to_str().unwrap() }; -} -lazy_static! { - pub static ref PAPER_NAME_A5: &'static str = - unsafe { CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_A5).to_str().unwrap() }; -} -lazy_static! { - pub static ref PAPER_NAME_B5: &'static str = - unsafe { CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_B5).to_str().unwrap() }; -} -lazy_static! { - pub static ref PAPER_NAME_EXECUTIVE: &'static str = unsafe { + }); +pub static PAPER_NAME_A3: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { + CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_A3).to_str().unwrap() + }); +pub static PAPER_NAME_A4: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { + CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_A4).to_str().unwrap() + }); +pub static PAPER_NAME_A5: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { + CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_A5).to_str().unwrap() + }); +pub static PAPER_NAME_B5: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { + CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_B5).to_str().unwrap() + }); +pub static PAPER_NAME_EXECUTIVE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_EXECUTIVE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PAPER_NAME_LEGAL: &'static str = unsafe { + }); +pub static PAPER_NAME_LEGAL: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_LEGAL) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PAPER_NAME_LETTER: &'static str = unsafe { + }); +pub static PAPER_NAME_LETTER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PAPER_NAME_LETTER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_COLLATE: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_COLLATE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_COLLATE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_DEFAULT_SOURCE: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_DEFAULT_SOURCE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_DEFAULT_SOURCE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_DITHER: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_DITHER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_DITHER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_DUPLEX: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_DUPLEX: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_DUPLEX) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_FINISHINGS: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_FINISHINGS: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_FINISHINGS) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_MEDIA_TYPE: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_MEDIA_TYPE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_MEDIA_TYPE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_NUMBER_UP: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_NUMBER_UP: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_NUMBER_UP) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_NUMBER_UP_LAYOUT: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_NUMBER_UP_LAYOUT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_N_COPIES: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_N_COPIES: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_N_COPIES) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_ORIENTATION: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_ORIENTATION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_ORIENTATION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_OUTPUT_BASENAME: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_OUTPUT_BASENAME: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_OUTPUT_BASENAME) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_OUTPUT_BIN: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_OUTPUT_BIN: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_OUTPUT_BIN) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_OUTPUT_DIR: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_OUTPUT_DIR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_OUTPUT_DIR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_OUTPUT_FILE_FORMAT: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_OUTPUT_FILE_FORMAT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_OUTPUT_URI: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_OUTPUT_URI: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_OUTPUT_URI) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PAGE_RANGES: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PAGE_RANGES: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PAGE_RANGES) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PAGE_SET: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PAGE_SET: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PAGE_SET) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PAPER_FORMAT: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PAPER_FORMAT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PAPER_FORMAT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PAPER_HEIGHT: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PAPER_HEIGHT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PAPER_HEIGHT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PAPER_WIDTH: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PAPER_WIDTH: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PAPER_WIDTH) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PRINTER: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PRINTER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PRINTER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PRINTER_LPI: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PRINTER_LPI: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PRINTER_LPI) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_PRINT_PAGES: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_PRINT_PAGES: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_PRINT_PAGES) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_QUALITY: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_QUALITY: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_QUALITY) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_RESOLUTION: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_RESOLUTION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_RESOLUTION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_RESOLUTION_X: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_RESOLUTION_X: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_RESOLUTION_X) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_RESOLUTION_Y: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_RESOLUTION_Y: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_RESOLUTION_Y) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_REVERSE: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_REVERSE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_REVERSE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_SCALE: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_SCALE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_SCALE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_USE_COLOR: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_USE_COLOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_USE_COLOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_WIN32_DRIVER_EXTRA: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_WIN32_DRIVER_EXTRA: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_WIN32_DRIVER_EXTRA) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref PRINT_SETTINGS_WIN32_DRIVER_VERSION: &'static str = unsafe { + }); +pub static PRINT_SETTINGS_WIN32_DRIVER_VERSION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_PRINT_SETTINGS_WIN32_DRIVER_VERSION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_ACCELERATOR: &'static str = unsafe { + }); +pub static STYLE_CLASS_ACCELERATOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_ACCELERATOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_ARROW: &'static str = unsafe { + }); +pub static STYLE_CLASS_ARROW: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_ARROW) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_BACKGROUND: &'static str = unsafe { + }); +pub static STYLE_CLASS_BACKGROUND: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_BACKGROUND) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_BOTTOM: &'static str = unsafe { + }); +pub static STYLE_CLASS_BOTTOM: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_BOTTOM) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_BUTTON: &'static str = unsafe { + }); +pub static STYLE_CLASS_BUTTON: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_BUTTON) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_CALENDAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_CALENDAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_CALENDAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_CELL: &'static str = unsafe { + }); +pub static STYLE_CLASS_CELL: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_CELL) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_CHECK: &'static str = unsafe { + }); +pub static STYLE_CLASS_CHECK: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_CHECK) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_COMBOBOX_ENTRY: &'static str = unsafe { + }); +pub static STYLE_CLASS_COMBOBOX_ENTRY: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_COMBOBOX_ENTRY) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_CONTEXT_MENU: &'static str = unsafe { + }); +pub static STYLE_CLASS_CONTEXT_MENU: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_CONTEXT_MENU) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_CSD: &'static str = unsafe { + }); +pub static STYLE_CLASS_CSD: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_CSD) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_CURSOR_HANDLE: &'static str = unsafe { + }); +pub static STYLE_CLASS_CURSOR_HANDLE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_CURSOR_HANDLE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_DEFAULT: &'static str = unsafe { + }); +pub static STYLE_CLASS_DEFAULT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_DEFAULT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_DESTRUCTIVE_ACTION: &'static str = unsafe { + }); +pub static STYLE_CLASS_DESTRUCTIVE_ACTION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_DESTRUCTIVE_ACTION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_DIM_LABEL: &'static str = unsafe { + }); +pub static STYLE_CLASS_DIM_LABEL: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_DIM_LABEL) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_DND: &'static str = unsafe { + }); +pub static STYLE_CLASS_DND: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_DND) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_DOCK: &'static str = unsafe { + }); +pub static STYLE_CLASS_DOCK: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_DOCK) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_ENTRY: &'static str = unsafe { + }); +pub static STYLE_CLASS_ENTRY: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_ENTRY) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_ERROR: &'static str = unsafe { + }); +pub static STYLE_CLASS_ERROR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_ERROR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_EXPANDER: &'static str = unsafe { + }); +pub static STYLE_CLASS_EXPANDER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_EXPANDER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_FLAT: &'static str = unsafe { + }); +pub static STYLE_CLASS_FLAT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_FLAT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_FRAME: &'static str = unsafe { + }); +pub static STYLE_CLASS_FRAME: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_FRAME) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_HEADER: &'static str = unsafe { + }); +pub static STYLE_CLASS_HEADER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_HEADER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_HIGHLIGHT: &'static str = unsafe { + }); +pub static STYLE_CLASS_HIGHLIGHT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_HIGHLIGHT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_HORIZONTAL: &'static str = unsafe { + }); +pub static STYLE_CLASS_HORIZONTAL: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_HORIZONTAL) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_IMAGE: &'static str = unsafe { + }); +pub static STYLE_CLASS_IMAGE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_IMAGE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_INFO: &'static str = unsafe { + }); +pub static STYLE_CLASS_INFO: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_INFO) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_INLINE_TOOLBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_INLINE_TOOLBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_INLINE_TOOLBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_INSERTION_CURSOR: &'static str = unsafe { + }); +pub static STYLE_CLASS_INSERTION_CURSOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_INSERTION_CURSOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_LABEL: &'static str = unsafe { + }); +pub static STYLE_CLASS_LABEL: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_LABEL) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_LEFT: &'static str = unsafe { + }); +pub static STYLE_CLASS_LEFT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_LEFT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_LEVEL_BAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_LEVEL_BAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_LEVEL_BAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_LINKED: &'static str = unsafe { + }); +pub static STYLE_CLASS_LINKED: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_LINKED) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_LIST: &'static str = unsafe { + }); +pub static STYLE_CLASS_LIST: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_LIST) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_LIST_ROW: &'static str = unsafe { + }); +pub static STYLE_CLASS_LIST_ROW: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_LIST_ROW) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_MARK: &'static str = unsafe { + }); +pub static STYLE_CLASS_MARK: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_MARK) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_MENU: &'static str = unsafe { + }); +pub static STYLE_CLASS_MENU: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_MENU) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_MENUBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_MENUBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_MENUBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_MENUITEM: &'static str = unsafe { + }); +pub static STYLE_CLASS_MENUITEM: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_MENUITEM) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_MESSAGE_DIALOG: &'static str = unsafe { + }); +pub static STYLE_CLASS_MESSAGE_DIALOG: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_MESSAGE_DIALOG) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_MONOSPACE: &'static str = unsafe { + }); +pub static STYLE_CLASS_MONOSPACE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_MONOSPACE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_NEEDS_ATTENTION: &'static str = unsafe { + }); +pub static STYLE_CLASS_NEEDS_ATTENTION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_NEEDS_ATTENTION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_NOTEBOOK: &'static str = unsafe { + }); +pub static STYLE_CLASS_NOTEBOOK: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_NOTEBOOK) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_OSD: &'static str = unsafe { + }); +pub static STYLE_CLASS_OSD: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_OSD) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_OVERSHOOT: &'static str = unsafe { + }); +pub static STYLE_CLASS_OVERSHOOT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_OVERSHOOT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_PANE_SEPARATOR: &'static str = unsafe { + }); +pub static STYLE_CLASS_PANE_SEPARATOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_PANE_SEPARATOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_PAPER: &'static str = unsafe { + }); +pub static STYLE_CLASS_PAPER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_PAPER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_POPOVER: &'static str = unsafe { + }); +pub static STYLE_CLASS_POPOVER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_POPOVER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_POPUP: &'static str = unsafe { + }); +pub static STYLE_CLASS_POPUP: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_POPUP) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_PRIMARY_TOOLBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_PRIMARY_TOOLBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_PRIMARY_TOOLBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_PROGRESSBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_PROGRESSBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_PROGRESSBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_PULSE: &'static str = unsafe { + }); +pub static STYLE_CLASS_PULSE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_PULSE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_QUESTION: &'static str = unsafe { + }); +pub static STYLE_CLASS_QUESTION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_QUESTION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_RADIO: &'static str = unsafe { + }); +pub static STYLE_CLASS_RADIO: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_RADIO) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_RAISED: &'static str = unsafe { + }); +pub static STYLE_CLASS_RAISED: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_RAISED) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_READ_ONLY: &'static str = unsafe { + }); +pub static STYLE_CLASS_READ_ONLY: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_READ_ONLY) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_RIGHT: &'static str = unsafe { + }); +pub static STYLE_CLASS_RIGHT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_RIGHT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_RUBBERBAND: &'static str = unsafe { + }); +pub static STYLE_CLASS_RUBBERBAND: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_RUBBERBAND) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SCALE: &'static str = unsafe { + }); +pub static STYLE_CLASS_SCALE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SCALE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SCALE_HAS_MARKS_ABOVE: &'static str = unsafe { + }); +pub static STYLE_CLASS_SCALE_HAS_MARKS_ABOVE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SCALE_HAS_MARKS_BELOW: &'static str = unsafe { + }); +pub static STYLE_CLASS_SCALE_HAS_MARKS_BELOW: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SCROLLBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_SCROLLBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SCROLLBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SCROLLBARS_JUNCTION: &'static str = unsafe { + }); +pub static STYLE_CLASS_SCROLLBARS_JUNCTION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SCROLLBARS_JUNCTION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SEPARATOR: &'static str = unsafe { + }); +pub static STYLE_CLASS_SEPARATOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SEPARATOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SIDEBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_SIDEBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SIDEBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SLIDER: &'static str = unsafe { + }); +pub static STYLE_CLASS_SLIDER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SLIDER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SPINBUTTON: &'static str = unsafe { + }); +pub static STYLE_CLASS_SPINBUTTON: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SPINBUTTON) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SPINNER: &'static str = unsafe { + }); +pub static STYLE_CLASS_SPINNER: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SPINNER) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_STATUSBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_STATUSBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_STATUSBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SUBTITLE: &'static str = unsafe { + }); +pub static STYLE_CLASS_SUBTITLE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SUBTITLE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_SUGGESTED_ACTION: &'static str = unsafe { + }); +pub static STYLE_CLASS_SUGGESTED_ACTION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_SUGGESTED_ACTION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_TITLE: &'static str = unsafe { + }); +pub static STYLE_CLASS_TITLE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_TITLE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_TITLEBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_TITLEBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_TITLEBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_TOOLBAR: &'static str = unsafe { + }); +pub static STYLE_CLASS_TOOLBAR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_TOOLBAR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_TOOLTIP: &'static str = unsafe { + }); +pub static STYLE_CLASS_TOOLTIP: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_TOOLTIP) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_TOP: &'static str = unsafe { + }); +pub static STYLE_CLASS_TOP: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_TOP) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_TOUCH_SELECTION: &'static str = unsafe { + }); +pub static STYLE_CLASS_TOUCH_SELECTION: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_TOUCH_SELECTION) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_TROUGH: &'static str = unsafe { + }); +pub static STYLE_CLASS_TROUGH: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_TROUGH) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_UNDERSHOOT: &'static str = unsafe { + }); +pub static STYLE_CLASS_UNDERSHOOT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_UNDERSHOOT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_VERTICAL: &'static str = unsafe { + }); +pub static STYLE_CLASS_VERTICAL: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_VERTICAL) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_VIEW: &'static str = unsafe { + }); +pub static STYLE_CLASS_VIEW: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_VIEW) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_WARNING: &'static str = unsafe { + }); +pub static STYLE_CLASS_WARNING: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_WARNING) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_CLASS_WIDE: &'static str = unsafe { + }); +pub static STYLE_CLASS_WIDE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_CLASS_WIDE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_BACKGROUND_COLOR: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_BACKGROUND_COLOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_BACKGROUND_COLOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_BACKGROUND_IMAGE: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_BACKGROUND_IMAGE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_BACKGROUND_IMAGE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_BORDER_COLOR: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_BORDER_COLOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_BORDER_COLOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_BORDER_RADIUS: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_BORDER_RADIUS: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_BORDER_RADIUS) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_BORDER_STYLE: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_BORDER_STYLE: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_BORDER_STYLE) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_BORDER_WIDTH: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_BORDER_WIDTH: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_BORDER_WIDTH) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_COLOR: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_COLOR: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_COLOR) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_FONT: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_FONT: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_FONT) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_MARGIN: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_MARGIN: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_MARGIN) .to_str() .unwrap() - }; -} -lazy_static! { - pub static ref STYLE_PROPERTY_PADDING: &'static str = unsafe { + }); +pub static STYLE_PROPERTY_PADDING: once_cell::sync::Lazy<&'static str> = + once_cell::sync::Lazy::new(|| unsafe { CStr::from_ptr(gtk_sys::GTK_STYLE_PROPERTY_PADDING) .to_str() .unwrap() - }; -} + }); diff --git a/src/auto/container.rs b/src/auto/container.rs index f85f5767b17c..6b8c8a68aabf 100644 --- a/src/auto/container.rs +++ b/src/auto/container.rs @@ -32,6 +32,7 @@ glib_wrapper! { } } +#[derive(Clone, Default)] pub struct ContainerBuilder { can_focus: Option, can_target: Option, @@ -68,39 +69,7 @@ pub struct ContainerBuilder { impl ContainerBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Container { diff --git a/src/auto/dialog.rs b/src/auto/dialog.rs index 148a0109c655..edd3ea74c55c 100644 --- a/src/auto/dialog.rs +++ b/src/auto/dialog.rs @@ -59,6 +59,7 @@ impl Default for Dialog { } } +#[derive(Clone, Default)] pub struct DialogBuilder { use_header_bar: Option, accept_focus: Option, @@ -120,64 +121,7 @@ pub struct DialogBuilder { impl DialogBuilder { pub fn new() -> Self { - Self { - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - } + Self::default() } pub fn build(self) -> Dialog { diff --git a/src/auto/drawing_area.rs b/src/auto/drawing_area.rs index 33643295b5cd..a0f797d273a1 100644 --- a/src/auto/drawing_area.rs +++ b/src/auto/drawing_area.rs @@ -43,6 +43,7 @@ impl Default for DrawingArea { } } +#[derive(Clone, Default)] pub struct DrawingAreaBuilder { content_height: Option, content_width: Option, @@ -81,41 +82,7 @@ pub struct DrawingAreaBuilder { impl DrawingAreaBuilder { pub fn new() -> Self { - Self { - content_height: None, - content_width: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> DrawingArea { diff --git a/src/auto/entry.rs b/src/auto/entry.rs index 12e75df6a519..5d81a7ac90ea 100644 --- a/src/auto/entry.rs +++ b/src/auto/entry.rs @@ -68,6 +68,7 @@ impl Default for Entry { } } +#[derive(Clone, Default)] pub struct EntryBuilder { activates_default: Option, attributes: Option, @@ -145,80 +146,7 @@ pub struct EntryBuilder { impl EntryBuilder { pub fn new() -> Self { - Self { - activates_default: None, - attributes: None, - buffer: None, - completion: None, - enable_emoji_completion: None, - has_frame: None, - im_module: None, - input_hints: None, - input_purpose: None, - invisible_char: None, - invisible_char_set: None, - max_length: None, - overwrite_mode: None, - placeholder_text: None, - populate_all: None, - primary_icon_activatable: None, - primary_icon_gicon: None, - primary_icon_name: None, - primary_icon_paintable: None, - primary_icon_sensitive: None, - primary_icon_tooltip_markup: None, - primary_icon_tooltip_text: None, - progress_fraction: None, - progress_pulse_step: None, - secondary_icon_activatable: None, - secondary_icon_gicon: None, - secondary_icon_name: None, - secondary_icon_paintable: None, - secondary_icon_sensitive: None, - secondary_icon_tooltip_markup: None, - secondary_icon_tooltip_text: None, - show_emoji_icon: None, - tabs: None, - truncate_multiline: None, - visibility: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - editing_canceled: None, - editable: None, - max_width_chars: None, - text: None, - width_chars: None, - xalign: None, - } + Self::default() } pub fn build(self) -> Entry { diff --git a/src/auto/entry_completion.rs b/src/auto/entry_completion.rs index 39d29210983b..1ea1fc030dbc 100644 --- a/src/auto/entry_completion.rs +++ b/src/auto/entry_completion.rs @@ -54,6 +54,7 @@ impl Default for EntryCompletion { } } +#[derive(Clone, Default)] pub struct EntryCompletionBuilder { cell_area: Option, inline_completion: Option, @@ -68,17 +69,7 @@ pub struct EntryCompletionBuilder { impl EntryCompletionBuilder { pub fn new() -> Self { - Self { - cell_area: None, - inline_completion: None, - inline_selection: None, - minimum_key_length: None, - model: None, - popup_completion: None, - popup_set_width: None, - popup_single_match: None, - text_column: None, - } + Self::default() } pub fn build(self) -> EntryCompletion { diff --git a/src/auto/expander.rs b/src/auto/expander.rs index f692068ca904..0771312e88df 100644 --- a/src/auto/expander.rs +++ b/src/auto/expander.rs @@ -53,6 +53,7 @@ impl Expander { } } +#[derive(Clone, Default)] pub struct ExpanderBuilder { expanded: Option, label: Option, @@ -95,45 +96,7 @@ pub struct ExpanderBuilder { impl ExpanderBuilder { pub fn new() -> Self { - Self { - expanded: None, - label: None, - label_widget: None, - resize_toplevel: None, - use_markup: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Expander { diff --git a/src/auto/file_chooser_button.rs b/src/auto/file_chooser_button.rs index 365bbd18f89d..f3f614adfd65 100644 --- a/src/auto/file_chooser_button.rs +++ b/src/auto/file_chooser_button.rs @@ -57,6 +57,7 @@ impl FileChooserButton { } } +#[derive(Clone, Default)] pub struct FileChooserButtonBuilder { dialog: Option, title: Option, @@ -107,53 +108,7 @@ pub struct FileChooserButtonBuilder { impl FileChooserButtonBuilder { pub fn new() -> Self { - Self { - dialog: None, - title: None, - width_chars: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action: None, - create_folders: None, - do_overwrite_confirmation: None, - extra_widget: None, - filter: None, - local_only: None, - preview_widget: None, - preview_widget_active: None, - select_multiple: None, - show_hidden: None, - use_preview_label: None, - } + Self::default() } pub fn build(self) -> FileChooserButton { diff --git a/src/auto/file_chooser_dialog.rs b/src/auto/file_chooser_dialog.rs index 18a373ba2a17..fd5932b9d8ae 100644 --- a/src/auto/file_chooser_dialog.rs +++ b/src/auto/file_chooser_dialog.rs @@ -41,6 +41,7 @@ impl FileChooserDialog { //} } +#[derive(Clone, Default)] pub struct FileChooserDialogBuilder { use_header_bar: Option, accept_focus: Option, @@ -113,75 +114,7 @@ pub struct FileChooserDialogBuilder { impl FileChooserDialogBuilder { pub fn new() -> Self { - Self { - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - action: None, - create_folders: None, - do_overwrite_confirmation: None, - extra_widget: None, - filter: None, - local_only: None, - preview_widget: None, - preview_widget_active: None, - select_multiple: None, - show_hidden: None, - use_preview_label: None, - } + Self::default() } pub fn build(self) -> FileChooserDialog { diff --git a/src/auto/file_chooser_widget.rs b/src/auto/file_chooser_widget.rs index 89831c4bd451..85149c7409a9 100644 --- a/src/auto/file_chooser_widget.rs +++ b/src/auto/file_chooser_widget.rs @@ -48,6 +48,7 @@ impl FileChooserWidget { } } +#[derive(Clone, Default)] pub struct FileChooserWidgetBuilder { search_mode: Option, can_focus: Option, @@ -96,51 +97,7 @@ pub struct FileChooserWidgetBuilder { impl FileChooserWidgetBuilder { pub fn new() -> Self { - Self { - search_mode: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action: None, - create_folders: None, - do_overwrite_confirmation: None, - extra_widget: None, - filter: None, - local_only: None, - preview_widget: None, - preview_widget_active: None, - select_multiple: None, - show_hidden: None, - use_preview_label: None, - } + Self::default() } pub fn build(self) -> FileChooserWidget { diff --git a/src/auto/fixed.rs b/src/auto/fixed.rs index 6927e1d793f6..080568817deb 100644 --- a/src/auto/fixed.rs +++ b/src/auto/fixed.rs @@ -40,6 +40,7 @@ impl Default for Fixed { } } +#[derive(Clone, Default)] pub struct FixedBuilder { can_focus: Option, can_target: Option, @@ -76,39 +77,7 @@ pub struct FixedBuilder { impl FixedBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Fixed { diff --git a/src/auto/flow_box.rs b/src/auto/flow_box.rs index 6b1145d99c5e..f525ca21d1a3 100644 --- a/src/auto/flow_box.rs +++ b/src/auto/flow_box.rs @@ -55,6 +55,7 @@ impl Default for FlowBox { } } +#[derive(Clone, Default)] pub struct FlowBoxBuilder { accept_unpaired_release: Option, activate_on_single_click: Option, @@ -100,48 +101,7 @@ pub struct FlowBoxBuilder { impl FlowBoxBuilder { pub fn new() -> Self { - Self { - accept_unpaired_release: None, - activate_on_single_click: None, - column_spacing: None, - homogeneous: None, - max_children_per_line: None, - min_children_per_line: None, - row_spacing: None, - selection_mode: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> FlowBox { diff --git a/src/auto/flow_box_child.rs b/src/auto/flow_box_child.rs index b4ea888b1ca6..2bcad2d0b809 100644 --- a/src/auto/flow_box_child.rs +++ b/src/auto/flow_box_child.rs @@ -47,6 +47,7 @@ impl Default for FlowBoxChild { } } +#[derive(Clone, Default)] pub struct FlowBoxChildBuilder { can_focus: Option, can_target: Option, @@ -83,39 +84,7 @@ pub struct FlowBoxChildBuilder { impl FlowBoxChildBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> FlowBoxChild { diff --git a/src/auto/font_button.rs b/src/auto/font_button.rs index bccb4b59dbd2..3deeb518db91 100644 --- a/src/auto/font_button.rs +++ b/src/auto/font_button.rs @@ -56,6 +56,7 @@ impl Default for FontButton { } } +#[derive(Clone, Default)] pub struct FontButtonBuilder { title: Option, use_font: Option, @@ -101,48 +102,7 @@ pub struct FontButtonBuilder { impl FontButtonBuilder { pub fn new() -> Self { - Self { - title: None, - use_font: None, - use_size: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - font: None, - font_desc: None, - language: None, - level: None, - preview_text: None, - show_preview_entry: None, - } + Self::default() } pub fn build(self) -> FontButton { diff --git a/src/auto/font_chooser_dialog.rs b/src/auto/font_chooser_dialog.rs index 0cf4abb87d24..8840330cb1d8 100644 --- a/src/auto/font_chooser_dialog.rs +++ b/src/auto/font_chooser_dialog.rs @@ -48,6 +48,7 @@ impl FontChooserDialog { } } +#[derive(Clone, Default)] pub struct FontChooserDialogBuilder { use_header_bar: Option, accept_focus: Option, @@ -115,70 +116,7 @@ pub struct FontChooserDialogBuilder { impl FontChooserDialogBuilder { pub fn new() -> Self { - Self { - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - font: None, - font_desc: None, - language: None, - level: None, - preview_text: None, - show_preview_entry: None, - } + Self::default() } pub fn build(self) -> FontChooserDialog { diff --git a/src/auto/font_chooser_widget.rs b/src/auto/font_chooser_widget.rs index cbb9c4b35fbf..ad4f69d55dd5 100644 --- a/src/auto/font_chooser_widget.rs +++ b/src/auto/font_chooser_widget.rs @@ -48,6 +48,7 @@ impl Default for FontChooserWidget { } } +#[derive(Clone, Default)] pub struct FontChooserWidgetBuilder { can_focus: Option, can_target: Option, @@ -90,45 +91,7 @@ pub struct FontChooserWidgetBuilder { impl FontChooserWidgetBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - font: None, - font_desc: None, - language: None, - level: None, - preview_text: None, - show_preview_entry: None, - } + Self::default() } pub fn build(self) -> FontChooserWidget { diff --git a/src/auto/frame.rs b/src/auto/frame.rs index 60cc15122b53..89e14b8be54c 100644 --- a/src/auto/frame.rs +++ b/src/auto/frame.rs @@ -44,6 +44,7 @@ impl Frame { } } +#[derive(Clone, Default)] pub struct FrameBuilder { label: Option, label_widget: Option, @@ -84,43 +85,7 @@ pub struct FrameBuilder { impl FrameBuilder { pub fn new() -> Self { - Self { - label: None, - label_widget: None, - label_xalign: None, - shadow_type: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Frame { diff --git a/src/auto/gl_area.rs b/src/auto/gl_area.rs index 35034289823d..e9571d7195b4 100644 --- a/src/auto/gl_area.rs +++ b/src/auto/gl_area.rs @@ -46,6 +46,7 @@ impl Default for GLArea { } } +#[derive(Clone, Default)] pub struct GLAreaBuilder { auto_render: Option, has_depth_buffer: Option, @@ -86,43 +87,7 @@ pub struct GLAreaBuilder { impl GLAreaBuilder { pub fn new() -> Self { - Self { - auto_render: None, - has_depth_buffer: None, - has_stencil_buffer: None, - use_es: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> GLArea { diff --git a/src/auto/grid.rs b/src/auto/grid.rs index aeb63d694549..7b667b870d58 100644 --- a/src/auto/grid.rs +++ b/src/auto/grid.rs @@ -48,6 +48,7 @@ impl Default for Grid { } } +#[derive(Clone, Default)] pub struct GridBuilder { baseline_row: Option, column_homogeneous: Option, @@ -90,45 +91,7 @@ pub struct GridBuilder { impl GridBuilder { pub fn new() -> Self { - Self { - baseline_row: None, - column_homogeneous: None, - column_spacing: None, - row_homogeneous: None, - row_spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Grid { diff --git a/src/auto/header_bar.rs b/src/auto/header_bar.rs index 1683ab75ff35..8d39e9c3dea3 100644 --- a/src/auto/header_bar.rs +++ b/src/auto/header_bar.rs @@ -46,6 +46,7 @@ impl Default for HeaderBar { } } +#[derive(Clone, Default)] pub struct HeaderBarBuilder { custom_title: Option, decoration_layout: Option, @@ -90,47 +91,7 @@ pub struct HeaderBarBuilder { impl HeaderBarBuilder { pub fn new() -> Self { - Self { - custom_title: None, - decoration_layout: None, - decoration_layout_set: None, - has_subtitle: None, - show_title_buttons: None, - spacing: None, - subtitle: None, - title: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> HeaderBar { diff --git a/src/auto/image.rs b/src/auto/image.rs index deca65f0688b..b771982ac162 100644 --- a/src/auto/image.rs +++ b/src/auto/image.rs @@ -109,6 +109,7 @@ impl Default for Image { } } +#[derive(Clone, Default)] pub struct ImageBuilder { file: Option, gicon: Option, @@ -153,47 +154,7 @@ pub struct ImageBuilder { impl ImageBuilder { pub fn new() -> Self { - Self { - file: None, - gicon: None, - icon_name: None, - icon_size: None, - paintable: None, - pixel_size: None, - resource: None, - use_fallback: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Image { diff --git a/src/auto/info_bar.rs b/src/auto/info_bar.rs index 378a5591625c..63425ca123c8 100644 --- a/src/auto/info_bar.rs +++ b/src/auto/info_bar.rs @@ -57,6 +57,7 @@ impl Default for InfoBar { } } +#[derive(Clone, Default)] pub struct InfoBarBuilder { message_type: Option, revealed: Option, @@ -100,46 +101,7 @@ pub struct InfoBarBuilder { impl InfoBarBuilder { pub fn new() -> Self { - Self { - message_type: None, - revealed: None, - show_close_button: None, - baseline_position: None, - homogeneous: None, - spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> InfoBar { diff --git a/src/auto/label.rs b/src/auto/label.rs index 3b2f363fe83c..84884fbcb82f 100644 --- a/src/auto/label.rs +++ b/src/auto/label.rs @@ -57,6 +57,7 @@ impl Label { } } +#[derive(Clone, Default)] pub struct LabelBuilder { attributes: Option, ellipsize: Option, @@ -111,57 +112,7 @@ pub struct LabelBuilder { impl LabelBuilder { pub fn new() -> Self { - Self { - attributes: None, - ellipsize: None, - justify: None, - label: None, - lines: None, - max_width_chars: None, - mnemonic_widget: None, - pattern: None, - selectable: None, - single_line_mode: None, - track_visited_links: None, - use_markup: None, - use_underline: None, - width_chars: None, - wrap: None, - wrap_mode: None, - xalign: None, - yalign: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Label { diff --git a/src/auto/level_bar.rs b/src/auto/level_bar.rs index 64b3c0f73ae1..70b7d0b1fb18 100644 --- a/src/auto/level_bar.rs +++ b/src/auto/level_bar.rs @@ -58,6 +58,7 @@ impl Default for LevelBar { } } +#[derive(Clone, Default)] pub struct LevelBarBuilder { inverted: Option, max_value: Option, @@ -100,45 +101,7 @@ pub struct LevelBarBuilder { impl LevelBarBuilder { pub fn new() -> Self { - Self { - inverted: None, - max_value: None, - min_value: None, - mode: None, - value: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> LevelBar { diff --git a/src/auto/link_button.rs b/src/auto/link_button.rs index c8e492b5973d..8949d7bafe18 100644 --- a/src/auto/link_button.rs +++ b/src/auto/link_button.rs @@ -55,6 +55,7 @@ impl LinkButton { } } +#[derive(Clone, Default)] pub struct LinkButtonBuilder { uri: Option, visited: Option, @@ -98,46 +99,7 @@ pub struct LinkButtonBuilder { impl LinkButtonBuilder { pub fn new() -> Self { - Self { - uri: None, - visited: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> LinkButton { diff --git a/src/auto/list_box.rs b/src/auto/list_box.rs index dc8bba249630..bdcd313da64d 100644 --- a/src/auto/list_box.rs +++ b/src/auto/list_box.rs @@ -53,6 +53,7 @@ impl Default for ListBox { } } +#[derive(Clone, Default)] pub struct ListBoxBuilder { accept_unpaired_release: Option, activate_on_single_click: Option, @@ -93,43 +94,7 @@ pub struct ListBoxBuilder { impl ListBoxBuilder { pub fn new() -> Self { - Self { - accept_unpaired_release: None, - activate_on_single_click: None, - selection_mode: None, - show_separators: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> ListBox { diff --git a/src/auto/list_box_row.rs b/src/auto/list_box_row.rs index 64f41c52a6c8..487f03721b20 100644 --- a/src/auto/list_box_row.rs +++ b/src/auto/list_box_row.rs @@ -48,6 +48,7 @@ impl Default for ListBoxRow { } } +#[derive(Clone, Default)] pub struct ListBoxRowBuilder { activatable: Option, selectable: Option, @@ -87,42 +88,7 @@ pub struct ListBoxRowBuilder { impl ListBoxRowBuilder { pub fn new() -> Self { - Self { - activatable: None, - selectable: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> ListBoxRow { diff --git a/src/auto/lock_button.rs b/src/auto/lock_button.rs index b6768aaee576..a2b55ed23bc7 100644 --- a/src/auto/lock_button.rs +++ b/src/auto/lock_button.rs @@ -50,6 +50,7 @@ impl LockButton { } } +#[derive(Clone, Default)] pub struct LockButtonBuilder { permission: Option, text_lock: Option, @@ -97,50 +98,7 @@ pub struct LockButtonBuilder { impl LockButtonBuilder { pub fn new() -> Self { - Self { - permission: None, - text_lock: None, - text_unlock: None, - tooltip_lock: None, - tooltip_not_authorized: None, - tooltip_unlock: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> LockButton { diff --git a/src/auto/media_controls.rs b/src/auto/media_controls.rs index 8e4ba1703fc2..3ba6eadf238a 100644 --- a/src/auto/media_controls.rs +++ b/src/auto/media_controls.rs @@ -42,6 +42,7 @@ impl MediaControls { } } +#[derive(Clone, Default)] pub struct MediaControlsBuilder { media_stream: Option, can_focus: Option, @@ -79,40 +80,7 @@ pub struct MediaControlsBuilder { impl MediaControlsBuilder { pub fn new() -> Self { - Self { - media_stream: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> MediaControls { diff --git a/src/auto/menu.rs b/src/auto/menu.rs index 8d4758f1cd38..6d69153656ea 100644 --- a/src/auto/menu.rs +++ b/src/auto/menu.rs @@ -72,6 +72,7 @@ impl Default for Menu { } } +#[derive(Clone, Default)] pub struct MenuBuilder { accel_group: Option, accel_path: Option, @@ -119,50 +120,7 @@ pub struct MenuBuilder { impl MenuBuilder { pub fn new() -> Self { - Self { - accel_group: None, - accel_path: None, - active: None, - anchor_hints: None, - attach_widget: None, - menu_type_hint: None, - monitor: None, - rect_anchor_dx: None, - rect_anchor_dy: None, - reserve_toggle_size: None, - take_focus: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Menu { diff --git a/src/auto/menu_bar.rs b/src/auto/menu_bar.rs index 6e65d1079dfa..6b0401fbbb60 100644 --- a/src/auto/menu_bar.rs +++ b/src/auto/menu_bar.rs @@ -50,6 +50,7 @@ impl Default for MenuBar { } } +#[derive(Clone, Default)] pub struct MenuBarBuilder { take_focus: Option, can_focus: Option, @@ -87,40 +88,7 @@ pub struct MenuBarBuilder { impl MenuBarBuilder { pub fn new() -> Self { - Self { - take_focus: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> MenuBar { diff --git a/src/auto/menu_button.rs b/src/auto/menu_button.rs index b0b97b759cbf..a77d6c85bc41 100644 --- a/src/auto/menu_button.rs +++ b/src/auto/menu_button.rs @@ -52,6 +52,7 @@ impl Default for MenuButton { } } +#[derive(Clone, Default)] pub struct MenuButtonBuilder { align_widget: Option, direction: Option, @@ -100,51 +101,7 @@ pub struct MenuButtonBuilder { impl MenuButtonBuilder { pub fn new() -> Self { - Self { - align_widget: None, - direction: None, - menu_model: None, - popover: None, - popup: None, - use_popover: None, - active: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> MenuButton { diff --git a/src/auto/menu_item.rs b/src/auto/menu_item.rs index 6b735fad16be..11b4aafb61e9 100644 --- a/src/auto/menu_item.rs +++ b/src/auto/menu_item.rs @@ -71,6 +71,7 @@ impl Default for MenuItem { } } +#[derive(Clone, Default)] pub struct MenuItemBuilder { accel_path: Option, label: Option, @@ -112,44 +113,7 @@ pub struct MenuItemBuilder { impl MenuItemBuilder { pub fn new() -> Self { - Self { - accel_path: None, - label: None, - submenu: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> MenuItem { diff --git a/src/auto/menu_shell.rs b/src/auto/menu_shell.rs index be2fb156dcb7..8fd4b6569a32 100644 --- a/src/auto/menu_shell.rs +++ b/src/auto/menu_shell.rs @@ -38,6 +38,7 @@ glib_wrapper! { } } +#[derive(Clone, Default)] pub struct MenuShellBuilder { take_focus: Option, can_focus: Option, @@ -75,40 +76,7 @@ pub struct MenuShellBuilder { impl MenuShellBuilder { pub fn new() -> Self { - Self { - take_focus: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> MenuShell { diff --git a/src/auto/menu_tool_button.rs b/src/auto/menu_tool_button.rs index ca3229cf45f9..d9d8a4ab99cc 100644 --- a/src/auto/menu_tool_button.rs +++ b/src/auto/menu_tool_button.rs @@ -48,6 +48,7 @@ impl MenuToolButton { } } +#[derive(Clone, Default)] pub struct MenuToolButtonBuilder { menu: Option, icon_name: Option, @@ -96,51 +97,7 @@ pub struct MenuToolButtonBuilder { impl MenuToolButtonBuilder { pub fn new() -> Self { - Self { - menu: None, - icon_name: None, - icon_widget: None, - label: None, - label_widget: None, - use_underline: None, - expand_item: None, - homogeneous: None, - is_important: None, - visible_horizontal: None, - visible_vertical: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> MenuToolButton { diff --git a/src/auto/message_dialog.rs b/src/auto/message_dialog.rs index a771f9151884..51a452da04e6 100644 --- a/src/auto/message_dialog.rs +++ b/src/auto/message_dialog.rs @@ -52,6 +52,7 @@ impl MessageDialog { //} } +#[derive(Clone, Default)] pub struct MessageDialogBuilder { buttons: Option, message_type: Option, @@ -119,70 +120,7 @@ pub struct MessageDialogBuilder { impl MessageDialogBuilder { pub fn new() -> Self { - Self { - buttons: None, - message_type: None, - secondary_text: None, - secondary_use_markup: None, - text: None, - use_markup: None, - use_header_bar: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - } + Self::default() } pub fn build(self) -> MessageDialog { diff --git a/src/auto/model_button.rs b/src/auto/model_button.rs index b0dc26e4472c..c767d5b6a51f 100644 --- a/src/auto/model_button.rs +++ b/src/auto/model_button.rs @@ -483,6 +483,7 @@ impl Default for ModelButton { } } +#[derive(Clone, Default)] pub struct ModelButtonBuilder { active: Option, centered: Option, @@ -533,53 +534,7 @@ pub struct ModelButtonBuilder { impl ModelButtonBuilder { pub fn new() -> Self { - Self { - active: None, - centered: None, - icon: None, - iconic: None, - inverted: None, - menu_name: None, - role: None, - text: None, - use_markup: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> ModelButton { diff --git a/src/auto/notebook.rs b/src/auto/notebook.rs index 76db470f43e9..a555e63d6cc3 100644 --- a/src/auto/notebook.rs +++ b/src/auto/notebook.rs @@ -55,6 +55,7 @@ impl Default for Notebook { } } +#[derive(Clone, Default)] pub struct NotebookBuilder { enable_popup: Option, group_name: Option, @@ -98,46 +99,7 @@ pub struct NotebookBuilder { impl NotebookBuilder { pub fn new() -> Self { - Self { - enable_popup: None, - group_name: None, - page: None, - scrollable: None, - show_border: None, - show_tabs: None, - tab_pos: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Notebook { diff --git a/src/auto/overlay.rs b/src/auto/overlay.rs index cc2c8d145bf1..2071a0c658e8 100644 --- a/src/auto/overlay.rs +++ b/src/auto/overlay.rs @@ -39,6 +39,7 @@ impl Default for Overlay { } } +#[derive(Clone, Default)] pub struct OverlayBuilder { can_focus: Option, can_target: Option, @@ -75,39 +76,7 @@ pub struct OverlayBuilder { impl OverlayBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Overlay { diff --git a/src/auto/paned.rs b/src/auto/paned.rs index 75814caeb969..952ed8703b29 100644 --- a/src/auto/paned.rs +++ b/src/auto/paned.rs @@ -46,6 +46,7 @@ impl Paned { } } +#[derive(Clone, Default)] pub struct PanedBuilder { position: Option, position_set: Option, @@ -90,47 +91,7 @@ pub struct PanedBuilder { impl PanedBuilder { pub fn new() -> Self { - Self { - position: None, - position_set: None, - resize_child1: None, - resize_child2: None, - shrink_child1: None, - shrink_child2: None, - wide_handle: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Paned { diff --git a/src/auto/password_entry.rs b/src/auto/password_entry.rs index e801e6f3f557..d4ac46668bb0 100644 --- a/src/auto/password_entry.rs +++ b/src/auto/password_entry.rs @@ -46,6 +46,7 @@ impl Default for PasswordEntry { } } +#[derive(Clone, Default)] pub struct PasswordEntryBuilder { activates_default: Option, placeholder_text: Option, @@ -90,47 +91,7 @@ pub struct PasswordEntryBuilder { impl PasswordEntryBuilder { pub fn new() -> Self { - Self { - activates_default: None, - placeholder_text: None, - show_peek_icon: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - editable: None, - max_width_chars: None, - text: None, - width_chars: None, - xalign: None, - } + Self::default() } pub fn build(self) -> PasswordEntry { diff --git a/src/auto/picture.rs b/src/auto/picture.rs index 431d40df5202..93a656284d9b 100644 --- a/src/auto/picture.rs +++ b/src/auto/picture.rs @@ -94,6 +94,7 @@ impl Default for Picture { } } +#[derive(Clone, Default)] pub struct PictureBuilder { alternative_text: Option, can_shrink: Option, @@ -135,44 +136,7 @@ pub struct PictureBuilder { impl PictureBuilder { pub fn new() -> Self { - Self { - alternative_text: None, - can_shrink: None, - file: None, - keep_aspect_ratio: None, - paintable: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Picture { diff --git a/src/auto/popover.rs b/src/auto/popover.rs index 05e78b7064a8..c7f11ecd52b4 100644 --- a/src/auto/popover.rs +++ b/src/auto/popover.rs @@ -60,6 +60,7 @@ impl Popover { } } +#[derive(Clone, Default)] pub struct PopoverBuilder { constrain_to: Option, default_widget: Option, @@ -102,45 +103,7 @@ pub struct PopoverBuilder { impl PopoverBuilder { pub fn new() -> Self { - Self { - constrain_to: None, - default_widget: None, - modal: None, - pointing_to: None, - position: None, - relative_to: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Popover { diff --git a/src/auto/popover_menu.rs b/src/auto/popover_menu.rs index 8ec204d9a245..c3e4a842b4b2 100644 --- a/src/auto/popover_menu.rs +++ b/src/auto/popover_menu.rs @@ -50,6 +50,7 @@ impl Default for PopoverMenu { } } +#[derive(Clone, Default)] pub struct PopoverMenuBuilder { visible_submenu: Option, constrain_to: Option, @@ -93,46 +94,7 @@ pub struct PopoverMenuBuilder { impl PopoverMenuBuilder { pub fn new() -> Self { - Self { - visible_submenu: None, - constrain_to: None, - default_widget: None, - modal: None, - pointing_to: None, - position: None, - relative_to: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> PopoverMenu { diff --git a/src/auto/progress_bar.rs b/src/auto/progress_bar.rs index d33de939eddf..3a68adda0ba7 100644 --- a/src/auto/progress_bar.rs +++ b/src/auto/progress_bar.rs @@ -46,6 +46,7 @@ impl Default for ProgressBar { } } +#[derive(Clone, Default)] pub struct ProgressBarBuilder { ellipsize: Option, fraction: Option, @@ -89,46 +90,7 @@ pub struct ProgressBarBuilder { impl ProgressBarBuilder { pub fn new() -> Self { - Self { - ellipsize: None, - fraction: None, - inverted: None, - pulse_step: None, - show_text: None, - text: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> ProgressBar { diff --git a/src/auto/radio_button.rs b/src/auto/radio_button.rs index c48d723df553..e8207c0dc741 100644 --- a/src/auto/radio_button.rs +++ b/src/auto/radio_button.rs @@ -79,6 +79,7 @@ impl RadioButton { } } +#[derive(Clone, Default)] pub struct RadioButtonBuilder { group: Option, draw_indicator: Option, @@ -124,48 +125,7 @@ pub struct RadioButtonBuilder { impl RadioButtonBuilder { pub fn new() -> Self { - Self { - group: None, - draw_indicator: None, - inconsistent: None, - active: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> RadioButton { diff --git a/src/auto/radio_menu_item.rs b/src/auto/radio_menu_item.rs index 856283bd4838..94be2c6dfa6a 100644 --- a/src/auto/radio_menu_item.rs +++ b/src/auto/radio_menu_item.rs @@ -78,6 +78,7 @@ impl RadioMenuItem { } } +#[derive(Clone, Default)] pub struct RadioMenuItemBuilder { group: Option, active: Option, @@ -123,48 +124,7 @@ pub struct RadioMenuItemBuilder { impl RadioMenuItemBuilder { pub fn new() -> Self { - Self { - group: None, - active: None, - draw_as_radio: None, - inconsistent: None, - accel_path: None, - label: None, - submenu: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> RadioMenuItem { diff --git a/src/auto/radio_tool_button.rs b/src/auto/radio_tool_button.rs index f927b763ea04..e095e363c21a 100644 --- a/src/auto/radio_tool_button.rs +++ b/src/auto/radio_tool_button.rs @@ -51,6 +51,7 @@ impl RadioToolButton { } } +#[derive(Clone, Default)] pub struct RadioToolButtonBuilder { group: Option, active: Option, @@ -100,52 +101,7 @@ pub struct RadioToolButtonBuilder { impl RadioToolButtonBuilder { pub fn new() -> Self { - Self { - group: None, - active: None, - icon_name: None, - icon_widget: None, - label: None, - label_widget: None, - use_underline: None, - expand_item: None, - homogeneous: None, - is_important: None, - visible_horizontal: None, - visible_vertical: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> RadioToolButton { diff --git a/src/auto/range.rs b/src/auto/range.rs index b0ff49d6c7d0..a239e902ba87 100644 --- a/src/auto/range.rs +++ b/src/auto/range.rs @@ -38,6 +38,7 @@ glib_wrapper! { } } +#[derive(Clone, Default)] pub struct RangeBuilder { adjustment: Option, fill_level: Option, @@ -81,46 +82,7 @@ pub struct RangeBuilder { impl RangeBuilder { pub fn new() -> Self { - Self { - adjustment: None, - fill_level: None, - inverted: None, - restrict_to_fill_level: None, - round_digits: None, - show_fill_level: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Range { diff --git a/src/auto/revealer.rs b/src/auto/revealer.rs index 9d261afa84f5..7646cc2fca55 100644 --- a/src/auto/revealer.rs +++ b/src/auto/revealer.rs @@ -45,6 +45,7 @@ impl Default for Revealer { } } +#[derive(Clone, Default)] pub struct RevealerBuilder { reveal_child: Option, transition_duration: Option, @@ -84,42 +85,7 @@ pub struct RevealerBuilder { impl RevealerBuilder { pub fn new() -> Self { - Self { - reveal_child: None, - transition_duration: None, - transition_type: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Revealer { diff --git a/src/auto/scale.rs b/src/auto/scale.rs index 9f507a5a03d1..f7d6e0e55a1d 100644 --- a/src/auto/scale.rs +++ b/src/auto/scale.rs @@ -63,6 +63,7 @@ impl Scale { } } +#[derive(Clone, Default)] pub struct ScaleBuilder { digits: Option, draw_value: Option, @@ -110,50 +111,7 @@ pub struct ScaleBuilder { impl ScaleBuilder { pub fn new() -> Self { - Self { - digits: None, - draw_value: None, - has_origin: None, - value_pos: None, - adjustment: None, - fill_level: None, - inverted: None, - restrict_to_fill_level: None, - round_digits: None, - show_fill_level: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Scale { diff --git a/src/auto/scale_button.rs b/src/auto/scale_button.rs index a369faca0bac..9a357054eef4 100644 --- a/src/auto/scale_button.rs +++ b/src/auto/scale_button.rs @@ -58,6 +58,7 @@ impl ScaleButton { } } +#[derive(Clone, Default)] pub struct ScaleButtonBuilder { adjustment: Option, icons: Option>, @@ -103,48 +104,7 @@ pub struct ScaleButtonBuilder { impl ScaleButtonBuilder { pub fn new() -> Self { - Self { - adjustment: None, - icons: None, - value: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - orientation: None, - } + Self::default() } pub fn build(self) -> ScaleButton { diff --git a/src/auto/scrollbar.rs b/src/auto/scrollbar.rs index 9d992a298e53..07b6bbc4d22a 100644 --- a/src/auto/scrollbar.rs +++ b/src/auto/scrollbar.rs @@ -45,6 +45,7 @@ impl Scrollbar { } } +#[derive(Clone, Default)] pub struct ScrollbarBuilder { adjustment: Option, can_focus: Option, @@ -83,41 +84,7 @@ pub struct ScrollbarBuilder { impl ScrollbarBuilder { pub fn new() -> Self { - Self { - adjustment: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Scrollbar { diff --git a/src/auto/scrolled_window.rs b/src/auto/scrolled_window.rs index 0ae165225e85..1df155a91203 100644 --- a/src/auto/scrolled_window.rs +++ b/src/auto/scrolled_window.rs @@ -59,6 +59,7 @@ impl ScrolledWindow { } } +#[derive(Clone, Default)] pub struct ScrolledWindowBuilder { hadjustment: Option, hscrollbar_policy: Option, @@ -109,53 +110,7 @@ pub struct ScrolledWindowBuilder { impl ScrolledWindowBuilder { pub fn new() -> Self { - Self { - hadjustment: None, - hscrollbar_policy: None, - kinetic_scrolling: None, - max_content_height: None, - max_content_width: None, - min_content_height: None, - min_content_width: None, - overlay_scrolling: None, - propagate_natural_height: None, - propagate_natural_width: None, - shadow_type: None, - vadjustment: None, - vscrollbar_policy: None, - window_placement: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> ScrolledWindow { diff --git a/src/auto/search_bar.rs b/src/auto/search_bar.rs index 750335b8450a..68b02fe9f589 100644 --- a/src/auto/search_bar.rs +++ b/src/auto/search_bar.rs @@ -47,6 +47,7 @@ impl Default for SearchBar { } } +#[derive(Clone, Default)] pub struct SearchBarBuilder { search_mode_enabled: Option, show_close_button: Option, @@ -85,41 +86,7 @@ pub struct SearchBarBuilder { impl SearchBarBuilder { pub fn new() -> Self { - Self { - search_mode_enabled: None, - show_close_button: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> SearchBar { diff --git a/src/auto/search_entry.rs b/src/auto/search_entry.rs index 4f0da6e1b72b..a685cd8642f0 100644 --- a/src/auto/search_entry.rs +++ b/src/auto/search_entry.rs @@ -48,6 +48,7 @@ impl Default for SearchEntry { } } +#[derive(Clone, Default)] pub struct SearchEntryBuilder { activates_default: Option, placeholder_text: Option, @@ -91,46 +92,7 @@ pub struct SearchEntryBuilder { impl SearchEntryBuilder { pub fn new() -> Self { - Self { - activates_default: None, - placeholder_text: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - editable: None, - max_width_chars: None, - text: None, - width_chars: None, - xalign: None, - } + Self::default() } pub fn build(self) -> SearchEntry { diff --git a/src/auto/separator.rs b/src/auto/separator.rs index 06f39b6ea6c8..ba08b5d71eac 100644 --- a/src/auto/separator.rs +++ b/src/auto/separator.rs @@ -35,6 +35,7 @@ impl Separator { } } +#[derive(Clone, Default)] pub struct SeparatorBuilder { can_focus: Option, can_target: Option, @@ -72,40 +73,7 @@ pub struct SeparatorBuilder { impl SeparatorBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Separator { diff --git a/src/auto/separator_menu_item.rs b/src/auto/separator_menu_item.rs index 28c2afd42791..b9df1c11d7f1 100644 --- a/src/auto/separator_menu_item.rs +++ b/src/auto/separator_menu_item.rs @@ -42,6 +42,7 @@ impl Default for SeparatorMenuItem { } } +#[derive(Clone, Default)] pub struct SeparatorMenuItemBuilder { accel_path: Option, label: Option, @@ -83,44 +84,7 @@ pub struct SeparatorMenuItemBuilder { impl SeparatorMenuItemBuilder { pub fn new() -> Self { - Self { - accel_path: None, - label: None, - submenu: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> SeparatorMenuItem { diff --git a/src/auto/separator_tool_item.rs b/src/auto/separator_tool_item.rs index 99ac055ecf1a..8dab39785c04 100644 --- a/src/auto/separator_tool_item.rs +++ b/src/auto/separator_tool_item.rs @@ -45,6 +45,7 @@ impl Default for SeparatorToolItem { } } +#[derive(Clone, Default)] pub struct SeparatorToolItemBuilder { draw: Option, expand_item: Option, @@ -87,45 +88,7 @@ pub struct SeparatorToolItemBuilder { impl SeparatorToolItemBuilder { pub fn new() -> Self { - Self { - draw: None, - expand_item: None, - homogeneous: None, - is_important: None, - visible_horizontal: None, - visible_vertical: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> SeparatorToolItem { diff --git a/src/auto/shortcut_label.rs b/src/auto/shortcut_label.rs index 27c2410919f6..291188f65385 100644 --- a/src/auto/shortcut_label.rs +++ b/src/auto/shortcut_label.rs @@ -128,6 +128,7 @@ impl ShortcutLabel { } } +#[derive(Clone, Default)] pub struct ShortcutLabelBuilder { accelerator: Option, disabled_text: Option, @@ -170,45 +171,7 @@ pub struct ShortcutLabelBuilder { impl ShortcutLabelBuilder { pub fn new() -> Self { - Self { - accelerator: None, - disabled_text: None, - baseline_position: None, - homogeneous: None, - spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> ShortcutLabel { diff --git a/src/auto/shortcuts_group.rs b/src/auto/shortcuts_group.rs index af93794898aa..34652531b88e 100644 --- a/src/auto/shortcuts_group.rs +++ b/src/auto/shortcuts_group.rs @@ -250,6 +250,7 @@ impl ShortcutsGroup { } } +#[derive(Clone, Default)] pub struct ShortcutsGroupBuilder { accel_size_group: Option, title: Option, @@ -294,47 +295,7 @@ pub struct ShortcutsGroupBuilder { impl ShortcutsGroupBuilder { pub fn new() -> Self { - Self { - accel_size_group: None, - title: None, - title_size_group: None, - view: None, - baseline_position: None, - homogeneous: None, - spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> ShortcutsGroup { diff --git a/src/auto/shortcuts_section.rs b/src/auto/shortcuts_section.rs index addf9df5510a..f75211a1409a 100644 --- a/src/auto/shortcuts_section.rs +++ b/src/auto/shortcuts_section.rs @@ -229,6 +229,7 @@ impl ShortcutsSection { } } +#[derive(Clone, Default)] pub struct ShortcutsSectionBuilder { max_height: Option, section_name: Option, @@ -273,47 +274,7 @@ pub struct ShortcutsSectionBuilder { impl ShortcutsSectionBuilder { pub fn new() -> Self { - Self { - max_height: None, - section_name: None, - title: None, - view_name: None, - baseline_position: None, - homogeneous: None, - spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> ShortcutsSection { diff --git a/src/auto/shortcuts_shortcut.rs b/src/auto/shortcuts_shortcut.rs index c38e2b249c0d..beb20de71211 100644 --- a/src/auto/shortcuts_shortcut.rs +++ b/src/auto/shortcuts_shortcut.rs @@ -520,6 +520,7 @@ impl ShortcutsShortcut { } } +#[derive(Clone, Default)] pub struct ShortcutsShortcutBuilder { accel_size_group: Option, accelerator: Option, @@ -567,50 +568,7 @@ pub struct ShortcutsShortcutBuilder { impl ShortcutsShortcutBuilder { pub fn new() -> Self { - Self { - accel_size_group: None, - accelerator: None, - action_name: None, - direction: None, - icon: None, - icon_set: None, - shortcut_type: None, - subtitle: None, - subtitle_set: None, - title: None, - title_size_group: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> ShortcutsShortcut { diff --git a/src/auto/shortcuts_window.rs b/src/auto/shortcuts_window.rs index e93775df7b94..937b7d3fcde4 100644 --- a/src/auto/shortcuts_window.rs +++ b/src/auto/shortcuts_window.rs @@ -41,6 +41,7 @@ glib_wrapper! { } } +#[derive(Clone, Default)] pub struct ShortcutsWindowBuilder { section_name: Option, view_name: Option, @@ -103,65 +104,7 @@ pub struct ShortcutsWindowBuilder { impl ShortcutsWindowBuilder { pub fn new() -> Self { - Self { - section_name: None, - view_name: None, - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - } + Self::default() } pub fn build(self) -> ShortcutsWindow { diff --git a/src/auto/size_group.rs b/src/auto/size_group.rs index 079146133e39..f39d22454d5a 100644 --- a/src/auto/size_group.rs +++ b/src/auto/size_group.rs @@ -33,13 +33,14 @@ impl SizeGroup { } } +#[derive(Clone, Default)] pub struct SizeGroupBuilder { mode: Option, } impl SizeGroupBuilder { pub fn new() -> Self { - Self { mode: None } + Self::default() } pub fn build(self) -> SizeGroup { diff --git a/src/auto/spin_button.rs b/src/auto/spin_button.rs index 64d74ebbade0..234cb9c1ce49 100644 --- a/src/auto/spin_button.rs +++ b/src/auto/spin_button.rs @@ -67,6 +67,7 @@ impl SpinButton { } } +#[derive(Clone, Default)] pub struct SpinButtonBuilder { adjustment: Option, climb_rate: Option, @@ -117,53 +118,7 @@ pub struct SpinButtonBuilder { impl SpinButtonBuilder { pub fn new() -> Self { - Self { - adjustment: None, - climb_rate: None, - digits: None, - numeric: None, - snap_to_ticks: None, - update_policy: None, - value: None, - wrap: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - editable: None, - max_width_chars: None, - text: None, - width_chars: None, - xalign: None, - orientation: None, - } + Self::default() } pub fn build(self) -> SpinButton { diff --git a/src/auto/spinner.rs b/src/auto/spinner.rs index aaa71fb43b1c..6951441da8a9 100644 --- a/src/auto/spinner.rs +++ b/src/auto/spinner.rs @@ -44,6 +44,7 @@ impl Default for Spinner { } } +#[derive(Clone, Default)] pub struct SpinnerBuilder { active: Option, can_focus: Option, @@ -81,40 +82,7 @@ pub struct SpinnerBuilder { impl SpinnerBuilder { pub fn new() -> Self { - Self { - active: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Spinner { diff --git a/src/auto/stack.rs b/src/auto/stack.rs index f7bf5871d952..5eee5c0ceb5f 100644 --- a/src/auto/stack.rs +++ b/src/auto/stack.rs @@ -47,6 +47,7 @@ impl Default for Stack { } } +#[derive(Clone, Default)] pub struct StackBuilder { hhomogeneous: Option, homogeneous: Option, @@ -91,47 +92,7 @@ pub struct StackBuilder { impl StackBuilder { pub fn new() -> Self { - Self { - hhomogeneous: None, - homogeneous: None, - interpolate_size: None, - transition_duration: None, - transition_type: None, - vhomogeneous: None, - visible_child: None, - visible_child_name: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Stack { diff --git a/src/auto/stack_sidebar.rs b/src/auto/stack_sidebar.rs index 3b21e750b3b7..46e38f2bb3a9 100644 --- a/src/auto/stack_sidebar.rs +++ b/src/auto/stack_sidebar.rs @@ -45,6 +45,7 @@ impl Default for StackSidebar { } } +#[derive(Clone, Default)] pub struct StackSidebarBuilder { stack: Option, can_focus: Option, @@ -82,40 +83,7 @@ pub struct StackSidebarBuilder { impl StackSidebarBuilder { pub fn new() -> Self { - Self { - stack: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> StackSidebar { diff --git a/src/auto/stack_switcher.rs b/src/auto/stack_switcher.rs index a7dac5232711..264f6e20028d 100644 --- a/src/auto/stack_switcher.rs +++ b/src/auto/stack_switcher.rs @@ -48,6 +48,7 @@ impl Default for StackSwitcher { } } +#[derive(Clone, Default)] pub struct StackSwitcherBuilder { stack: Option, baseline_position: Option, @@ -89,44 +90,7 @@ pub struct StackSwitcherBuilder { impl StackSwitcherBuilder { pub fn new() -> Self { - Self { - stack: None, - baseline_position: None, - homogeneous: None, - spacing: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> StackSwitcher { diff --git a/src/auto/statusbar.rs b/src/auto/statusbar.rs index 448fa27ad6ef..2ba6fff981f3 100644 --- a/src/auto/statusbar.rs +++ b/src/auto/statusbar.rs @@ -45,6 +45,7 @@ impl Default for Statusbar { } } +#[derive(Clone, Default)] pub struct StatusbarBuilder { can_focus: Option, can_target: Option, @@ -81,39 +82,7 @@ pub struct StatusbarBuilder { impl StatusbarBuilder { pub fn new() -> Self { - Self { - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Statusbar { diff --git a/src/auto/switch.rs b/src/auto/switch.rs index 7352b8672b19..6bbdf33db7d6 100644 --- a/src/auto/switch.rs +++ b/src/auto/switch.rs @@ -46,6 +46,7 @@ impl Default for Switch { } } +#[derive(Clone, Default)] pub struct SwitchBuilder { active: Option, state: Option, @@ -85,42 +86,7 @@ pub struct SwitchBuilder { impl SwitchBuilder { pub fn new() -> Self { - Self { - active: None, - state: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> Switch { diff --git a/src/auto/text.rs b/src/auto/text.rs index 3512da1a6c30..a4e30e24714a 100644 --- a/src/auto/text.rs +++ b/src/auto/text.rs @@ -775,6 +775,7 @@ impl Default for Text { } } +#[derive(Clone, Default)] pub struct TextBuilder { activates_default: Option, attributes: Option, @@ -833,61 +834,7 @@ pub struct TextBuilder { impl TextBuilder { pub fn new() -> Self { - Self { - activates_default: None, - attributes: None, - buffer: None, - enable_emoji_completion: None, - im_module: None, - input_hints: None, - input_purpose: None, - invisible_char: None, - invisible_char_set: None, - max_length: None, - overwrite_mode: None, - placeholder_text: None, - populate_all: None, - propagate_text_width: None, - tabs: None, - truncate_multiline: None, - visibility: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - editable: None, - max_width_chars: None, - text: None, - width_chars: None, - xalign: None, - } + Self::default() } pub fn build(self) -> Text { diff --git a/src/auto/text_view.rs b/src/auto/text_view.rs index a6615e9f7cb3..1b76ec018c06 100644 --- a/src/auto/text_view.rs +++ b/src/auto/text_view.rs @@ -77,6 +77,7 @@ impl Default for TextView { } } +#[derive(Clone, Default)] pub struct TextViewBuilder { accepts_tab: Option, bottom_margin: Option, @@ -138,64 +139,7 @@ pub struct TextViewBuilder { impl TextViewBuilder { pub fn new() -> Self { - Self { - accepts_tab: None, - bottom_margin: None, - buffer: None, - cursor_visible: None, - editable: None, - im_module: None, - indent: None, - input_hints: None, - input_purpose: None, - justification: None, - left_margin: None, - monospace: None, - overwrite: None, - pixels_above_lines: None, - pixels_below_lines: None, - pixels_inside_wrap: None, - populate_all: None, - right_margin: None, - tabs: None, - top_margin: None, - wrap_mode: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - hadjustment: None, - hscroll_policy: None, - vadjustment: None, - vscroll_policy: None, - } + Self::default() } pub fn build(self) -> TextView { diff --git a/src/auto/toggle_button.rs b/src/auto/toggle_button.rs index aa3ec692d5ec..846cfa9bac67 100644 --- a/src/auto/toggle_button.rs +++ b/src/auto/toggle_button.rs @@ -67,6 +67,7 @@ impl Default for ToggleButton { } } +#[derive(Clone, Default)] pub struct ToggleButtonBuilder { active: Option, icon_name: Option, @@ -109,45 +110,7 @@ pub struct ToggleButtonBuilder { impl ToggleButtonBuilder { pub fn new() -> Self { - Self { - active: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> ToggleButton { diff --git a/src/auto/toggle_tool_button.rs b/src/auto/toggle_tool_button.rs index 09138e3bb833..24dd27157747 100644 --- a/src/auto/toggle_tool_button.rs +++ b/src/auto/toggle_tool_button.rs @@ -47,6 +47,7 @@ impl Default for ToggleToolButton { } } +#[derive(Clone, Default)] pub struct ToggleToolButtonBuilder { active: Option, icon_name: Option, @@ -95,51 +96,7 @@ pub struct ToggleToolButtonBuilder { impl ToggleToolButtonBuilder { pub fn new() -> Self { - Self { - active: None, - icon_name: None, - icon_widget: None, - label: None, - label_widget: None, - use_underline: None, - expand_item: None, - homogeneous: None, - is_important: None, - visible_horizontal: None, - visible_vertical: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> ToggleToolButton { diff --git a/src/auto/tool_button.rs b/src/auto/tool_button.rs index eb3038b91c12..600f97107eea 100644 --- a/src/auto/tool_button.rs +++ b/src/auto/tool_button.rs @@ -50,6 +50,7 @@ impl ToolButton { } } +#[derive(Clone, Default)] pub struct ToolButtonBuilder { icon_name: Option, icon_widget: Option, @@ -97,50 +98,7 @@ pub struct ToolButtonBuilder { impl ToolButtonBuilder { pub fn new() -> Self { - Self { - icon_name: None, - icon_widget: None, - label: None, - label_widget: None, - use_underline: None, - expand_item: None, - homogeneous: None, - is_important: None, - visible_horizontal: None, - visible_vertical: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - } + Self::default() } pub fn build(self) -> ToolButton { diff --git a/src/auto/tool_item.rs b/src/auto/tool_item.rs index 3b0db951c91d..2f93adf34ded 100644 --- a/src/auto/tool_item.rs +++ b/src/auto/tool_item.rs @@ -50,6 +50,7 @@ impl Default for ToolItem { } } +#[derive(Clone, Default)] pub struct ToolItemBuilder { expand_item: Option, homogeneous: Option, @@ -91,44 +92,7 @@ pub struct ToolItemBuilder { impl ToolItemBuilder { pub fn new() -> Self { - Self { - expand_item: None, - homogeneous: None, - is_important: None, - visible_horizontal: None, - visible_vertical: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> ToolItem { diff --git a/src/auto/toolbar.rs b/src/auto/toolbar.rs index 64c1ba664964..4845c825c02f 100644 --- a/src/auto/toolbar.rs +++ b/src/auto/toolbar.rs @@ -53,6 +53,7 @@ impl Default for Toolbar { } } +#[derive(Clone, Default)] pub struct ToolbarBuilder { show_arrow: Option, toolbar_style: Option, @@ -92,42 +93,7 @@ pub struct ToolbarBuilder { impl ToolbarBuilder { pub fn new() -> Self { - Self { - show_arrow: None, - toolbar_style: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - orientation: None, - } + Self::default() } pub fn build(self) -> Toolbar { diff --git a/src/auto/tree_view.rs b/src/auto/tree_view.rs index 7ece263378b9..8385923fd57a 100644 --- a/src/auto/tree_view.rs +++ b/src/auto/tree_view.rs @@ -75,6 +75,7 @@ impl Default for TreeView { } } +#[derive(Clone, Default)] pub struct TreeViewBuilder { activate_on_single_click: Option, enable_grid_lines: Option, @@ -132,60 +133,7 @@ pub struct TreeViewBuilder { impl TreeViewBuilder { pub fn new() -> Self { - Self { - activate_on_single_click: None, - enable_grid_lines: None, - enable_search: None, - enable_tree_lines: None, - expander_column: None, - fixed_height_mode: None, - headers_clickable: None, - headers_visible: None, - hover_expand: None, - hover_selection: None, - level_indentation: None, - model: None, - reorderable: None, - rubber_banding: None, - search_column: None, - show_expanders: None, - tooltip_column: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - hadjustment: None, - hscroll_policy: None, - vadjustment: None, - vscroll_policy: None, - } + Self::default() } pub fn build(self) -> TreeView { diff --git a/src/auto/tree_view_column.rs b/src/auto/tree_view_column.rs index 147d63f50338..4b5009e62aed 100644 --- a/src/auto/tree_view_column.rs +++ b/src/auto/tree_view_column.rs @@ -63,6 +63,7 @@ impl Default for TreeViewColumn { } } +#[derive(Clone, Default)] pub struct TreeViewColumnBuilder { alignment: Option, cell_area: Option, @@ -85,25 +86,7 @@ pub struct TreeViewColumnBuilder { impl TreeViewColumnBuilder { pub fn new() -> Self { - Self { - alignment: None, - cell_area: None, - clickable: None, - expand: None, - fixed_width: None, - max_width: None, - min_width: None, - reorderable: None, - resizable: None, - sizing: None, - sort_column_id: None, - sort_indicator: None, - sort_order: None, - spacing: None, - title: None, - visible: None, - widget: None, - } + Self::default() } pub fn build(self) -> TreeViewColumn { diff --git a/src/auto/versions.txt b/src/auto/versions.txt index 098736327d70..02762baf430c 100644 --- a/src/auto/versions.txt +++ b/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 8335272) +Generated by gir (https://github.com/gtk-rs/gir @ 83cc9ad) from gir-files (https://github.com/gtk-rs/gir-files @ 22748fa) diff --git a/src/auto/video.rs b/src/auto/video.rs index 65754bebbdc2..78e4f59659f6 100644 --- a/src/auto/video.rs +++ b/src/auto/video.rs @@ -85,6 +85,7 @@ impl Default for Video { } } +#[derive(Clone, Default)] pub struct VideoBuilder { autoplay: Option, file: Option, @@ -125,43 +126,7 @@ pub struct VideoBuilder { impl VideoBuilder { pub fn new() -> Self { - Self { - autoplay: None, - file: None, - loop_: None, - media_stream: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - } + Self::default() } pub fn build(self) -> Video { diff --git a/src/auto/viewport.rs b/src/auto/viewport.rs index edcd4e403f5b..57c200226da7 100644 --- a/src/auto/viewport.rs +++ b/src/auto/viewport.rs @@ -51,6 +51,7 @@ impl Viewport { } } +#[derive(Clone, Default)] pub struct ViewportBuilder { shadow_type: Option, can_focus: Option, @@ -92,44 +93,7 @@ pub struct ViewportBuilder { impl ViewportBuilder { pub fn new() -> Self { - Self { - shadow_type: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - hadjustment: None, - hscroll_policy: None, - vadjustment: None, - vscroll_policy: None, - } + Self::default() } pub fn build(self) -> Viewport { diff --git a/src/auto/volume_button.rs b/src/auto/volume_button.rs index 58a8379c80a0..a0bb73fcd6c1 100644 --- a/src/auto/volume_button.rs +++ b/src/auto/volume_button.rs @@ -53,6 +53,7 @@ impl Default for VolumeButton { } } +#[derive(Clone, Default)] pub struct VolumeButtonBuilder { use_symbolic: Option, adjustment: Option, @@ -99,49 +100,7 @@ pub struct VolumeButtonBuilder { impl VolumeButtonBuilder { pub fn new() -> Self { - Self { - use_symbolic: None, - adjustment: None, - icons: None, - value: None, - icon_name: None, - label: None, - relief: None, - use_underline: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - action_name: None, - orientation: None, - } + Self::default() } pub fn build(self) -> VolumeButton { diff --git a/src/auto/window.rs b/src/auto/window.rs index 1e680abd7c83..389103239206 100644 --- a/src/auto/window.rs +++ b/src/auto/window.rs @@ -87,6 +87,7 @@ impl Window { } } +#[derive(Clone, Default)] pub struct WindowBuilder { accept_focus: Option, application: Option, @@ -147,63 +148,7 @@ pub struct WindowBuilder { impl WindowBuilder { pub fn new() -> Self { - Self { - accept_focus: None, - application: None, - attached_to: None, - decorated: None, - default_height: None, - default_widget: None, - default_width: None, - deletable: None, - destroy_with_parent: None, - display: None, - focus_on_map: None, - focus_visible: None, - hide_on_close: None, - icon_name: None, - mnemonics_visible: None, - modal: None, - resizable: None, - startup_id: None, - title: None, - transient_for: None, - type_: None, - type_hint: None, - window_position: None, - can_focus: None, - can_target: None, - css_name: None, - cursor: None, - expand: None, - focus_on_click: None, - halign: None, - has_focus: None, - has_tooltip: None, - height_request: None, - hexpand: None, - hexpand_set: None, - is_focus: None, - layout_manager: None, - margin: None, - margin_bottom: None, - margin_end: None, - margin_start: None, - margin_top: None, - name: None, - opacity: None, - overflow: None, - receives_default: None, - sensitive: None, - tooltip_markup: None, - tooltip_text: None, - valign: None, - vexpand: None, - vexpand_set: None, - visible: None, - width_request: None, - focus_widget: None, - } + Self::default() } pub fn build(self) -> Window { From 33a45b74d5d57f4b73f6bbe5da1e6b8f5c5ed8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 2 Jan 2020 10:49:47 +0200 Subject: [PATCH 3/4] Switch from lazy_static to once_cell --- Cargo.toml | 2 +- src/lib.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 803c13e9a6bb..2928cc2d2e26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ git = "https://github.com/gtk-rs/lgpl-docs" [dependencies] libc = "0.2" bitflags = "1.0" -lazy_static = "1.0" +once_cell = "1.0" atk = { git = "https://github.com/gtk-rs/atk" } atk-sys = { git = "https://github.com/gtk-rs/sys" } cairo-sys-rs = { git = "https://github.com/gtk-rs/cairo" } diff --git a/src/lib.rs b/src/lib.rs index f3ad6aaa8ed0..2988d80346a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,8 +15,7 @@ extern crate libc; #[macro_use] extern crate bitflags; -#[macro_use] -extern crate lazy_static; +extern crate once_cell; extern crate atk_sys; extern crate cairo_sys; From ff54ac769042faa69a7e7f6016f37f0f903ca78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 5 Jan 2020 19:41:54 +0200 Subject: [PATCH 4/4] Update minimum travis Rust version to 1.39 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3017bfb20d79..5bd97434f573 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: rust: stable env: GTK=3.96 FEATURES= - os: linux - rust: 1.36.0 + rust: 1.39.0 env: GTK=3.96 FEATURES= addons: apt: