Finish bundled-template migration; simplify frontmatter; de-duplicate toolbar/menu
Completes the move off the external cookiecutter tool: drops src/cookiecutter.rs and the cookiecutter_bin/Template-path setting now that scaffolding always runs through the built-in MiniJinja engine, and rewrites default_project_template() to walk up from the executable without panicking when the bundled template can't be found. Rounds out the snowflake template with the remaining 06-Revisions, 07-Final, 08-Covers and 09-Archive folders. Simplifies the scene/chapter YAML frontmatter (drops type/word_count_min/ word_count_max in favor of status + a flat characters list) and updates the new-file template, header parsing, outline, file list and Story Bible editor to match. Separately, de-duplicates the toolbar and menu bar: settings that only existed as always-visible toolbar controls (draft marker, zero-pad, spell-check toggle, dictionary picker) move into their Settings windows, toolbar buttons that exactly duplicated a menu item are dropped, and toolbar-only actions with no menu path (open project folder, git sync/init) gain one under File. Also fixes two ambiguous menu labels: the Story Bible editor now reads "Story Bible editor…" next to "Story Bible…" in Tools instead of sharing a label with Edit, and Settings' "New project…" is now "New-project settings…" so it doesn't read like File's actual create action. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -221,11 +221,15 @@ impl App {
|
||||
if !open {
|
||||
self.story_bible_editor_content.clear();
|
||||
self.story_bible_editor_path = None;
|
||||
self.story_bible_editor_focused = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Contents of the Story Bible editor window.
|
||||
fn story_bible_editor_contents(&mut self, ui: &mut egui::Ui, tree: &[BibleTreeNode]) {
|
||||
// Set by the editor's text area below, read back out once the closures
|
||||
// that borrow `self` have finished.
|
||||
let mut focused = false;
|
||||
ui.horizontal(|ui| {
|
||||
// Left panel: Tree view (1/3 width)
|
||||
let tree_width = ui.available_width() / 3.0;
|
||||
@@ -275,12 +279,12 @@ impl App {
|
||||
.desired_rows(20);
|
||||
|
||||
let response = ui.add(text_edit);
|
||||
|
||||
// Handle keyboard shortcuts
|
||||
if response.has_focus() {
|
||||
// Ctrl+S to save - we'll handle this differently
|
||||
// since we can't mutate self directly from within the closure
|
||||
}
|
||||
|
||||
// Recorded rather than acted on: the save needs `&mut
|
||||
// self`, which this closure is already borrowing to
|
||||
// draw with. `App::update` reads the flag next frame and
|
||||
// routes Ctrl+S here instead of to the manuscript.
|
||||
focused = response.has_focus();
|
||||
});
|
||||
|
||||
// Save button
|
||||
@@ -298,6 +302,7 @@ impl App {
|
||||
});
|
||||
});
|
||||
});
|
||||
self.story_bible_editor_focused = focused;
|
||||
}
|
||||
|
||||
/// Load a Story Bible item from the workspace.
|
||||
|
||||
Reference in New Issue
Block a user