GNOME Bugzilla – Bug 742698
closing an untitled document doesn't seem to close it
Last modified: 2016-02-22 00:20:58 UTC
Steps: * open builder * create new document * enter a char * press Ctrl+W or find the close document button and click it Actual result: editor switches to the first untitled document Expected result: editor should ask if I want to save that thing, then save/throwaway it and close it.
I think this makes sense. When Builder is closed, I think we'll start saving the modified contents in ~/.local/gnome-builder/drafts instead of asking. So we'll need a way to directly close them. I'd also like to change order of items in the popover, but that will be a different bug. (And maybe a close button). All requires more thought...
Created attachment 294276 [details] [review] Closing an untitled document doesn't close it A request close signal has been implemented in order for the document grid to decide whether it should close the document. The signal is catched and if the document has no changes we close the view else we popup a save / cancel dialog.
I like it, nice work! Attachment 294276 [details] pushed as af5e873 - Closing an untitled document doesn't close it
We need to do a bit more work on this, since it caused a minor annoyance with split views. When splitting a document that is open, the close signal is called and a new view is opened up (in the new location). That is causing this to trigger.
Is there a chance instead of closing and creating a new view to just move the current view to its new location?
It's certainly doable. It just requires being a bit more careful with unrealizing/realizing new widgets. The current implementation was certainly out of convenience.
This shouldn't be an issue anymore.