From a1da35a9df0e5f228c4c95bdb48173965dbe9966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Pettersen?= Date: Mon, 15 Nov 1999 10:52:19 +0000 Subject: [PATCH] fixed OS2 bug --- ChangeLog | 6 ++++++ modules/colorsel_gtk.c | 41 +++++------------------------------------ 2 files changed, 11 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb1a667a93..bebb7b3109 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * app/xinput_airbrush.c diff --git a/modules/colorsel_gtk.c b/modules/colorsel_gtk.c index 33b2af9aa8..c9af3016bb 100644 --- a/modules/colorsel_gtk.c +++ b/modules/colorsel_gtk.c @@ -22,6 +22,7 @@ #include #include #include +#include "modregister.h" /* prototypes */ static GtkWidget * colorsel_gtk_new (int, int, int, @@ -49,32 +50,6 @@ static GimpModuleInfo info = { "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 */ G_MODULE_EXPORT GimpModuleStatus @@ -84,13 +59,10 @@ module_init (GimpModuleInfo **inforet) #ifndef __EMX__ id = gimp_color_selector_register ("GTK", "gtk.html", &methods); - - if (id) #else - color_reg_func reg_func; - reg_func = (color_reg_func) get_main_func("gimp_color_selector_register"); - if (reg_func && (id = (*reg_func) ("GTK", &methods))) -#endif + id = mod_color_selector_register ("GTK", "gtk.html", &methods); +#endif + if (id) { info.shutdown_data = id; *inforet = &info; @@ -111,10 +83,7 @@ module_unload (void *shutdown_data, #ifndef __EMX__ gimp_color_selector_unregister (shutdown_data, completed_cb, completed_data); #else - color_unreg_func unreg_func; - unreg_func = (color_unreg_func) get_main_func("gimp_color_selector_unregister"); - if (unreg_func) - (*unreg_func) (shutdown_data, completed_cb, completed_data); + mod_color_selector_unregister (shutdown_data, completed_cb, completed_data); #endif }