[Gllug] C/C++ mentor

Pete Ryland pdr at pdr.cx
Tue Nov 21 23:39:29 UTC 2006


On 21/11/06, TreeBoy <gllug at petethetree.co.uk> wrote:
> I'm afraid that this debate reinforces (for me) that you really shouldn't
> bother with GNOME development when no-one can agree which tool to use to
> define your GUI.

Just like a lot of things Linux and indeed FOSS, choice is IMO a great
thing.  Just like we have the choice of GTK+ or Qt (or TK, or ncurses,
or plain-old X, or ...), we also have choice of development
environment to be used to create apps with these toolkits.  I can see
what you're saying, but I don't think it's that much trouble to add a
few extra things to your google searches to find information relevant
to your chosen way of doing things.

> With KDE and QT there is only really one toolset and everyone deals with that
> same one.

This is not really true.  There are plenty of Qt and KDE developers
that don't use Kdevelop.  However, you'll still hear them recommend it
to those new to the toolkit.

> GNOME may well be technically superior

I was going to say that that was debatable, but really it's not even
possible to debate.  They are technically *different*! :-)

> Here I am hanging myself out to dry and I hope that some developers for GNOME
> will get involved in a conversation that may be of interest to the First
> Poster and re-educate my opinion.

As it turns out, I currently share some of your pain.  Having not done
anything with GTK+ for a few years, I wanted to write some simple
frontends with PyGTK, and found little improvement in the learning
curve since GTK1.0.  So I've actually set out to simplify the creating
of simple GUIs whilst still trying to allow the flexibility that
people have come to expect.  I've only released prototypes of this so
far, which currently only live on my blog which in case anyone's
interested is here:

http://pdr.cx/~pdr/blog/geekstuff/egg20061018.html

It firstly provides all the basic stuff like a menu bar with help menu
and about box, a tool bar, and a status bar, all with a minimal amount
of code.  It then allows you to use ordinary method definitions to
automatically create menu items, tool bar items, and normal widgets
like buttons, check boxes, etc by wrapping them with a decorator.  The
docstring becomes the tooltip, stock items are used if the method name
corresponds, and parameters are checked to see what type of item
should be created.  So for example:

def open(self, filename):
    """Open a file (read-only)"""
    file = open(filename)
    ...

This can be placed in a menu list to create a menu item that will use
the stock "open" icon and short-cut key and will launch a file open
dialog to get the filename sent as the argument to this method.  IMO,
GUI programming should be this easy.

Sorry for the divergence of the topic, and for the pimping, but I
thought it might be interesting to some.

Pete
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list