- Subject: Re: updated ffx -- file dialog
- From: Günter Milde <milde@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Jun 2003 10:06:11 +0200
On Thu, Jun 19, 2003 at 04:07:30PM +0200, Klaus Schmid wrote:
> > To make the recent files capable for multi sessions, it seems there is no
> > other way to read/write from/on disk at each reference...
>
> Here my current opinion, yet only as pseudo-code:
...
> Comments, improvements or bugfixes welcome.
> This should be self-explanatory, if not please read
> this or complain and I will try to explain:
>
> file: file in which file strings are saved
> buffer: buffer in which file strings are saved
> xxx_list: list of file strings from xxx
> load file: load file into buffer (read_file)
> read xxx_list: read xxx_list from buffer
> merge xxx: merge xxx to current list
> write buffer: write current list to buffer
> write file: write buffer to file (save_buffer)
So here comes my idea:
custom_var recent_sync_level
0 do not sync
1 synchronize at minimum (startup, exit)
2 synchronize normally (startup, popu-menu-function, exit)
I still prefer to go without a buffer by saving the last access
time to a variable when reading the file to a list. This way
file_changed_on_disk could be replaced with a list_changed_on_disk function.
merge_lists would do a merge of the list in memory with the list in the file.
Maybe there could be one function for read_file_to_list and merge_lists, as
at startup we have an empty list.
Actions at different places:
at startup % there is no recent-files list yet
read_file_to_list
% assume that there is no load/save action in another jed
% while the File>Recent_Files popup is open
before file_dialog
if sync_level>1 and list_changed_on_disk
merge_lists
after file_load/save % also without File dialog
list_changed = move_choosen_entry_to_top()
if (sync_level>1 and list_changed)
merge_lists
write_list_to_file
on exit
if (sync_level and list_changed_on_disk)
merge_lists
write_list_to_file
% Every time a file is opened or saved, it is put to position 1 in the list
% and eventually deleted from a later position. (insert_or_move_to_top).
% With sync_level == 2, there should be no need to have the touch-time on
% the list items. merge_lists could find out the right sort order by
% matching the lists.
Günter
--
Milde at ife.et.tu-dresden.de
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]