Jean-Marc Lasgouttes wrote:
> Could you try to do that? Or maybe 'save as defaults'? You could also
> try to review the popup triggered by this button and see whether it
> makes sense.

I changed it to "Save as Document Defaults", which is the best solution 
IMHO. I also changed the popup text a little bit, so now it should be 
clear what happens.

> Juergen> I'm sorry I can't follow you :-( If you can give me some
> more Juergen> hints and it is easy to do this I will have a try.
> Otherwise Juergen> I would say we don't disable that button at all.
> There's no Juergen> harm in that (it was intended as a visual
> feedback to the Juergen> user: if the button is disabled, his
> settings are the Juergen> defaults).
>
> You're right. You can remove all this code altogether, since you
> cannot check anyway that the current settings are the same as what is
> saved in the default template.

I removed it.

> >> 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.
>
> Juergen> Not really, I'm afraid. I would be lucky if I'd finally find
> Juergen> the time to keep my promises (tabular dialog). But I can put
> Juergen> it on my virtual todo-list.
>
> I just tried. Note that some people even offered money on that :)
> http://www.mail-archive.com/lyx-users@lists.lyx.org/msg09145.html
> [there were follow-ups, but they do not appear on the archive]

Good try. As I said, it's on my list, and it may happen that I'll have 
a go on that (after the tabular stuff). And the money will of course be 
taken for some beers (or vine?) on the next developer meeting ;-)

Thanks,
Jürgen

> JMarc
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.195
diff -u -r1.195 ChangeLog
--- src/frontends/xforms/ChangeLog      2001/11/08 11:46:05     1.195
+++ src/frontends/xforms/ChangeLog      2001/11/12 12:26:22
@@ -1,3 +1,12 @@
+2001-11-12  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+
+       * forms/form_document.fd: Renamed "Save as Class Defaults"
+       to "Save as Document Defaults"
+       * FormDocument.C:
+       Removed the setEnabled-Definitions for the
+       "save_default"-Button since it causes nothing but trouble.
+       Changed the text of AskQuestion on saveParamsAsDefault.
+
 2001-11-07  John Levon  <[EMAIL PROTECTED]>

        * DropDown.C: fix crash, improve behaviour a bit
Index: src/frontends/xforms/FormDocument.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/FormDocument.C,v
retrieving revision 1.75
diff -u -r1.75 FormDocument.C
--- src/frontends/xforms/FormDocument.C 2001/11/07 11:39:58     1.75
+++ src/frontends/xforms/FormDocument.C 2001/11/12 12:26:24
@@ -360,9 +360,6 @@

        BufferParams const & params = lv_->buffer()->params;

-       setEnabled(dialog_->button_reset_defaults,
-                  !params.hasClassDefaults());
-
        class_update(params);
        paper_update(params);
        language_update(params);
@@ -382,8 +379,8 @@
 bool saveParamsAsDefault(BufferParams const &params)
 {
        if (!AskQuestion(_("Do you want to save the current settings"),
-                       _("for document layout"),
-                       _("as default for new documents?")))
+                       _("for the document layout as default?"),
+                       _("(they will be valid for any new document)")))
                return false;

        string const fname = AddName(AddPath(user_lyxdir, "templates/"),
@@ -618,8 +615,6 @@
                setEnabled(paper_->choice_foot_skip_units,     use_geom);
        }

-       setEnabled(dialog_->button_reset_defaults,
-                  lv_->buffer()->params.hasClassDefaults());

        switch (data) {
        case INPUT:
Index: src/frontends/xforms/form_document.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/form_document.C,v
retrieving revision 1.23
diff -u -r1.23 form_document.C
--- src/frontends/xforms/form_document.C        2001/10/23 11:35:48     1.23
+++ src/frontends/xforms/form_document.C        2001/11/12 12:26:26
@@ -57,7 +57,7 @@
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, INPUT);
   {
-    char const * const dummy = N_("Save as Class Defaults|#v");
+    char const * const dummy = N_("Save as Document Defaults|#v");
     fdui->button_save_defaults = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 420, 195, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
cvs server: Diffing src/frontends/xforms/forms
Index: src/frontends/xforms/forms/form_document.fd
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/forms/form_document.fd,v
retrieving revision 1.17
diff -u -r1.17 form_document.fd
--- src/frontends/xforms/forms/form_document.fd 2001/10/23 11:35:48     1.17
+++ src/frontends/xforms/forms/form_document.fd 2001/11/12 12:26:29
@@ -149,7 +149,7 @@
 style: FL_NORMAL_STYLE
 size: FL_DEFAULT_SIZE
 lcol: FL_BLACK
-label: Save as Class Defaults|#v
+label: Save as Document Defaults|#v
 shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity

Reply via email to