Re: Gnome equivalent for gtk_init_check() ?
- From: Gustavo Joćo Alves Marques Carneiro <ee96090 fe up pt>
- To: Havoc Pennington <hp redhat com>
- Cc: Rick Niles <niles scyld com>, gnome-devel-list gnome org
- Subject: Re: Gnome equivalent for gtk_init_check() ?
- Date: Wed, 14 Jun 2000 22:04:05 +0100 (WET DST)
On 14 Jun 2000, Havoc Pennington wrote:
>
> Gustavo Joćo Alves Marques Carneiro <ee96090@fe.up.pt> writes:
> > Yes, but what about the popt table? One has to call gtk_init_check. If
> > it fails, we have to call some popt function to parse the arguments and
> > skip gnome_init, otherwise call gnome_init_with_popt_table.
>
>
> No, I think you can just do this:
>
> if (gtk_init_check (&argc, &argv))
> gnome_init_with_popt_table (...);
But if you do that, when X is not available, the program won't parse
command line arguments. You have to append this else:
else {
while ((rc = poptGetNextOpt(pctx)) > 0) {
switch (rc) {
/* specific arguments are handled here */
}
}
Right?
>
> > If there was
> > a gnome_init_check_with_popt_table, it would be simpler.
> >
>
> Yes, of course.
>
> Havoc
>
--
Gustavo J. A. M. Carneiro
[http://linuxdeec.fe.up.pt/~ee96090]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]