Skip to content

Commit

Permalink
Update GTK packages from 0.16 to 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoss committed Mar 19, 2023
1 parent 2c81b43 commit 528a526
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 65 deletions.
86 changes: 44 additions & 42 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ default-members = ["crates/*", "."]
[dependencies]
navig18xx = { path = "./crates/navig18xx", version = "0.1.0" }
# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
gtk = "0.16"
gdk = "0.16"
glib = "0.16"
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }
gtk = "0.17"
gdk = "0.17"
glib = "0.17"
chrono = "0.4"
log = "0.4"
env_logger = "0.9"
Expand Down
2 changes: 1 addition & 1 deletion crates/n18brush/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ n18route = { path = "../n18route", version = "0.1.0" }
n18tile = { path = "../n18tile", version = "0.1.0" }
n18token = { path = "../n18token", version = "0.1.0" }
# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }
log = "0.4"
2 changes: 1 addition & 1 deletion crates/n18example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ n18game = { path = "../n18game", version = "0.1.0" }
n18brush = { path = "../n18brush", version = "0.1.0" }

# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }
6 changes: 3 additions & 3 deletions crates/n18hex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ categories = ["algorithms", "graphics"]

[dependencies]
# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
pango = "0.16"
pangocairo = "0.16"
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }
pango = "0.17"
pangocairo = "0.17"
2 changes: 1 addition & 1 deletion crates/n18map/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ n18tile = { path = "../n18tile", version = "0.1.0" }
n18token = { path = "../n18token", version = "0.1.0" }
n18catalogue = { path = "../n18catalogue", version = "0.1.0" }
# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }
2 changes: 1 addition & 1 deletion crates/n18route/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ rayon = "1.5"
[dev-dependencies]
n18catalogue = { path = "../n18catalogue", version = "0.1.0" }
n18brush = { path = "../n18brush", version = "0.1.0" }
cairo-rs = { version = "0.16" }
cairo-rs = { version = "0.17" }
env_logger = "0.9"
2 changes: 1 addition & 1 deletion crates/n18tile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = ["algorithms", "graphics"]
[dependencies]
n18hex = { path = "../n18hex", version = "0.1.0" }
# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }

[[example]]
name = "custom_tile"
Expand Down
2 changes: 1 addition & 1 deletion crates/n18token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ categories = ["algorithms", "graphics"]
[dependencies]
n18hex = { path = "../n18hex", version = "0.1.0" }
# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }
8 changes: 4 additions & 4 deletions crates/n18ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ n18game = { path = "../n18game", version = "0.1.0" }
n18brush = { path = "../n18brush", version = "0.1.0" }

# Include support for saving surfaces as PNG images.
cairo-rs = { version = "0.16", features = ["png", "pdf", "svg"] }
gtk = "0.16"
gdk = "0.16"
glib = "0.16"
cairo-rs = { version = "0.17", features = ["png", "pdf", "svg"] }
gtk = "0.17"
gdk = "0.17"
glib = "0.17"
chrono = "0.4"
log = "0.4"
8 changes: 4 additions & 4 deletions crates/n18ui/src/control/_gtk3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn select_index<F>(
let title_label = gtk::Label::new(Some(title));

// Display the companies as a list.
let list = gtk::builders::ListBoxBuilder::new()
let list = gtk::ListBox::builder()
.selection_mode(gtk::SelectionMode::Browse)
.activate_on_single_click(false)
.margin_top(4)
Expand Down Expand Up @@ -303,7 +303,7 @@ pub fn select_file_save<F>(
.build();

for filter in filters {
dialog.add_filter(filter)
dialog.add_filter(filter.clone())
}
if let Some(path) = default_path {
dialog.set_current_name(path);
Expand Down Expand Up @@ -348,7 +348,7 @@ pub fn select_file_load<F>(
.action(gtk::FileChooserAction::Open)
.build();
for filter in filters {
dialog.add_filter(filter)
dialog.add_filter(filter.clone())
}
if let Some(path) = default_path {
dialog.set_current_name(path);
Expand Down Expand Up @@ -569,7 +569,7 @@ impl UiController for Gtk3Controller {
let label = gtk::Label::builder()
.use_markup(true)
.selectable(false)
.label(&format!("<b>{}</b>", text))
.label(format!("<b>{}</b>", text))
.expand(true)
.halign(gtk::Align::Center)
.build();
Expand Down
4 changes: 2 additions & 2 deletions src/bin/rusty_train.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn start_message() -> gtk::Grid {
let label = gtk::Label::builder()
.use_markup(true)
.selectable(false)
.label(&format!("<b>{}:</b> ", text))
.label(format!("<b>{}:</b> ", text))
.expand(true)
.halign(gtk::Align::End)
.build();
Expand All @@ -170,7 +170,7 @@ fn start_message() -> gtk::Grid {
.for_each(|(ix, text)| {
let label = gtk::Label::builder()
.selectable(false)
.label(text)
.label(*text)
.expand(true)
.halign(gtk::Align::Start)
.build();
Expand Down

0 comments on commit 528a526

Please sign in to comment.