[Glade-users] Where to install *.glade file?



Brian Wagener wrote:

I am making a libglade app, and don't really know where I should install
it.  And how do I find it in my application.  Anyone know?

I think you normally install the XML files somewhere beneath $datadir.

Evolution does something like this (in the Makefile.am):

gladedir = $(datadir)/evolution/glade

INCLUDES =                                              \
        -DEVOLUTION_GLADEDIR=\""$(gladedir)"\"

glade_DATA =                    \
        alarm-notify.glade      \
        cal-prefs-dialog.glade  \
        task-editor-dialog.glade

glade_messages =                        \
        alarm-notify.glade.h            \
        cal-prefs-dialog.glade.h        \
        task-editor-dialog.glade.h

EXTRA_DIST =                    \
        $(glade_DATA)           \
        $(glade_messages)


As you can see, it defines EVOLUTION_GLADEDIR when compiling so you use
this to find the XML files in the app, e.g.

        xml = glade_xml_new (EVOLUTION_GLADEDIR "/event-editor-dialog.glade", NULL);

Damon







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