Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit 6d51f08

Browse files
authored
Merge pull request #819 from sdroege/0.17-backports
0.17 backports
2 parents d989b5d + 9faa387 commit 6d51f08

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+404
-400
lines changed

atk/src/auto/object.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
489489
glib::ObjectExt::set_property(
490490
self.as_ref(),
491491
"accessible-description",
492-
&accessible_description,
492+
accessible_description,
493493
)
494494
}
495495

@@ -502,23 +502,23 @@ impl<O: IsA<Object>> AtkObjectExt for O {
502502
}
503503

504504
fn set_accessible_name(&self, accessible_name: Option<&str>) {
505-
glib::ObjectExt::set_property(self.as_ref(), "accessible-name", &accessible_name)
505+
glib::ObjectExt::set_property(self.as_ref(), "accessible-name", accessible_name)
506506
}
507507

508508
fn accessible_parent(&self) -> Option<Object> {
509509
glib::ObjectExt::property(self.as_ref(), "accessible-parent")
510510
}
511511

512512
fn set_accessible_parent<P: IsA<Object>>(&self, accessible_parent: Option<&P>) {
513-
glib::ObjectExt::set_property(self.as_ref(), "accessible-parent", &accessible_parent)
513+
glib::ObjectExt::set_property(self.as_ref(), "accessible-parent", accessible_parent)
514514
}
515515

516516
fn accessible_role(&self) -> Role {
517517
glib::ObjectExt::property(self.as_ref(), "accessible-role")
518518
}
519519

520520
fn set_accessible_role(&self, accessible_role: Role) {
521-
glib::ObjectExt::set_property(self.as_ref(), "accessible-role", &accessible_role)
521+
glib::ObjectExt::set_property(self.as_ref(), "accessible-role", accessible_role)
522522
}
523523

524524
fn accessible_table_caption(&self) -> Option<glib::GString> {
@@ -529,7 +529,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
529529
glib::ObjectExt::set_property(
530530
self.as_ref(),
531531
"accessible-table-caption",
532-
&accessible_table_caption,
532+
accessible_table_caption,
533533
)
534534
}
535535

@@ -544,7 +544,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
544544
glib::ObjectExt::set_property(
545545
self.as_ref(),
546546
"accessible-table-caption-object",
547-
&accessible_table_caption_object,
547+
accessible_table_caption_object,
548548
)
549549
}
550550

@@ -559,7 +559,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
559559
glib::ObjectExt::set_property(
560560
self.as_ref(),
561561
"accessible-table-column-description",
562-
&accessible_table_column_description,
562+
accessible_table_column_description,
563563
)
564564
}
565565

@@ -574,7 +574,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
574574
glib::ObjectExt::set_property(
575575
self.as_ref(),
576576
"accessible-table-column-header",
577-
&accessible_table_column_header,
577+
accessible_table_column_header,
578578
)
579579
}
580580

@@ -586,7 +586,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
586586
glib::ObjectExt::set_property(
587587
self.as_ref(),
588588
"accessible-table-row-description",
589-
&accessible_table_row_description,
589+
accessible_table_row_description,
590590
)
591591
}
592592

@@ -601,7 +601,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
601601
glib::ObjectExt::set_property(
602602
self.as_ref(),
603603
"accessible-table-row-header",
604-
&accessible_table_row_header,
604+
accessible_table_row_header,
605605
)
606606
}
607607

@@ -613,7 +613,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
613613
glib::ObjectExt::set_property(
614614
self.as_ref(),
615615
"accessible-table-summary",
616-
&accessible_table_summary,
616+
accessible_table_summary,
617617
)
618618
}
619619

@@ -622,7 +622,7 @@ impl<O: IsA<Object>> AtkObjectExt for O {
622622
}
623623

624624
fn set_accessible_value(&self, accessible_value: f64) {
625-
glib::ObjectExt::set_property(self.as_ref(), "accessible-value", &accessible_value)
625+
glib::ObjectExt::set_property(self.as_ref(), "accessible-value", accessible_value)
626626
}
627627

