renamed variable "script_list" to "script_tree" because it's a GTree.
2004-11-20 Michael Natterer <mitch@gimp.org> * plug-ins/script-fu/script-fu-scripts.c: renamed variable "script_list" to "script_tree" because it's a GTree. (script_fu_remove_script): g_list_free() the right list (don't leak all lists of scripts at the tree leaves).
This commit is contained in:

committed by
Michael Natterer

parent
aff16ce142
commit
38cbe2eaf9
@ -1,3 +1,11 @@
|
|||||||
|
2004-11-20 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/script-fu/script-fu-scripts.c: renamed variable
|
||||||
|
"script_list" to "script_tree" because it's a GTree.
|
||||||
|
|
||||||
|
(script_fu_remove_script): g_list_free() the right list (don't
|
||||||
|
leak all lists of scripts at the tree leaves).
|
||||||
|
|
||||||
2004-11-20 Sven Neumann <sven@gimp.org>
|
2004-11-20 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* Made 2.2-pre2 release.
|
* Made 2.2-pre2 release.
|
||||||
|
@ -96,7 +96,7 @@ static gint script_fu_menu_compare (gconstpointer a,
|
|||||||
* Local variables
|
* Local variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static GTree *script_list = NULL;
|
static GTree *script_tree = NULL;
|
||||||
static GList *script_menu_list = NULL;
|
static GList *script_menu_list = NULL;
|
||||||
|
|
||||||
|
|
||||||
@ -110,15 +110,15 @@ script_fu_find_scripts (void)
|
|||||||
gchar *path_str;
|
gchar *path_str;
|
||||||
|
|
||||||
/* Make sure to clear any existing scripts */
|
/* Make sure to clear any existing scripts */
|
||||||
if (script_list != NULL)
|
if (script_tree != NULL)
|
||||||
{
|
{
|
||||||
g_tree_foreach (script_list,
|
g_tree_foreach (script_tree,
|
||||||
(GTraverseFunc) script_fu_remove_script,
|
(GTraverseFunc) script_fu_remove_script,
|
||||||
NULL);
|
NULL);
|
||||||
g_tree_destroy (script_list);
|
g_tree_destroy (script_tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
script_list = g_tree_new ((GCompareFunc) g_utf8_collate);
|
script_tree = g_tree_new ((GCompareFunc) g_utf8_collate);
|
||||||
|
|
||||||
path_str = gimp_gimprc_query ("script-fu-path");
|
path_str = gimp_gimprc_query ("script-fu-path");
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ script_fu_find_scripts (void)
|
|||||||
g_free (path_str);
|
g_free (path_str);
|
||||||
|
|
||||||
/* Now that all scripts are read in and sorted, tell gimp about them */
|
/* Now that all scripts are read in and sorted, tell gimp about them */
|
||||||
g_tree_foreach (script_list,
|
g_tree_foreach (script_tree,
|
||||||
(GTraverseFunc) script_fu_install_script,
|
(GTraverseFunc) script_fu_install_script,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
@ -564,9 +564,9 @@ script_fu_add_script (LISP a)
|
|||||||
|
|
||||||
{
|
{
|
||||||
gchar *key = gettext (script->menu_path);
|
gchar *key = gettext (script->menu_path);
|
||||||
GList *list = g_tree_lookup (script_list, key);
|
GList *list = g_tree_lookup (script_tree, key);
|
||||||
|
|
||||||
g_tree_insert (script_list, key, g_list_append (list, script));
|
g_tree_insert (script_tree, key, g_list_append (list, script));
|
||||||
}
|
}
|
||||||
|
|
||||||
return NIL;
|
return NIL;
|
||||||
@ -711,7 +711,7 @@ script_fu_remove_script (gpointer foo,
|
|||||||
script_fu_free_script (script);
|
script_fu_free_script (script);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (list);
|
g_list_free (scripts);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -905,7 +905,7 @@ script_fu_find_script (const gchar *pdb_name)
|
|||||||
{
|
{
|
||||||
gconstpointer script = pdb_name;
|
gconstpointer script = pdb_name;
|
||||||
|
|
||||||
g_tree_foreach (script_list,
|
g_tree_foreach (script_tree,
|
||||||
(GTraverseFunc) script_fu_lookup_script,
|
(GTraverseFunc) script_fu_lookup_script,
|
||||||
&script);
|
&script);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user