Jean-Marc Lasgouttes wrote: > Fine. A remaining problem: 'save class defaults' is not a good name, > since it looks like 'reset class defaults'. A better name would be > 'save default document layout' or 'save as defaults for new > documents', but these are of course too long. This buttons operates > on _all_ parameters in the popup, not only class defaults (which are > the defaults of the class as defined in the layout file). Could you > find a better name?
Ah, now I finally understand the effect of that button. I always thought it changes the default settings of the current class, not the defaults for "New" documents. I don't have a good idea for a short and enlightening name. I think we have to use something like "Save Settings as Defaults" and explain what this means in the following popup. Don't know... > Juergen> The only thing that became worse AFAICS is the "Use Class > Juergen> Defaults" button. It is now disabled most of the time > Juergen> (actually it obviously disables after any first change you > Juergen> do), which shouldn't happen. Is it possible that > Juergen> params.hasClassDefaults() doesn't give the correct values > Juergen> anymore? > > First problem: > > - in FormDocument::input > setEnabled(dialog_->button_reset_defaults, > lv_->buffer()->params.hasClassDefaults()); > should be > setEnabled(dialog_->button_reset_defaults, > !lv_->buffer()->params.hasClassDefaults()); D'oh! That's of course my fault. Sorry. But this is not a good solution in general. It does not really do want I intended. > - as you can see in code above, you compare to the actual buffer > parameters (i.e. after an "apply"). If you really want the current > popup state, you should do an apply on a BufferParams variable, and > use this one in the test. I do not think this will be too expensive > in terms of time. I'm sorry I can't follow you :-( If you can give me some more hints and it is easy to do this I will have a try. Otherwise I would say we don't disable that button at all. There's no harm in that (it was intended as a visual feedback to the user: if the button is disabled, his settings are the defaults). > AFAIK, none of these problems are related to my changes. You're right. > JMarc > > PS: if you are looking at more things to to on popups, I have a > project for you: adding shortcuts to popups. I think it would be a > rather safe change, and some people have shown interest in this. Not really, I'm afraid. I would be lucky if I'd finally find the time to keep my promises (tabular dialog). But I can put it on my virtual todo-list. Thanks, Jürgen.