tweecode / twine

UI for creating hypertext stories
http://twinery.org
656 stars 97 forks source link

The "File>Open recent" list should update itself when files are no longer present #29

Closed Philip-Sutton closed 12 years ago

Philip-Sutton commented 12 years ago

In the main window, the menu function: "File > Open recent" opens a list of recently used .tws files. However, files that have been deleted from the computer remain in the list even after an attempt has been made to open them though the "Open recent" function. Once the program has found a file to be not present, it should be automatically removed from the list.

ghost commented 12 years ago
import os
if not os.path.exists("file_name.tws"):    #this will look for the file
    wx.FileHistory.RemoveFileFromHistory()

for removal of dead links we can use: http://xoomer.virgilio.it/infinity77/wxPython/Widgets/wx.FileHistory.html#RemoveFileFromHistory

Stormrose commented 12 years ago

The Recent file history is scanned for missing files and any missing files are removed from the Recent file list and the user alerted to the removal. This happens on: StoryFrame creation (includes on startup), and when trying to open a file from the recent menu. Also is friendly with multiple story windows open at once.

mcdemarco commented 12 years ago

Hi, I ran into this bug. The fix doesn't seem to be in tweecode yet and I don't see a pull request for it. I don't know what the process is, but I hope it hasn't been forgotten...

Stormrose commented 12 years ago

I fixed that in this commit here: https://github.com/Stormrose/twine/commit/629dbe16fbeea479195fb4aa5f27b5a014a6910d It's in the list of things in my current pull request: Issue #44 The current rules are that somebody else must verify the commits in the pull request and apply them. It's a good system. Unfortunately between github and egit all my commits end up in one big long chain. The recent alphas have this issue fixed.

mcdemarco commented 12 years ago

Hi,

I saw the commit (and grabbed the code to try out, not that it helped...), but I guess the name of the pull request made it sound unrelated. Where are the alphas?

Thanks, mary

On Tue, May 8, 2012 at 9:27 PM, Stormrose reply@reply.github.com wrote:

I fixed that in this commit here: https://github.com/Stormrose/twine/commit/629dbe16fbeea479195fb4aa5f27b5a014a6910d It's in the list of things in my current pull request: Issue #44 The current rules are that somebody else must verify the commits in the pull request and apply them. It's a good system. Unfortunately between github and egit all my commits end up in one big long chain. The recent alphas have this issue fixed.


Reply to this email directly or view it on GitHub: https://github.com/tweecode/twine/issues/29#issuecomment-5590893

Stormrose commented 12 years ago

Try either of these: http://dl.dropbox.com/u/25549414/twine-1.3.5-alpha_201205051201-windows.exe https://github.com/Stormrose/twine/zipball/master