let tab = match model.kind {
NoteType::PlainTextNote => NoteTypeTabView::TextArea,
NoteType::MDTextNote => NoteTypeTabView::TextArea,
+ NoteType::File => NoteTypeTabView::File,
_ => NoteTypeTabView::Empty
};
self.note_type.set(tab as i64);
textarea.focus();
});
});
+
+ tabview.tab("file", |obj| {
+ obj.grid(
+ |g|{
+ g.fill(true);
+ g.margin(8);
+ g.columnspacing(8);
+ g.rowspacing(8);
+ g.def_vfill(true);
+ },
+ |obj|{
+ obj.grid_row(|obj|{
+ obj.rlabel(|l|{
+ l.label("Name");
+ });
+ obj.textfield(|t|{
+ t.hexpand(true);
+ t.hfill(true);
+ t.varname("note_nodename");
+ });
+ obj.button(|b|{
+ b.label("Open");
+ b.action("open_extern");
+ });
+ });
+ }
+ );
+ });
});
});
});
pub enum NoteTypeTabView {
Empty = 0,
- TextArea = 1
+ TextArea = 1,
+ File = 2,
}
#[derive(Default)]