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.
This commit is contained in:
Sven Neumann 2001-12-18 20:40:50 +00:00 committed by Sven Neumann
parent 5a48cb857c
commit 89844be451
17 changed files with 82 additions and 60 deletions

View File

@ -1,3 +1,24 @@
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.

View File

@ -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@ \

View File

@ -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;

View File

@ -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);

View File

@ -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,

View File

@ -25,7 +25,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpconfig.h"
#include "gimpconfig-params.h"
#include "gimpconfig-types.h"
#include "gimpconfig-utils.h"

View File

@ -25,7 +25,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpconfig.h"
#include "gimpconfig-params.h"
#include "gimpconfig-types.h"
#include "gimpconfig-utils.h"

View File

@ -25,7 +25,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpconfig.h"
#include "gimpconfig-params.h"
#include "gimpconfig-types.h"
#include "gimpconfig-utils.h"

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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),

View File

@ -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),

View File

@ -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),

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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,