Commit 153c6145 authored by Jody Goldberg's avatar Jody Goldberg
Browse files

some renaming

parent e175d83a
......@@ -813,7 +813,7 @@ dependent_link (Dependent *dep, CellPos const *pos)
g_return_if_fail (dep != NULL);
g_return_if_fail (dep->expression != NULL);
g_return_if_fail (!(dep->flags & DEPENDENT_IN_EXPR_LIST));
g_return_if_fail (!(dep->flags & DEPENDENT_IS_LINKED));
g_return_if_fail (IS_SHEET (dep->sheet));
g_return_if_fail (dep->sheet->deps != NULL);
......@@ -825,7 +825,7 @@ dependent_link (Dependent *dep, CellPos const *pos)
if (dep->next_dep)
dep->next_dep->prev_dep = dep;
sheet->deps->dependent_list = dep;
dep->flags |= DEPENDENT_IN_EXPR_LIST;
dep->flags |= DEPENDENT_IS_LINKED;
handle_tree_deps (dep, pos, dep->expression, ADD_DEPS);
}
......@@ -848,7 +848,7 @@ dependent_unlink (Dependent *dep, CellPos const *pos)
if (dep->sheet != NULL) {
g_return_if_fail (dep->expression != NULL);
g_return_if_fail (dep->flags & DEPENDENT_IN_EXPR_LIST);
g_return_if_fail (dep->flags & DEPENDENT_IS_LINKED);
g_return_if_fail (IS_SHEET (dep->sheet));
/* see note in do_deps_destroy */
......@@ -867,7 +867,7 @@ dependent_unlink (Dependent *dep, CellPos const *pos)
} if (!dependent_is_cell (dep))
handle_tree_deps (dep, pos, dep->expression, REMOVE_DEPS);
dep->flags &= ~(DEPENDENT_IN_EXPR_LIST | DEPENDENT_NEEDS_RECALC);
dep->flags &= ~(DEPENDENT_IS_LINKED | DEPENDENT_NEEDS_RECALC);
}
}
......@@ -886,7 +886,7 @@ dependent_unlink_sheet (Sheet *sheet)
g_return_if_fail (IS_SHEET (sheet));
SHEET_FOREACH_DEPENDENT (sheet, dep, {
dep->flags &= ~DEPENDENT_IN_EXPR_LIST;
dep->flags &= ~DEPENDENT_IS_LINKED;
UNLINK_DEP (dep);
});
}
......
......@@ -22,7 +22,7 @@ typedef struct {
typedef enum {
/* Linked into the workbook wide expression list */
DEPENDENT_IN_EXPR_LIST = 0x00001000,
DEPENDENT_IS_LINKED = 0x00001000,
DEPENDENT_NEEDS_RECALC = 0x00002000,
DEPENDENT_BEING_CALCULATED = 0x00004000,
......@@ -34,7 +34,7 @@ typedef enum {
#define dependent_type(dep) ((dep)->flags & DEPENDENT_TYPE_MASK)
#define dependent_is_cell(dep) (dependent_type (dep) == DEPENDENT_CELL)
#define dependent_needs_recalc(dep) ((dep)->flags & DEPENDENT_NEEDS_RECALC)
#define dependent_is_linked(dep) ((dep)->flags & DEPENDENT_IN_EXPR_LIST)
#define dependent_is_linked(dep) ((dep)->flags & DEPENDENT_IS_LINKED)
struct _DependencyContainer {
Dependent *dependent_list;
......
......@@ -813,7 +813,7 @@ dependent_link (Dependent *dep, CellPos const *pos)
g_return_if_fail (dep != NULL);
g_return_if_fail (dep->expression != NULL);
g_return_if_fail (!(dep->flags & DEPENDENT_IN_EXPR_LIST));
g_return_if_fail (!(dep->flags & DEPENDENT_IS_LINKED));
g_return_if_fail (IS_SHEET (dep->sheet));
g_return_if_fail (dep->sheet->deps != NULL);
......@@ -825,7 +825,7 @@ dependent_link (Dependent *dep, CellPos const *pos)
if (dep->next_dep)
dep->next_dep->prev_dep = dep;
sheet->deps->dependent_list = dep;
dep->flags |= DEPENDENT_IN_EXPR_LIST;
dep->flags |= DEPENDENT_IS_LINKED;
handle_tree_deps (dep, pos, dep->expression, ADD_DEPS);
}
......@@ -848,7 +848,7 @@ dependent_unlink (Dependent *dep, CellPos const *pos)
if (dep->sheet != NULL) {
g_return_if_fail (dep->expression != NULL);
g_return_if_fail (dep->flags & DEPENDENT_IN_EXPR_LIST);
g_return_if_fail (dep->flags & DEPENDENT_IS_LINKED);
g_return_if_fail (IS_SHEET (dep->sheet));
/* see note in do_deps_destroy */
......@@ -867,7 +867,7 @@ dependent_unlink (Dependent *dep, CellPos const *pos)
} if (!dependent_is_cell (dep))
handle_tree_deps (dep, pos, dep->expression, REMOVE_DEPS);
dep->flags &= ~(DEPENDENT_IN_EXPR_LIST | DEPENDENT_NEEDS_RECALC);
dep->flags &= ~(DEPENDENT_IS_LINKED | DEPENDENT_NEEDS_RECALC);
}
}
......@@ -886,7 +886,7 @@ dependent_unlink_sheet (Sheet *sheet)
g_return_if_fail (IS_SHEET (sheet));
SHEET_FOREACH_DEPENDENT (sheet, dep, {
dep->flags &= ~DEPENDENT_IN_EXPR_LIST;
dep->flags &= ~DEPENDENT_IS_LINKED;
UNLINK_DEP (dep);
});
}
......
......@@ -22,7 +22,7 @@ typedef struct {
typedef enum {
/* Linked into the workbook wide expression list */
DEPENDENT_IN_EXPR_LIST = 0x00001000,
DEPENDENT_IS_LINKED = 0x00001000,
DEPENDENT_NEEDS_RECALC = 0x00002000,
DEPENDENT_BEING_CALCULATED = 0x00004000,
......@@ -34,7 +34,7 @@ typedef enum {
#define dependent_type(dep) ((dep)->flags & DEPENDENT_TYPE_MASK)
#define dependent_is_cell(dep) (dependent_type (dep) == DEPENDENT_CELL)
#define dependent_needs_recalc(dep) ((dep)->flags & DEPENDENT_NEEDS_RECALC)
#define dependent_is_linked(dep) ((dep)->flags & DEPENDENT_IN_EXPR_LIST)
#define dependent_is_linked(dep) ((dep)->flags & DEPENDENT_IS_LINKED)
struct _DependencyContainer {
Dependent *dependent_list;
......
......@@ -115,7 +115,7 @@ category_free (FormatTemplateCategory *category)
**/
GSList *
category_get_templates_list (FormatTemplateCategory *category,
CommandContext *context)
CommandContext *cc)
{
GSList *templates = NULL;
DIR *dir;
......@@ -137,7 +137,7 @@ category_get_templates_list (FormatTemplateCategory *category,
FormatTemplate *ft;
full_entry_name = g_concat_dir_and_file (category->directory, entry->d_name);
ft = format_template_new_from_file (context, full_entry_name);
ft = format_template_new_from_file (full_entry_name, cc);
if (ft == NULL) {
g_warning (_("Invalid template file: %s"), full_entry_name);
} else {
......@@ -352,14 +352,15 @@ category_group_list_free (GList *category_groups)
*
**/
GSList *
category_group_get_templates_list (FormatTemplateCategoryGroup *category_group, CommandContext *context)
category_group_get_templates_list (FormatTemplateCategoryGroup *category_group,
CommandContext *cc)
{
GSList *templates = NULL;
GList *l;
for (l = category_group->categories; l != NULL; l = l->next)
templates = g_slist_concat (templates,
category_get_templates_list (l->data, context));
category_get_templates_list (l->data, cc));
return g_slist_sort (templates, format_template_compare_name);
}
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