Skip to content

Commit bd0b766

Browse files
gtk: Disable CenterLayout builder
1 parent 7c56f7a commit bd0b766

File tree

3 files changed

+5
-44
lines changed

3 files changed

+5
-44
lines changed

gtk4/Gir.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ generate = [
6464
"Gtk.CellRendererSpinner",
6565
"Gtk.CellRendererState",
6666
"Gtk.CenterBox",
67-
"Gtk.CenterLayout",
6867
"Gtk.Collation",
6968
"Gtk.ColorButton",
7069
"Gtk.ColorChooserDialog",
@@ -832,6 +831,11 @@ status = "generate"
832831
name = "path"
833832
const = true
834833

834+
[[object]]
835+
name = "Gtk.CenterLayout"
836+
status = "generate"
837+
generate_builder = false
838+
835839
[[object]]
836840
name = "Gtk.CheckButton"
837841
status = "generate"

gtk4/src/auto/center_layout.rs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ impl CenterLayout {
2828
unsafe { LayoutManager::from_glib_full(ffi::gtk_center_layout_new()).unsafe_cast() }
2929
}
3030

31-
// rustdoc-stripper-ignore-next
32-
/// Creates a new builder-pattern struct instance to construct [`CenterLayout`] objects.
33-
///
34-
/// This method returns an instance of [`CenterLayoutBuilder`](crate::builders::CenterLayoutBuilder) which can be used to create [`CenterLayout`] objects.
35-
pub fn builder() -> CenterLayoutBuilder {
36-
CenterLayoutBuilder::new()
37-
}
38-
3931
#[doc(alias = "gtk_center_layout_get_baseline_position")]
4032
#[doc(alias = "get_baseline_position")]
4133
pub fn baseline_position(&self) -> BaselinePosition {
@@ -190,40 +182,6 @@ impl Default for CenterLayout {
190182
}
191183
}
192184

193-
// rustdoc-stripper-ignore-next
194-
/// A [builder-pattern] type to construct [`CenterLayout`] objects.
195-
///
196-
/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
197-
#[must_use = "The builder must be built to be used"]
198-
pub struct CenterLayoutBuilder {
199-
builder: glib::object::ObjectBuilder<'static, CenterLayout>,
200-
}
201-
202-
impl CenterLayoutBuilder {
203-
fn new() -> Self {
204-
Self {
205-
builder: glib::object::Object::builder(),
206-
}
207-
}
208-
209-
#[cfg(feature = "v4_12")]
210-
#[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))]
211-
pub fn shrink_center_last(self, shrink_center_last: bool) -> Self {
212-
Self {
213-
builder: self
214-
.builder
215-
.property("shrink-center-last", shrink_center_last),
216-
}
217-
}
218-
219-
// rustdoc-stripper-ignore-next
220-
/// Build the [`CenterLayout`].
221-
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
222-
pub fn build(self) -> CenterLayout {
223-
self.builder.build()
224-
}
225-
}
226-
227185
impl fmt::Display for CenterLayout {
228186
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
229187
f.write_str("CenterLayout")

gtk4/src/auto/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,6 @@ pub mod builders {
14061406
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
14071407
pub use super::cell_view::CellViewBuilder;
14081408
pub use super::center_box::CenterBoxBuilder;
1409-
pub use super::center_layout::CenterLayoutBuilder;
14101409
pub use super::check_button::CheckButtonBuilder;
14111410
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
14121411
pub use super::color_button::ColorButtonBuilder;

0 commit comments

Comments
 (0)