mirror of https://github.com/laurent22/joplin.git
Desktop: Resolves #1502: Improved note deletion dialog
parent
afb375955e
commit
016ce3dd61
|
@ -77,13 +77,16 @@ class Bridge {
|
|||
});
|
||||
}
|
||||
|
||||
showConfirmMessageBox(message) {
|
||||
const result = this.showMessageBox_(this.window(), {
|
||||
showConfirmMessageBox(message, options = null) {
|
||||
if (options === null) options = {};
|
||||
|
||||
const result = this.showMessageBox_(this.window(), Object.assign({}, {
|
||||
type: 'question',
|
||||
message: message,
|
||||
cancelId: 1,
|
||||
buttons: [_('OK'), _('Cancel')],
|
||||
});
|
||||
}, options));
|
||||
|
||||
return result === 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,11 @@ class NoteListUtils {
|
|||
msg = _('Delete these %d notes?', noteIds.length);
|
||||
}
|
||||
|
||||
const ok = bridge().showConfirmMessageBox(msg);
|
||||
const ok = bridge().showConfirmMessageBox(msg, {
|
||||
buttons: [_('Delete'), _('Cancel')],
|
||||
defaultId: 1,
|
||||
});
|
||||
|
||||
if (!ok) return;
|
||||
await Note.batchDelete(noteIds);
|
||||
}
|
||||
|
|
|
@ -139,8 +139,6 @@ class ExternalEditWatcher {
|
|||
|
||||
const watchedPaths = this.watcher_.getWatched();
|
||||
|
||||
console.info(noteFilename, watchedPaths);
|
||||
|
||||
for (let dirName in watchedPaths) {
|
||||
if (!watchedPaths.hasOwnProperty(dirName)) continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue