-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Support for save and save as #24
Conversation
Depends on glyphr-studio/Glyphr-Studio-1#263 |
@mattlag and @Autre31415 this is a super rough implementation so lemme know what sucks and I'll fix it. One thing I don't like about it already is it only works via keyboard commands (ctrl/cmd+s for save and ctrl/cmd+shift+s for save as). The visual save button is not handled. Open to ideas for improvements on how it should work. |
I agree, this needs a bit more thought.
|
Okay yeah that all makes sense. I'll push an update with those changes. Can you publish a new version of the main repo that has my changes to it so we can inherit it in the desktop app? |
All right, pushed up some changes that reflect those additional requirements. Pretty hacky in how it interacts with that save button, but it seems to work. If we want to clean up the interactions between how electron talks to that save button, I'll need to PR the main project again. Up to you which way you think we should go with it. |
dialog.showSaveDialog({ | ||
properties: ['openFile'], | ||
title: 'Choose where to save project...', | ||
defaultPath: process.env.HOME + '/' + fname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} else { | ||
event.returnValue = 'false' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without a replacement for this line, selecting "Cancel" on the "Would you like to save before closing?" dialog will always cause the app to close.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the bug associated with this
dialog.showSaveDialog({ | ||
properties: ['openFile'], | ||
title: 'Choose where to save project...', | ||
defaultPath: process.env.HOME + '/' + fname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I suppose one more thing I should do on this at least before we merge it is suppress the save/save-as menus on the welcome screen. |
Okay, took care of suppressing the save/save-as menus on the welcome screen. |
@mattlag and @Autre31415 I think I'm done tweaking it now. Give it a spin and let me know if you think this is good now. |
Closes #21
Closes #25
Closes #26
Probably closes #14
Makes progress on #4