gimp r25491 - in trunk: . app/config



Author: neo
Date: Wed Apr 16 11:35:52 2008
New Revision: 25491
URL: http://svn.gnome.org/viewvc/gimp?rev=25491&view=rev

Log:
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.


Modified:
   trunk/ChangeLog
   trunk/app/config/test-config.c

Modified: trunk/app/config/test-config.c
==============================================================================
--- trunk/app/config/test-config.c	(original)
+++ trunk/app/config/test-config.c	Wed Apr 16 11:35:52 2008
@@ -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 @@
                                    const gchar *value,
                                    gpointer     data);
 
+static void  units_init           (void);
+
 
 int
 main (int   argc,
@@ -69,6 +72,8 @@
 
   g_type_init ();
 
+  units_init ();
+
   g_print ("\nTesting GimpConfig ...\n");
 
   g_print (" Creating a new Grid object ...");
@@ -236,10 +241,10 @@
 }
 
 
-/* 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 @@
     }
 }
 
-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);
+}



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