gimp r27016 - in trunk: . plug-ins/script-fu
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27016 - in trunk: . plug-ins/script-fu
- Date: Fri, 19 Sep 2008 19:17:12 +0000 (UTC)
Author: mitch
Date: Fri Sep 19 19:17:12 2008
New Revision: 27016
URL: http://svn.gnome.org/viewvc/gimp?rev=27016&view=rev
Log:
2008-09-19 Michael Natterer <mitch gimp org>
* plug-ins/script-fu/script-fu-types.h (struct SFScript): rename
"menu_path" to "menu_label". Having a full path here is just
compat cruft.
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-script.[ch]: changed accordingly.
Modified:
trunk/ChangeLog
trunk/plug-ins/script-fu/script-fu-script.c
trunk/plug-ins/script-fu/script-fu-script.h
trunk/plug-ins/script-fu/script-fu-scripts.c
trunk/plug-ins/script-fu/script-fu-types.h
Modified: trunk/plug-ins/script-fu/script-fu-script.c
==============================================================================
--- trunk/plug-ins/script-fu/script-fu-script.c (original)
+++ trunk/plug-ins/script-fu/script-fu-script.c Fri Sep 19 19:17:12 2008
@@ -50,7 +50,7 @@
SFScript *
script_fu_script_new (const gchar *name,
- const gchar *menu_path,
+ const gchar *menu_label,
const gchar *blurb,
const gchar *author,
const gchar *copyright,
@@ -63,7 +63,7 @@
script = g_slice_new0 (SFScript);
script->name = g_strdup (name);
- script->menu_path = g_strdup (menu_path);
+ script->menu_label = g_strdup (menu_label);
script->blurb = g_strdup (blurb);
script->author = g_strdup (author);
script->copyright = g_strdup (copyright);
@@ -85,7 +85,7 @@
g_free (script->name);
g_free (script->blurb);
- g_free (script->menu_path);
+ g_free (script->menu_label);
g_free (script->author);
g_free (script->copyright);
g_free (script->date);
@@ -171,7 +171,7 @@
script_fu_script_install_proc (SFScript *script,
GimpRunProc run_proc)
{
- const gchar *menu_path = NULL;
+ const gchar *menu_label = NULL;
GimpParamDef *args;
gint i;
@@ -179,8 +179,8 @@
g_return_if_fail (run_proc != NULL);
/* Allow scripts with no menus */
- if (strncmp (script->menu_path, "<None>", 6) != 0)
- menu_path = script->menu_path;
+ if (strncmp (script->menu_label, "<None>", 6) != 0)
+ menu_label = script->menu_label;
args = g_new0 (GimpParamDef, script->n_args + 1);
@@ -308,7 +308,7 @@
script->author,
script->copyright,
script->date,
- menu_path,
+ menu_label,
script->image_types,
GIMP_TEMPORARY,
script->n_args + 1, 0,
@@ -335,7 +335,7 @@
g_return_val_if_fail (script != NULL, NULL);
/* strip mnemonics from the menupath */
- title = gimp_strip_uline (gettext (script->menu_path));
+ title = gimp_strip_uline (gettext (script->menu_label));
/* if this looks like a full menu path, use only the last part */
if (title[0] == '<' && (tmp = strrchr (title, '/')) && tmp[1])
Modified: trunk/plug-ins/script-fu/script-fu-script.h
==============================================================================
--- trunk/plug-ins/script-fu/script-fu-script.h (original)
+++ trunk/plug-ins/script-fu/script-fu-script.h Fri Sep 19 19:17:12 2008
@@ -21,7 +21,7 @@
SFScript * script_fu_script_new (const gchar *name,
- const gchar *menu_path,
+ const gchar *menu_label,
const gchar *blurb,
const gchar *author,
const gchar *copyright,
Modified: trunk/plug-ins/script-fu/script-fu-scripts.c
==============================================================================
--- trunk/plug-ins/script-fu/script-fu-scripts.c (original)
+++ trunk/plug-ins/script-fu/script-fu-scripts.c Fri Sep 19 19:17:12 2008
@@ -134,13 +134,12 @@
{
SFScript *script;
const gchar *name;
- const gchar *menu_path;
+ const gchar *menu_label;
const gchar *blurb;
const gchar *author;
const gchar *copyright;
const gchar *date;
const gchar *image_types;
- gchar *mapped;
gint n_args;
gint i;
@@ -155,8 +154,8 @@
name = sc->vptr->string_value (sc->vptr->pair_car (a));
a = sc->vptr->pair_cdr (a);
- /* Find the script menu_path */
- menu_path = sc->vptr->string_value (sc->vptr->pair_car (a));
+ /* Find the script menu_label */
+ menu_label = sc->vptr->string_value (sc->vptr->pair_car (a));
a = sc->vptr->pair_cdr (a);
/* Find the script blurb */
@@ -192,7 +191,7 @@
/* Create a new script */
script = script_fu_script_new (name,
- menu_path,
+ menu_label,
blurb,
author,
copyright,
@@ -498,16 +497,19 @@
/* fill all values from defaults */
script_fu_script_reset (script, TRUE);
- mapped = script_fu_menu_map (script->menu_path);
-
- if (mapped)
+ if (script->menu_label[0] == '<')
{
- g_free (script->menu_path);
- script->menu_path = mapped;
+ gchar *mapped = script_fu_menu_map (script->menu_label);
+
+ if (mapped)
+ {
+ g_free (script->menu_label);
+ script->menu_label = mapped;
+ }
}
{
- const gchar *key = gettext (script->menu_path);
+ const gchar *key = gettext (script->menu_label);
GList *list = g_tree_lookup (script_tree, key);
g_tree_insert (script_tree, (gpointer) key, g_list_append (list, script));
@@ -881,10 +883,10 @@
gettext (menu_b->menu_path));
if (retval == 0 &&
- menu_a->script->menu_path && menu_b->script->menu_path)
+ menu_a->script->menu_label && menu_b->script->menu_label)
{
- retval = g_utf8_collate (gettext (menu_a->script->menu_path),
- gettext (menu_b->script->menu_path));
+ retval = g_utf8_collate (gettext (menu_a->script->menu_label),
+ gettext (menu_b->script->menu_label));
}
}
Modified: trunk/plug-ins/script-fu/script-fu-types.h
==============================================================================
--- trunk/plug-ins/script-fu/script-fu-types.h (original)
+++ trunk/plug-ins/script-fu/script-fu-types.h Fri Sep 19 19:17:12 2008
@@ -93,7 +93,7 @@
typedef struct
{
gchar *name;
- gchar *menu_path;
+ gchar *menu_label;
gchar *blurb;
gchar *author;
gchar *copyright;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]