lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Accept command line arguments in lmi_wx


From: Greg Chicares
Subject: Re: [lmi] [PATCH] Accept command line arguments in lmi_wx
Date: Sun, 08 Mar 2015 00:30:53 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2015-02-15 18:46, Vadim Zeitlin wrote:
> 
>  While testing the performance of different operations with a big census, I
> got annoyed by the fact that I had to open the one and same census file
> each time over and over again from the GUI (even if it's as simple as
> pressing Alt+F,1 -- arguably, I get annoyed too easily)

That's what I do.

> and so wrote the
> attached patch to allow passing the name of the file(s) to open directly on
> the command line.
> 
>  It's not a problem for me to keep this patch private, of course, but I
> think it's quite reasonable to expect any document-oriented application to
> accept files to open on the command line and I was quite surprised a few
> times already by the fact that lmi didn't support this, so I believe it
> would be a good idea to apply it, especially considering how simple it is
> and that the command line arguments are not used for anything else
> currently.

I'm not averse to adding this sort of facility to lmi. I have two
minor, interrelated objections to this particular way of doing it:

(1) The original "Unrecognized parameters" diagnostic seems useful,
and I hesitate to lose it.

(2) It's inconsistent with the way file names are handled by the
command-line 'lmi_cli*' binary. The difference is perhaps arbitrary
between
  lmi_wx file0 file1
in this patch versus
  lmi_cli -f file0 --file=file1
in 'lmi_cli*' today; but we want consistency, and I tend to prefer
the latter for lmi.

If you'd like to address those objections, I think the "case 'f':"
code in 'main_cli.cpp' could be imported here, probably without
distinguishing illustrator_names, mec_server_names, etc. because
a single vector of input_file_names can just be passed to
doc_manager_->CreateDocument() (as your patch does) . I don't think
any of the other command-line options for the CLI program should be
imported, and I doubt "prospicience" would be useful to add to the
CLI program (which otherwise accepts a superset of the GUI program's
options).

Or of course you could just maintain a private patch.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]