Re: How do you develop you GTK code?

> On Fri, 13 Apr 2007 23:57:12 -0300 you wrote:
> > I am curious about it and really want to know: How
> do you develop your GTK
> > codes?

I do a combination of by hand and via glade.  Glade
has several faults, the one being not being able to
bind arbritrary information to widgets in the
designer, which I doun't think would be possible
anyways, though QT's designer offers something along
those lines, as subclassing existing widgets is about
1000x easier than doing it in GTK+.  So for my niche
use, in order to be able to reuse signal handlers, and
not end up with one handler per control, I have glue
code in place that on initialization of the
application it binds additional data per applicable
widget  which the signal handlers use to take
appropriate action.
so my code makes very extensive use of
g_object_set_data(), and g_object_get_data().

Thus for all my buttons I have one handler
std_button_handler(), and in my code I assign an enum
to each control (i.e.
g_object_set_data(G_OBJECT(widget), "handler"
 so that when that handler is called,  it's is handled
in a case statement inside that handler.

-- David J. Andruczyk

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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