[crossfire] gtk-v2-libglade branch stable; ready for review/merge.

Kevin R. Bulgrien kbulgrien at worldnet.att.net
Thu Aug 16 02:30:38 CDT 2007


FYI,

The libglade conversion of the gtk-v2 client is in a stable state and is 
basically at release-candidate stage with respect to the libglade
functionality.  Feel free to try it on for size.  I haven't checked on all
the glade configurations I have make up, but there are two different
ones in SVN presently.

Feel free to scope it out and give feedback...  I believe it is stable to
the point where it can be merged back onto trunk and branch/1.x.

Consider the following example:

$ ./configure --prefix=${HOME}
$ make
$ make install

The libglade client changes include:

1) autoconf/automake stuff has been done so that `make install` copies the
    gtk-v2.glade and gtk-v1.glade file into the package data directory aka
    ~/share/crossfire-client in this example.

2) crossfire-client-gtk2 sources main.h and main.c consider the the package
    data directory to be the default location for .glade files.  This directory is
    already the default location for bmaps.client.

3) By default crossfire-client-gtk2 will attempt to load gtk-v2.glade.

4) It is possible to specify and alternate .glade file from the command-line using
    -xml_file.  IE. crossfire-client-gtk2 -xml_file ~/share/crossfire-client/gtk-v1.glade

5) If the glade xml file cannot be read, the client will abort immediately and display
    an error message on stderr that identifies the file it wants to load.

6) The new libglade gtk-v2 client has been modified to be able to programatically
    determine the names of all hpaned and vpaned widgets in the .glade file.  This
    means that Client | Save Window Position will work for any .glade file as long as
    all of the resizeable hpaned and vpaned widget names are prefixed with either
    hpaned_ or vpaned_.  This is the default naming convention used by the Glade
    Designer.  The client no longer used hard-coded names, and is not restricted to
    a fixed number of resize points.

It is not possible to specify the .glade file from within the Client | Configure window.
I looked at that code a bit, but have not really digested how it works if you want to
save string data (path/filename) instead of a simple numeric value.  I guess the
sound_server setting is one possible example to follow, but so far I haven't quite
figured it out.

Features to be considered, but not yet implemented are likely:

1) Choose a .glade file from the Client | Configure window.

2) Possibly create a mechanism so that Client | Save Window Position could work
    for multiple .glade files without blowing away the saved settings for other
    layouts.  Presently, if you run the client with a new layout, the Window sizing
    may be broken because it will use the values set up for the previously used
    layout.  I guess I'm not sure how big a deal that is since I see people latching
    on to a favorite and playing with it.

3) I wonder if the .glade files should be named to make it obvious they are
    designed only for the gtk-v2 client.  Perhaps so that the file name always
    appears in the form gtk-v2-<stylename>.glade.  Ideas entertained.

I do plan to upload a few more .glade layouts, but I haven't given much thought
yet on how to name them or describe their appearance yet.

Kevin R. Bulgrien



More information about the crossfire mailing list