diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-25 17:22:10 +0000 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-25 17:22:10 +0000 |
| commit | b6f945da35065f0a0d3b384b4d0f167908c0140f (patch) | |
| tree | 2fe792360569c829ca4bdd2c66f3a6a9e0748e7f /src/client/layout.rs | |
| parent | Converted tab updates to the new generic update() function (diff) | |
| download | sl0ppij-b6f945da35065f0a0d3b384b4d0f167908c0140f.tar.gz sl0ppij-b6f945da35065f0a0d3b384b4d0f167908c0140f.tar.xz sl0ppij-b6f945da35065f0a0d3b384b4d0f167908c0140f.zip | |
Wrap up the plugin system refactor, running everything through update()
Diffstat (limited to 'src/client/layout.rs')
| -rw-r--r-- | src/client/layout.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/client/layout.rs b/src/client/layout.rs index 33df2a2f..2d1daaf4 100644 --- a/src/client/layout.rs +++ b/src/client/layout.rs @@ -1,10 +1,8 @@ -use crate::utils::consts::ZELLIJ_ROOT_LAYOUT_DIR; use directories_next::ProjectDirs; use serde::{Deserialize, Serialize}; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::{fs::File, io::prelude::*}; -use crate::common::wasm_vm::NaughtyEventType; use crate::panes::PositionAndSize; fn split_space_to_parts_vertically( @@ -181,19 +179,15 @@ pub struct Layout { pub plugin: Option<PathBuf>, #[serde(default)] pub expansion_boundary: bool, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub events: Vec<NaughtyEventType>, } impl Layout { pub fn new(layout_path: PathBuf) -> Self { let project_dirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap(); let layout_dir = project_dirs.data_dir().join("layouts/"); - let root_layout_dir = Path::new(ZELLIJ_ROOT_LAYOUT_DIR); let mut layout_file = File::open(&layout_path) .or_else(|_| File::open(&layout_path.with_extension("yaml"))) .or_else(|_| File::open(&layout_dir.join(&layout_path).with_extension("yaml"))) - .or_else(|_| File::open(root_layout_dir.join(&layout_path).with_extension("yaml"))) .unwrap_or_else(|_| panic!("cannot find layout {}", &layout_path.display())); let mut layout = String::new(); |
