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

Commit 5ecbdd9

Browse files
Matteo Biggiobilelmoussaoui
Matteo Biggio
authored andcommitted
Adapt to addition of glib::Propagation
1 parent 41ca60f commit 5ecbdd9

File tree

37 files changed

+194
-194
lines changed

37 files changed

+194
-194
lines changed

atk/src/auto/versions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
1+
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)

atk/sys/versions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
1+
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)

examples/cairo_test/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn build_ui(application: &gtk::Application) {
5757
cr.arc(0.5 + eye_dx, eye_y, 0.05, 0.0, PI * 2.);
5858
cr.fill().expect("Invalid cairo surface state");
5959

60-
glib::ControlFlow::Break
60+
glib::Propagation::Stop
6161
});
6262

6363
drawable(application, 500, 500, |_, cr| {
@@ -82,7 +82,7 @@ fn build_ui(application: &gtk::Application) {
8282
cr.arc(0.27, 0.65, 0.02, 0.0, PI * 2.);
8383
cr.fill().expect("Invalid cairo surface state");
8484

85-
glib::ControlFlow::Break
85+
glib::Propagation::Stop
8686
});
8787
}
8888

@@ -99,7 +99,7 @@ fn main() {
9999

100100
pub fn drawable<F>(application: &gtk::Application, width: i32, height: i32, draw_fn: F)
101101
where
102-
F: Fn(&DrawingArea, &Context) -> glib::ControlFlow + 'static,
102+
F: Fn(&DrawingArea, &Context) -> glib::Propagation + 'static,
103103
{
104104
let window = gtk::ApplicationWindow::new(application);
105105
let drawing_area = DrawingArea::new();

examples/cairo_threads/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn build_ui(application: &gtk::Application) {
104104
// Whenever the drawing area has to be redrawn, render the latest images in the correct
105105
// locations
106106
area.connect_draw(
107-
glib::clone!(@weak workspace => @default-return glib::ControlFlow::Break, move |_, cr| {
107+
glib::clone!(@weak workspace => @default-return glib::Propagation::Stop, move |_, cr| {
108108
let (ref images, ref origins, _) = *workspace;
109109

110110
for (image, origin) in images.iter().zip(origins.iter()) {
@@ -113,7 +113,7 @@ fn build_ui(application: &gtk::Application) {
113113
});
114114
}
115115

116-
glib::ControlFlow::Break
116+
glib::Propagation::Stop
117117
}),
118118
);
119119

examples/clipboard_simple/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn build_ui(application: &gtk::Application) {
2222
window.set_title("gtk::Clipboard Simple Example");
2323
window.connect_delete_event(|window, _| {
2424
window.close();
25-
glib::ControlFlow::Break
25+
glib::Propagation::Stop
2626
});
2727

2828
// Create the button grid

examples/gtk_builder_basics/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn build_ui(application: &gtk::Application) {
2626

2727
dialog.connect_delete_event(|dialog, _| {
2828
dialog.hide();
29-
glib::ControlFlow::Continue
29+
glib::Propagation::Proceed
3030
});
3131

3232
bigbutton.connect_clicked(glib::clone!(@weak dialog => move |_| dialog.show_all()));

examples/gtk_builder_signal/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn build_ui(application: &gtk::Application) {
1414
.expect("Couldn't get messagedialog1");
1515
dialog.connect_delete_event(|dialog, _| {
1616
dialog.hide();
17-
glib::ControlFlow::Continue
17+
glib::Propagation::Proceed
1818
});
1919

2020
builder.connect_signals(move |_, handler_name| {

examples/gtk_test/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ fn build_ui(application: &gtk::Application) {
155155
button_about.connect_clicked(move |x| about_clicked(x, &dialog));
156156

157157
window.connect_key_press_event(
158-
glib::clone!(@weak entry => @default-return glib::ControlFlow::Break, move |_, key| {
158+
glib::clone!(@weak entry => @default-return glib::Propagation::Stop, move |_, key| {
159159
let keyval = key.keyval();
160160
let keystate = key.state();
161161

@@ -166,7 +166,7 @@ fn build_ui(application: &gtk::Application) {
166166
println!("You pressed Ctrl!");
167167
}
168168

169-
glib::ControlFlow::Break
169+
glib::Propagation::Stop
170170
}),
171171
);
172172

@@ -182,7 +182,7 @@ fn about_clicked(button: &Button, dialog: &AboutDialog) {
182182
// as otherwise we can't show it again a second time.
183183
dialog.connect_delete_event(|dialog, _| {
184184
dialog.hide();
185-
glib::ControlFlow::Continue
185+
glib::Propagation::Proceed
186186
});
187187

188188
println!("Authors: {:?}", dialog.authors());

examples/multi_window/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ fn create_sub_window(
9898
window.set_default_size(400, 200);
9999

100100
window.connect_delete_event(
101-
glib::clone!(@weak windows => @default-return glib::ControlFlow::Break, move |_, _| {
101+
glib::clone!(@weak windows => @default-return glib::Propagation::Stop, move |_, _| {
102102
windows.borrow_mut().remove(&id);
103-
glib::ControlFlow::Break
103+
glib::Propagation::Stop
104104
}),
105105
);
106106

examples/progress_tracker/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl Widgets {
130130
window.set_default_size(500, 250);
131131
window.connect_delete_event(move |window, _| {
132132
window.close();
133-
glib::ControlFlow::Break
133+
glib::Propagation::Stop
134134
});
135135

136136
Self {

examples/transparent_main_window/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ fn set_visual(window: &ApplicationWindow, _screen: Option<&gdk::Screen>) {
4141
}
4242
}
4343

44-
fn draw(_window: &ApplicationWindow, ctx: &cairo::Context) -> glib::ControlFlow {
44+
fn draw(_window: &ApplicationWindow, ctx: &cairo::Context) -> glib::Propagation {
4545
// crucial for transparency
4646
ctx.set_source_rgba(1.0, 0.0, 0.0, 0.4);
4747
ctx.set_operator(cairo::Operator::Screen);
4848
ctx.paint().expect("Invalid cairo surface state");
49-
glib::ControlFlow::Break
49+
glib::Propagation::Stop
5050
}

gdk/src/auto/versions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
1+
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)

gdk/sys/versions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
1+
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)

gdkx11/src/auto/versions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
1+
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)

gdkx11/sys/versions.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ c88b69265102)
2-
from gir-files (https://github.com/gtk-rs/gir-files @ 744be9fbbbed)
1+
Generated by gir (https://github.com/gtk-rs/gir @ ef087c070d5b)
2+
from gir-files (https://github.com/gtk-rs/gir-files @ 1dc6c3826666)

gir

gtk/src/auto/about_dialog.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -879,13 +879,13 @@ pub trait AboutDialogExt: IsA<AboutDialog> + sealed::Sealed + 'static {
879879
}
880880

881881
#[doc(alias = "activate-link")]
882-
fn connect_activate_link<F: Fn(&Self, &str) -> glib::ControlFlow + 'static>(
882+
fn connect_activate_link<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
883883
&self,
884884
f: F,
885885
) -> SignalHandlerId {
886886
unsafe extern "C" fn activate_link_trampoline<
887887
P: IsA<AboutDialog>,
888-
F: Fn(&P, &str) -> glib::ControlFlow + 'static,
888+
F: Fn(&P, &str) -> glib::Propagation + 'static,
889889
>(
890890
this: *mut ffi::GtkAboutDialog,
891891
uri: *mut libc::c_char,

gtk/src/auto/entry_completion.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -431,14 +431,14 @@ pub trait EntryCompletionExt: IsA<EntryCompletion> + sealed::Sealed + 'static {
431431

432432
#[doc(alias = "cursor-on-match")]
433433
fn connect_cursor_on_match<
434-
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
434+
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
435435
>(
436436
&self,
437437
f: F,
438438
) -> SignalHandlerId {
439439
unsafe extern "C" fn cursor_on_match_trampoline<
440440
P: IsA<EntryCompletion>,
441-
F: Fn(&P, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
441+
F: Fn(&P, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
442442
>(
443443
this: *mut ffi::GtkEntryCompletion,
444444
model: *mut ffi::GtkTreeModel,
@@ -467,13 +467,13 @@ pub trait EntryCompletionExt: IsA<EntryCompletion> + sealed::Sealed + 'static {
467467
}
468468

469469
#[doc(alias = "insert-prefix")]
470-
fn connect_insert_prefix<F: Fn(&Self, &str) -> glib::ControlFlow + 'static>(
470+
fn connect_insert_prefix<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
471471
&self,
472472
f: F,
473473
) -> SignalHandlerId {
474474
unsafe extern "C" fn insert_prefix_trampoline<
475475
P: IsA<EntryCompletion>,
476-
F: Fn(&P, &str) -> glib::ControlFlow + 'static,
476+
F: Fn(&P, &str) -> glib::Propagation + 'static,
477477
>(
478478
this: *mut ffi::GtkEntryCompletion,
479479
prefix: *mut libc::c_char,
@@ -501,14 +501,14 @@ pub trait EntryCompletionExt: IsA<EntryCompletion> + sealed::Sealed + 'static {
501501

502502
#[doc(alias = "match-selected")]
503503
fn connect_match_selected<
504-
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
504+
F: Fn(&Self, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
505505
>(
506506
&self,
507507
f: F,
508508
) -> SignalHandlerId {
509509
unsafe extern "C" fn match_selected_trampoline<
510510
P: IsA<EntryCompletion>,
511-
F: Fn(&P, &TreeModel, &TreeIter) -> glib::ControlFlow + 'static,
511+
F: Fn(&P, &TreeModel, &TreeIter) -> glib::Propagation + 'static,
512512
>(
513513
this: *mut ffi::GtkEntryCompletion,
514514
model: *mut ffi::GtkTreeModel,

gtk/src/auto/gl_area.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,13 @@ pub trait GLAreaExt: IsA<GLArea> + sealed::Sealed + 'static {
480480
}
481481

482482
#[doc(alias = "render")]
483-
fn connect_render<F: Fn(&Self, &gdk::GLContext) -> glib::ControlFlow + 'static>(
483+
fn connect_render<F: Fn(&Self, &gdk::GLContext) -> glib::Propagation + 'static>(
484484
&self,
485485
f: F,
486486
) -> SignalHandlerId {
487487
unsafe extern "C" fn render_trampoline<
488488
P: IsA<GLArea>,
489-
F: Fn(&P, &gdk::GLContext) -> glib::ControlFlow + 'static,
489+
F: Fn(&P, &gdk::GLContext) -> glib::Propagation + 'static,
490490
>(
491491
this: *mut ffi::GtkGLArea,
492492
context: *mut gdk::ffi::GdkGLContext,

gtk/src/auto/label.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -841,13 +841,13 @@ pub trait LabelExt: IsA<Label> + sealed::Sealed + 'static {
841841
}
842842

843843
#[doc(alias = "activate-link")]
844-
fn connect_activate_link<F: Fn(&Self, &str) -> glib::ControlFlow + 'static>(
844+
fn connect_activate_link<F: Fn(&Self, &str) -> glib::Propagation + 'static>(
845845
&self,
846846
f: F,
847847
) -> SignalHandlerId {
848848
unsafe extern "C" fn activate_link_trampoline<
849849
P: IsA<Label>,
850-
F: Fn(&P, &str) -> glib::ControlFlow + 'static,
850+
F: Fn(&P, &str) -> glib::Propagation + 'static,
851851
>(
852852
this: *mut ffi::GtkLabel,
853853
uri: *mut libc::c_char,

gtk/src/auto/link_button.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,13 @@ pub trait LinkButtonExt: IsA<LinkButton> + sealed::Sealed + 'static {
398398
}
399399

400400
#[doc(alias = "activate-link")]
401-
fn connect_activate_link<F: Fn(&Self) -> glib::ControlFlow + 'static>(
401+
fn connect_activate_link<F: Fn(&Self) -> glib::Propagation + 'static>(
402402
&self,
403403
f: F,
404404
) -> SignalHandlerId {
405405
unsafe extern "C" fn activate_link_trampoline<
406406
P: IsA<LinkButton>,
407-
F: Fn(&P) -> glib::ControlFlow + 'static,
407+
F: Fn(&P) -> glib::Propagation + 'static,
408408
>(
409409
this: *mut ffi::GtkLinkButton,
410410
f: glib::ffi::gpointer,

gtk/src/auto/menu_shell.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,13 @@ pub trait MenuShellExt: IsA<MenuShell> + sealed::Sealed + 'static {
351351
}
352352

353353
#[doc(alias = "move-selected")]
354-
fn connect_move_selected<F: Fn(&Self, i32) -> glib::ControlFlow + 'static>(
354+
fn connect_move_selected<F: Fn(&Self, i32) -> glib::Propagation + 'static>(
355355
&self,
356356
f: F,
357357
) -> SignalHandlerId {
358358
unsafe extern "C" fn move_selected_trampoline<
359359
P: IsA<MenuShell>,
360-
F: Fn(&P, i32) -> glib::ControlFlow + 'static,
360+
F: Fn(&P, i32) -> glib::Propagation + 'static,
361361
>(
362362
this: *mut ffi::GtkMenuShell,
363363
distance: libc::c_int,

gtk/src/auto/range.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ pub trait RangeExt: IsA<Range> + sealed::Sealed + 'static {
280280
}
281281

282282
#[doc(alias = "change-value")]
283-
fn connect_change_value<F: Fn(&Self, ScrollType, f64) -> glib::ControlFlow + 'static>(
283+
fn connect_change_value<F: Fn(&Self, ScrollType, f64) -> glib::Propagation + 'static>(
284284
&self,
285285
f: F,
286286
) -> SignalHandlerId {
287287
unsafe extern "C" fn change_value_trampoline<
288288
P: IsA<Range>,
289-
F: Fn(&P, ScrollType, f64) -> glib::ControlFlow + 'static,
289+
F: Fn(&P, ScrollType, f64) -> glib::Propagation + 'static,
290290
>(
291291
this: *mut ffi::GtkRange,
292292
scroll: ffi::GtkScrollType,

gtk/src/auto/switch.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,13 @@ pub trait SwitchExt: IsA<Switch> + sealed::Sealed + 'static {
346346
}
347347

348348
#[doc(alias = "state-set")]
349-
fn connect_state_set<F: Fn(&Self, bool) -> glib::ControlFlow + 'static>(
349+
fn connect_state_set<F: Fn(&Self, bool) -> glib::Propagation + 'static>(
350350
&self,
351351
f: F,
352352
) -> SignalHandlerId {
353353
unsafe extern "C" fn state_set_trampoline<
354354
P: IsA<Switch>,
355-
F: Fn(&P, bool) -> glib::ControlFlow + 'static,
355+
F: Fn(&P, bool) -> glib::Propagation + 'static,
356356
>(
357357
this: *mut ffi::GtkSwitch,
358358
state: glib::ffi::gboolean,

gtk/src/auto/text_tag.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1257,14 +1257,14 @@ pub trait TextTagExt: IsA<TextTag> + sealed::Sealed + 'static {
12571257

12581258
#[doc(alias = "event")]
12591259
fn connect_event<
1260-
F: Fn(&Self, &glib::Object, &gdk::Event, &TextIter) -> glib::ControlFlow + 'static,
1260+
F: Fn(&Self, &glib::Object, &gdk::Event, &TextIter) -> glib::Propagation + 'static,
12611261
>(
12621262
&self,
12631263
f: F,
12641264
) -> SignalHandlerId {
12651265
unsafe extern "C" fn event_trampoline<
12661266
P: IsA<TextTag>,
1267-
F: Fn(&P, &glib::Object, &gdk::Event, &TextIter) -> glib::ControlFlow + 'static,
1267+
F: Fn(&P, &glib::Object, &gdk::Event, &TextIter) -> glib::Propagation + 'static,
12681268
>(
12691269
this: *mut ffi::GtkTextTag,
12701270
object: *mut glib::gobject_ffi::GObject,

gtk/src/auto/text_view.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1324,15 +1324,15 @@ pub trait TextViewExt: IsA<TextView> + sealed::Sealed + 'static {
13241324

13251325
#[doc(alias = "extend-selection")]
13261326
fn connect_extend_selection<
1327-
F: Fn(&Self, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::ControlFlow
1327+
F: Fn(&Self, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::Propagation
13281328
+ 'static,
13291329
>(
13301330
&self,
13311331
f: F,
13321332
) -> SignalHandlerId {
13331333
unsafe extern "C" fn extend_selection_trampoline<
13341334
P: IsA<TextView>,
1335-
F: Fn(&P, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::ControlFlow
1335+
F: Fn(&P, TextExtendSelection, &TextIter, &TextIter, &TextIter) -> glib::Propagation
13361336
+ 'static,
13371337
>(
13381338
this: *mut ffi::GtkTextView,

gtk/src/auto/tool_item.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -567,13 +567,13 @@ pub trait ToolItemExt: IsA<ToolItem> + sealed::Sealed + 'static {
567567
}
568568

569569
#[doc(alias = "create-menu-proxy")]
570-
fn connect_create_menu_proxy<F: Fn(&Self) -> glib::ControlFlow + 'static>(
570+
fn connect_create_menu_proxy<F: Fn(&Self) -> glib::Propagation + 'static>(
571571
&self,
572572
f: F,
573573
) -> SignalHandlerId {
574574
unsafe extern "C" fn create_menu_proxy_trampoline<
575575
P: IsA<ToolItem>,
576-
F: Fn(&P) -> glib::ControlFlow + 'static,
576+
F: Fn(&P) -> glib::Propagation + 'static,
577577
>(
578578
this: *mut ffi::GtkToolItem,
579579
f: glib::ffi::gpointer,

gtk/src/auto/toolbar.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,13 @@ pub trait ToolbarExt: IsA<Toolbar> + sealed::Sealed + 'static {
569569
}
570570

571571
#[doc(alias = "popup-context-menu")]
572-
fn connect_popup_context_menu<F: Fn(&Self, i32, i32, i32) -> glib::ControlFlow + 'static>(
572+
fn connect_popup_context_menu<F: Fn(&Self, i32, i32, i32) -> glib::Propagation + 'static>(
573573
&self,
574574
f: F,
575575
) -> SignalHandlerId {
576576
unsafe extern "C" fn popup_context_menu_trampoline<
577577
P: IsA<Toolbar>,
578-
F: Fn(&P, i32, i32, i32) -> glib::ControlFlow + 'static,
578+
F: Fn(&P, i32, i32, i32) -> glib::Propagation + 'static,
579579
>(
580580
this: *mut ffi::GtkToolbar,
581581
x: libc::c_int,

0 commit comments

Comments
 (0)