Commit 41d82db0 authored by Jody Goldberg's avatar Jody Goldberg

cleanup the function categories

parent 23c3803d
...@@ -135,12 +135,12 @@ register_function(name, args, named_args, help, subref) ...@@ -135,12 +135,12 @@ register_function(name, args, named_args, help, subref)
SV *subref SV *subref
PREINIT: PREINIT:
FunctionCategory *fncat; GnmFuncGroup *fncat;
GnmFuncDescriptor desc; GnmFuncDescriptor desc;
GnmFunc *func; GnmFunc *func;
CODE: CODE:
fncat = function_get_category ("Perl plugin"); fncat = gnm_func_group_fetch ("Perl plugin");
desc.fn_name = name; desc.fn_name = name;
desc.args = args;; desc.args = args;;
desc.arg_names = named_args; desc.arg_names = named_args;
......
...@@ -194,7 +194,7 @@ dialog_function_select_load_tree (FunctionSelectState *state) ...@@ -194,7 +194,7 @@ dialog_function_select_load_tree (FunctionSelectState *state)
{ {
int i = 0; int i = 0;
GtkTreeIter p_iter; GtkTreeIter p_iter;
FunctionCategory const * cat; GnmFuncGroup const * cat;
gtk_tree_store_clear (state->model); gtk_tree_store_clear (state->model);
...@@ -204,7 +204,7 @@ dialog_function_select_load_tree (FunctionSelectState *state) ...@@ -204,7 +204,7 @@ dialog_function_select_load_tree (FunctionSelectState *state)
CATEGORY, NULL, CATEGORY, NULL,
-1); -1);
while ((cat = function_category_get_nth (i++)) != NULL) { while ((cat = gnm_func_group_get_nth (i++)) != NULL) {
gtk_tree_store_append (state->model, &p_iter, NULL); gtk_tree_store_append (state->model, &p_iter, NULL);
gtk_tree_store_set (state->model, &p_iter, gtk_tree_store_set (state->model, &p_iter,
CAT_NAME, _(cat->display_name->str), CAT_NAME, _(cat->display_name->str),
...@@ -332,7 +332,7 @@ cb_dialog_function_select_cat_selection_changed (GtkTreeSelection *the_selection ...@@ -332,7 +332,7 @@ cb_dialog_function_select_cat_selection_changed (GtkTreeSelection *the_selection
{ {
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeModel *model; GtkTreeModel *model;
FunctionCategory const * cat; GnmFuncGroup const * cat;
GList *funcs, *this_func; GList *funcs, *this_func;
gtk_list_store_clear (state->model_f); gtk_list_store_clear (state->model_f);
......
...@@ -134,28 +134,28 @@ func_builtin_init (void) ...@@ -134,28 +134,28 @@ func_builtin_init (void)
static GnmFuncDescriptor const builtins [] = { static GnmFuncDescriptor const builtins [] = {
{ "sum", NULL, N_("number,number,"), { "sum", NULL, N_("number,number,"),
&help_sum, NULL, gnumeric_sum, &help_sum, NULL, gnumeric_sum,
NULL, NULL, NULL, 0, NULL, NULL, NULL, GNM_FUNC_SIMPLE,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_IMPL_STATUS_COMPLETE,
GNM_FUNC_TEST_STATUS_BASIC GNM_FUNC_TEST_STATUS_BASIC
}, },
{ "product", NULL, N_("number,number,"), { "product", NULL, N_("number,number,"),
&help_product, NULL, gnumeric_product, &help_product, NULL, gnumeric_product,
NULL, NULL, NULL, 0, NULL, NULL, NULL, GNM_FUNC_SIMPLE,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_IMPL_STATUS_COMPLETE,
GNM_FUNC_TEST_STATUS_BASIC GNM_FUNC_TEST_STATUS_BASIC
}, },
{ "gnumeric_version", "", "", { "gnumeric_version", "", "",
&help_gnumeric_version, gnumeric_version, NULL, &help_gnumeric_version, gnumeric_version,
NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, GNM_FUNC_SIMPLE,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC,
GNM_FUNC_TEST_STATUS_BASIC GNM_FUNC_TEST_STATUS_EXHAUSTIVE
}, },
{ NULL } { NULL }
}; };
GnmFunc *func; GnmFunc *func;
FunctionCategory *mathcat = function_get_category (mathcatname); GnmFuncGroup *mathcat = gnm_func_group_fetch (mathcatname);
FunctionCategory *gnumericcat = function_get_category (gnumericcatname); GnmFuncGroup *gnumericcat = gnm_func_group_fetch (gnumericcatname);
func = gnm_func_add (mathcat, builtins + 0); func = gnm_func_add (mathcat, builtins + 0);
auto_format_function_result (func, AF_FIRST_ARG_FORMAT); auto_format_function_result (func, AF_FIRST_ARG_FORMAT);
...@@ -172,7 +172,7 @@ static void ...@@ -172,7 +172,7 @@ static void
shutdown_cat (const char *catname, GSList **funcs) shutdown_cat (const char *catname, GSList **funcs)
{ {
GSList *tmp; GSList *tmp;
FunctionCategory *cat = function_get_category (catname); GnmFuncGroup *cat = gnm_func_group_fetch (catname);
for (tmp = *funcs; tmp; tmp = tmp->next) { for (tmp = *funcs; tmp; tmp = tmp->next) {
GnmFunc *def = tmp->data; GnmFunc *def = tmp->data;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
static GList *categories; static GList *categories;
static SymbolTable *global_symbol_table; static SymbolTable *global_symbol_table;
static FunctionCategory *unknown_cat; static GnmFuncGroup *unknown_cat;
static GSList *unknown_functions; static GSList *unknown_functions;
void void
...@@ -82,6 +82,12 @@ func_def_cmp (gconstpointer a, gconstpointer b) ...@@ -82,6 +82,12 @@ func_def_cmp (gconstpointer a, gconstpointer b)
g_return_val_if_fail (fda->name != NULL, 0); g_return_val_if_fail (fda->name != NULL, 0);
g_return_val_if_fail (fdb->name != NULL, 0); g_return_val_if_fail (fdb->name != NULL, 0);
if (fda->fn_group != NULL && fdb->fn_group != NULL) {
int res = strcmp (fda->fn_group->display_name->str, fdb->fn_group->display_name->str);
if (res != 0)
return res;
}
return g_ascii_strcasecmp (fda->name, fdb->name); return g_ascii_strcasecmp (fda->name, fdb->name);
} }
...@@ -91,6 +97,7 @@ function_dump_defs (char const *filename, gboolean as_def) ...@@ -91,6 +97,7 @@ function_dump_defs (char const *filename, gboolean as_def)
FILE *output_file; FILE *output_file;
unsigned i; unsigned i;
GPtrArray *ordered; GPtrArray *ordered;
GnmFuncGroup const *group = NULL;
g_return_if_fail (filename != NULL); g_return_if_fail (filename != NULL);
...@@ -99,7 +106,7 @@ function_dump_defs (char const *filename, gboolean as_def) ...@@ -99,7 +106,7 @@ function_dump_defs (char const *filename, gboolean as_def)
exit (1); exit (1);
} }
/* TODO : Use the translated names and split by category. */ /* TODO : Use the translated names and split by fn_group. */
ordered = g_ptr_array_new (); ordered = g_ptr_array_new ();
g_hash_table_foreach (global_symbol_table->hash, g_hash_table_foreach (global_symbol_table->hash,
copy_hash_table_to_ptr_array, ordered); copy_hash_table_to_ptr_array, ordered);
...@@ -139,8 +146,13 @@ function_dump_defs (char const *filename, gboolean as_def) ...@@ -139,8 +146,13 @@ function_dump_defs (char const *filename, gboolean as_def)
{ "Under development", "FF6C00" }, { "Under development", "FF6C00" },
{ "Unique to Gnumeric", "44BE18" }, { "Unique to Gnumeric", "44BE18" },
}; };
if (group != fd->fn_group) {
group = fd->fn_group;
fprintf (output_file, "<tr><td><h1>%s</h1></td></tr>\n", group->display_name->str);
}
fprintf (output_file, "<tr><td></td>\n");
fprintf (output_file, fprintf (output_file,
"<tr>\n <td><a href =\"doc/gnumeric-%s.html\">%s</a></td>\n", fd->name, fd->name); " <td><a href =\"doc/gnumeric-%s.html\">%s</a></td>\n", fd->name, fd->name);
fprintf (output_file, fprintf (output_file,
" <td bgcolor=#%s><a href=\"mailto:gnumeric-list@gnome.org?subject=Re: %s implementation\">%s</a></td>\n", " <td bgcolor=#%s><a href=\"mailto:gnumeric-list@gnome.org?subject=Re: %s implementation\">%s</a></td>\n",
implementation[fd->impl_status].colour_str, fd->name, implementation[fd->impl_status].name); implementation[fd->impl_status].colour_str, fd->name, implementation[fd->impl_status].name);
...@@ -159,11 +171,22 @@ testing[fd->test_status].colour_str, fd->name, testing[fd->test_status].name); ...@@ -159,11 +171,22 @@ testing[fd->test_status].colour_str, fd->name, testing[fd->test_status].name);
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static void
gnm_func_group_free (GnmFuncGroup *fn_group)
{
g_return_if_fail (fn_group != NULL);
g_return_if_fail (fn_group->functions == NULL);
string_unref (fn_group->internal_name);
string_unref (fn_group->display_name);
g_free (fn_group);
}
static gint static gint
function_category_compare (gconstpointer a, gconstpointer b) function_category_compare (gconstpointer a, gconstpointer b)
{ {
FunctionCategory const *cat_a = a; GnmFuncGroup const *cat_a = a;
FunctionCategory const *cat_b = b; GnmFuncGroup const *cat_b = b;
char *str_a, *str_b; char *str_a, *str_b;
g_return_val_if_fail (cat_a->display_name != NULL, 0); g_return_val_if_fail (cat_a->display_name != NULL, 0);
...@@ -182,17 +205,17 @@ function_category_compare (gconstpointer a, gconstpointer b) ...@@ -182,17 +205,17 @@ function_category_compare (gconstpointer a, gconstpointer b)
return strcoll (str_a, str_b); return strcoll (str_a, str_b);
} }
FunctionCategory * GnmFuncGroup *
function_get_category (char const *name) gnm_func_group_fetch (char const *name)
{ {
return function_get_category_with_translation (name, _(name)); return gnm_func_group_fetch_with_translation (name, _(name));
} }
FunctionCategory * GnmFuncGroup *
function_get_category_with_translation (char const *name, gnm_func_group_fetch_with_translation (char const *name,
char const *translation) char const *translation)
{ {
FunctionCategory *cat = NULL; GnmFuncGroup *cat = NULL;
char *int_name; char *int_name;
GList *l; GList *l;
...@@ -208,7 +231,7 @@ function_get_category_with_translation (char const *name, ...@@ -208,7 +231,7 @@ function_get_category_with_translation (char const *name,
} }
if (l == NULL) { if (l == NULL) {
cat = g_new (FunctionCategory, 1); cat = g_new (GnmFuncGroup, 1);
cat->internal_name = string_get (int_name); cat->internal_name = string_get (int_name);
if (translation != NULL) { if (translation != NULL) {
cat->display_name = string_get (translation); cat->display_name = string_get (translation);
...@@ -234,44 +257,32 @@ function_get_category_with_translation (char const *name, ...@@ -234,44 +257,32 @@ function_get_category_with_translation (char const *name,
return cat; return cat;
} }
FunctionCategory * GnmFuncGroup *
function_category_get_nth (int n) gnm_func_group_get_nth (int n)
{ {
return g_list_nth_data (categories, n); return g_list_nth_data (categories, n);
} }
void
function_category_add_func (FunctionCategory *category,
GnmFunc *fn_def)
{
g_return_if_fail (category != NULL);
g_return_if_fail (fn_def != NULL);
category->functions = g_list_append (category->functions, fn_def);
}
static void static void
function_category_free (FunctionCategory *category) gnm_func_group_add_func (GnmFuncGroup *fn_group,
GnmFunc *fn_def)
{ {
g_return_if_fail (category != NULL); g_return_if_fail (fn_group != NULL);
g_return_if_fail (category->functions == NULL); g_return_if_fail (fn_def != NULL);
string_unref (category->internal_name); fn_group->functions = g_list_append (fn_group->functions, fn_def);
string_unref (category->display_name);
g_free (category);
} }
void void
function_category_remove_func (FunctionCategory *category, gnm_func_group_remove_func (GnmFuncGroup *fn_group, GnmFunc *func)
GnmFunc *fn_def)
{ {
g_return_if_fail (category != NULL); g_return_if_fail (fn_group != NULL);
g_return_if_fail (fn_def != NULL); g_return_if_fail (func != NULL);
category->functions = g_list_remove (category->functions, fn_def); fn_group->functions = g_list_remove (fn_group->functions, func);
if (category->functions == NULL) { if (fn_group->functions == NULL) {
categories = g_list_remove (categories, category); categories = g_list_remove (categories, fn_group);
function_category_free (category); gnm_func_group_free (fn_group);
} }
} }
...@@ -368,7 +379,7 @@ gnm_func_lookup (char const *name, Workbook const *optional_scope) ...@@ -368,7 +379,7 @@ gnm_func_lookup (char const *name, Workbook const *optional_scope)
} }
void void
function_remove (FunctionCategory *category, char const *name) function_remove (GnmFuncGroup *fn_group, char const *name)
{ {
GnmFunc *func; GnmFunc *func;
Symbol *sym; Symbol *sym;
...@@ -379,7 +390,7 @@ function_remove (FunctionCategory *category, char const *name) ...@@ -379,7 +390,7 @@ function_remove (FunctionCategory *category, char const *name)
g_return_if_fail (func->ref_count == 0); g_return_if_fail (func->ref_count == 0);
function_category_remove_func (category, func); gnm_func_group_remove_func (fn_group, func);
sym = symbol_lookup (global_symbol_table, name); sym = symbol_lookup (global_symbol_table, name);
symbol_unref (sym); symbol_unref (sym);
...@@ -399,14 +410,14 @@ function_add_args ...@@ -399,14 +410,14 @@ function_add_args
function_add_nodes function_add_nodes
#endif #endif
GnmFunc * GnmFunc *
gnm_func_add (FunctionCategory *category, gnm_func_add (GnmFuncGroup *fn_group,
GnmFuncDescriptor const *desc) GnmFuncDescriptor const *desc)
{ {
static char const valid_tokens[] = "fsbraAES?|"; static char const valid_tokens[] = "fsbraAES?|";
GnmFunc *func; GnmFunc *func;
char const *ptr; char const *ptr;
g_return_val_if_fail (category != NULL, NULL); g_return_val_if_fail (fn_group != NULL, NULL);
g_return_val_if_fail (desc != NULL, NULL); g_return_val_if_fail (desc != NULL, NULL);
func = g_new (GnmFunc, 1); func = g_new (GnmFunc, 1);
...@@ -450,8 +461,9 @@ gnm_func_add (FunctionCategory *category, ...@@ -450,8 +461,9 @@ gnm_func_add (FunctionCategory *category,
return NULL; return NULL;
} }
if (category != NULL) func->fn_group = fn_group;
function_category_add_func (category, func); if (fn_group != NULL)
gnm_func_group_add_func (fn_group, func);
symbol_install (global_symbol_table, func->name, SYMBOL_FUNCTION, func); symbol_install (global_symbol_table, func->name, SYMBOL_FUNCTION, func);
return func; return func;
...@@ -465,7 +477,7 @@ unknownFunctionHandler (FunctionEvalInfo *ei, GnmExprList *expr_node_list) ...@@ -465,7 +477,7 @@ unknownFunctionHandler (FunctionEvalInfo *ei, GnmExprList *expr_node_list)
} }
GnmFunc * GnmFunc *
gnm_func_add_stub (FunctionCategory *category, gnm_func_add_stub (GnmFuncGroup *fn_group,
char const *name, char const *name,
GnmFuncLoadDesc load_desc, GnmFuncLoadDesc load_desc,
GnmFuncRefNotify opt_ref_notify) GnmFuncRefNotify opt_ref_notify)
...@@ -479,8 +491,9 @@ gnm_func_add_stub (FunctionCategory *category, ...@@ -479,8 +491,9 @@ gnm_func_add_stub (FunctionCategory *category,
func->fn_type = GNM_FUNC_TYPE_STUB; func->fn_type = GNM_FUNC_TYPE_STUB;
func->fn.load_desc = load_desc; func->fn.load_desc = load_desc;
if (category != NULL) func->fn_group = fn_group;
function_category_add_func (category, func); if (fn_group != NULL)
gnm_func_group_add_func (fn_group, func);
symbol_install (global_symbol_table, func->name, SYMBOL_FUNCTION, func); symbol_install (global_symbol_table, func->name, SYMBOL_FUNCTION, func);
return func; return func;
...@@ -505,7 +518,7 @@ gnm_func_add_placeholder (char const *name, char const *type, ...@@ -505,7 +518,7 @@ gnm_func_add_placeholder (char const *name, char const *type,
g_return_val_if_fail (func == NULL, func); g_return_val_if_fail (func == NULL, func);
if (!unknown_cat) if (!unknown_cat)
unknown_cat = function_get_category (unknown_cat_name); unknown_cat = gnm_func_group_fetch (unknown_cat_name);
memset (&desc, 0, sizeof (GnmFuncDescriptor)); memset (&desc, 0, sizeof (GnmFuncDescriptor));
desc.name = copy_name ? g_strdup (name) : name; desc.name = copy_name ? g_strdup (name) : name;
...@@ -546,16 +559,16 @@ gnm_func_set_user_data (GnmFunc *func, gpointer user_data) ...@@ -546,16 +559,16 @@ gnm_func_set_user_data (GnmFunc *func, gpointer user_data)
} }
char const * char const *
gnm_func_get_name (GnmFunc const *fn_def) gnm_func_get_name (GnmFunc const *func)
{ {
g_return_val_if_fail (fn_def != NULL, NULL); g_return_val_if_fail (func != NULL, NULL);
return fn_def->name; return func->name;
} }
/** /**
* function_def_count_args: * function_def_count_args:
* @fn_def: pointer to function definition * @func: pointer to function definition
* @min: pointer to min. args * @min: pointer to min. args
* @max: pointer to max. args * @max: pointer to max. args
* *
......
...@@ -12,21 +12,19 @@ void functions_shutdown (void); ...@@ -12,21 +12,19 @@ void functions_shutdown (void);
void function_dump_defs (char const *filename, gboolean def_or_state); void function_dump_defs (char const *filename, gboolean def_or_state);
/******************************************************************************/ /******************************************************************************/
/* Function category support */ /* Function group support */
typedef struct _FunctionCategory FunctionCategory; typedef struct _GnmFuncGroup GnmFuncGroup;
struct _FunctionCategory { struct _GnmFuncGroup {
String *internal_name, *display_name; String *internal_name, *display_name;
gboolean has_translation; gboolean has_translation;
GList *functions; GList *functions;
}; };
FunctionCategory *function_get_category (char const *name); GnmFuncGroup *gnm_func_group_get_nth (gint n);
FunctionCategory *function_get_category_with_translation (char const *name, GnmFuncGroup *gnm_func_group_fetch (char const *name);
char const *translation); GnmFuncGroup *gnm_func_group_fetch_with_translation (char const *name,
FunctionCategory *function_category_get_nth (gint n); char const *translation);
void function_category_add_func (FunctionCategory *, GnmFunc *);
void function_category_remove_func (FunctionCategory *category, GnmFunc *fn_def);
/******************************************************************************/ /******************************************************************************/
...@@ -150,15 +148,16 @@ struct _GnmFunc { ...@@ -150,15 +148,16 @@ struct _GnmFunc {
} args; } args;
GnmFuncLoadDesc load_desc; GnmFuncLoadDesc load_desc;
} fn; } fn;
GnmFuncLink linker; GnmFuncGroup *fn_group; /* most recent it was assigned to */
GnmFuncUnlink unlinker; GnmFuncLink linker;
GnmFuncRefNotify ref_notify; GnmFuncUnlink unlinker;
GnmFuncImplStatus impl_status; GnmFuncRefNotify ref_notify;
GnmFuncTestStatus test_status; GnmFuncImplStatus impl_status;
GnmFuncFlags flags; GnmFuncTestStatus test_status;
GnmFuncFlags flags;
gint ref_count;
gpointer user_data; gint ref_count;
gpointer user_data;
}; };
struct _FunctionEvalInfo { struct _FunctionEvalInfo {
...@@ -173,9 +172,9 @@ char const *gnm_func_get_name (GnmFunc const *fn_def); ...@@ -173,9 +172,9 @@ char const *gnm_func_get_name (GnmFunc const *fn_def);
gpointer gnm_func_get_user_data (GnmFunc const *func); gpointer gnm_func_get_user_data (GnmFunc const *func);
void gnm_func_set_user_data (GnmFunc *func, gpointer user_data); void gnm_func_set_user_data (GnmFunc *func, gpointer user_data);
GnmFunc *gnm_func_lookup (char const *name, Workbook const *scope); GnmFunc *gnm_func_lookup (char const *name, Workbook const *scope);
GnmFunc *gnm_func_add (FunctionCategory *category, GnmFunc *gnm_func_add (GnmFuncGroup *group,
GnmFuncDescriptor const *descriptor); GnmFuncDescriptor const *descriptor);
GnmFunc *gnm_func_add_stub (FunctionCategory *category, GnmFunc *gnm_func_add_stub (GnmFuncGroup *group,
char const *name, char const *name,
GnmFuncLoadDesc load_desc, GnmFuncLoadDesc load_desc,
GnmFuncRefNotify opt_ref_notify); GnmFuncRefNotify opt_ref_notify);
...@@ -183,7 +182,7 @@ GnmFunc *gnm_func_add_placeholder (char const *name, char const *type, ...@@ -183,7 +182,7 @@ GnmFunc *gnm_func_add_placeholder (char const *name, char const *type,
gboolean copy_name); gboolean copy_name);
/* TODO */ /* TODO */
void function_remove (FunctionCategory *category, void function_remove (GnmFuncGroup *group,
char const *name); char const *name);
void function_def_count_args (GnmFunc const *fn_def, void function_def_count_args (GnmFunc const *fn_def,
......
...@@ -941,7 +941,7 @@ struct _PluginServiceFunctionGroup { ...@@ -941,7 +941,7 @@ struct _PluginServiceFunctionGroup {
gchar *category_name, *translated_category_name; gchar *category_name, *translated_category_name;
GSList *function_name_list; GSList *function_name_list;
FunctionCategory *category; GnmFuncGroup *func_group;
PluginServiceFunctionGroupCallbacks cbs; PluginServiceFunctionGroupCallbacks cbs;
}; };
...@@ -955,7 +955,7 @@ plugin_service_function_group_init (GObject *obj) ...@@ -955,7 +955,7 @@ plugin_service_function_group_init (GObject *obj)
service_function_group->category_name = NULL; service_function_group->category_name = NULL;
service_function_group->translated_category_name = NULL; service_function_group->translated_category_name = NULL;
service_function_group->function_name_list = NULL; service_function_group->function_name_list = NULL;
service_function_group->category = NULL; service_function_group->func_group = NULL;
} }
static void static void
...@@ -1094,14 +1094,14 @@ plugin_service_function_group_activate (PluginService *service, ErrorInfo **ret_ ...@@ -1094,14 +1094,14 @@ plugin_service_function_group_activate (PluginService *service, ErrorInfo **ret_
PluginServiceFunctionGroup *service_function_group = GNM_PLUGIN_SERVICE_FUNCTION_GROUP (service); PluginServiceFunctionGroup *service_function_group = GNM_PLUGIN_SERVICE_FUNCTION_GROUP (service);
GNM_INIT_RET_ERROR_INFO (ret_error); GNM_INIT_RET_ERROR_INFO (ret_error);
service_function_group->category = function_get_category_with_translation ( service_function_group->func_group = gnm_func_group_fetch_with_translation (
service_function_group->category_name, service_function_group->category_name,
service_function_group->translated_category_name); service_function_group->translated_category_name);
GNM_SLIST_FOREACH (service_function_group->function_name_list, char, fname, GNM_SLIST_FOREACH (service_function_group->function_name_list, char, fname,
GnmFunc *fn_def; GnmFunc *fn_def;
fn_def = gnm_func_add_stub ( fn_def = gnm_func_add_stub (
service_function_group->category, fname, service_function_group->func_group, fname,
plugin_service_function_group_func_desc_load, plugin_service_function_group_func_desc_load,
plugin_service_function_group_func_ref_notify); plugin_service_function_group_func_ref_notify);
gnm_func_set_user_data (fn_def, service); gnm_func_set_user_data (fn_def, service);
...@@ -1116,7 +1116,7 @@ plugin_service_function_group_deactivate (PluginService *service, ErrorInfo **re ...@@ -1116,7 +1116,7 @@ plugin_service_function_group_deactivate (PluginService *service, ErrorInfo **re
GNM_INIT_RET_ERROR_INFO (ret_error); GNM_INIT_RET_ERROR_INFO (ret_error);
GNM_SLIST_FOREACH (service_function_group->function_name_list, char, fname, GNM_SLIST_FOREACH (service_function_group->function_name_list, char, fname,
function_remove (service_function_group->category, fname); function_remove (service_function_group->func_group, fname);
); );
service->is_active = FALSE; service->is_active = FALSE;
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "workbook-view.h" #include "workbook-view.h"
#include "workbook.h" #include "workbook.h"
#include "sheet.h" #include "sheet.h"
#include "sheet-view.h"
#include "selection.h" #include "selection.h"
#include "commands.h" #include "commands.h"
#include "value.h" #include "value.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment