Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-08

"Save All" button always highlighted.

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Zaher Dirkey

Hi,
When the project changed, "Save All" button highlighted to notify us there is a file need to save, it is work.
But the project changed when the current/active opened file changed (change Tab of file), and who is not use to edit multiple files in one project, So that make "Save All" button always highlighted.

I think Save all highlighting must be responsible on files only not include the project file, but when save all it must save the project file.

--Sorry for bad English--

Best Regard
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110802/ae6640c1/attachment-0001.html>

Reply by email

Martin
to Zaher Dirkey
Zaher Dirkey wrote 9 lines
Hi, When the project changed, "Save All" button highlighted to notify us there is a file need to save, it is work. But the project changed when the current/active opened file changed (change Tab of file), and who is not use to edit multiple files in one project, So that make "Save All" button always highlighted. I think Save all highlighting must be responsible on files only not include the project file, but when save all it must save the project file.

The logic behind it, is more complex.

Part of the project is the project session.
The project session holds information, about all open files, the order of tabs, the position of scrolling, caret, .... So the project session does remember, if you had a none project file open.

You can try and save it, and reopen the project, and the none project file will be opened again too.

Of course you can turn off session for "none project files" or turn off entirely. In that case you are right (afaik), the project does get marked as modified, despite it should not...

Btw the opposite is true, too. Cursor (caret) position, is saved in the session, but does not trigger the modified state => It is only saved if something else did change too.

The caret position is actually indented, otherwjise if you just open the project, click somewhere into the window, and close it, it will scream modified. So caret is saved, but does on it's own not flag modified.
- One could say the same should be true for tab switching => save = yes -- flag modified = no
- Then what about changing folds (fold a block, or unfold? IIRC it currently doesn't flag modified (yet is saved); some people already ask if it could flag....
http://bugs.freepascal.org/view.php?id=18633
- not sure what scrolling does.

It's hard to impossible to get a set of rules that is consistent AND pleases the majority.

Yet the current status partly is due to implementation.

Personally I thing:
- all the "VIEW" actions (tab switching, scrolling, moving caret) do not need to flag.
- opening.closing tabs (even if cloning / no new file) should trigger modified
- folding can be seen either way...

But then again: if someone did change tabs, or did scroll, and wants to save it => there should be a way for him to do this.

Kind of, there would be a need for
- a "minor modified" => don't ask when closing project, but offer some way to save if wanted
- "modified" => the normal modified

I actually sometimes use switching tabs to mark the project as modified... But I guess I oppose this, (I can always drag a tap to a new position, which definitely should mark the project as modified)

Actually dragging tabs is really complex: if it should ignore files that are not part of the project, because it changes the current position of tabs that belong to the project:
old order: Tab-project / tab project / tab-other
new order: Tab-project / tab-other / tab project
last on changed from 2 to 3 => but, if project is reopend, the position 2 will be empty (not part of project) and the "changed" tab falls back to it's original pos.....

just a few considerations on the topic...

Martin

Reply by email

Hans-Peter Diettrich
to Zaher Dirkey: When the project changed, "Save All" button highlighted to notify us there is a file need…
Show quoted text 6 lines
Hi, When the project changed, "Save All" button highlighted to notify us there is a file need to save, it is work. But the project changed when the current/active opened file changed (change Tab of file), and who is not use to edit multiple files in one project, So that make "Save All" button always highlighted.

I assume that "Save All" includes the layout and other settings as well, not only modified files.

DoDi

Reply by email