Re: oaf patch for bug 1703



Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/oaf/ChangeLog,v
retrieving revision 1.43
diff -u -r1.43 ChangeLog
--- ChangeLog   2000/07/19 16:25:59     1.43
+++ ChangeLog   2000/07/20 01:53:26
@@ -1,3 +1,14 @@
+2000-07-18  Mathieu Lacage <mathieu@eazel.com>
+
+       Closes bugzilla.eazel.com number 1703 
+
+       * doc/oaf-config.doc: add doc for config paths.
+       * Makefile.am: add oaf-config.xml.in to the build.
+       * oafd/Makefile.am: add od-utils.[hc] to te build.
+       * oafd/od-utils.[hc]: add function od_utils_load_config_file.
+       * oafd/main.c: add call to od_utils_load_config_file to 
+       really read the configuration from the xml file.
+       
 2000-07-19  Gene Z. Ragan  <gzr@eazel.com>
 
        * liboaf/oaf-plugin.c: (oaf_server_activate_shlib):
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/oaf/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- Makefile.am 2000/06/06 20:46:35     1.6
+++ Makefile.am 2000/07/20 01:53:26
@@ -10,6 +10,9 @@
        oaf.spec.in             \
        oaf.spec
 
+oafconfigdir=$(sysconfdir)/oaf
+oafconfig_DATA = oaf-config.xml
+
 confexecdir = $(libdir)
 confexec_DATA = oafConf.sh
 
Index: oaf-config.xml
===================================================================
RCS file: oaf-config.xml
diff -N oaf-config.xml
--- /dev/null   Tue May  5 16:32:27 1998
+++ oaf-config.xml      Wed Jul 19 21:53:26 2000
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+
+<oafconfig>
+
+<searchpath>
+<item>/opt/gnome/share/oaf</item>
+<item>/usr/local/gnome/share/oaf</item>
+<item>/usr/local/share/oaf</item>
+<item>/opt/gnome/oaf/share/oaf</item>
+</searchpath>
+
+<searchpath>
+<item>/opt/gnome/oaf/share/oaf</item>
+</searchpath>
+
+</oafconfig>
Index: docs/oaf-config.txt
===================================================================
RCS file: oaf-config.txt
diff -N oaf-config.txt
--- /dev/null   Tue May  5 16:32:27 1998
+++ oaf-config.txt      Wed Jul 19 21:53:26 2000
@@ -0,0 +1,31 @@
+OAF will search a number of directories for .oafinfo files.
+It will use the GNOME_PATH, OAF_INFO_PATH, OAFINFODIR env
+variables and the ${prefix}/etc/oaf/oaf-config.xml file.
+
+OAFINFODIR is deprecated.
+OAF_INFO_PATH should be used like this: 
+export OAF_INFO_PATH=/opt/gnome/share/oaf:/opt/gnome/oaf/share/oaf:/usr/local/gnome/share/oaf:/usr/local/share/oaf
+GNOME_PATH should be the standard GNOME env var used by GNOME to determine
+where the many GNOME packages are installed. Each entry in GNOME_PATH should 
+point to the install prefix of a GNOME package.
+export GNOME_PATH=/opt/gnome:/usr/local/gnome:/opt/gnome/oaf:/opt/gnome/gnome-vfs:/opt/gnome/bonobo
+
+
+Last, the oaf-config.xml file is used by oaf. oaf will search each 
+of the directory specified there for .oafinfo files. A sample oaf-config.xml
+file is include in the oaf tarball. Its syntax is pretty simple. You just need
+to add new items in the searchpath tag. Ths fil will be read everytime oaf is
+restarted.
+
+<?xml version="1.0"?>
+
+<oafconfig>
+
+<searchpath>
+<item>/opt/gnome/share/oaf</item>
+<item>/usr/local/gnome/share/oaf</item>
+<item>/usr/local/share/oaf</item>
+<item>/opt/gnome/oaf/share/oaf</item>
+</searchpath>
+
+</oafconfig>
Index: oafd/Makefile.am
===================================================================
RCS file: /cvs/gnome/oaf/oafd/Makefile.am,v
retrieving revision 1.13
diff -u -r1.13 Makefile.am
--- oafd/Makefile.am    2000/04/17 21:48:45     1.13
+++ oafd/Makefile.am    2000/07/20 01:53:26
@@ -1,6 +1,17 @@
+NULL=
+
 bin_PROGRAMS=oafd oaf-client
 
-INCLUDES=-I$(top_srcdir) -I$(top_builddir) -I$(top_builddir)/liboaf -DOAFINFODIR=\"$(pkgdatadir)\" @ORBIT_CFLAGS@ @XML_CFLAGS@ @GLIB_CFLAGS@
+INCLUDES=                              \
+       -I$(top_srcdir)                 \
+       -I$(top_builddir)               \
+       -I$(top_builddir)/liboaf        \
+       -DOAFINFODIR=\"$(pkgdatadir)\"  \
+       @ORBIT_CFLAGS@                  \
+       @XML_CFLAGS@            directory = xmlNodeGetContent (item_node);
+                                        result = g_strconcat (result, ":", directory, NULL);
+                                        deb_print (result);
+                                }
+                                item_node = item_node->next;
+                        }
+                }
+                search_node = search_node->next;
+        }
+
+        return result;
+}
+
+
Index: oafd/od-utils.c~
===================================================================
RCS file: od-utils.c~
diff -N od-utils.c~
Index: oafd/od-utils.h
===================================================================
RCS file: od-utils.h
diff -N od-utils.h
--- /dev/null   Tue May  5 16:32:27 1998
+++ od-utils.h  Wed Jul 19 21:53:26 2000
@@ -0,0 +1,14 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+#ifndef ODUTILS_H
+#define ODUTILS_H
+
+/* loads the information from oaf configuration file
+   in $sysconfdir/oaf/oaf-conf.xml.
+*/
+char *od_utils_load_config_file (void);
+
+
+
+
+#endif /* ODUTILS_H */
Index: oafd/od-utils.h~
===================================================================
RCS file: od-utils.h~
diff -N od-utils.h~

-- 
Mathieu Lacage <mathieu@eazel.com>





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