Re: Balsa command line attachement patch
- From: "W. Michael Petullo" <mike flyn org>
- To: balsa-list gnome org
- Subject: Re: Balsa command line attachement patch
- Date: Sat, 14 Jul 2001 07:09:43 +0200
>>>> I would like to resubmit the patch to you which allows one to specify
>>>> an attachment on the command line, in addition to a recipient. My
>>>> patch adds a -a or --attach option which takes paths as an argument.
>>>> ``balsa -a /foo/bar'' and ``balsa --attach=/foo/bar,/foo/baz'' are two
>>>> examples of my patch's use.
>>> The patch is OK apart from the choice of the separator character: comma
>>> is a legal character in Unix file name and is used to mark version of
>>> the file (CVS, RCS). I think ';' would be better. Even better solution
>>> would be to allow multiple '-a' options...
>> No! Not ;! ; is th command seperator. One might do something like
>> balsa --attach=/foo/bar;sendmail -q.
>>
>> For this reason, a ; would be a very bad choice. I think the multiple
>> -a/--attach option is much better...
> Yes, I agree that multiple -a options would be best. I did not use this
> method in my patch because the infrastructure did not seem to be in the
> command line parsing code. However, now that it seems my patch will be
> accepted, I will take the time to implement it this way.
I found some decent documentation on popt + GNOME at
http://developer.gnome.org/doc/GGAD/z77.html. In order to support
multiple -a options, like gcc's -I, it seems I am given two options:
1. Use gnome_init_with_popt_table, as balsa currently does, and make
a semi-ugly callback scheme using POPT_ARG_CALLBACK to handle multiple
-a options.
2. Skip using gnome_init_with_popt_table and parse options manually
using popt's functions directly. That would be a shame, as
gnome_init_with_popt_table is pretty slick. Unfortunately, it does not
seem to be able to support what I would like it to.
I'm not too enthusiastic about either option. Does anyone have any
experience with GNOME applications that allow an argument to be specified
multiple times? I'd like to know if there is a correct way to do this.
Thanks!
--
Mike
:wq
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]