Re: Gnome equivalent for gtk_init_check() ?



There is a gnomelib_init for initializing gnome with only libgnome (and not
libgnomeui). Why not make a gnomelib_init_with_popt_table?

	= L

> > 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?

/-------------------------------------------------------------------\
|   LOBAN AMAAN RAHMAN  <-- anagram of -->  AHA! AN ABNORMAL MAN!   |
|  MSC #763, Caltech, Pasadena, CA 91126, USA. Tel: 1-626-395-1406  |
|     loban@earthling.net, loban@caltech.edu, http://i.am/loban     |
\-------------------------------------------------------------------/




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