Skip to content

Commit

Permalink
Fixed: #642
Browse files Browse the repository at this point in the history
When asking to overwrite Leo outline, use different message.

Leo build: 20180223140534
  • Loading branch information
vitalije committed Feb 23, 2018
1 parent 4a815ce commit 799c364
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions leo/core/commit_timestamp.json
@@ -1,4 +1,4 @@
{
"asctime": "Fri Feb 23 13:38:13 UTC 2018",
"timestamp": "20180223133813"
"asctime": "Fri Feb 23 14:05:34 UTC 2018",
"timestamp": "20180223140534"
}
17 changes: 12 additions & 5 deletions leo/core/leoExternalFiles.py
Expand Up @@ -340,12 +340,19 @@ def ask(self, c, path, p=None):
where = 'the outline node'
else:
where = p.h
s = '\n'.join([
'%s has changed outside Leo.' % (g.splitLongFileName(path)),
'Reload %s in Leo?' % (where),
])
_is_leo = path.endswith(('.leo', '.db'))
if _is_leo:
s = '\n'.join([
'%s has changed outside Leo.' %(g.splitLongFileName(path)),
'Overwrite it?'
])
else:
s = '\n'.join([
'%s has changed outside Leo.' % (g.splitLongFileName(path)),
'Reload %s in Leo?' % (where),
])
result = g.app.gui.runAskYesNoDialog(c, 'Overwrite the version in Leo?', s,
yes_all=True, no_all=True)
yes_all=not _is_leo, no_all=not _is_leo)
if result and "-all" in result.lower():
self.yesno_all_time = time.time()
self.yesno_all_answer = result.lower()
Expand Down

0 comments on commit 799c364

Please sign in to comment.