summaryrefslogtreecommitdiffstats
path: root/src/views/main.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-01-30 12:43:15 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-01-30 13:01:35 +0100
commite5e72a6d36c9bacc61efd3ed3453867c7f4d970f (patch)
tree942a0968c05f9e6e14f9c9194da06712b9adead0 /src/views/main.rs
parent37b555faa39c0bee96ce40f0cff7e76dd5ef783b (diff)
Change implementation to use menubar for commands
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/views/main.rs')
-rw-r--r--src/views/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/views/main.rs b/src/views/main.rs
index c42e417..98b8849 100644
--- a/src/views/main.rs
+++ b/src/views/main.rs
@@ -39,6 +39,10 @@ impl MainView {
Ok(MainView { rt, tabs }.with_name(MAIN_VIEW_NAME))
}
+ pub fn add_tab_for_query(&mut self, query: &str) -> Result<()> {
+ self.tabs.add_tab_for_query(self.rt.clone(), query)
+ }
+
pub fn get_current_tab(&self) -> Option<&cursive_multiplex::Mux> {
if let Some(mux) = self.tabs.get_active_tab() {
mux.downcast_ref::<cursive_multiplex::Mux>()