mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 12:02:32 +00:00
removed member "accelerator". It was never set and this is the
2004-05-07 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-in-proc.[ch]: removed member "accelerator". It was never set and this is the conceptually wrong place to store it anyway. * app/actions/file-dialog-actions.c * app/actions/plug-in-actions.c * app/plug-in/plug-in-message.c * app/xcf/xcf.c: changed accordingly. * tools/pdbgen/pdb/plug_in.pdb (plugins_query): always return NULL as accelerator. Cleaned up the function a bit and made it aware of proc_def->menu_label added below. * app/pdb/plug_in_cmds.c: regenerated.
This commit is contained in:
parent
ca179a7757
commit
9b7196a0b7
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2004-05-07 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/plug-in/plug-in-proc.[ch]: removed member "accelerator".
|
||||
It was never set and this is the conceptually wrong place to store
|
||||
it anyway.
|
||||
|
||||
* app/actions/file-dialog-actions.c
|
||||
* app/actions/plug-in-actions.c
|
||||
* app/plug-in/plug-in-message.c
|
||||
* app/xcf/xcf.c: changed accordingly.
|
||||
|
||||
* tools/pdbgen/pdb/plug_in.pdb (plugins_query): always return NULL
|
||||
as accelerator. Cleaned up the function a bit and made it aware of
|
||||
proc_def->menu_label added below.
|
||||
|
||||
* app/pdb/plug_in_cmds.c: regenerated.
|
||||
|
||||
2004-05-07 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Changed plug-in menu registration again to allow passing just the
|
||||
|
|
|
@ -86,7 +86,7 @@ file_dialog_actions_setup (GimpActionGroup *group,
|
|||
entry.name = file_proc->db_info.name;
|
||||
entry.stock_id = stock_id;
|
||||
entry.label = label;
|
||||
entry.accelerator = file_proc->accelerator;
|
||||
entry.accelerator = NULL;
|
||||
entry.tooltip = NULL;
|
||||
entry.proc_def = file_proc;
|
||||
entry.help_id = help_id;
|
||||
|
|
|
@ -299,7 +299,7 @@ plug_in_actions_add_proc (GimpActionGroup *group,
|
|||
entry.name = proc_def->db_info.name;
|
||||
entry.stock_id = NULL;
|
||||
entry.label = label;
|
||||
entry.accelerator = proc_def->accelerator;
|
||||
entry.accelerator = NULL;
|
||||
entry.tooltip = NULL;
|
||||
entry.proc_def = proc_def;
|
||||
entry.help_id = help_id;
|
||||
|
|
|
@ -78,7 +78,6 @@ plug_in_proc_def_free (PlugInProcDef *proc_def)
|
|||
g_list_foreach (proc_def->menu_paths, (GFunc) g_free, NULL);
|
||||
g_list_free (proc_def->menu_paths);
|
||||
|
||||
g_free (proc_def->accelerator);
|
||||
g_free (proc_def->extensions);
|
||||
g_free (proc_def->prefixes);
|
||||
g_free (proc_def->magics);
|
||||
|
|
|
@ -29,7 +29,6 @@ struct _PlugInProcDef
|
|||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
gchar *accelerator;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
|
|
|
@ -191,8 +191,7 @@ plugins_query_invoker (Gimp *gimp,
|
|||
gchar **types_strs;
|
||||
gint32 *time_ints;
|
||||
gchar **realname_strs;
|
||||
PlugInProcDef *proc_def;
|
||||
GSList *list = NULL;
|
||||
GSList *list;
|
||||
gint i = 0;
|
||||
regex_t sregex;
|
||||
|
||||
|
@ -203,22 +202,31 @@ plugins_query_invoker (Gimp *gimp,
|
|||
else
|
||||
search_str = NULL;
|
||||
|
||||
/* count number of plugin entries, then allocate 4 arrays of correct size
|
||||
/* count number of plugin entries, then allocate arrays of correct size
|
||||
* where we can store the strings.
|
||||
*/
|
||||
|
||||
for (list = gimp->plug_in_proc_defs; list; list = g_slist_next (list))
|
||||
{
|
||||
proc_def = (PlugInProcDef *) list->data;
|
||||
PlugInProcDef *proc_def = list->data;
|
||||
|
||||
if (proc_def->prog && proc_def->menu_paths)
|
||||
{
|
||||
gchar *name = strrchr (proc_def->menu_paths->data, '/');
|
||||
gchar *name;
|
||||
|
||||
if (name)
|
||||
name = name + 1;
|
||||
if (proc_def->menu_label)
|
||||
{
|
||||
name = proc_def->menu_label;
|
||||
}
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
{
|
||||
name = strrchr (proc_def->menu_paths->data, '/');
|
||||
|
||||
if (name)
|
||||
name = name + 1;
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
}
|
||||
|
||||
if (search_str && match_strings (&sregex, name))
|
||||
continue;
|
||||
|
@ -236,27 +244,35 @@ plugins_query_invoker (Gimp *gimp,
|
|||
|
||||
for (list = gimp->plug_in_proc_defs; list; list = g_slist_next (list))
|
||||
{
|
||||
PlugInProcDef *proc_def = list->data;
|
||||
|
||||
if (i > num_plugins)
|
||||
g_error ("Internal error counting plugins");
|
||||
|
||||
proc_def = (PlugInProcDef *) list->data;
|
||||
|
||||
if (proc_def->prog && proc_def->menu_paths)
|
||||
{
|
||||
ProcRecord *pr = &proc_def->db_info;
|
||||
gchar *name;
|
||||
|
||||
gchar *name = strrchr (proc_def->menu_paths->data, '/');
|
||||
|
||||
if (name)
|
||||
name = name + 1;
|
||||
if (proc_def->menu_label)
|
||||
{
|
||||
name = proc_def->menu_label;
|
||||
}
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
{
|
||||
name = strrchr (proc_def->menu_paths->data, '/');
|
||||
|
||||
if (search_str && match_strings (&sregex,name))
|
||||
if (name)
|
||||
name = name + 1;
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
}
|
||||
|
||||
if (search_str && match_strings (&sregex, name))
|
||||
continue;
|
||||
|
||||
menu_strs[i] = gimp_strip_uline (proc_def->menu_paths->data);
|
||||
accel_strs[i] = g_strdup (proc_def->accelerator);
|
||||
accel_strs[i] = NULL;
|
||||
prog_strs[i] = g_strdup (proc_def->prog);
|
||||
types_strs[i] = g_strdup (proc_def->image_types);
|
||||
realname_strs[i] = g_strdup (pr->name);
|
||||
|
|
|
@ -690,7 +690,6 @@ plug_in_handle_proc_install (PlugIn *plug_in,
|
|||
}
|
||||
|
||||
proc_def->prog = g_strdup (prog);
|
||||
proc_def->accelerator = NULL;
|
||||
proc_def->extensions = NULL;
|
||||
proc_def->prefixes = NULL;
|
||||
proc_def->magics = NULL;
|
||||
|
|
|
@ -78,7 +78,6 @@ plug_in_proc_def_free (PlugInProcDef *proc_def)
|
|||
g_list_foreach (proc_def->menu_paths, (GFunc) g_free, NULL);
|
||||
g_list_free (proc_def->menu_paths);
|
||||
|
||||
g_free (proc_def->accelerator);
|
||||
g_free (proc_def->extensions);
|
||||
g_free (proc_def->prefixes);
|
||||
g_free (proc_def->magics);
|
||||
|
|
|
@ -29,7 +29,6 @@ struct _PlugInProcDef
|
|||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
gchar *accelerator;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
|
|
|
@ -690,7 +690,6 @@ plug_in_handle_proc_install (PlugIn *plug_in,
|
|||
}
|
||||
|
||||
proc_def->prog = g_strdup (prog);
|
||||
proc_def->accelerator = NULL;
|
||||
proc_def->extensions = NULL;
|
||||
proc_def->prefixes = NULL;
|
||||
proc_def->magics = NULL;
|
||||
|
|
|
@ -78,7 +78,6 @@ plug_in_proc_def_free (PlugInProcDef *proc_def)
|
|||
g_list_foreach (proc_def->menu_paths, (GFunc) g_free, NULL);
|
||||
g_list_free (proc_def->menu_paths);
|
||||
|
||||
g_free (proc_def->accelerator);
|
||||
g_free (proc_def->extensions);
|
||||
g_free (proc_def->prefixes);
|
||||
g_free (proc_def->magics);
|
||||
|
|
|
@ -29,7 +29,6 @@ struct _PlugInProcDef
|
|||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
gchar *accelerator;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
|
|
|
@ -78,7 +78,6 @@ plug_in_proc_def_free (PlugInProcDef *proc_def)
|
|||
g_list_foreach (proc_def->menu_paths, (GFunc) g_free, NULL);
|
||||
g_list_free (proc_def->menu_paths);
|
||||
|
||||
g_free (proc_def->accelerator);
|
||||
g_free (proc_def->extensions);
|
||||
g_free (proc_def->prefixes);
|
||||
g_free (proc_def->magics);
|
||||
|
|
|
@ -29,7 +29,6 @@ struct _PlugInProcDef
|
|||
gchar *prog;
|
||||
gchar *menu_label;
|
||||
GList *menu_paths;
|
||||
gchar *accelerator;
|
||||
gchar *extensions;
|
||||
gchar *prefixes;
|
||||
gchar *magics;
|
||||
|
|
|
@ -83,7 +83,6 @@ static PlugInProcDef xcf_plug_in_load_proc =
|
|||
"gimp_xcf_load",
|
||||
"XCF (GIMP)",
|
||||
NULL,
|
||||
NULL,
|
||||
"xcf",
|
||||
"",
|
||||
"0,string,gimp\\040xcf\\040",
|
||||
|
@ -133,7 +132,6 @@ static PlugInProcDef xcf_plug_in_save_proc =
|
|||
"gimp_xcf_save",
|
||||
"XCF (GIMP)",
|
||||
NULL,
|
||||
NULL,
|
||||
"xcf",
|
||||
"",
|
||||
NULL,
|
||||
|
|
|
@ -130,8 +130,7 @@ sub plugins_query {
|
|||
|
||||
%invoke = (
|
||||
headers => [ qw("libgimpbase/gimpbase.h") ],
|
||||
vars => [ 'PlugInProcDef *proc_def', 'GSList *list = NULL',
|
||||
'gint i = 0', 'regex_t sregex' ],
|
||||
vars => [ 'GSList *list', 'gint i = 0', 'regex_t sregex' ],
|
||||
code => <<'CODE'
|
||||
{
|
||||
if (search_str && strlen (search_str))
|
||||
|
@ -139,22 +138,31 @@ sub plugins_query {
|
|||
else
|
||||
search_str = NULL;
|
||||
|
||||
/* count number of plugin entries, then allocate 4 arrays of correct size
|
||||
/* count number of plugin entries, then allocate arrays of correct size
|
||||
* where we can store the strings.
|
||||
*/
|
||||
|
||||
for (list = gimp->plug_in_proc_defs; list; list = g_slist_next (list))
|
||||
{
|
||||
proc_def = (PlugInProcDef *) list->data;
|
||||
PlugInProcDef *proc_def = list->data;
|
||||
|
||||
if (proc_def->prog && proc_def->menu_paths)
|
||||
{
|
||||
gchar *name = strrchr (proc_def->menu_paths->data, '/');
|
||||
gchar *name;
|
||||
|
||||
if (name)
|
||||
name = name + 1;
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
if (proc_def->menu_label)
|
||||
{
|
||||
name = proc_def->menu_label;
|
||||
}
|
||||
else
|
||||
{
|
||||
name = strrchr (proc_def->menu_paths->data, '/');
|
||||
|
||||
if (name)
|
||||
name = name + 1;
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
}
|
||||
|
||||
if (search_str && match_strings (&sregex, name))
|
||||
continue;
|
||||
|
@ -172,27 +180,35 @@ sub plugins_query {
|
|||
|
||||
for (list = gimp->plug_in_proc_defs; list; list = g_slist_next (list))
|
||||
{
|
||||
PlugInProcDef *proc_def = list->data;
|
||||
|
||||
if (i > num_plugins)
|
||||
g_error ("Internal error counting plugins");
|
||||
|
||||
proc_def = (PlugInProcDef *) list->data;
|
||||
|
||||
if (proc_def->prog && proc_def->menu_paths)
|
||||
{
|
||||
ProcRecord *pr = &proc_def->db_info;
|
||||
gchar *name;
|
||||
|
||||
gchar *name = strrchr (proc_def->menu_paths->data, '/');
|
||||
if (proc_def->menu_label)
|
||||
{
|
||||
name = proc_def->menu_label;
|
||||
}
|
||||
else
|
||||
{
|
||||
name = strrchr (proc_def->menu_paths->data, '/');
|
||||
|
||||
if (name)
|
||||
name = name + 1;
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
if (name)
|
||||
name = name + 1;
|
||||
else
|
||||
name = proc_def->menu_paths->data;
|
||||
}
|
||||
|
||||
if (search_str && match_strings (&sregex,name))
|
||||
if (search_str && match_strings (&sregex, name))
|
||||
continue;
|
||||
|
||||
menu_strs[i] = gimp_strip_uline (proc_def->menu_paths->data);
|
||||
accel_strs[i] = g_strdup (proc_def->accelerator);
|
||||
accel_strs[i] = NULL;
|
||||
prog_strs[i] = g_strdup (proc_def->prog);
|
||||
types_strs[i] = g_strdup (proc_def->image_types);
|
||||
realname_strs[i] = g_strdup (pr->name);
|
||||
|
|
Loading…
Reference in a new issue