Skip to content

Commit 5671555

Browse files
committed
Prepare for new release
1 parent 049bac9 commit 5671555

File tree

5 files changed

+5046
-4955
lines changed

5 files changed

+5046
-4955
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ npm install
1313
./node_modules/.bin/electron .
1414

1515
# to package for Mac
16-
./node_modules/electron-packager/cli.js . Cracked --platform=darwin --arch=x64 --icon=./cracked.icns --overwrite
16+
./node_modules/electron-packager/bin/electron-packager.js . Cracked --platform=darwin --arch=x64 --icon=./cracked.icns --overwrite
1717

1818
# to package for Linux
19-
./node_modules/electron-packager/cli.js . Cracked --platform=linux --arch=x64 --icon=./cracked.icns --overwrite
19+
./node_modules/electron-packager/bin/electron-packager.js . Cracked --platform=linux --arch=x64 --icon=./cracked.icns --overwrite
2020

2121
# build installer for Mac
2222
./node_modules/electron-installer-dmg/bin/electron-installer-dmg.js --overwrite Cracked-darwin-x64/Cracked.app Cracked --out=Installers/

app/index.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,26 @@ currentWindow.on('close', function(e) {
5858
//so go ahead and close
5959
currentWindow.destroy();
6060
} else {
61-
dialog.showMessageBox({
61+
62+
var messageResult = dialog.showMessageBoxSync({
6263
type:"question",
6364
message:"Do you want to save the changes made to this document?",
6465
buttons:["Don't Save","Cancel","Save"],
6566
defaultId:2
66-
},function(result) {
67-
//save
68-
if(result===2) {
69-
saveFile(function(){
70-
currentWindow.destroy();
71-
});
72-
//cancel-do nothing
73-
} else if(result===1) {
74-
//don't save
75-
flipShutdownFlag();
76-
} else {
77-
currentWindow.destroy();
78-
}
7967
});
68+
69+
if(messageResult===2) {
70+
saveFile(function(){
71+
currentWindow.destroy();
72+
});
73+
//cancel-do nothing
74+
} else if(messageResult===1) {
75+
//don't save
76+
flipShutdownFlag();
77+
} else {
78+
currentWindow.destroy();
79+
}
80+
8081
}
8182
});
8283

@@ -181,11 +182,9 @@ function saveFile(callback) {
181182
//if not previously saved
182183
if(!crackedFile) {
183184
//throw up a dialog
184-
dialog.showSaveDialog({title:"Do you want to save the changes made to the document \"Untitled\"?"},function(path){
185-
if(path && path.length) {
186-
__cb(path);
187-
}
188-
});
185+
__cb(dialog.showSaveDialogSync(
186+
{title:"Do you want to save the changes made to the document \"Untitled\"?"},function(path){}
187+
));
189188
} else {
190189
//already saved so just save it.
191190
__cb();

0 commit comments

Comments
 (0)