Re: GTK Coding Conventions
- From: Rick Sutphin <sutphinc bellsouth net>
- To: gtk-app-devel-list gnome org
- Subject: Re: GTK Coding Conventions
- Date: Wed, 13 Apr 2005 07:12:30 -0400
Thanks for the response. I appreciate the suggestion. I was hoping for
something along the lines of an object oriented 'HelloWorld' example (I
am not a very experinenced coder).
I am currently working through the GObject tutorial. Though I was hoping
to find something simpler I could use until I am up to speed on GObject.
Keith Sharp wrote:
On Tue, 2005-04-12 at 21:31 -0400, Rick Sutphin wrote:
I am a noob to GTK+ programming, and GUI programming in general. I have
worked through the example, and done a few simple programs of my own.
I would like to improve my programs. Particularly I would like to do
away with , or at least reduce, the mumber of global variables. I would
also like to make my code more modular and object oriented. Can anyone
recommend any good examples, or simple programs, that I could study to
learn good GTK+ coding practices?
The practice I have found useful is to make extensive use of GObject. I
normally define a GObject for my application let this hold variables
that would normally be defined globally, as well as references to other
objects that the applications needs.
I originally saw this style of coding in Gossip, but I am sure that
it has been used in many other applications. The code for Gossip is
very clean and easy to read.
 http://cvs.gnome.org/viewcvs/gossip/ or
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
] [Thread Prev