removes initial pawns, adds utf-8 support

This commit is contained in:
2019-06-08 15:49:13 +02:00
parent a1412f03d2
commit 32ffe82815
2 changed files with 7 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ impl CellWidget {
name: builder.get_object("name").unwrap(),
desc_btn: builder.get_object("desc_btn").unwrap(),
targets: vec![
gtk::TargetEntry::new("text/plain", gtk::TargetFlags::SAME_APP, 0),
gtk::TargetEntry::new("text/plain;charset=utf-8", gtk::TargetFlags::SAME_APP, 0),
],
};
cell.desc_btn.set_visible(false);
@@ -102,9 +102,13 @@ impl CellWidget {
println!("Send...");
// TODO: Refactoring, this is the inverse of 'placing',
// building a PawnData instead of destructuring it.
if let Some(to_send) = c.name.get_text() {
if let Some(to_send) = c.name
.get_text()
{
dbg!(&to_send);
data.set_text(&to_send);
} else {
}
else {
dbg!("Should not happen !!");
}
});