Commit 75216bdd authored by Michael Meeks's avatar Michael Meeks
Browse files

Updated ( but still not working name support )

parent 921f98f8
......@@ -28,4 +28,7 @@ libglade-config
<<<<<<< ChangeLog
1999-06-05 Michael Meeks <>
1999-06-20 James Henstridge <>
* glade/glade-gtk.c: Add extern glade_init_gtk_widget to kill
* example of using the standard dialogs with libglade.
* upped version number to 0.2.
* glade/glade-gnome.c: small clean up.
* doc/libglade-docs.sgml: a few more changes to the documentation.
1999-06-19 James Henstridge <>
* glade/glade-gnome.c (gnomedialog_build_children): connect signals
to the individual button widgets.
(messagebox_build_children): similar for the message box widget.
* doc/libglade-docs.sgml: heaps of extra docs. This should reduce
the number of libglade questions people ask me (assuming they
read the docs of course :).
* doc/libglade-sections.txt: added entries for the extra functions.
* glade/glade-xml.h, glade/glade-xml.c
(glade_xml_signal_connect_full, glade_xml_signal_autoconnect_full):
Added two functions that should be useful for people wanting to write
language bindings for libglade. They allow the user to specify an
arbitrary function to use for connecting signals.
1999-06-17 James Henstridge <>
* made the test glade file for GNOME a bit
* glade/glade-gnome.c (toolbar_new): make toolbar button relief
match user preferences.
* glade/glade-gtk.c (text_new): small bug fix to text widget creation.
1999-06-14 James Henstridge <>
* glade/glade.h: moved the include of glade/glade-xml.h outside of
the extern "C" { ... } block, since it has its own extern "C" { ... }
stuff (and the extern "C" notation is not valid in C).
* glade/glade-gtk.c (optionmenu_new, combo_new): made adjustments to
match change in libglade-xgettext.
* libglade-xgettext (TranslatableStringParser.end_items): add list
items to translation list individually instead of as one large string.
* glade/glade-gnome.c (gnomedialog_new, app_new): added support for
setting wmname/wmclass on these windows as well.
* glade/glade-gtk.c: added support for GtkFileSelection,
GtkColorSelectionDialog and GtkFontSelectionDialog, including
the support for connecting signals to their buttons.
Also added support for setting the wmname/wmclass on windows.
1999-06-13 James Henstridge <>
* glade/glade-gnome.c: put #ifdef's round references to
GNOME_STOCK_PIXMAP_MIDI, so it will compile with gnome-libs-1.0.1
(Damon is keeping compatibility with that release for glade, so
I may as well do so as well).
1999-06-13 Richard Hestilow <>
* glade/glade-xml.h, glade-build.h, glade.h: added
"#ifdef __cplusplus" wrappers, otherwise was giving linktime
errors with g++.
1999-06-12 James Henstridge <>
* glade/glade-xml.c: fixed up gettext call.
* added a call to AM_GNOME_GETTEXT so that the i18n
stuff should get included correctly. Note that there is no libglade
translation domain -- libglade should not give any of its own output.
1999-06-11 James Henstridge <>
* glade/glade-xml.[ch] (glade_xml_construct): added a third argument -
the translation domain.
(glade_xml_new_with_domain): a new constructor that allows you to
specify that this GladeXML object use a different translation
domain than the default.
* glade/glade-xml.c (glade_xml_set_common_params): translate the
* glade/glade-gnome.c: added calls to glade_xml_gettext at appropriate
* glade/glade-gtk.c: added calls to glade_xml_gettext at appropriate
* glade/glade-xml.c (glade_xml_gettext): new function to handle
translations of text in widget building routines.
* glade/glade-xml.h: added textdomain attribute to GladeXML structure
that will hold the gettext text domain used for translations. This
is just in preparation -- I haven't added i18n to libglade yet.
* glade/glade-xml.c (glade_xml_relative_file): small fix in call
to g_strconcat(). This one was picked up by Gary Ross.
* glade/glade-gnome.c (get_stock_name): now reads GNOME_STOCK_PIXMAP_
and GNOME_STOCK_MENU_ style stock names correctly.
(toolbar_new, toolbar_build_children): functions for building toolbars
that is aware of stock icons. Now the toolbars look correct.
(menu_new, menubar_new, menushell_build_children): Handle stock
menu items correctly. It even handles gnome-libs' internal
translation of stock menu item labels.
(pixmapmenuitem_new): This function does not worry about stock menu
items now. It does handle pixmaps next to the menu items though
like it should.
* (bin_SCRIPTS): added libglade-xgettext.
* libglade-xgettext: a small program that can extract translation
strings from glade XML files. Libglade itself has no i18n support
yet, but this is a start. The program can output both standard pot
files or a C file that can then be parsed by xgettext.
1999-06-10 James Henstridge <>
* test-libglade.c (main): updated to call glade_gnome_init() instead
of glade_init() if GNOME support is enabled.
* libglade.m4 (module_args): modified macro so that you can pass
`gnome' as the third argument to get GNOME support.
* you can now pass it the arguments gtk and gnome
to indicate which widget sets you wish to use. If you specify
GNOME, the --libs output will include -lglade-gnome.
* glade/ create a separate libglade-gnome library if
GNOME support is enabled.
* glade/glade-gnome.c: implemented the GnomeApp, GnomeAppBar,
GnomeDock, GnomeDockItem and GtkPixmapItem (sort of). Just about
everything displays, except that the GNOMEUIINFO stuff, which is
not properly implemented at this point in time.
* glade/glade-gnome.c (about_new): make the about dialog creation
routine use the values of gnome_app_id and gnome_app_version.
* glade/glade-tree.c (recurse_tree, destroy_func): the hash table of
widget name -> xmlNode was broken. It was freeing the keys before
they were used. This bug is from when I was converting libglade
over to using xmlNodeGetContent(). It should now be possible to
use the glade_xml_new("filename", "rootnode") style of initialisation,
and signal handlers that should be connected with
gtk_signal_connect_object should now work correctly as well.
* glade/glade-gtk.c (pixmap_new): the filename of the pixmap should
be relative to the xml file.
(toolbar_new, toolbar_build_children): fixed up toolbar support. I
used code from the examples by Craig M. Buchek and Gary Ross. The
actual implementation is different than both, but the sample code
was very helpful.
* doc/libglade-sections.txt: added extra entries to documentation.
* glade/glade-xml.c (glade_xml_set_common_params): new function that
exposes some of the work that glade_xml_build_widget performs.
* glade/glade-xml.h, glade/glade-xml.c (glade_xml_relative_file):
new function that resolves a filename that is relative to the XML
file for an interface. This is useful for resolving image file
names and other external files.
* glade/glade-xml.c (glade_xml_build_widget): make the height and
width setting code work correctly (before, setting width would unset
the height and vice versa).
1999-06-09 James Henstridge <>
* (EXTRA_DIST): added the and examples to the distribution.
* glade/glade-xml.h, glade/glade-xml.c: changed the second argument
name in glade_xml_signal_connect to handlername, so that people who
don't want to read the docs do not get confused as easily :)
1999-06-09 Michael Meeks <>
* glade/glade-xml.c (glade_xml_new): Added return NULL on error
(glade_xml_construct): Added boolean - success return value.
1999-06-08 James Henstridge <>
* (confexec_DATA): install the script.
* A file for use with the gnome-config shell
* glade/glade-gnome.c: added support for GnomeDialog and
GnomeMessageBox. This still leaves support for GnomeApp to be done.
Before this can be finished though, I need to work out the stock
menu (GnomeUIInfo) stuff. I don't know how difficult this will be.
1999-06-06 Erik Walthinsen <>
* converted libglade.spec to, made appropiate
......@@ -138,7 +333,6 @@
both gtk and gnome code.
(glade_get_adjustment): similar to above.
>>>>>>> 1.31
1999-06-04 Miguel de Icaza <>
* glade/glade-gtk.c (optionmenu_new): Only add items if there are
libglade.spec \ \ \ \ \ \
libglade.m4 \ \ \
libglade.m4 \
bin_SCRIPTS = libglade-config
bin_SCRIPTS = libglade-config libglade-xgettext
noinst_PROGRAMS = test-libglade
test_libglade_LDADD = glade/ $(THE_LIBS) $(XML_LIBS)
extra_dirs = macros doc
test_libglade_LDADD = $(THE_LIBS) $(XML_LIBS)
extra_dirs = intl po macros doc
m4datadir = $(datadir)/aclocal
m4data_DATA = libglade.m4
confexecdir = $(libdir)
confexec_DATA =
extra_dirs =
SUBDIRS = glade $(extra_dirs)
SUBDIRS = $(extra_dirs) glade
test_libglade_SOURCES = test-libglade.c
cp libglade.spec $(distdir)
- Radio group support
- The start of gnome support -- this code has been split off into a
separate library called libglade-gnome. You can get the cflags or
libraries to link with the gnome code by calling `libglade-config
--cflags --libs gnome`. Also, if you want gnome support, you
should call glade_gnome_init() instead of glade_init().
- I18N support. Libglade can either use the current translation
domain when building the widget tree, or you can specify a
different one with glade_xml_new_with_domain(). There is also
a program called libglade-xgettext to help extract strings for
translation from an XML file.
libglade-0.1: 27-May-1999
- Many fixes from many people. This version should actually be
......@@ -14,6 +14,13 @@
/* If true, include GNOME support */
/* for gettext ... */
#ifdef DEBUG
AM_INIT_AUTOMAKE(libglade, 0.1)
AM_INIT_AUTOMAKE(libglade, 0.2)
dnl get the GNOME macros
......@@ -50,10 +51,18 @@ GNOME_COMPILE_WARNINGS
AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
dnl gettext stuff ... there is no message catalog for libglade -- libglade
dnl provides translation for the XML files it reads in.
<?xml version="1.0"?>
<last_modification_time>Mon, 14 Jun 1999 08:16:29 GMT</last_modification_time>
<title>Select File</title>
<last_modification_time>Mon, 14 Jun 1999 08:11:36 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:11:49 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:11:14 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:16:37 GMT</last_modification_time>
<title>Select Color</title>
<last_modification_time>Mon, 14 Jun 1999 08:12:37 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:12:49 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:12:21 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:16:46 GMT</last_modification_time>
<title>Select Font</title>
<last_modification_time>Mon, 14 Jun 1999 08:13:24 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:13:37 GMT</last_modification_time>
<last_modification_time>Mon, 14 Jun 1999 08:13:48 GMT</last_modification_time>
......@@ -7,24 +7,290 @@
<book id="libglade">
<title>Libglade Reference Manual</title>
<holder>James Henstridge</holder>
<para>Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and this
permission notice are preserved on all copies.</para>
<para>Permission is granted to copy and distribute modified
versions of this manual under the conditions for verbatim
copying, provided also that the entire resulting derived work is
distributed under the terms of a permission notice identical to
this one.</para>
<para>Permission is granted to copy and distribute translations
of this manual into another language, under the above conditions
for modified versions.</para>
<para>This manual documents the interfaces of the libglade
library and has some short notes to help get you up to speed
with using the library.</para>
<chapter id="libglade-notes">
<title>Libglade Programming Notes</title>
<para>Libglade is an alternative to using Glade's code generation.
Instead of generating code from the XML interface description,
libglade loads and parses the description at runtime. It also
provides functions that can be used to connect signal handlers to
parts of the interface.</para>
<para>In this way, it allows you to separate your program code
from the interface code. In fact, if you use the
glade_xml_signal_autoconnect() function, the GUI code could be as
simple as the <filename>test-libglade.c</filename> example that
comes with libglade. Of course, you would also add your own
signal handlers to the code. Note that the signals are connected
the same way as if you had hand coded the interface. There is no
extra overhead to interfaces generated by libglade (after the
initial generating of course, and this is not much of an overhead)
when compared to a hand crafted interface.</para>
<sect1 id=libglade-basics>
<title>Libglade Programming Basics</title>
<para>Your basic libglade program will look something like this:</para>
#include &lt;gtk/gtk.h&gt;
#include &lt;glade/glade.h&gt;
void some_signal_handler_func(GtkWidget *widget, gpointer user_data) {
/* do something useful here */
int main(int argc, char *argv[]) {
GladeXML *xml;
gtk_init(&amp;argc, &amp;argv);
/* load the interface */
xml = glade_xml_new("filename-for-interface", NULL);
/* connect the signals in the interface */
/* start the event loop */
return 0;
<para>This will create the interface from the file
<filename>filename-for-interface</filename>, then connect all
the signals in the interface. The automatic signal connection
is done by looking up function names in the symbol table using
gmodule. This means that the interface file can use standard
GTK functions such as <function>gtk_widget_show</function>, or
<function>gtk_main_quit</function>, or others in the interface
and not have to write any code to connect the signals.</para>
<para>The <function>some_signal_handler_func</function> function
is not referenced anywhere in the program explicitely, but if
any signals are defined in the interface description that use
"some_signal_handler_func" as the handler name, then this