tui: Remove obsolete event handling
This commit is contained in:
parent
3e9c3d2679
commit
1fa49796ff
|
|
@ -1,6 +1,5 @@
|
||||||
use radicle::cob::patch::{Patch, PatchId};
|
use radicle::cob::patch::{Patch, PatchId};
|
||||||
|
|
||||||
use tui_realm_stdlib::Phantom;
|
|
||||||
use tuirealm::command::{Cmd, CmdResult, Direction as MoveDirection};
|
use tuirealm::command::{Cmd, CmdResult, Direction as MoveDirection};
|
||||||
use tuirealm::event::{Event, Key, KeyEvent};
|
use tuirealm::event::{Event, Key, KeyEvent};
|
||||||
use tuirealm::{MockComponent, NoUserEvent, State, StateValue};
|
use tuirealm::{MockComponent, NoUserEvent, State, StateValue};
|
||||||
|
|
@ -131,9 +130,3 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<Shortcuts> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl tuirealm::Component<Message, NoUserEvent> for Phantom {
|
|
||||||
fn on(&mut self, _event: Event<NoUserEvent>) -> Option<Message> {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
use tui_realm_stdlib::Phantom;
|
|
||||||
|
|
||||||
use tuirealm::command::{Cmd, CmdResult};
|
use tuirealm::command::{Cmd, CmdResult};
|
||||||
use tuirealm::props::{AttrValue, Attribute, Color, Props, Style};
|
use tuirealm::props::{AttrValue, Attribute, Color, Props, Style};
|
||||||
use tuirealm::tui::layout::{Constraint, Direction, Layout, Rect};
|
use tuirealm::tui::layout::{Constraint, Direction, Layout, Rect};
|
||||||
|
|
@ -30,14 +28,6 @@ impl WidgetComponent for GlobalListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Some user events need to be handled globally (e.g. user presses key `q` to quit
|
|
||||||
/// the application). This component can be used in conjunction with SubEventClause
|
|
||||||
/// to handle those events.
|
|
||||||
#[derive(Default, MockComponent)]
|
|
||||||
pub struct GlobalPhantom {
|
|
||||||
component: Phantom,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A tab header that displays all labels horizontally aligned and separated
|
/// A tab header that displays all labels horizontally aligned and separated
|
||||||
/// by a divider. Highlights the label defined by the current tab index.
|
/// by a divider. Highlights the label defined by the current tab index.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue