commit -- libglade support


Subject: commit -- libglade support
From: Joaquin Cuenca Abela (cuenca@celium.net)
Date: Wed Feb 07 2001 - 07:37:40 CST


I've commited libglade support to CVS.

Quick pre-FAQ :)

* What it means?

Usually to code a dialog box for AbiWord you to code the backend, the
dialog, and to bind them together. Now you don't need to code the dialog
anymore. You can just make a mockup with glade, and save it in the
abi/src/glade directory (be cool with the gnome people, and make a gnome
version of your dialog --usually you *just* need *1* copy & paste operation
and some (few) mouse clicks-- and save it in abi/src/glade/gnome).

* What are the problems?

it adds a dependence. But we've luck, libglade only takes 308 kb (please,
check with {df,explorer,whatever} your current disk space and breath again)
and it doesn't additional dependencies. It needs gettext to i18n (but, we
too NEED gettext :)

* What are the advantages?

It simplifies the task of the developer doing the frontend of a dialog box
(yes, I know that it was already very easy). The developer has to care to
provide an [X]AP_UnixGnomeDialog_* equivalent right now. With this patch
there are no more need of [X]AP_UnixGnomeDialog_* stuff.

It simplifies the task of the developer doing the *maintenance* of a dialog
box. Do you think that this task was easy enough before? Some weeks ago I
posted a patch just to align the text of the lists dialog.

That *easy* task took me ~4 hours. Why?
I did a dialog in glade from scratch that mimics (but with the correct
alignement) the current dialog in 5-10 minutes, and it took me 4 hours to
figure out all the vars that had something to do with the building of the
dialog, and to integrate the code that glade was generating with the code
that was in AP_UnixDialog_Lists. I should recognize that it's an somewhat
extreme example, and that usually it takes no so long to modify a dialog,
but anyway it takes *too much* time. In addition you have to recompile all
the stuff, and if you want to be cool with the gnome developers, verify the
gnome version (which implies a make abiclean; make ... install)

* Do we need that?

I'm sure that you want to send a reply with something like that: "hey, we
have been developing abiword for 3 years without libglade and without any
problem, why the hell we need that?"

In short, we have problems. The dialogs are not very consistent between
themselves (each dialog uses, for instance a different layout/spacing/...
for their buttons) I recognize that maybe it's not very important but
sometimes we have UI considerations to take in account, and we will want to
modify this or that dialog box. Right now it's much of a pain.

===========================================

Even if you (the developers) take the decision to exclude this patch, or to
leave it as a post 1.0 feature, I will ask to leave the patch until the list
dialogs box is finished. I will post a new mockup for the dialog among with
some radical changes to the code (that will break the non-unix build), and I
will to use libglade to do the initial developement and the changes to the
dialog until it gets finished.

If we decide to desactivate the libglade support we can easily degladeify
the lists dialog.

As a proof of concept I've gladeified the break dialog. Take a look to the
code and send suggestions (please :).

Cheers,

--
Joaquin Cuenca Abela
cuenca@celium.net



This archive was generated by hypermail 2b25 : Wed Feb 07 2001 - 07:36:56 CST