Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit d8d6d34

Browse files
Merge pull request #442 from sdroege/gnome-3.14
Update to GNOME 3.14 versions
2 parents 348454c + 10d9d21 commit d8d6d34

File tree

16 files changed

+17
-85
lines changed

16 files changed

+17
-85
lines changed

Cargo.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,21 @@ lazy_static = "1.2"
2525
libc = "0.2"
2626
bitflags = "1.0"
2727
futures-preview = { version = "0.2", optional = true }
28-
glib-sys = { git = "https://github.com/gtk-rs/sys" }
29-
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
28+
glib-sys = { git = "https://github.com/gtk-rs/sys", features = ["v2_40"] }
29+
gobject-sys = { git = "https://github.com/gtk-rs/sys", features = ["v2_42"] }
3030

3131
[dev-dependencies]
3232
tempfile = "3"
3333

3434
[features]
35-
v2_34 = ["glib-sys/v2_34", "gobject-sys/v2_34"]
36-
v2_36 = ["v2_34", "glib-sys/v2_36", "gobject-sys/v2_36"]
37-
v2_38 = ["v2_36", "glib-sys/v2_38", "gobject-sys/v2_38"]
38-
v2_40 = ["v2_38", "glib-sys/v2_40"]
39-
v2_44 = ["v2_40", "glib-sys/v2_44", "gobject-sys/v2_44"]
35+
v2_44 = ["glib-sys/v2_44", "gobject-sys/v2_44"]
4036
v2_46 = ["v2_44", "glib-sys/v2_46", "gobject-sys/v2_46"]
4137
v2_48 = ["v2_46", "glib-sys/v2_48"]
4238
v2_50 = ["v2_48", "glib-sys/v2_50"]
4339
v2_52 = ["v2_50", "glib-sys/v2_52"]
4440
v2_54 = ["v2_52", "glib-sys/v2_54", "gobject-sys/v2_54"]
4541
v2_56 = ["v2_54", "glib-sys/v2_56"]
4642
v2_58 = ["v2_56", "glib-sys/v2_58"]
47-
futures = ["futures-preview", "v2_36"]
43+
futures = ["futures-preview"]
4844
subclassing = []
4945
dox = ["glib-sys/dox", "gobject-sys/dox"]

Gir.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
girs_dir = "gir-files"
33
library = "GLib"
44
version = "2.0"
5-
min_cfg_version = "2.32"
5+
min_cfg_version = "2.42"
66
target_path = "."
77
work_mode = "normal"
88
single_version_file = true
9+
deprecate_by_min_version = true
910

1011
generate = [
1112
"GLib.DateDay",

Gir_GObject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
girs_dir = "gir-files"
33
library = "GObject"
44
version = "2.0"
5-
min_cfg_version = "2.32"
5+
min_cfg_version = "2.42"
66
target_path = "."
77
auto_path = "src/gobject/auto"
88
work_mode = "normal"
99
single_version_file = true
10+
deprecate_by_min_version = true
1011

1112
generate = [
1213
"GObject.BindingFlags",

gir

src/auto/constants.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ lazy_static! {
2020
lazy_static! {
2121
pub static ref KEY_FILE_DESKTOP_GROUP: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_GROUP).to_str().unwrap()};
2222
}
23-
#[cfg(any(feature = "v2_38", feature = "dox"))]
2423
lazy_static! {
2524
pub static ref KEY_FILE_DESKTOP_KEY_ACTIONS: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_ACTIONS).to_str().unwrap()};
2625
}
@@ -30,7 +29,6 @@ lazy_static! {
3029
lazy_static! {
3130
pub static ref KEY_FILE_DESKTOP_KEY_COMMENT: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_COMMENT).to_str().unwrap()};
3231
}
33-
#[cfg(any(feature = "v2_38", feature = "dox"))]
3432
lazy_static! {
3533
pub static ref KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE).to_str().unwrap()};
3634
}

