[Glade-users] practical question: apps locating glade file
- From: Neil Zanella <nzanella gmail com> (Neil Zanella)
- Subject: [Glade-users] practical question: apps locating glade file
- Date: Fri, 10 Dec 2004 13:04:13 -0700
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.
Regards,
Neil
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
$srcdir/src):
/* main.c */
gchar *gladedir = GLADEDIR;
#ifdef HAVE_LIBPOPT
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 */
#!/bin/sh
test --gladedir="$srcdir/../ui"
Rgrds,
Ivan.
_______________________________________________
Glade-users maillist - Glade-users lists ximian com
http://lists.ximian.com/mailman/listinfo/glade-users
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]