DistributedProofreaders / guiguts

Perl/Tk text editor designed for editing and formatting public domain material for inclusion at Project Gutenberg
GNU General Public License v2.0
9 stars 10 forks source link

Add page marker flags feature #1298

Closed windymilla closed 4 months ago

windymilla commented 5 months ago

This feature is in GG2, and allows editing in a different editor without losing the page break positions.

In particular, swapping between GG1 & GG2 should be easy, but any other editor is OK too.

Linked with GG2 PR: https://github.com/DistributedProofreaders/guiguts-py/pull/272

windymilla commented 5 months ago

Testing notes:

  1. File-->Project-->Add Page Marker flags in GG1
  2. Save file from GG1
  3. Load in another editor
  4. If that editor is GG2, then after loading the file, you can File-->Project-->Remove Page Marker flags in GG2 if you don't want them to get in the way.
  5. Make the edits you want to in the other editor.
  6. If that editor is GG2, then use File-->Project-->Add Page Marker flags in GG2 before a final save.
  7. Load the file in GG1 again
  8. File-->Project-->Remove Page Marker flags in GG1

These notes should also work if "GG1" & "GG2" are swapped above.

In summary, in both directions of transfer... Immediately before saving, Add Page Markers, and immediately after loading, Remove Page Markers (only if the editor is a version of Guiguts, of course, or it won't have those options).

srjfoo commented 4 months ago

I found the File->Set Page Markers option in GG1 confusing, but remembered to look it up in the manual. Is this something that just won't be implemented in GG2, or is that something else we need to open an issue about?

windymilla commented 4 months ago

I found the File->Set Page Markers option in GG1 confusing, but remembered to look it up in the manual. Is this something that just won't be implemented in GG2, or is that something else we need to open an issue about?

I don't think we need it in GG2. Our new page marker flags remove any need that there may have been in the past. Historically, there is a Pref in GG1 that lets you not set the page markers when you first load a file, and then you would have had to use that menu option to set them later. I wonder if many versions ago, that was the only way of setting page markers, then someone added the feature to auto-set them when the file was loaded (also adding a Pref to keep the old-old-timers happy)

windymilla commented 4 months ago

It worked as expected for me, but it probably should be documented that until a save is done, the bin/json files won't be updated (unless, of course, that's pounded into PPers' heads much earlier in the process 😁).

However, if you don't do a save, then the changes you've made to the file itself won't be updated, so you've just loaded a file and done nothing to it (or discarded your changes). So, I don't think there would be any need to save the json file in that circumstance.

srjfoo commented 4 months ago

It worked as expected for me, but it probably should be documented that until a save is done, the bin/json files won't be updated (unless, of course, that's pounded into PPers' heads much earlier in the process 😁).

However, if you don't do a save, then the changes you've made to the file itself won't be updated, so you've just loaded a file and done nothing to it (or discarded your changes). So, I don't think there would be any need to save the json file in that circumstance.

Good point.