-
- return FALSE;
-}
-
-
-/**
- * da_cat_max_key_ghfunc:
- *
- * GHFunc for biggest key
- *
- */
-static void
-da_cat_max_key_ghfunc(gpointer key, Category *cat, guint32 *max_key)
-{
-
- *max_key = MAX(*max_key, cat->key);
-}
-
-/**
- * da_cat_get_max_key:
- *
- * Get the biggest key from the GHashTable
- *
- * Return value: the biggest key value
- *
- */
-guint32
-da_cat_get_max_key(void)
-{
-guint32 max_key = 0;
-
- g_hash_table_foreach(GLOBALS->h_cat, (GHFunc)da_cat_max_key_ghfunc, &max_key);
- return max_key;
-}
-
-/**
- * da_cat_get_fullname:
- *
- * Get category the fullname 'xxxx:yyyyy'
- *
- * Return value: the category fullname (free it with g_free)
- *
- */
-gchar *
-da_cat_get_fullname(Category *cat)
-{
-Category *parent;
-
- if( cat->parent == 0 )
- return g_strdup(cat->name);
- else
- {
- parent = da_cat_get(cat->parent);
- if( parent )
- {
- return g_strdup_printf("%s:%s", parent->name, cat->name);
- }
- }
-
- return NULL;
-}
-
-
-/**
- * da_cat_name_grfunc:
- *
- * GRFunc to get the max id
- *
- * Return value: TRUE if the key/value pair match our name
- *
- */
-static gboolean
-da_cat_name_grfunc(gpointer key, Category *cat, gchar *name)
-{
-
-// DB( g_print("%s == %s\n", name, cat->name) );
- if( name && cat->name)
- {
- if(!strcasecmp(name, cat->name))
- return TRUE;
- }