As proposed by JMarc, I removed the annoying AskQuestion when changing 
the class in Layout -> Document. Instead I implemented a button "Reset" 
(to class defaults) and a checkbox "Auto Reset" (to class defaults). 
Furthermore I removed the irritating menu entry "Save as class 
defaults" in "Layout" and added another Button in Layout Document 
instead.

So far everything seems to work as it should AFAICS. There are a few 
things to advance (see below), but maybe people could have a look first 
if they like this approach at all. JMarc (or someone else), can you 
please review the patch for my coding might be a little bit too 
intuitive ;-)

TODO:

- The status of the Auto Reset checkbox (default = true) is not saved 
between sessions currently. I already added a new lyxrc variable but 
didn't add anything to Preferences yet. I would vote for keeping the 
checkbox  in the Document Dialog (too), for it's more transparent to 
the user. Maybe we should handle it like in the Graphics Dialog, where 
the "Don't Display" checkbox is in Preferences (for general settings) 
/and/ in Graphics (for the single case)?

- I'd like to enable the "Save as defaults" and "Reset" buttons only if 
the current class settings != default class settings. I'm not shure 
what's the best way to check this, though.

PROBLEMS:
When hitting "Save as Defaults" a popup opens <grin>. Immediately the 
Document dialog jumps behind the main window. So AskQuestion strikes 
again! I think we should really fix this, it might be a general problem 
with dialogs and messageboxes.

Ah, and Michael, I moved the entries in Layout -> Document -> Extras a 
little bit to the left ;-)

Thanks,
Jürgen  

document.diff.tar.gz

Reply via email to