Opened 13 years ago

Closed 11 years ago

#6887 closed enhancement (fixed)

Add function to reload a document

Reported by: humdinger Owned by: siarzhuk
Priority: normal Milestone: R1
Component: Applications/StyledEdit Version: R1/Development
Keywords: Cc: jwlhc172@…
Blocked By: Blocking:
Platform: All

Description

A nice feature for StyledEdit would be a way to refresh the current file, i.e. a menu item File|Reload (ALT+L] that reloads the file. Could be nice for log files or if you accidentally edited a document.
If the document was altered after it was opened, it should ask if the changes should be saved first and show a save dialog if the user confirms.

Besides this manual reloading, it may also be nice to node-monitor the file and signal if it has been changed after it was opened. I could imagine that an Alert would be too annoying. How about showing a changed file by adding a italic "- reload?" or something or just some symbol like "¤¤¤"?

Change History (8)

comment:1 by anevilyak, 13 years ago

Have you looked at how Pe handles it? IMHO an alert isn't unreasonable in this case since if the file was modified out from under you, you probably don't want to be dealing with out of date contents.

comment:2 by humdinger, 13 years ago

Pe doesn't show when the file has been altered. It does provide a manual "Revert..." that will ask to load the last saved version. That's OK, too, I just named it "Reload..." to get an "L" in there for a nice shortcut. :)
No monitoring, though, with Pe.
Maybe an alert isn't too annoying after all... worth a try, I guess.

comment:3 by anevilyak, 13 years ago

Hm, I thought it did, maybe I'm getting it confused with my env at work. Will need to check later.

comment:4 by stippi, 13 years ago

Pe definitely node-monitors any open file, I use that all the time. If you just rename or move the file, nothing "happens", as Pe will simply follow the file around. But if some other app changes contents, Pe will make the file saveable, if it wasn't before. It used to display an alert, and it may still do so under certain conditions.

comment:5 by jwlh172, 12 years ago

Cc: jwlhc172@… added

comment:6 by siarzhuk, 11 years ago

Owner: changed from korli to siarzhuk
Status: newassigned

It would be nice to have this option with extended functionality and make it possible to reload the document with changing file encoding on the fly. Menu structure can be following:

File
  Reload <Alt-L>
    ISO West European
    [...]
    Macintosh Roman
    [...]
    

so selecting "root" Reload entry will reload document in current encoding and selecting "leaf" encoding entries should force the text encoding to corresponding charset.

comment:7 by siarzhuk, 11 years ago

This issue was published as GCI 2012 task http://google-melange.appspot.com/gci/task/view/google/gci2012/7977207 I take ownership of it.

comment:8 by siarzhuk, 11 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev44994

Note: See TracTickets for help on using tickets.