My first GTK program

Tony Nelson tonynelson at
Fri Dec 9 20:28:54 UTC 2005

At 6:58 PM +0200 12/9/05, Jarkko Elfving wrote:
>I'm starting my first GTK programming and I need some guidance.
>I've searching in Google little help, but I haven't found any
>full-filling guides yet to help me in this little project. Some kind of
>help I've found, but I'm sure that there is more and better helps with
>working examples.

All I've found for GTK is reference docs and a rather uneven guide.  I'm
programming in Python, which pretty well eliminates the large amounts of
scaffolding code that GTK requires when used from C.

Use the source.  Gedit is one accessible GTK application.  There are lots
of apps at, and you can browse them in CVS or download the FC

Go with the flow in GTK.  GTK menu handling is, umm, disappointing.  Most
GTK apps don't bother disabling menu items that don't apply to the current
conditions or selection.  Also, GTK doesn't have Undo in it, neither in its
UI management or in its widgets.

I found Glade to be mysterious.  Now that I have a better understanding of
the GTK class and containment hierarchies, I might find it less mysterious,
but I still don't plan to use it.  The thing that GTK is best at is
automatically laying out visual layouts constructed on the fly.  Glade
doesn't seem to have much real purpose.

>Also I'm trying to finding some useful commands to build a system wide
>program with functions like getenv() and system().

I don't understand the question.  You already have getenv() and system()
with your C library, right?  (They are in Python, as well.)

>What else I should to noticed before I start this kind of project?

wxWidgets?  QT?  I don't know them yet, but they might be a better choice.
(Though, any of wxWidgets, QT, and GTK can be used on various OSs.  I have
my Python GTK app running on MSWindows as well as FC3 Linux.)
TonyN.:'                       <mailto:tonynelson at>
      '                              <>

More information about the fedora-list mailing list