Commit 89844be4 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

docs/gimptool-1.3.1.in applied patch from Roger Leigh <rl117@york.ac.uk>

2001-12-18  Sven Neumann  <sven@gimp.org>

	* docs/gimptool-1.3.1.in
	* gimptool-1.3.in: applied patch from Roger Leigh <rl117@york.ac.uk>
	that makes gimptool respect the DESTDIR environment variable.

	* app/config/Makefile.am: declare test-config as TESTS so it is build
	and executed when running 'make check'.

	* app/config/gimpbaseconfig.c: don't register a GimpConfig interface.
	* app/config/gimpcoreconfig.c
	* app/config/gimpdisplayconfig.c
	* app/config/gimpguiconfig.c: no need to include "gimpconfig.h".

	* app/config/gimpconfig.[ch]: removed store_unknown parameter from
	deserialize method. The default implementation will bail out on
	unknown tokens.

	* app/config/gimprc.c: override deserialize method so it stores
	unknown tokens.
parent 5a48cb85
2001-12-18 Sven Neumann <sven@gimp.org>
* docs/gimptool-1.3.1.in
* gimptool-1.3.in: applied patch from Roger Leigh <rl117@york.ac.uk>
that makes gimptool respect the DESTDIR environment variable.
* app/config/Makefile.am: declare test-config as TESTS so it is build
and executed when running 'make check'.
* app/config/gimpbaseconfig.c: don't register a GimpConfig interface.
* app/config/gimpcoreconfig.c
* app/config/gimpdisplayconfig.c
* app/config/gimpguiconfig.c: no need to include "gimpconfig.h".
* app/config/gimpconfig.[ch]: removed store_unknown parameter from
deserialize method. The default implementation will bail out on
unknown tokens.
* app/config/gimprc.c: override deserialize method so it stores
unknown tokens.
2001-12-18 Sven Neumann <sven@gimp.org>
* app/config/Makefile.am: don't build test-config by default.
......
......@@ -43,9 +43,13 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(includedir) \
@STRIP_END@
#
# test programs, not to be built by default and never installed
#
TESTS = test-config
EXTRA_PROGRAMS = test-config
test_config_DEPENDENCIES = @STRIP_BEGIN@ \
......
......@@ -25,7 +25,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpconfig.h"
#include "gimpconfig-params.h"
#include "gimpconfig-types.h"
......@@ -74,15 +73,10 @@ gimp_base_config_get_type (void)
0, /* n_preallocs */
NULL /* instance_init */
};
static const GInterfaceInfo config_iface_info = { NULL, NULL, NULL };
config_type = g_type_register_static (G_TYPE_OBJECT,
"GimpBaseConfig",
&config_info, 0);
g_type_add_interface_static (config_type,
GIMP_TYPE_CONFIG_INTERFACE,
&config_iface_info);
}
return config_type;
......
......@@ -46,8 +46,7 @@ static void gimp_config_iface_init (GimpConfigInterface *gimp_config_iface);
static void gimp_config_iface_serialize (GObject *object,
gint fd);
static gboolean gimp_config_iface_deserialize (GObject *object,
GScanner *scanner,
gboolean store_unknown);
GScanner *scanner);
GType
......@@ -92,12 +91,9 @@ gimp_config_iface_serialize (GObject *object,
static gboolean
gimp_config_iface_deserialize (GObject *object,
GScanner *scanner,
gboolean store_unknown)
GScanner *scanner)
{
return gimp_config_deserialize_properties (object,
scanner,
store_unknown);
return gimp_config_deserialize_properties (object, scanner, FALSE);
}
gboolean
......@@ -133,8 +129,7 @@ gimp_config_serialize (GObject *object,
gboolean
gimp_config_deserialize (GObject *object,
const gchar *filename,
gboolean store_unknown)
const gchar *filename)
{
GimpConfigInterface *gimp_config_iface;
gint fd;
......@@ -165,7 +160,7 @@ gimp_config_deserialize (GObject *object,
g_scanner_input_file (scanner, fd);
scanner->input_name = filename;
success = gimp_config_iface->deserialize (object, scanner, store_unknown);
success = gimp_config_iface->deserialize (object, scanner);
g_scanner_destroy (scanner);
close (fd);
......
......@@ -35,8 +35,7 @@ struct _GimpConfigInterface
void (* serialize) (GObject *object,
gint fd);
gboolean (* deserialize) (GObject *object,
GScanner *scanner,
gboolean store_unknown);
GScanner *scanner);
};
typedef void (*GimpConfigForeachFunc) (const gchar *key,
......@@ -49,8 +48,7 @@ GType gimp_config_interface_get_type (void) G_GNUC_CONST;
gboolean gimp_config_serialize (GObject *object,
const gchar *filename);
gboolean gimp_config_deserialize (GObject *object,
const gchar *filename,
gboolean store_unknown);
const gchar *filename);
void gimp_config_add_unknown_token (GObject *object,
const gchar *key,
......
......@@ -25,7 +25,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpconfig.h"
#include "gimpconfig-params.h"
#include "gimpconfig-types.h"
#include "gimpconfig-utils.h"
......
......@@ -25,7 +25,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpconfig.h"
#include "gimpconfig-params.h"
#include "gimpconfig-types.h"
#include "gimpconfig-utils.h"
......
......@@ -25,7 +25,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpconfig.h"
#include "gimpconfig-params.h"
#include "gimpconfig-types.h"
#include "gimpconfig-utils.h"
......
......@@ -27,13 +27,16 @@
#include "gimpconfig.h"
#include "gimpconfig-serialize.h"
#include "gimpconfig-deserialize.h"
#include "gimprc.h"
static void gimp_rc_config_iface_init (gpointer iface,
gpointer iface_data);
static void gimp_rc_serialize (GObject *object,
gint fd);
static void gimp_rc_config_iface_init (gpointer iface,
gpointer iface_data);
static void gimp_rc_serialize (GObject *object,
gint fd);
static gboolean gimp_rc_deserialize (GObject *object,
GScanner *scanner);
GType
......@@ -80,7 +83,8 @@ gimp_rc_config_iface_init (gpointer iface,
{
GimpConfigInterface *config_iface = (GimpConfigInterface *) iface;
config_iface->serialize = gimp_rc_serialize;
config_iface->serialize = gimp_rc_serialize;
config_iface->deserialize = gimp_rc_deserialize;
}
static void
......@@ -91,6 +95,13 @@ gimp_rc_serialize (GObject *object,
gimp_config_serialize_unknown_tokens (object, fd);
}
static gboolean
gimp_rc_deserialize (GObject *object,
GScanner *scanner)
{
return gimp_config_deserialize_properties (object, scanner, TRUE);
}
GimpRc *
gimp_rc_new (void)
{
......
......@@ -77,7 +77,7 @@ main (int argc,
NULL);
g_print (" Deserializing from '%s' ...\n", filename);
gimp_config_deserialize (G_OBJECT (gimprc), filename, TRUE);
gimp_config_deserialize (G_OBJECT (gimprc), filename);
header = "\n Unknown string tokens:\n";
gimp_config_foreach_unknown_token (G_OBJECT (gimprc),
......@@ -87,7 +87,7 @@ main (int argc,
g_object_unref (G_OBJECT (gimprc));
g_print ("Done.\n");
g_print ("Done.\n\n");
return 0;
}
......
......@@ -184,22 +184,25 @@ and \-\-libs options. This option must be specified before any
.SH ENVIRONMENT
.PP
.TP 8
.B PKG_CONFIG
to get the location of the pkg-config program used to determine details
about your glib, pango and gtk+ installation.
.TP 8
.B CC
to get the name of the desired C compiler.
.TP 8
.B CFLAGS
to get the preferred flags to pass to the C compiler for plug-in building.
.TP 8
.B DESTDIR
to add a prefix to the install/uninstall path.
.TP 8
.B LDFLAGS
to get the prefered flags for passing to the linker.
.TP 8
.B LIBS
for passing extra libs that may be needed in the build process. For example,
LIBS=-lintl .
.TP 8
.B PKG_CONFIG
to get the location of the pkg-config program used to determine details
about your glib, pango and gtk+ installation.
.SH SEE ALSO
.BR gimp (1),
......
......@@ -184,22 +184,25 @@ and \-\-libs options. This option must be specified before any
.SH ENVIRONMENT
.PP
.TP 8
.B PKG_CONFIG
to get the location of the pkg-config program used to determine details
about your glib, pango and gtk+ installation.
.TP 8
.B CC
to get the name of the desired C compiler.
.TP 8
.B CFLAGS
to get the preferred flags to pass to the C compiler for plug-in building.
.TP 8
.B DESTDIR
to add a prefix to the install/uninstall path.
.TP 8
.B LDFLAGS
to get the prefered flags for passing to the linker.
.TP 8
.B LIBS
for passing extra libs that may be needed in the build process. For example,
LIBS=-lintl .
.TP 8
.B PKG_CONFIG
to get the location of the pkg-config program used to determine details
about your glib, pango and gtk+ installation.
.SH SEE ALSO
.BR gimp (1),
......
......@@ -184,22 +184,25 @@ and \-\-libs options. This option must be specified before any
.SH ENVIRONMENT
.PP
.TP 8
.B PKG_CONFIG
to get the location of the pkg-config program used to determine details
about your glib, pango and gtk+ installation.
.TP 8
.B CC
to get the name of the desired C compiler.
.TP 8
.B CFLAGS
to get the preferred flags to pass to the C compiler for plug-in building.
.TP 8
.B DESTDIR
to add a prefix to the install/uninstall path.
.TP 8
.B LDFLAGS
to get the prefered flags for passing to the linker.
.TP 8
.B LIBS
for passing extra libs that may be needed in the build process. For example,
LIBS=-lintl .
.TP 8
.B PKG_CONFIG
to get the location of the pkg-config program used to determine details
about your glib, pango and gtk+ installation.
.SH SEE ALSO
.BR gimp (1),
......
......@@ -244,7 +244,7 @@ while test $# -gt 0; do
shift
if test "x$1" != "x"; then
if test -f "$install_dir/$1"; then
cmd="rm -f $install_dir/$1"
cmd="rm -f $DESTDIR$install_dir/$1"
test $quiet = "yes" || echo $cmd
test $donothing = "yes" || exec $cmd
else
......@@ -260,7 +260,7 @@ while test $# -gt 0; do
shift
if test "x$1" != "x"; then
if test -r "$1"; then
cmd="$install_cmd $1 $install_dir/$1"
cmd="$install_cmd $1 $DESTDIR$install_dir/$1"
test $quiet = "yes" || echo $cmd
test $donothing = "yes" || exec $cmd
else
......
......@@ -244,7 +244,7 @@ while test $# -gt 0; do
shift
if test "x$1" != "x"; then
if test -f "$install_dir/$1"; then
cmd="rm -f $install_dir/$1"
cmd="rm -f $DESTDIR$install_dir/$1"
test $quiet = "yes" || echo $cmd
test $donothing = "yes" || exec $cmd
else
......@@ -260,7 +260,7 @@ while test $# -gt 0; do
shift
if test "x$1" != "x"; then
if test -r "$1"; then
cmd="$install_cmd $1 $install_dir/$1"
cmd="$install_cmd $1 $DESTDIR$install_dir/$1"
test $quiet = "yes" || echo $cmd
test $donothing = "yes" || exec $cmd
else
......
......@@ -46,8 +46,7 @@ static void gimp_config_iface_init (GimpConfigInterface *gimp_config_iface);
static void gimp_config_iface_serialize (GObject *object,
gint fd);
static gboolean gimp_config_iface_deserialize (GObject *object,
GScanner *scanner,
gboolean store_unknown);
GScanner *scanner);
GType
......@@ -92,12 +91,9 @@ gimp_config_iface_serialize (GObject *object,
static gboolean
gimp_config_iface_deserialize (GObject *object,
GScanner *scanner,
gboolean store_unknown)
GScanner *scanner)
{
return gimp_config_deserialize_properties (object,
scanner,
store_unknown);
return gimp_config_deserialize_properties (object, scanner, FALSE);
}
gboolean
......@@ -133,8 +129,7 @@ gimp_config_serialize (GObject *object,
gboolean
gimp_config_deserialize (GObject *object,
const gchar *filename,
gboolean store_unknown)
const gchar *filename)
{
GimpConfigInterface *gimp_config_iface;
gint fd;
......@@ -165,7 +160,7 @@ gimp_config_deserialize (GObject *object,
g_scanner_input_file (scanner, fd);
scanner->input_name = filename;
success = gimp_config_iface->deserialize (object, scanner, store_unknown);
success = gimp_config_iface->deserialize (object, scanner);
g_scanner_destroy (scanner);
close (fd);
......
......@@ -35,8 +35,7 @@ struct _GimpConfigInterface
void (* serialize) (GObject *object,
gint fd);
gboolean (* deserialize) (GObject *object,
GScanner *scanner,
gboolean store_unknown);
GScanner *scanner);
};
typedef void (*GimpConfigForeachFunc) (const gchar *key,
......@@ -49,8 +48,7 @@ GType gimp_config_interface_get_type (void) G_GNUC_CONST;
gboolean gimp_config_serialize (GObject *object,
const gchar *filename);
gboolean gimp_config_deserialize (GObject *object,
const gchar *filename,
gboolean store_unknown);
const gchar *filename);
void gimp_config_add_unknown_token (GObject *object,
const gchar *key,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment