[This has nothing to do with the recent recent files list bug]
A long time irritation for me has been tkinter's dumb decision to force
all paths returned by the file selection dialog into canonical form, so
when I navigate to /home/tbrown/Desktop/some/thing.leo it gets changed
to /mnt/usr1/home/tbrown/Desktop/some/thing.leo, which doesn't work on
a different machine where it would
be /ext/users/tbrown/Desktop/some/thing.leo or some such, but if
tkinter had just left it alone /home/tbrown/Desktop/some/thing.leo
would have worked on both machines.
Anyway, finally occured to me to add this trivial button script to my
main leo file:
orig = [i for i in c.recentFiles if i.startswith("/")]
c.clearRecentFiles()
for i in orig:
c.updateRecentFiles(i
.replace("/mnt/usr2/bkup/tb_usr1","")
.replace("/mnt/usr2/bkup/tb_proj","/home/tbrown/Desktop/Proj")
.replace("/media/hdd1/usr1","")
.replace("/media/hdd1/proj","/home/tbrown/Desktop/Proj")
.replace(".gnome-desktop","Desktop"))
which unmangles the list very nicely. There was an entry on the list
without a leading '/', so I made it filter those.
c.updateRecentFiles() filters duplicates, so that's taken care of for
free.
Assuming I'm not the only person with this annoyance, posted here for
others.
Cheers -Terry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---