fixed OS2 bug

This commit is contained in:
Asbjørn Pettersen 1999-11-15 10:52:19 +00:00
parent f2ad0eb2a7
commit a1da35a9df
2 changed files with 11 additions and 36 deletions

View File

@ -1,3 +1,9 @@
Mon Nov 15 11:48:59 1999 ape@spacetec.no (Asbjorn Pettersen)
* modules/colorsel_gtk.c (module_init): Removed most of the
OS/2 code and fixed a OS/2 bug.
Include modregister.h.
Mon Nov 15 11:30:42 CET 1999 Olof S Kylander <olof@gimp.org> Mon Nov 15 11:30:42 CET 1999 Olof S Kylander <olof@gimp.org>
* app/xinput_airbrush.c * app/xinput_airbrush.c

View File

@ -22,6 +22,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <libgimp/color_selector.h> #include <libgimp/color_selector.h>
#include <libgimp/gimpmodule.h> #include <libgimp/gimpmodule.h>
#include "modregister.h"
/* prototypes */ /* prototypes */
static GtkWidget * colorsel_gtk_new (int, int, int, static GtkWidget * colorsel_gtk_new (int, int, int,
@ -49,32 +50,6 @@ static GimpModuleInfo info = {
"17 Jan 1999" "17 Jan 1999"
}; };
#ifdef __EMX__
struct main_funcs_struc {
gchar *name;
void (*func)();
};
struct main_funcs_struc *gimp_main_funcs = NULL;
static gpointer
get_main_func(gchar *name)
{
struct main_funcs_struc *x;
if (gimp_main_funcs == NULL)
return NULL;
for (x = gimp_main_funcs; x->name; x++)
{
if (!strcmp(x->name, name))
return (gpointer) x->func;
}
}
typedef GimpColorSelectorID (*color_reg_func)(const char *,
GimpColorSelectorMethods *);
typedef gboolean (*color_unreg_func) (GimpColorSelectorID,
void (*)(void *),
void *);
#endif
/* globaly exported init function */ /* globaly exported init function */
G_MODULE_EXPORT GimpModuleStatus G_MODULE_EXPORT GimpModuleStatus
@ -84,13 +59,10 @@ module_init (GimpModuleInfo **inforet)
#ifndef __EMX__ #ifndef __EMX__
id = gimp_color_selector_register ("GTK", "gtk.html", &methods); id = gimp_color_selector_register ("GTK", "gtk.html", &methods);
if (id)
#else #else
color_reg_func reg_func; id = mod_color_selector_register ("GTK", "gtk.html", &methods);
reg_func = (color_reg_func) get_main_func("gimp_color_selector_register");
if (reg_func && (id = (*reg_func) ("GTK", &methods)))
#endif #endif
if (id)
{ {
info.shutdown_data = id; info.shutdown_data = id;
*inforet = &info; *inforet = &info;
@ -111,10 +83,7 @@ module_unload (void *shutdown_data,
#ifndef __EMX__ #ifndef __EMX__
gimp_color_selector_unregister (shutdown_data, completed_cb, completed_data); gimp_color_selector_unregister (shutdown_data, completed_cb, completed_data);
#else #else
color_unreg_func unreg_func; mod_color_selector_unregister (shutdown_data, completed_cb, completed_data);
unreg_func = (color_unreg_func) get_main_func("gimp_color_selector_unregister");
if (unreg_func)
(*unreg_func) (shutdown_data, completed_cb, completed_data);
#endif #endif
} }