Skip to content

Commit ca946bc

Browse files
gtk: Fix missing version guards
1 parent a0b47d2 commit ca946bc

File tree

6 files changed

+53
-28
lines changed

6 files changed

+53
-28
lines changed

gtk4/Gir.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ generate = [
7373
"Gtk.ColorDialogButton",
7474
"Gtk.ColumnView",
7575
"Gtk.ColumnViewColumn",
76-
"Gtk.ColumnViewSorter",
7776
"Gtk.ComboBoxText",
7877
"Gtk.Constraint",
7978
"Gtk.ConstraintAttribute",
@@ -118,7 +117,6 @@ generate = [
118117
"Gtk.FontChooserDialog",
119118
"Gtk.FontChooserLevel",
120119
"Gtk.FontChooserWidget",
121-
"Gtk.FontLevel",
122120
"Gtk.Frame",
123121
"Gtk.GestureDrag",
124122
"Gtk.GestureLongPress",
@@ -844,6 +842,11 @@ manual_traits = ["ColorChooserExtManual"]
844842
manual = true # array with size
845843
doc_trait_name = "ColorChooserExtManual"
846844

845+
[[object]]
846+
name = "Gtk.ColumnViewSorter"
847+
status = "generate"
848+
version = "4.10"
849+
847850
[[object]]
848851
name = "Gtk.ComboBox"
849852
status = "generate"
@@ -1264,6 +1267,11 @@ status = "generate"
12641267
name = "language"
12651268
const = true
12661269

1270+
[[object]]
1271+
name = "Gtk.FontLevel"
1272+
status = "generate"
1273+
version = "4.10"
1274+
12671275
[[object]]
12681276
name = "Gtk.Gesture"
12691277
status = "generate"

gtk4/src/auto/column_view_sorter.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,16 @@
22
// from gir-files (https://github.com/gtk-rs/gir-files)
33
// DO NOT EDIT
44

5-
#[cfg(any(feature = "v4_10", feature = "dox"))]
6-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
75
use crate::ColumnViewColumn;
8-
#[cfg(any(feature = "v4_10", feature = "dox"))]
9-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
106
use crate::SortType;
117
use crate::Sorter;
12-
#[cfg(any(feature = "v4_10", feature = "dox"))]
13-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
148
use glib::object::ObjectType as ObjectType_;
15-
#[cfg(any(feature = "v4_10", feature = "dox"))]
16-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
179
use glib::signal::connect_raw;
18-
#[cfg(any(feature = "v4_10", feature = "dox"))]
19-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
2010
use glib::signal::SignalHandlerId;
21-
#[cfg(any(feature = "v4_10", feature = "dox"))]
22-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
2311
use glib::translate::*;
24-
#[cfg(any(feature = "v4_10", feature = "dox"))]
25-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
2612
use std::boxed::Box as Box_;
2713
use std::fmt;
28-
#[cfg(any(feature = "v4_10", feature = "dox"))]
29-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
3014
use std::mem;
31-
#[cfg(any(feature = "v4_10", feature = "dox"))]
32-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
3315
use std::mem::transmute;
3416

3517
glib::wrapper! {
@@ -42,16 +24,12 @@ glib::wrapper! {
4224
}
4325

4426
impl ColumnViewSorter {
45-
#[cfg(any(feature = "v4_10", feature = "dox"))]
46-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
4727
#[doc(alias = "gtk_column_view_sorter_get_n_sort_columns")]
4828
#[doc(alias = "get_n_sort_columns")]
4929
pub fn n_sort_columns(&self) -> u32 {
5030
unsafe { ffi::gtk_column_view_sorter_get_n_sort_columns(self.to_glib_none().0) }
5131
}
5232

53-
#[cfg(any(feature = "v4_10", feature = "dox"))]
54-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
5533
#[doc(alias = "gtk_column_view_sorter_get_nth_sort_column")]
5634
#[doc(alias = "get_nth_sort_column")]
5735
pub fn nth_sort_column(&self, position: u32) -> (Option<ColumnViewColumn>, SortType) {
@@ -66,8 +44,6 @@ impl ColumnViewSorter {
6644
}
6745
}
6846

69-
#[cfg(any(feature = "v4_10", feature = "dox"))]
70-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
7147
#[doc(alias = "gtk_column_view_sorter_get_primary_sort_column")]
7248
#[doc(alias = "get_primary_sort_column")]
7349
pub fn primary_sort_column(&self) -> Option<ColumnViewColumn> {
@@ -78,8 +54,6 @@ impl ColumnViewSorter {
7854
}
7955
}
8056

81-
#[cfg(any(feature = "v4_10", feature = "dox"))]
82-
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
8357
#[doc(alias = "gtk_column_view_sorter_get_primary_sort_order")]
8458
#[doc(alias = "get_primary_sort_order")]
8559
pub fn primary_sort_order(&self) -> SortType {

gtk4/src/auto/enums.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4500,6 +4500,8 @@ impl From<FilterMatch> for glib::Value {
45004500
}
45014501
}
45024502

4503+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4504+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45034505
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
45044506
#[non_exhaustive]
45054507
#[doc(alias = "GtkFontLevel")]
@@ -4516,6 +4518,8 @@ pub enum FontLevel {
45164518
__Unknown(i32),
45174519
}
45184520

4521+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4522+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45194523
impl fmt::Display for FontLevel {
45204524
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
45214525
write!(
@@ -4532,6 +4536,8 @@ impl fmt::Display for FontLevel {
45324536
}
45334537
}
45344538

4539+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4540+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45354541
#[doc(hidden)]
45364542
impl IntoGlib for FontLevel {
45374543
type GlibType = ffi::GtkFontLevel;
@@ -4547,6 +4553,8 @@ impl IntoGlib for FontLevel {
45474553
}
45484554
}
45494555

4556+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4557+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45504558
#[doc(hidden)]
45514559
impl FromGlib<ffi::GtkFontLevel> for FontLevel {
45524560
unsafe fn from_glib(value: ffi::GtkFontLevel) -> Self {
@@ -4561,16 +4569,22 @@ impl FromGlib<ffi::GtkFontLevel> for FontLevel {
45614569
}
45624570
}
45634571

4572+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4573+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45644574
impl StaticType for FontLevel {
45654575
fn static_type() -> Type {
45664576
unsafe { from_glib(ffi::gtk_font_level_get_type()) }
45674577
}
45684578
}
45694579

4580+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4581+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45704582
impl glib::value::ValueType for FontLevel {
45714583
type Type = Self;
45724584
}
45734585

4586+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4587+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45744588
unsafe impl<'a> FromValue<'a> for FontLevel {
45754589
type Checker = glib::value::GenericValueTypeChecker<Self>;
45764590

@@ -4580,6 +4594,8 @@ unsafe impl<'a> FromValue<'a> for FontLevel {
45804594
}
45814595
}
45824596

4597+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4598+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45834599
impl ToValue for FontLevel {
45844600
fn to_value(&self) -> glib::Value {
45854601
let mut value = glib::Value::for_value_type::<Self>();
@@ -4594,6 +4610,8 @@ impl ToValue for FontLevel {
45944610
}
45954611
}
45964612

4613+
#[cfg(any(feature = "v4_10", feature = "dox"))]
4614+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
45974615
impl From<FontLevel> for glib::Value {
45984616
#[inline]
45994617
fn from(v: FontLevel) -> Self {

gtk4/src/auto/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,11 @@ pub use self::column_view::ColumnView;
239239
mod column_view_column;
240240
pub use self::column_view_column::ColumnViewColumn;
241241

242+
#[cfg(any(feature = "v4_10", feature = "dox"))]
243+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
242244
mod column_view_sorter;
245+
#[cfg(any(feature = "v4_10", feature = "dox"))]
246+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
243247
pub use self::column_view_sorter::ColumnViewSorter;
244248

245249
#[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
@@ -1061,6 +1065,8 @@ pub use self::enums::FileChooserAction;
10611065
pub use self::enums::FileChooserError;
10621066
pub use self::enums::FilterChange;
10631067
pub use self::enums::FilterMatch;
1068+
#[cfg(any(feature = "v4_10", feature = "dox"))]
1069+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
10641070
pub use self::enums::FontLevel;
10651071
pub use self::enums::IconSize;
10661072
pub use self::enums::IconThemeError;

gtk4/sys/Gir.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,24 @@ ignore = [
2828
gdk4 = "Gdk"
2929
gsk4 = "Gsk"
3030

31+
[[object]]
32+
name = "Gtk.ColumnViewSorter"
33+
status = "generate"
34+
[[object.function]]
35+
name = "get_type"
36+
version = "4.10"
37+
3138
[[object]]
3239
name = "Gtk.ExpressionWatch"
3340
status = "generate"
3441
[[object.function]]
3542
name = "get_type"
3643
version = "4.2"
44+
45+
[[object]]
46+
name = "Gtk.FontLevel"
47+
status = "generate"
48+
[[object.function]]
49+
name = "get_type"
50+
version = "4.10"
51+

gtk4/sys/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9210,6 +9210,8 @@ extern "C" {
92109210
//=========================================================================
92119211
// GtkFontLevel
92129212
//=========================================================================
9213+
#[cfg(any(feature = "v4_10", feature = "dox"))]
9214+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
92139215
pub fn gtk_font_level_get_type() -> GType;
92149216

92159217
//=========================================================================
@@ -11774,6 +11776,8 @@ extern "C" {
1177411776
//=========================================================================
1177511777
// GtkColumnViewSorter
1177611778
//=========================================================================
11779+
#[cfg(any(feature = "v4_10", feature = "dox"))]
11780+
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]
1177711781
pub fn gtk_column_view_sorter_get_type() -> GType;
1177811782
#[cfg(any(feature = "v4_10", feature = "dox"))]
1177911783
#[cfg_attr(feature = "dox", doc(cfg(feature = "v4_10")))]

0 commit comments

Comments
 (0)