mirror of https://github.com/GNOME/gimp.git
use plug_in_get_undo_desc() instead of duplicating its code.
2003-06-20 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/message.pdb (message): use plug_in_get_undo_desc() instead of duplicating its code. * app/pdb/message_cmds.c: regenerated.
This commit is contained in:
parent
6684bb8aa8
commit
119356a692
|
@ -1,3 +1,10 @@
|
|||
2003-06-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* tools/pdbgen/pdb/message.pdb (message): use
|
||||
plug_in_get_undo_desc() instead of duplicating its code.
|
||||
|
||||
* app/pdb/message_cmds.c: regenerated.
|
||||
|
||||
2003-06-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/plug-in-commands.c (plug_in_run_cmd_callback): pass the
|
||||
|
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "gimp-intl.h"
|
||||
#include "plug-in/plug-in-proc.h"
|
||||
#include "plug-in/plug-in.h"
|
||||
#include "plug-in/plug-ins.h"
|
||||
|
||||
static ProcRecord message_proc;
|
||||
static ProcRecord message_get_handler_proc;
|
||||
|
@ -70,44 +68,7 @@ message_invoker (Gimp *gimp,
|
|||
gchar *domain = NULL;
|
||||
|
||||
if (gimp->current_plug_in)
|
||||
{
|
||||
GSList *list;
|
||||
|
||||
for (list = gimp->plug_in_proc_defs; list; list = g_slist_next (list))
|
||||
{
|
||||
PlugInProcDef *proc_def = list->data;
|
||||
|
||||
if (&proc_def->db_info == gimp->current_plug_in->proc_rec)
|
||||
{
|
||||
const gchar *progname;
|
||||
|
||||
progname = plug_in_proc_def_get_progname (proc_def);
|
||||
|
||||
if (proc_def->menu_path)
|
||||
{
|
||||
const gchar *path;
|
||||
gchar *ellipses;
|
||||
|
||||
path = dgettext (plug_ins_locale_domain (gimp, progname,
|
||||
NULL),
|
||||
proc_def->menu_path);
|
||||
|
||||
domain = g_path_get_basename (path);
|
||||
|
||||
ellipses = strstr (domain, "...");
|
||||
|
||||
if (ellipses && ellipses == (domain + strlen (domain) - 3))
|
||||
*ellipses = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
domain = g_path_get_basename (progname);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
domain = plug_in_get_undo_desc (gimp->current_plug_in);
|
||||
|
||||
gimp_message (gimp, domain, message);
|
||||
|
||||
|
|
|
@ -49,44 +49,7 @@ HELP
|
|||
gchar *domain = NULL;
|
||||
|
||||
if (gimp->current_plug_in)
|
||||
{
|
||||
GSList *list;
|
||||
|
||||
for (list = gimp->plug_in_proc_defs; list; list = g_slist_next (list))
|
||||
{
|
||||
PlugInProcDef *proc_def = list->data;
|
||||
|
||||
if (&proc_def->db_info == gimp->current_plug_in->proc_rec)
|
||||
{
|
||||
const gchar *progname;
|
||||
|
||||
progname = plug_in_proc_def_get_progname (proc_def);
|
||||
|
||||
if (proc_def->menu_path)
|
||||
{
|
||||
const gchar *path;
|
||||
gchar *ellipses;
|
||||
|
||||
path = dgettext (plug_ins_locale_domain (gimp, progname,
|
||||
NULL),
|
||||
proc_def->menu_path);
|
||||
|
||||
domain = g_path_get_basename (path);
|
||||
|
||||
ellipses = strstr (domain, "...");
|
||||
|
||||
if (ellipses && ellipses == (domain + strlen (domain) - 3))
|
||||
*ellipses = '\\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
domain = g_path_get_basename (progname);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
domain = plug_in_get_undo_desc (gimp->current_plug_in);
|
||||
|
||||
gimp_message (gimp, domain, message);
|
||||
|
||||
|
@ -134,8 +97,7 @@ HELP
|
|||
%invoke = ( code => 'gimp->message_handler = handler;' );
|
||||
}
|
||||
|
||||
@headers = qw(<string.h> "core/gimp.h" "plug-in/plug-in.h" "plug-in/plug-ins.h"
|
||||
"plug-in/plug-in-proc.h" "gimp-intl.h");
|
||||
@headers = qw(<string.h> "core/gimp.h" "plug-in/plug-in.h" "gimp-intl.h");
|
||||
|
||||
@procs = qw(message message_get_handler message_set_handler);
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
|
Loading…
Reference in New Issue