mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 10:58:04 +08:00
Implement closing the current, and all, documents from the menu bar (#265)
Closes #261 Additional cleanup and refactoring with the way the backend relays the list of open documents to the frontend and prompts for confirmation.
This commit is contained in:
@@ -12,14 +12,14 @@ pub enum FrontendMessage {
|
||||
ExpandFolder { path: Vec<LayerId>, children: Vec<LayerPanelEntry> },
|
||||
SetActiveTool { tool_name: String },
|
||||
SetActiveDocument { document_index: usize },
|
||||
CloseDocument { document_index: usize },
|
||||
NewDocument { document_name: String },
|
||||
UpdateOpenDocumentsList { open_documents: Vec<String> },
|
||||
PromptConfirmationToCloseDocument { document_index: usize },
|
||||
PromptConfirmationToCloseAllDocuments,
|
||||
UpdateCanvas { document: String },
|
||||
ExportDocument { document: String },
|
||||
EnableTextInput,
|
||||
DisableTextInput,
|
||||
UpdateWorkingColors { primary: Color, secondary: Color },
|
||||
PromptCloseConfirmationModal,
|
||||
SetCanvasZoom { new_zoom: f64 },
|
||||
SetRotation { new_radians: f64 },
|
||||
}
|
||||
@@ -44,7 +44,6 @@ impl MessageHandler<FrontendMessage, ()> for FrontendMessageHandler {
|
||||
CollapseFolder,
|
||||
ExpandFolder,
|
||||
SetActiveTool,
|
||||
NewDocument,
|
||||
UpdateCanvas,
|
||||
EnableTextInput,
|
||||
DisableTextInput,
|
||||
|
||||
Reference in New Issue
Block a user