-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added Open Recent file menu #50
Conversation
use wx.FileHistory to open recently opened files from the file menu
@oyarzun, Thanks for your contribution! Can you send me your contact info to jreadey AT hdfgroup.org? We'd like you to submit a contributor's agreement for any code to be merged to the HDFGroup organization. |
@oyarzun, it looks like the file history list will get longer and longer as more files are opened. Could you add a "clear" menu item to cleanup the history? So the "Open Recent" menu would look like this: Clear Recent |
How about the Recent |
It only keeps a maximum of 8 in the history. self.filehistory = wx.FileHistory(8) http://docs.wxwidgets.org/trunk/classwx_file_history.html#a30e3a3a1f92fc253cc0fc69eb6f27fd8 |
Oops. Failed to notice that line. |
Merged to develop branch.
|
Has anyone tried this on Windows? I get an error on opening a file due to a no 'RemoveFileHistory' method on FileHistory. |
@jreadey : there are at least a couple of issues.. One is that the Another issue is that The first issue (only on Windows) has made evident the second bug that is not Windows-specific. |
I'm not sure what's up RemoveFileFromHistory. It's there on my Mac environment: wx.version() == '3.0.0.0 osx-cocoa (classic)'. @oyarzun - any thoughts on this? Can you patch the url setup and provide an alternative for RemoveFileFromHistory if that is not available on all platforms? |
Oh I see. This path was somehow getting triggered in Windows but not the Mac. |
@jreadey Why is this PR still open? |
Closing. |
Why doesn't OPeNDAP URL appear in Open Recent menu? Does history work on local files only? |
The follow-on questions might be:
|
I think it will be best/easiest to put recent files/resources in the same history menu. Is the wx FileHistory adaptable for strings that are not proper files? |
use wx.FileHistory to open recently opened files from the file menu