src/auto/enums.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pub enum ChecksumType {
1414
Md5,
1515
Sha1,
1616
Sha256,
17-
#[cfg(any(feature = "v2_36", feature = "dox"))]
1817
Sha512,
1918
#[cfg(any(feature = "v2_52", feature = "dox"))]
2019
Sha384,
@@ -28,7 +27,6 @@ impl fmt::Display for ChecksumType {
2827
ChecksumType::Md5 => "Md5",
2928
ChecksumType::Sha1 => "Sha1",
3029
ChecksumType::Sha256 => "Sha256",
31-
#[cfg(any(feature = "v2_36", feature = "dox"))]
3230
ChecksumType::Sha512 => "Sha512",
3331
#[cfg(any(feature = "v2_52", feature = "dox"))]
3432
ChecksumType::Sha384 => "Sha384",
@@ -46,7 +44,6 @@ impl ToGlib for ChecksumType {
4644
ChecksumType::Md5 => ffi::G_CHECKSUM_MD5,
4745
ChecksumType::Sha1 => ffi::G_CHECKSUM_SHA1,
4846
ChecksumType::Sha256 => ffi::G_CHECKSUM_SHA256,
49-
#[cfg(any(feature = "v2_36", feature = "dox"))]
5047
ChecksumType::Sha512 => ffi::G_CHECKSUM_SHA512,
5148
#[cfg(any(feature = "v2_52", feature = "dox"))]
5249
ChecksumType::Sha384 => ffi::G_CHECKSUM_SHA384,
@@ -62,7 +59,6 @@ impl FromGlib<ffi::GChecksumType> for ChecksumType {
6259
0 => ChecksumType::Md5,
6360
1 => ChecksumType::Sha1,
6461
2 => ChecksumType::Sha256,
65-
#[cfg(any(feature = "v2_36", feature = "dox"))]
6662
3 => ChecksumType::Sha512,
6763
#[cfg(any(feature = "v2_52", feature = "dox"))]
6864
4 => ChecksumType::Sha384,

src/auto/functions.rs

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

5-
#[cfg(any(feature = "v2_34", feature = "dox"))]
65
use Bytes;
76
use ChecksumType;
87
use Error;
@@ -56,11 +55,6 @@ pub fn assertion_message_expr<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&
5655
}
5756
}
5857

59-
//#[deprecated]
60-
//pub fn atexit<P: FnOnce() + Send + Sync + 'static>(func: P) {
61-
// unsafe { TODO: call ffi::g_atexit() }
62-
//}
63-
6458
pub fn base64_decode(text: &str) -> Vec<u8> {
6559
unsafe {
6660
let mut out_len = mem::uninitialized();
@@ -92,13 +86,6 @@ pub fn base64_encode(data: &[u8]) -> Option<GString> {
9286
// unsafe { TODO: call ffi::g_base64_encode_step() }
9387
//}
9488

95-
#[deprecated]
96-
pub fn basename<P: AsRef<std::path::Path>>(file_name: P) -> Option<std::path::PathBuf> {
97-
unsafe {
98-
from_glib_none(ffi::g_basename(file_name.as_ref().to_glib_none().0))
99-
}
100-
}
101-
10289
pub fn bit_nth_lsf(mask: libc::c_ulong, nth_bit: i32) -> i32 {
10390
unsafe {
10491
ffi::g_bit_nth_lsf(mask, nth_bit)
@@ -174,12 +161,10 @@ pub fn clear_error() -> Result<(), Error> {
174161
// unsafe { TODO: call ffi::g_clear_handle_id() }
175162
//}
176163

177-
//#[cfg(any(feature = "v2_34", feature = "dox"))]
178164
//pub fn clear_pointer(pp: /*Unimplemented*/Fundamental: Pointer) {
179165
// unsafe { TODO: call ffi::g_clear_pointer() }
180166
//}
181167

182-
#[cfg(any(feature = "v2_34", feature = "dox"))]
183168
pub fn compute_checksum_for_bytes(checksum_type: ChecksumType, data: &Bytes) -> Option<GString> {
184169
unsafe {
185170
from_glib_full(ffi::g_compute_checksum_for_bytes(checksum_type.to_glib(), data.to_glib_none().0))
@@ -243,7 +228,6 @@ pub fn compute_hmac_for_string(digest_type: ChecksumType, key: &[u8], str: &str)
243228
// unsafe { TODO: call ffi::g_datalist_get_flags() }
244229
//}
245230

246-
//#[cfg(any(feature = "v2_34", feature = "dox"))]
247231
//pub fn datalist_id_dup_data(datalist: /*Ignored*/&mut Data, key_id: Quark, dup_func: /*Unimplemented*/FnMut(/*Unimplemented*/Fundamental: Pointer) -> /*Unimplemented*/Fundamental: Pointer, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> /*Unimplemented*/Option<Fundamental: Pointer> {
248232
// unsafe { TODO: call ffi::g_datalist_id_dup_data() }
249233
//}
@@ -256,7 +240,6 @@ pub fn compute_hmac_for_string(digest_type: ChecksumType, key: &[u8], str: &str)
256240
// unsafe { TODO: call ffi::g_datalist_id_remove_no_notify() }
257241
//}
258242

259-
//#[cfg(any(feature = "v2_34", feature = "dox"))]
260243
//pub fn datalist_id_replace_data(datalist: /*Ignored*/&mut Data, key_id: Quark, oldval: /*Unimplemented*/Option<Fundamental: Pointer>, newval: /*Unimplemented*/Option<Fundamental: Pointer>) -> Option<Fn() + 'static> {
261244
// unsafe { TODO: call ffi::g_datalist_id_replace_data() }
262245
//}
@@ -412,13 +395,6 @@ pub fn format_size(size: u64) -> Option<GString> {
412395
}
413396
}
414397

415-
#[deprecated]
416-
pub fn format_size_for_display(size: i64) -> Option<GString> {
417-
unsafe {
418-
from_glib_full(ffi::g_format_size_for_display(size))
419-
}
420-
}
421-
422398
pub fn format_size_full(size: u64, flags: FormatSizeFlags) -> Option<GString> {
423399
unsafe {
424400
from_glib_full(ffi::g_format_size_full(size, flags.to_glib()))
@@ -494,7 +470,6 @@ pub fn get_monotonic_time() -> i64 {
494470
}
495471
}
496472

497-
#[cfg(any(feature = "v2_36", feature = "dox"))]
498473
pub fn get_num_processors() -> u32 {
499474
unsafe {
500475
ffi::g_get_num_processors()
@@ -1055,7 +1030,6 @@ pub fn spaced_primes_closest(num: u32) -> u32 {
10551030
// unsafe { TODO: call ffi::g_spawn_async_with_pipes() }
10561031
//}
10571032

1058-
#[cfg(any(feature = "v2_34", feature = "dox"))]
10591033
pub fn spawn_check_exit_status(exit_status: i32) -> Result<(), Error> {
10601034
unsafe {
10611035
let mut error = ptr::null_mut();
@@ -1095,7 +1069,6 @@ pub fn stpcpy(dest: &str, src: &str) -> Option<GString> {
10951069
// unsafe { TODO: call ffi::g_test_add_data_func() }
10961070
//}
10971071

1098-
//#[cfg(any(feature = "v2_34", feature = "dox"))]
10991072
//pub fn test_add_data_func_full<P: Fn() + Send + Sync + 'static>(testpath: &str, test_data: /*Unimplemented*/Option<Fundamental: Pointer>, test_func: P) {
11001073
// unsafe { TODO: call ffi::g_test_add_data_func_full() }
11011074
//}
@@ -1126,7 +1099,6 @@ pub fn test_bug_base(uri_pattern: &str) {
11261099
}
11271100
}
11281101

1129-
//#[cfg(any(feature = "v2_38", feature = "dox"))]
11301102
//pub fn test_build_filename(file_type: /*Ignored*/TestFileType, first_path: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<GString> {
11311103
// unsafe { TODO: call ffi::g_test_build_filename() }
11321104
//}
@@ -1139,7 +1111,6 @@ pub fn test_bug_base(uri_pattern: &str) {
11391111
// unsafe { TODO: call ffi::g_test_create_suite() }
11401112
//}
11411113

1142-
//#[cfg(any(feature = "v2_34", feature = "dox"))]
11431114
//pub fn test_expect_message<'a, P: Into<Option<&'a str>>>(log_domain: P, log_level: /*Ignored*/LogLevelFlags, pattern: &str) {
11441115
// unsafe { TODO: call ffi::g_test_expect_message() }
11451116
//}
@@ -1150,19 +1121,16 @@ pub fn test_fail() {
11501121
}
11511122
}
11521123

1153-
#[cfg(any(feature = "v2_38", feature = "dox"))]
11541124
pub fn test_failed() -> bool {
11551125
unsafe {
11561126
from_glib(ffi::g_test_failed())
11571127
}
11581128
}
11591129

1160-
//#[cfg(any(feature = "v2_38", feature = "dox"))]
11611130
//pub fn test_get_dir(file_type: /*Ignored*/TestFileType) -> Option<std::path::PathBuf> {
11621131
// unsafe { TODO: call ffi::g_test_get_dir() }
11631132
//}
11641133

1165-
//#[cfg(any(feature = "v2_38", feature = "dox"))]
11661134
//pub fn test_get_filename(file_type: /*Ignored*/TestFileType, first_path: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Option<GString> {
11671135
// unsafe { TODO: call ffi::g_test_get_filename() }
11681136
//}
@@ -1171,7 +1139,6 @@ pub fn test_failed() -> bool {
11711139
// unsafe { TODO: call ffi::g_test_get_root() }
11721140
//}
11731141

1174-
#[cfg(any(feature = "v2_38", feature = "dox"))]
11751142
pub fn test_incomplete<'a, P: Into<Option<&'a str>>>(msg: P) {
11761143
let msg = msg.into();
11771144
unsafe {
@@ -1245,22 +1212,19 @@ pub fn test_run() -> i32 {
12451212
// unsafe { TODO: call ffi::g_test_run_suite() }
12461213
//}
12471214

1248-
#[cfg(any(feature = "v2_38", feature = "dox"))]
12491215
pub fn test_set_nonfatal_assertions() {
12501216
unsafe {
12511217
ffi::g_test_set_nonfatal_assertions();
12521218
}
12531219
}
12541220

1255-
#[cfg(any(feature = "v2_38", feature = "dox"))]
12561221
pub fn test_skip<'a, P: Into<Option<&'a str>>>(msg: P) {
12571222
let msg = msg.into();
12581223
unsafe {
12591224
ffi::g_test_skip(msg.to_glib_none().0);
12601225
}
12611226
}
12621227

1263-
#[cfg(any(feature = "v2_38", feature = "dox"))]
12641228
pub fn test_subprocess() -> bool {
12651229
unsafe {
12661230
from_glib(ffi::g_test_subprocess())
@@ -1307,7 +1271,6 @@ pub fn test_trap_reached_timeout() -> bool {
13071271
}
13081272
}
13091273

1310-
//#[cfg(any(feature = "v2_38", feature = "dox"))]
13111274
//pub fn test_trap_subprocess<'a, P: Into<Option<&'a str>>>(test_path: P, usec_timeout: u64, test_flags: /*Ignored*/TestSubprocessFlags) {
13121275
// unsafe { TODO: call ffi::g_test_trap_subprocess() }
13131276
//}

src/auto/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ pub use self::constants::CSET_DIGITS;
5353
pub use self::constants::CSET_a_2_z;
5454
pub use self::constants::KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX;
5555
pub use self::constants::KEY_FILE_DESKTOP_GROUP;
56-
#[cfg(any(feature = "v2_38", feature = "dox"))]
5756
pub use self::constants::KEY_FILE_DESKTOP_KEY_ACTIONS;
5857
pub use self::constants::KEY_FILE_DESKTOP_KEY_CATEGORIES;
5958
pub use self::constants::KEY_FILE_DESKTOP_KEY_COMMENT;
60-
#[cfg(any(feature = "v2_38", feature = "dox"))]
6159
pub use self::constants::KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE;
6260
pub use self::constants::KEY_FILE_DESKTOP_KEY_EXEC;
6361
pub use self::constants::KEY_FILE_DESKTOP_KEY_FULLNAME;

src/auto/source.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ impl Source {
3333
// unsafe { TODO: call ffi::g_source_add_poll() }
3434
//}
3535

36-
//#[cfg(any(feature = "v2_36", feature = "dox"))]
3736
//pub fn add_unix_fd(&self, fd: i32, events: IOCondition) -> /*Unimplemented*/Option<Fundamental: Pointer> {
3837
// unsafe { TODO: call ffi::g_source_add_unix_fd() }
3938
//}
@@ -63,11 +62,6 @@ impl Source {
6362
}
6463
}
6564

66-
//#[deprecated]
67-
//pub fn get_current_time(&self, timeval: /*Ignored*/&mut TimeVal) {
68-
// unsafe { TODO: call ffi::g_source_get_current_time() }
69-
//}
70-
7165
pub fn get_id(&self) -> u32 {
7266
unsafe {
7367
ffi::g_source_get_id(self.to_glib_none().0)
@@ -104,12 +98,10 @@ impl Source {
10498
}
10599
}
106100

107-
//#[cfg(any(feature = "v2_36", feature = "dox"))]
108101
//pub fn modify_unix_fd(&self, tag: /*Unimplemented*/Fundamental: Pointer, new_events: IOCondition) {
109102
// unsafe { TODO: call ffi::g_source_modify_unix_fd() }
110103
//}
111104

112-
//#[cfg(any(feature = "v2_36", feature = "dox"))]
113105
//pub fn query_unix_fd(&self, tag: /*Unimplemented*/Fundamental: Pointer) -> IOCondition {
114106
// unsafe { TODO: call ffi::g_source_query_unix_fd() }
115107
//}
@@ -124,7 +116,6 @@ impl Source {
124116
// unsafe { TODO: call ffi::g_source_remove_poll() }
125117
//}
126118

127-
//#[cfg(any(feature = "v2_36", feature = "dox"))]
128119
//pub fn remove_unix_fd(&self, tag: /*Unimplemented*/Fundamental: Pointer) {
129120
// unsafe { TODO: call ffi::g_source_remove_unix_fd() }
130121
//}

src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ f5d3eab)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 4a198d9)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 02dfee2)

0 commit comments

Comments
 (0)