ui improvement

This commit is contained in:
John Smith 2021-12-14 14:20:05 -05:00
parent c4b66aad36
commit 3b54c2f8bd
3 changed files with 10 additions and 19 deletions

View File

@ -200,21 +200,6 @@ impl UI {
});
}
// fn main_layout(s: &mut Cursive) -> ViewRef<LinearLayout> {
// s.find_name("main-layout").unwrap()
// }
// fn column_layout(s: &mut Cursive) -> ViewRef<LinearLayout> {
// s.find_name("column-layout").unwrap()
// }
// fn button_layout(s: &mut Cursive) -> ViewRef<LinearLayout> {
// s.find_name("button-layout").unwrap()
// }
// fn peers(s: &mut Cursive) -> ViewRef<TextView> {
// s.find_name("peers").unwrap()
// }
// fn node_events(s: &mut Cursive) -> ViewRef<FlexiLoggerView> {
// s.find_name("node-events").unwrap()
// }
fn command_line(s: &mut Cursive) -> ViewRef<EditView> {
s.find_name("command-line").unwrap()
}
@ -482,10 +467,15 @@ impl UI {
inner.connection_dialog_state = Some(state);
drop(inner);
if hide {
s.pop_layer();
s.pop_layer();
return true;
}
if show {
s.add_fullscreen_layer(Layer::with_color(
ResizedView::with_full_screen(DummyView {}),
ColorStyle::new(PaletteColor::Background, PaletteColor::Background),
));
s.add_layer(
Dialog::around(
LinearLayout::vertical().child(

View File

@ -36,7 +36,7 @@ impl RawUdpProtocolHandler {
}
trace!(
"receiving message of length {} from {}",
"receiving UDP message of length {} from {}",
data.len(),
remote_addr
);
@ -67,7 +67,7 @@ impl RawUdpProtocolHandler {
}
trace!(
"sending message of length {} to {}",
"sending UDP message of length {} to {}",
data.len(),
socket_addr
);

View File

@ -89,13 +89,13 @@ macro_rules! map_error_panic {
};
}
#[derive(Clone)]
#[derive(Debug, Clone)]
pub enum Destination {
Direct(NodeRef),
PrivateRoute(PrivateRoute),
}
#[derive(Clone)]
#[derive(Debug, Clone)]
pub enum RespondTo {
None,
Sender,
@ -320,6 +320,7 @@ impl RPCProcessor {
if nr.node_id() != node_id {
// found a close node, but not exact within our configured resolve_node timeout
error!("XXX: Timeout");
return Err(RPCError::Timeout);
}