[Glade-users] practical question: apps locating glade file

Yeah, I guess you could use command line flags to avoid having to recompile.
This means people need to be aware of the --gladedir option. I almost wonder
whether it would make sense for a system directory called 
/usr/share/glade/appname to exist for every app that uses
glade on the system with glade files being placed there.
Well, I guess there isn't any advantage to this either.



On Sat, 11 Dec 2004 01:51:41 +0800, Ivan Wong <email ivanwong info> wrote:
Sort of OK, but it seems this method needs a recompile in order
to do a make install. On the other hand I can't think of a better
solution, and it seems to me that having glade_xml_new itself
do the directory searching for the given file inappropriate.
um... how about this (a `make check` should work in both $srcdir and

/* main.c */
gchar *gladedir = GLADEDIR;

static struct poptOption options[] = {
       { "gladedir", '\0', POPT_ARG_STRING, &gladedir, 0,
         N_("the directory where glade xml files are placed."), NULL },

int main (int argc, char *argv[])
    gchar *filename;

    filename = g_build_filename (gladedir, "galeon.glade", NULL);
    gladexml = glade_xml_new (filename, ...);
    g_free (filename);
    if (!gladexml)
        gladexml = glade_xml_new (GLADEDIR "/galeon.glade", ...);

/* src/Makefile.am */

TESTS = test-galeon

/* src/test-galeon */


test --gladedir="$srcdir/../ui"


Glade-users maillist  -  Glade-users lists ximian com

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