M Cargo.toml => Cargo.toml +2 -2
@@ 10,8 10,8 @@ categories = ["command-line-interface", "gui"]
license = "MIT/Apache-2.0"
[dependencies]
-cursive = { version = "0.13", default-features = false }
+cursive = { version = "0.14", default-features = false }
[dev-dependencies]
-cursive = "0.13"
+cursive = "0.14"
rand = "0.7"
M examples/basic.rs => examples/basic.rs +3 -3
@@ 101,7 101,7 @@ fn main() {
table.set_on_submit(|siv: &mut Cursive, row: usize, index: usize| {
let value = siv
- .call_on_id("table", move |table: &mut TableView<Foo, BasicColumn>| {
+ .call_on_name("table", move |table: &mut TableView<Foo, BasicColumn>| {
format!("{:?}", table.borrow_item(index).unwrap())
})
.unwrap();
@@ 110,7 110,7 @@ fn main() {
Dialog::around(TextView::new(value))
.title(format!("Removing row # {}", row))
.button("Close", move |s| {
- s.call_on_id("table", |table: &mut TableView<Foo, BasicColumn>| {
+ s.call_on_name("table", |table: &mut TableView<Foo, BasicColumn>| {
table.remove_item(index);
});
s.pop_layer();
@@ 118,7 118,7 @@ fn main() {
);
});
- siv.add_layer(Dialog::around(table.with_id("table").min_size((50, 20))).title("Table View"));
+ siv.add_layer(Dialog::around(table.with_name("table").min_size((50, 20))).title("Table View"));
siv.run();
}
M examples/double.rs => examples/double.rs +2 -2
@@ 13,7 13,7 @@ use std::cmp::Ordering;
use cursive::align::HAlign;
use cursive::direction::Orientation;
use cursive::traits::*;
-use cursive::views::{BoxView, Dialog, DummyView, LinearLayout};
+use cursive::views::{Dialog, DummyView, LinearLayout, ResizedView};
use cursive::Cursive;
use rand::Rng;
@@ 61,7 61,7 @@ fn main() {
let mut layout = LinearLayout::new(Orientation::Horizontal);
layout.add_child(create_table().min_size((32, 20)));
- layout.add_child(BoxView::with_fixed_size((4, 0), DummyView));
+ layout.add_child(ResizedView::with_fixed_size((4, 0), DummyView));
layout.add_child(create_table().min_size((32, 20)));
siv.add_layer(Dialog::around(layout).title("Table View Demo"));
M src/lib.rs => src/lib.rs +0 -1
@@ 1055,5 1055,4 @@ mod tests {
assert!(simple_table.len() == 1);
}
-
}