mirror of https://github.com/GNOME/gimp.git
initialize the units vtable in libgimpbase instead of trying to override
2008-04-16 Sven Neumann <sven@gimp.org> * app/config/test-config.c: initialize the units vtable in libgimpbase instead of trying to override symbols from it. Fixes bug #528160. svn path=/trunk/; revision=25491
This commit is contained in:
parent
5061fb6be0
commit
5f613135e6
|
@ -1,3 +1,9 @@
|
|||
2008-04-16 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/config/test-config.c: initialize the units vtable in
|
||||
libgimpbase instead of trying to override symbols from it.
|
||||
Fixes bug #528160.
|
||||
|
||||
2008-04-15 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell-coords.c
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <glib-object.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpbase/gimpbase-private.h"
|
||||
#include "libgimpconfig/gimpconfig.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
|
@ -41,6 +42,8 @@ static void output_unknown_token (const gchar *key,
|
|||
const gchar *value,
|
||||
gpointer data);
|
||||
|
||||
static void units_init (void);
|
||||
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
|
@ -69,6 +72,8 @@ main (int argc,
|
|||
|
||||
g_type_init ();
|
||||
|
||||
units_init ();
|
||||
|
||||
g_print ("\nTesting GimpConfig ...\n");
|
||||
|
||||
g_print (" Creating a new Grid object ...");
|
||||
|
@ -236,10 +241,10 @@ output_unknown_token (const gchar *key,
|
|||
}
|
||||
|
||||
|
||||
/* some dummy funcs so we can properly link this beast */
|
||||
/* minimal dummy units implementation */
|
||||
|
||||
const gchar *
|
||||
gimp_unit_get_identifier (GimpUnit unit)
|
||||
static const gchar *
|
||||
unit_get_identifier (GimpUnit unit)
|
||||
{
|
||||
switch (unit)
|
||||
{
|
||||
|
@ -258,8 +263,19 @@ gimp_unit_get_identifier (GimpUnit unit)
|
|||
}
|
||||
}
|
||||
|
||||
gint
|
||||
gimp_unit_get_number_of_units (void)
|
||||
static gint
|
||||
unit_get_number_of_units (void)
|
||||
{
|
||||
return GIMP_UNIT_END;
|
||||
}
|
||||
|
||||
static void
|
||||
units_init (void)
|
||||
{
|
||||
GimpUnitVtable vtable;
|
||||
|
||||
vtable.unit_get_number_of_units = unit_get_number_of_units;
|
||||
vtable.unit_get_identifier = unit_get_identifier;
|
||||
|
||||
gimp_base_init (&vtable);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue