Re: my libglade hacks



On Tue, Oct 23, 2001 at 07:25:12PM -0400, Michael Meeks wrote:
>         Of course this screws people who are expecting a gnome dialog to
> come out of the glade file - involving user code changes; but ... hmm.
> Possibly we could do evilish things like making GNOME_DIALOG () tolerate
> GTK_DIALOGs and making gnome_dialog_run etc. work with GtkDialogs.

Or, if people write sane code they have type checks when getting a widget from
libglade.  I have a piece of code called glade-helper in vicious-extensions,
which does a type check and informs the user in a dialog that the installation
is corrupted if it doesn't get the right widget type.  Much better then
warnigns and crash.  Perhaps this piece of code can be added to libglade (there
are also possibilities for other sanity checks, for example I have a check for
number of columns in a clist since getting the wrong number can be quite
deadly).  All this needs is a specialized get function which is guaranteed to
return the correct widget.  It just exits on errors (with the dialog of
course).

George



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