628628
fn connect_active_descendant_changed<F: Fn(&Self, &Object) + 'static>(

atk/src/auto/relation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ impl<O: IsA<Relation>> RelationExt for O {
9999
}
100100

101101
fn set_relation_type(&self, relation_type: RelationType) {
102-
glib::ObjectExt::set_property(self.as_ref(), "relation-type", &relation_type)
102+
glib::ObjectExt::set_property(self.as_ref(), "relation-type", relation_type)
103103
}
104104

105105
fn set_target(&self, target: Option<&glib::ValueArray>) {
106-
glib::ObjectExt::set_property(self.as_ref(), "target", &target)
106+
glib::ObjectExt::set_property(self.as_ref(), "target", target)
107107
}
108108

109109
fn connect_relation_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {

atk/src/auto/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 425f84d5af7f)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4eaad6a722bf)
1+
Generated by gir (https://github.com/gtk-rs/gir @ c0ef822cedca)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 6d1aaead565c)

atk/sys/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 425f84d5af7f)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4eaad6a722bf)
1+
Generated by gir (https://github.com/gtk-rs/gir @ c0ef822cedca)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 6d1aaead565c)

examples/basic_subclass/simple_application/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
mod imp;
22

3-
use gio::ApplicationFlags;
43
use gtk::{gio, glib};
54

65
glib::wrapper! {
@@ -12,8 +11,7 @@ impl SimpleApplication {
1211
#[allow(clippy::new_without_default)]
1312
pub fn new() -> Self {
1413
glib::Object::builder()
15-
.property("application-id", &"org.gtk-rs.SimpleApplication")
16-
.property("flags", &ApplicationFlags::empty())
14+
.property("application-id", "org.gtk-rs.SimpleApplication")
1715
.build()
1816
}
1917
}

examples/dialog_async/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async fn dialog<W: IsA<gtk::Window>>(window: W) {
5050
.modal(true)
5151
.buttons(gtk::ButtonsType::Close)
5252
.text("You answered")
53-
.secondary_text(&format!("Your answer: {answer:?}"))
53+
.secondary_text(format!("Your answer: {answer:?}"))
5454
.build();
5555

5656
info_dialog.run_future().await;

examples/list_box_model/row_data/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ glib::wrapper! {
1919
impl RowData {
2020
pub fn new(name: &str, count: u32) -> RowData {
2121
glib::Object::builder()
22-
.property("name", &name)
23-
.property("count", &count)
22+
.property("name", name)
23+
.property("count", count)
2424
.build()
2525
}
2626
}

gdk/src/atom.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ impl GlibPtrDefault for Atom {
5353
type GlibType = ffi::GdkAtom;
5454
}
5555

56+
unsafe impl glib::translate::TransparentPtrType for Atom {}
57+
5658
#[doc(hidden)]
5759
impl Uninitialized for Atom {
5860
#[inline]

gdk/src/auto/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ impl<O: IsA<Device>> DeviceExt for O {
426426
}
427427

428428
fn set_input_mode(&self, input_mode: InputMode) {
429-
glib::ObjectExt::set_property(self.as_ref(), "input-mode", &input_mode)
429+
glib::ObjectExt::set_property(self.as_ref(), "input-mode", input_mode)
430430
}
431431

432432
fn input_source(&self) -> InputSource {
@@ -438,7 +438,7 @@ impl<O: IsA<Device>> DeviceExt for O {
438438
}
439439

440440
fn set_seat<P: IsA<Seat>>(&self, seat: Option<&P>) {
441-
glib::ObjectExt::set_property(self.as_ref(), "seat", &seat)
441+
glib::ObjectExt::set_property(self.as_ref(), "seat", seat)
442442
}
443443

444444
fn tool(&self) -> Option<DeviceTool> {

gdk/src/auto/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 425f84d5af7f)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4eaad6a722bf)
1+
Generated by gir (https://github.com/gtk-rs/gir @ c0ef822cedca)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 6d1aaead565c)

gdk/src/keys.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use glib::GString;
55
use libc::c_uint;
66
use std::mem;
77

8-
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
8+
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
99
pub struct Key(u32);
1010

1111
impl ::std::ops::Deref for Key {

gdk/sys/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 425f84d5af7f)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4eaad6a722bf)
1+
Generated by gir (https://github.com/gtk-rs/gir @ c0ef822cedca)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 6d1aaead565c)

gdkx11/src/auto/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 425f84d5af7f)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4eaad6a722bf)
1+
Generated by gir (https://github.com/gtk-rs/gir @ c0ef822cedca)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 6d1aaead565c)

gdkx11/sys/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 425f84d5af7f)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 4eaad6a722bf)
1+
Generated by gir (https://github.com/gtk-rs/gir @ c0ef822cedca)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 6d1aaead565c)

gtk/Gir.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ manual = [
250250
"Gtk.Border",
251251
"Gtk.FileFilterInfo",
252252
"Gtk.PadActionEntry",
253-
"Gtk.PageRange",
254253
"Gtk.RecentData",
255254
"Gtk.Requisition",
256255
"Gtk.ResponseType",
@@ -1668,6 +1667,11 @@ generate_builder = true
16681667
name = "set_action_entries"
16691668
manual = true
16701669

1670+
[[object]]
1671+
name = "Gtk.PageRange"
1672+
status = "manual"
1673+
boxed_inline = true
1674+
16711675
[[object]]
16721676
name = "Gtk.PageSetup"
16731677
status = "generate"

gtk/src/auto/application.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl<O: IsA<Application>> GtkApplicationExt for O {
390390
}
391391

392392
fn set_register_session(&self, register_session: bool) {
393-
glib::ObjectExt::set_property(self.as_ref(), "register-session", &register_session)
393+
glib::ObjectExt::set_property(self.as_ref(), "register-session", register_session)
394394
}
395395

396396
#[cfg(any(feature = "v3_24", feature = "dox"))]

gtk/src/auto/aspect_frame.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,31 +403,31 @@ impl<O: IsA<AspectFrame>> AspectFrameExt for O {
403403
}
404404

405405
fn set_obey_child(&self, obey_child: bool) {
406-
glib::ObjectExt::set_property(self.as_ref(), "obey-child", &obey_child)
406+
glib::ObjectExt::set_property(self.as_ref(), "obey-child", obey_child)
407407
}
408408

409409
fn ratio(&self) -> f32 {
410410
glib::ObjectExt::property(self.as_ref(), "ratio")
411411
}
412412

413413
fn set_ratio(&self, ratio: f32) {
414-
glib::ObjectExt::set_property(self.as_ref(), "ratio", &ratio)
414+
glib::ObjectExt::set_property(self.as_ref(), "ratio", ratio)
415415
}
416416

417417
fn xalign(&self) -> f32 {
418418
glib::ObjectExt::property(self.as_ref(), "xalign")
419419
}
420420

421421
fn set_xalign(&self, xalign: f32) {
422-
glib::ObjectExt::set_property(self.as_ref(), "xalign", &xalign)
422+
glib::ObjectExt::set_property(self.as_ref(), "xalign", xalign)
423423
}
424424

425425
fn yalign(&self) -> f32 {
426426
glib::ObjectExt::property(self.as_ref(), "yalign")
427427
}
428428

429429
fn set_yalign(&self, yalign: f32) {
430-
glib::ObjectExt::set_property(self.as_ref(), "yalign", &yalign)
430+
glib::ObjectExt::set_property(self.as_ref(), "yalign", yalign)
431431
}
432432

433433
fn connect_obey_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {

gtk/src/auto/button_box.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ impl<O: IsA<ButtonBox>> ButtonBoxExt for O {
409409
}
410410

411411
fn set_layout_style(&self, layout_style: ButtonBoxStyle) {
412-
glib::ObjectExt::set_property(self.as_ref(), "layout-style", &layout_style)
412+
glib::ObjectExt::set_property(self.as_ref(), "layout-style", layout_style)
413413
}
414414

415415
fn connect_layout_style_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {

gtk/src/auto/calendar.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -604,63 +604,63 @@ impl<O: IsA<Calendar>> CalendarExt for O {
604604
}
605605

606606
fn set_day(&self, day: i32) {
607-
glib::ObjectExt::set_property(self.as_ref(), "day", &day)
607+
glib::ObjectExt::set_property(self.as_ref(), "day", day)
608608
}
609609

610610
fn month(&self) -> i32 {
611611
glib::ObjectExt::property(self.as_ref(), "month")
612612
}
613613

614614
fn set_month(&self, month: i32) {
615-
glib::ObjectExt::set_property(self.as_ref(), "month", &month)
615+
glib::ObjectExt::set_property(self.as_ref(), "month", month)
616616
}
617617

618618
fn is_no_month_change(&self) -> bool {
619619
glib::ObjectExt::property(self.as_ref(), "no-month-change")
620620
}
621621

622622
fn set_no_month_change(&self, no_month_change: bool) {
623-
glib::ObjectExt::set_property(self.as_ref(), "no-month-change", &no_month_change)
623+
glib::ObjectExt::set_property(self.as_ref(), "no-month-change", no_month_change)
624624
}
625625

626626
fn shows_day_names(&self) -> bool {
627627
glib::ObjectExt::property(self.as_ref(), "show-day-names")
628628
}
629629

630630
fn set_show_day_names(&self, show_day_names: bool) {
631-
glib::ObjectExt::set_property(self.as_ref(), "show-day-names", &show_day_names)
631+
glib::ObjectExt::set_property(self.as_ref(), "show-day-names", show_day_names)
632632
}
633633

634634
fn shows_details(&self) -> bool {
635635
glib::ObjectExt::property(self.as_ref(), "show-details")
636636
}
637637

638638
fn set_show_details(&self, show_details: bool) {
639-
glib::ObjectExt::set_property(self.as_ref(), "show-details", &show_details)
639+
glib::ObjectExt::set_property(self.as_ref(), "show-details", show_details)
640640
}
641641

642642
fn shows_heading(&self) -> bool {
643643
glib::ObjectExt::property(self.as_ref(), "show-heading")
644644
}
645645

646646
fn set_show_heading(&self, show_heading: bool) {
647-
glib::ObjectExt::set_property(self.as_ref(), "show-heading", &show_heading)
647+
glib::ObjectExt::set_property(self.as_ref(), "show-heading", show_heading)
648648
}
649649

650650
fn shows_week_numbers(&self) -> bool {
651651
glib::ObjectExt::property(self.as_ref(), "show-week-numbers")
652652
}
653653

654654
fn set_show_week_numbers(&self, show_week_numbers: bool) {
655-
glib::ObjectExt::set_property(self.as_ref(), "show-week-numbers", &show_week_numbers)
655+
glib::ObjectExt::set_property(self.as_ref(), "show-week-numbers", show_week_numbers)
656656
}
657657

658658
fn year(&self) -> i32 {
659659
glib::ObjectExt::property(self.as_ref(), "year")
660660
}
661661

662662
fn set_year(&self, year: i32) {
663-
glib::ObjectExt::set_property(self.as_ref(), "year", &year)
663+
glib::ObjectExt::set_property(self.as_ref(), "year", year)
664664
}
665665

666666
fn connect_day_selected<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {

gtk/src/auto/cell_editable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl<O: IsA<CellEditable>> CellEditableExt for O {
7676
}
7777

7878
fn set_editing_canceled(&self, editing_canceled: bool) {
79-
glib::ObjectExt::set_property(self.as_ref(), "editing-canceled", &editing_canceled)
79+
glib::ObjectExt::set_property(self.as_ref(), "editing-canceled", editing_canceled)
8080
}
8181

8282
fn connect_editing_done<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {

0 commit comments

Comments
 (0)