Re: GNOME skeleton program thoughts
- From: Glynn Foster <Glynn Foster Sun COM>
- To: patanjali codito com
- Cc: desktop-devel-list gnome org
- Subject: Re: GNOME skeleton program thoughts
- Date: Sun, 25 Apr 2004 10:56:27 +1200
Hey,
> It is difficult to define what the skeleton for a GNOME program should
> be since there are a lot of alternatives. In fact, since libgnomeui
> might be deprecated in the future, and because GtkUIManager has a lot of
> the stuff from libgnomeui - the following is a current version of the
> skeleton (post GNOME 2.6/GTK+ 2.4):
>
> main (...)
> {
> // declare variables
>
> program = gnome_program_init ();
>
> window = gtk_window_new (GTK_WINDOW_TOP_LEVEL);
>
> // lots of GTK+ calls using window, including GTK+ UI manager calls
>
> gtk.main ();
> }
>
> Is this correct ?
Yeah, this looks a lot better to me - others might be able to say what
the plans and schedule are for deprecating parts of libgnomeui.
> This potentially still has the problem that gnome_program_init () might
> be init-ting some sort of application/program object that will be used
> later. Another observation is that most apps don't need to use the
> returned GnomeProgram, and proceed to making many gtk+ calls after that.
gnome_program_init sets up a bunch of things - from calling gtk_init,
setting up the arguments for commandline parsing, setting up
environments and search paths for help documentation and loading
modules. Still pretty useful in a GNOME world.
Glynn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]