On Wed, Jun 20, 2007 at 02:42:10PM -0500, Bo Peng wrote:
> > lyx anewfile.lyx
> >
> > Lyx asks: 'The document anewfile.lyx does not yet exist. Do you want
> > to create a new document?
> >
> > Click create. no new document is created.
> > Click cancel: a new document is created.
> >
> > This should be fixed ASAP.
> 
> The patch is easy. Note that prompt() returns button index so 'create'
> button returns 0.
> 
> Index: src/buffer_funcs.cpp
> ===================================================================
> --- src/buffer_funcs.cpp        (revision 18837)
> +++ src/buffer_funcs.cpp        (working copy)
> @@ -214,7 +214,7 @@
>         docstring text = bformat(_("The document %1$s does not yet "
>                 "exist.\n\nDo you want to create a new document?"),
>                 from_utf8(filename.absFilename()));
> -       if (Alert::prompt(_("Create new document?"),
> +       if (!Alert::prompt(_("Create new document?"),
>                         text, 0, 1, _("&Create"), _("Cancel")))
>                 return newFile(filename.absFilename(), string(), true);
> 
> 
> Waiting for 1 OK becuase this is trivial.

The patch works for me.

-- 
Enrico

Reply via email to