Skip to content

Commit

Permalink
book: Update for 0.7.1 (#1451)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian authored Aug 4, 2023
1 parent 413eae2 commit 4b41549
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 56 deletions.
88 changes: 44 additions & 44 deletions book/listings/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions book/listings/saving_window_state/1/custom_window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ impl ObjectImpl for Window {
impl WidgetImpl for Window {}
impl WindowImpl for Window {
// Save window state right before the window will be closed
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Save window size
self.obj()
.save_window_size()
.expect("Failed to save window state");

glib::ControlFlow::Continue
// Allow to invoke other event handlers
glib::Propagation::Proceed
}
}
impl ApplicationWindowImpl for Window {}
Expand Down
4 changes: 2 additions & 2 deletions book/listings/settings/1/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ fn build_ui(app: &Application) {
settings
.set_boolean("is-switch-enabled", is_enabled)
.expect("Could not set setting.");
// Don't inhibit the default handler
glib::ControlFlow::Continue
// Allow to invoke other event handlers
glib::Propagation::Proceed
});
// ANCHOR_END: connect_state_set

Expand Down
2 changes: 1 addition & 1 deletion book/listings/todo/2/window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl WidgetImpl for Window {}
// ANCHOR: window_impl
// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Store task data in vector
let backup_data: Vec<TaskData> = self
.obj()
Expand Down
2 changes: 1 addition & 1 deletion book/listings/todo/3/window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl WidgetImpl for Window {}

// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Store task data in vector
let backup_data: Vec<TaskData> = self
.obj()
Expand Down
2 changes: 1 addition & 1 deletion book/listings/todo/4/window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl WidgetImpl for Window {}

// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Store task data in vector
let backup_data: Vec<TaskData> = self
.obj()
Expand Down
2 changes: 1 addition & 1 deletion book/listings/todo/5/window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl WidgetImpl for Window {}

// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Store task data in vector
let backup_data: Vec<TaskData> = self
.obj()
Expand Down
2 changes: 1 addition & 1 deletion book/listings/todo/6/window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl WidgetImpl for Window {}

// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Store task data in vector
let backup_data: Vec<TaskData> = self
.obj()
Expand Down
2 changes: 1 addition & 1 deletion book/listings/todo/7/window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl WidgetImpl for Window {}

// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Store task data in vector
let backup_data: Vec<TaskData> = self
.obj()
Expand Down
2 changes: 1 addition & 1 deletion book/listings/todo/8/window/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl WidgetImpl for Window {}
// ANCHOR: window_impl
// Trait shared by all windows
impl WindowImpl for Window {
fn close_request(&self) -> glib::ControlFlow {
fn close_request(&self) -> glib::Propagation {
// Store task data in vector
let backup_data: Vec<CollectionData> = self
.obj()
Expand Down

0 comments on commit 4b41549

Please sign in to comment.