diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-11-20 13:25:14 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-11-20 15:31:06 +0300 |
commit | 55aad51141907ea7834eb0cbcdf6f92e3fdce5d1 (patch) | |
tree | f556878f25667e079ce6d0dac96bda76f5f8be31 /tutorial | |
parent | 288acaa7ccb596e63af47b8ef7b8408a84f973b3 (diff) |
Update for glib constructor renames
See https://github.com/gtk-rs/gtk-rs-core/pull/384
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/src/progressbin/imp.rs | 2 | ||||
-rw-r--r-- | tutorial/src/rgb2gray/imp.rs | 4 | ||||
-rw-r--r-- | tutorial/src/sinesrc/imp.rs | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tutorial/src/progressbin/imp.rs b/tutorial/src/progressbin/imp.rs index 18c6b5752..5029c9c59 100644 --- a/tutorial/src/progressbin/imp.rs +++ b/tutorial/src/progressbin/imp.rs @@ -81,7 +81,7 @@ impl ObjectImpl for ProgressBin { // Metadata for the element's properties fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { - vec![glib::ParamSpec::new_enum( + vec![glib::ParamSpecEnum::new( "output", "Output", "Defines the output type of the progressbin", diff --git a/tutorial/src/rgb2gray/imp.rs b/tutorial/src/rgb2gray/imp.rs index 06d90dc2d..d79a0633b 100644 --- a/tutorial/src/rgb2gray/imp.rs +++ b/tutorial/src/rgb2gray/imp.rs @@ -97,14 +97,14 @@ impl ObjectImpl for Rgb2Gray { // Metadata for the properties static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { vec![ - glib::ParamSpec::new_boolean( + glib::ParamSpecBoolean::new( "invert", "Invert", "Invert grayscale output", DEFAULT_INVERT, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, ), - glib::ParamSpec::new_uint( + glib::ParamSpecUInt::new( "shift", "Shift", "Shift grayscale output (wrapping around)", diff --git a/tutorial/src/sinesrc/imp.rs b/tutorial/src/sinesrc/imp.rs index 4ada4ddd0..d26b83728 100644 --- a/tutorial/src/sinesrc/imp.rs +++ b/tutorial/src/sinesrc/imp.rs @@ -167,7 +167,7 @@ impl ObjectImpl for SineSrc { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { vec![ - glib::ParamSpec::new_uint( + glib::ParamSpecUInt::new( "samples-per-buffer", "Samples Per Buffer", "Number of samples per output buffer", @@ -176,7 +176,7 @@ impl ObjectImpl for SineSrc { DEFAULT_SAMPLES_PER_BUFFER, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, ), - glib::ParamSpec::new_uint( + glib::ParamSpecUInt::new( "freq", "Frequency", "Frequency", @@ -185,7 +185,7 @@ impl ObjectImpl for SineSrc { DEFAULT_FREQ, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, ), - glib::ParamSpec::new_double( + glib::ParamSpecDouble::new( "volume", "Volume", "Output volume", @@ -194,14 +194,14 @@ impl ObjectImpl for SineSrc { DEFAULT_VOLUME, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, ), - glib::ParamSpec::new_boolean( + glib::ParamSpecBoolean::new( "mute", "Mute", "Mute", DEFAULT_MUTE, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, ), - glib::ParamSpec::new_boolean( + glib::ParamSpecBoolean::new( "is-live", "Is Live", "(Pseudo) live output", |