Bug 759316 - "Recently used" menu not updated with gegl filters

This preparation commit only moves code around and renames it, the
history is still a list of plug-ins only:

- move app/core/gimp-filter-history.c
  to app/plug-in/gimppluginmanager-history.c and clean it up
- move the actions that create the submenus under "Filters"
  from the "plug-in" to the "filters" action group
- move the code that creates and updates the history actions
  to the "filters" action group
- add menu setup code for the "filters" menu
- move the "history-changed" signal from GimpPlugInManager to Gimp
This commit is contained in:
Michael Natterer
2015-12-30 11:53:52 +01:00
parent 8e08f7c06e
commit ac50da2ad4
25 changed files with 799 additions and 626 deletions

View File

@ -24,11 +24,15 @@
#include "actions-types.h" #include "actions-types.h"
#include "core/gimp-filter-history.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimplayermask.h" #include "core/gimplayermask.h"
#include "plug-in/gimppluginprocedure.h" /* FIXME history */
#include "widgets/gimpactiongroup.h" #include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h" #include "widgets/gimphelp-ids.h"
#include "widgets/gimpuimanager.h"
#include "actions.h" #include "actions.h"
#include "filters-actions.h" #include "filters-actions.h"
@ -37,6 +41,60 @@
#include "gimp-intl.h" #include "gimp-intl.h"
/* local function prototypes */
static void filters_actions_history_changed (Gimp *gimp,
GimpActionGroup *group);
/* private variables */
static const GimpActionEntry filters_menu_actions[] =
{
{ "filters-menu", NULL, NC_("filters-action",
"Filte_rs") },
{ "filters-recent-menu", NULL, NC_("filters-action",
"Recently Used") },
{ "filters-blur-menu", NULL, NC_("filters-action",
"_Blur") },
{ "filters-noise-menu", NULL, NC_("filters-action",
"_Noise") },
{ "filters-edge-detect-menu", NULL, NC_("filters-action",
"Edge-De_tect") },
{ "filters-enhance-menu", NULL, NC_("filters-action",
"En_hance") },
{ "filters-combine-menu", NULL, NC_("filters-action",
"C_ombine") },
{ "filters-generic-menu", NULL, NC_("filters-action",
"_Generic") },
{ "filters-light-shadow-menu", NULL, NC_("filters-action",
"_Light and Shadow") },
{ "filters-distorts-menu", NULL, NC_("filters-action",
"_Distorts") },
{ "filters-artistic-menu", NULL, NC_("filters-action",
"_Artistic") },
{ "filters-decor-menu", NULL, NC_("filters-action",
"_Decor") },
{ "filters-map-menu", NULL, NC_("filters-action",
"_Map") },
{ "filters-render-menu", NULL, NC_("filters-action",
"_Render") },
{ "filters-render-clouds-menu", NULL, NC_("filters-action",
"_Clouds") },
{ "filters-render-fractals-menu", NULL, NC_("filters-action",
"_Fractals") },
{ "filters-render-nature-menu", NULL, NC_("filters-action",
"_Nature") },
{ "filters-render-noise-menu", NULL, NC_("filters-action",
"N_oise") },
{ "filters-render-pattern-menu", NULL, NC_("filters-action",
"_Pattern") },
{ "filters-web-menu", NULL, NC_("filters-action",
"_Web") },
{ "filters-animation-menu", NULL, NC_("filters-action",
"An_imation") }
};
static const GimpStringActionEntry filters_actions[] = static const GimpStringActionEntry filters_actions[] =
{ {
{ "filters-alien-map", GIMP_STOCK_GEGL, { "filters-alien-map", GIMP_STOCK_GEGL,
@ -447,19 +505,47 @@ static const GimpStringActionEntry filters_actions[] =
{ "filters-wind", GIMP_STOCK_GEGL, { "filters-wind", GIMP_STOCK_GEGL,
NC_("filters-action", "W_ind..."), NULL, NULL, NC_("filters-action", "W_ind..."), NULL, NULL,
"gegl:wind", "gegl:wind",
NULL /* FIXME GIMP_HELP_FILTER_WIND */ }, NULL /* FIXME GIMP_HELP_FILTER_WIND */ }
}; };
static const GimpEnumActionEntry filters_repeat_actions[] =
{
{ "filters-repeat", "system-run",
NC_("filters-action", "Re_peat Last"), "<primary>F",
NC_("filters-action",
"Rerun the last used filter using the same settings"),
GIMP_RUN_WITH_LAST_VALS, FALSE,
GIMP_HELP_FILTER_REPEAT },
{ "filters-reshow", GIMP_STOCK_RESHOW_FILTER,
NC_("filters-action", "R_e-Show Last"), "<primary><shift>F",
NC_("filters-action", "Show the last used filter dialog again"),
GIMP_RUN_INTERACTIVE, FALSE,
GIMP_HELP_FILTER_RESHOW }
};
void void
filters_actions_setup (GimpActionGroup *group) filters_actions_setup (GimpActionGroup *group)
{ {
gint i; GimpPlugInActionEntry *entries;
gint n_entries;
gint i;
gimp_action_group_add_actions (group, "filters-action",
filters_menu_actions,
G_N_ELEMENTS (filters_menu_actions));
gimp_action_group_add_string_actions (group, "filters-action", gimp_action_group_add_string_actions (group, "filters-action",
filters_actions, filters_actions,
G_N_ELEMENTS (filters_actions), G_N_ELEMENTS (filters_actions),
G_CALLBACK (filters_filter_cmd_callback)); G_CALLBACK (filters_filter_cmd_callback));
gimp_action_group_add_enum_actions (group, "filters-action",
filters_repeat_actions,
G_N_ELEMENTS (filters_repeat_actions),
G_CALLBACK (filters_repeat_cmd_callback));
for (i = 0; i < G_N_ELEMENTS (filters_actions); i++) for (i = 0; i < G_N_ELEMENTS (filters_actions); i++)
{ {
const GimpStringActionEntry *entry = &filters_actions[i]; const GimpStringActionEntry *entry = &filters_actions[i];
@ -471,6 +557,38 @@ filters_actions_setup (GimpActionGroup *group)
gimp_action_group_set_action_tooltip (group, entry->name, gimp_action_group_set_action_tooltip (group, entry->name,
description); description);
} }
n_entries = gimp_filter_history_size (group->gimp);
entries = g_new0 (GimpPlugInActionEntry, n_entries);
for (i = 0; i < n_entries; i++)
{
entries[i].name = g_strdup_printf ("filter-recent-%02d", i + 1);
entries[i].icon_name = NULL;
entries[i].label = "";
entries[i].accelerator = "";
entries[i].tooltip = NULL;
entries[i].procedure = NULL;
entries[i].help_id = GIMP_HELP_FILTER_RESHOW;
}
gimp_action_group_add_plug_in_actions (group, entries, n_entries,
G_CALLBACK (filters_history_cmd_callback));
for (i = 0; i < n_entries; i++)
{
gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
g_free ((gchar *) entries[i].name);
}
g_free (entries);
g_signal_connect_object (group->gimp, "filter-history-changed",
G_CALLBACK (filters_actions_history_changed),
group, 0);
filters_actions_history_changed (group->gimp, group);
} }
void void
@ -593,4 +711,172 @@ filters_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("filters-wind", writable); SET_SENSITIVE ("filters-wind", writable);
#undef SET_SENSITIVE #undef SET_SENSITIVE
{
GimpPlugInProcedure *proc = gimp_filter_history_nth (group->gimp, 0);
gint i;
if (proc && gimp_plug_in_procedure_get_sensitive (proc, drawable))
{
gimp_action_group_set_action_sensitive (group, "filters-repeat", TRUE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", TRUE);
}
else
{
gimp_action_group_set_action_sensitive (group, "filters-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", FALSE);
}
for (i = 0; i < gimp_filter_history_length (group->gimp); i++)
{
gchar *name = g_strdup_printf ("filter-recent-%02d", i + 1);
gboolean sensitive;
proc = gimp_filter_history_nth (group->gimp, i);
sensitive = gimp_plug_in_procedure_get_sensitive (proc, drawable);
gimp_action_group_set_action_sensitive (group, name, sensitive);
g_free (name);
}
}
}
static GimpActionGroup *
filters_actions_get_plug_in_group (GimpActionGroup *group)
{
GList *list;
for (list = gimp_ui_managers_from_name ("<Image>");
list;
list = g_list_next (list))
{
GimpUIManager *manager = list->data;
/* if this is our UI manager */
if (gimp_ui_manager_get_action_group (manager, "filters") == group)
return gimp_ui_manager_get_action_group (manager, "plug-in");
}
/* this happens during initial UI manager construction */
return NULL;
}
static void
filters_actions_history_changed (Gimp *gimp,
GimpActionGroup *group)
{
GimpPlugInProcedure *proc;
GimpActionGroup *plug_in_group;
gint i;
plug_in_group = filters_actions_get_plug_in_group (group);
proc = gimp_filter_history_nth (gimp, 0);
if (proc)
{
const gchar *label;
gchar *repeat;
gchar *reshow;
gboolean sensitive = FALSE;
label = gimp_plug_in_procedure_get_label (proc);
/* copy the sensitivity of the plug-in procedure's actual action
* instead of calling filters_actions_update() because doing the
* latter would set the sensitivity of this image's action on
* all images' actions. See bug #517683.
*/
if (plug_in_group)
{
GtkAction *actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
}
repeat = g_strdup_printf (_("Re_peat \"%s\""), label);
reshow = g_strdup_printf (_("R_e-Show \"%s\""), label);
gimp_action_group_set_action_label (group, "filters-repeat", repeat);
gimp_action_group_set_action_label (group, "filters-reshow", reshow);
gimp_action_group_set_action_sensitive (group, "filters-repeat",
sensitive);
gimp_action_group_set_action_sensitive (group, "filters-reshow",
sensitive);
g_free (repeat);
g_free (reshow);
}
else
{
gimp_action_group_set_action_label (group, "filters-repeat",
_("Repeat Last"));
gimp_action_group_set_action_label (group, "filters-reshow",
_("Re-Show Last"));
gimp_action_group_set_action_sensitive (group, "filters-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "filters-reshow", FALSE);
}
for (i = 0; i < gimp_filter_history_length (gimp); i++)
{
GtkAction *action;
const gchar *label;
gchar *name;
gboolean sensitive = FALSE;
name = g_strdup_printf ("filter-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
proc = gimp_filter_history_nth (gimp, i);
if (proc->menu_label)
{
label = dgettext (gimp_plug_in_procedure_get_locale_domain (proc),
proc->menu_label);
}
else
{
label = gimp_plug_in_procedure_get_label (proc);
}
/* see comment above */
if (plug_in_group)
{
GtkAction *actual_action =
gtk_action_group_get_action (GTK_ACTION_GROUP (plug_in_group),
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
}
g_object_set (action,
"visible", TRUE,
"sensitive", sensitive,
"procedure", proc,
"label", label,
"icon-name", gimp_plug_in_procedure_get_icon_name (proc),
"tooltip", gimp_plug_in_procedure_get_blurb (proc),
NULL);
}
for (; i < gimp_filter_history_size (gimp); i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("filter-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
g_object_set (action,
"visible", FALSE,
"procedure", NULL,
NULL);
}
} }

View File

@ -25,15 +25,19 @@
#include "actions-types.h" #include "actions-types.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimp-filter-history.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimptoolinfo.h" #include "core/gimptoolinfo.h"
#include "pdb/gimpprocedure.h" /* FIXME history */
#include "tools/gimpoperationtool.h" #include "tools/gimpoperationtool.h"
#include "tools/tool_manager.h" #include "tools/tool_manager.h"
#include "actions.h" #include "actions.h"
#include "filters-commands.h" #include "filters-commands.h"
#include "plug-in-commands.h" /* FIXME history */
#include "gimp-intl.h" #include "gimp-intl.h"
@ -93,3 +97,63 @@ filters_filter_cmd_callback (GtkAction *action,
g_free (label); g_free (label);
} }
} }
void
filters_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpPlugInProcedure *procedure;
Gimp *gimp;
GimpDisplay *display;
GimpRunMode run_mode;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
run_mode = (GimpRunMode) value;
procedure = gimp_filter_history_nth (gimp, 0);
if (procedure)
{
GimpValueArray *args;
gint n_args;
args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure));
g_value_set_int (gimp_value_array_index (args, 0), run_mode);
n_args = plug_in_collect_display_args (action, display,
GIMP_PROCEDURE (procedure)->args,
args, 1);
plug_in_procedure_execute (procedure, gimp, display, args, n_args);
gimp_value_array_unref (args);
}
}
void
filters_history_cmd_callback (GtkAction *action,
GimpPlugInProcedure *procedure,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
GimpValueArray *args;
gint n_args;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure));
g_value_set_int (gimp_value_array_index (args, 0), GIMP_RUN_INTERACTIVE);
n_args = plug_in_collect_display_args (action, display,
GIMP_PROCEDURE (procedure)->args,
args, 1);
plug_in_procedure_execute (procedure, gimp, display, args, n_args);
gimp_value_array_unref (args);
}

View File

@ -23,5 +23,12 @@ void filters_filter_cmd_callback (GtkAction *action,
const gchar *operation, const gchar *operation,
gpointer data); gpointer data);
void filters_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void filters_history_cmd_callback (GtkAction *action,
GimpPlugInProcedure *proc,
gpointer data);
#endif /* __FILTERS_COMMANDS_H__ */ #endif /* __FILTERS_COMMANDS_H__ */

View File

@ -34,7 +34,6 @@
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginmanager-help-domain.h" #include "plug-in/gimppluginmanager-help-domain.h"
#include "plug-in/gimppluginmanager-history.h"
#include "plug-in/gimppluginmanager-locale-domain.h" #include "plug-in/gimppluginmanager-locale-domain.h"
#include "plug-in/gimppluginmanager-menu-branch.h" #include "plug-in/gimppluginmanager-menu-branch.h"
#include "plug-in/gimppluginprocedure.h" #include "plug-in/gimppluginprocedure.h"
@ -68,8 +67,6 @@ static void plug_in_actions_menu_path_added (GimpPlugInProcedure *proc,
static void plug_in_actions_add_proc (GimpActionGroup *group, static void plug_in_actions_add_proc (GimpActionGroup *group,
GimpPlugInProcedure *proc); GimpPlugInProcedure *proc);
static void plug_in_actions_history_changed (GimpPlugInManager *manager,
GimpActionGroup *group);
static gboolean plug_in_actions_check_translation (const gchar *original, static gboolean plug_in_actions_check_translation (const gchar *original,
const gchar *translated); const gchar *translated);
static void plug_in_actions_build_path (GimpActionGroup *group, static void plug_in_actions_build_path (GimpActionGroup *group,
@ -81,49 +78,6 @@ static void plug_in_actions_build_path (GimpActionGroup *group
static const GimpActionEntry plug_in_actions[] = static const GimpActionEntry plug_in_actions[] =
{ {
{ "plug-in-menu", NULL, NC_("plug-in-action",
"Filte_rs") },
{ "plug-in-recent-menu", NULL, NC_("plug-in-action",
"Recently Used") },
{ "plug-in-blur-menu", NULL, NC_("plug-in-action",
"_Blur") },
{ "plug-in-noise-menu", NULL, NC_("plug-in-action",
"_Noise") },
{ "plug-in-edge-detect-menu", NULL, NC_("plug-in-action",
"Edge-De_tect") },
{ "plug-in-enhance-menu", NULL, NC_("plug-in-action",
"En_hance") },
{ "plug-in-combine-menu", NULL, NC_("plug-in-action",
"C_ombine") },
{ "plug-in-generic-menu", NULL, NC_("plug-in-action",
"_Generic") },
{ "plug-in-light-shadow-menu", NULL, NC_("plug-in-action",
"_Light and Shadow") },
{ "plug-in-distorts-menu", NULL, NC_("plug-in-action",
"_Distorts") },
{ "plug-in-artistic-menu", NULL, NC_("plug-in-action",
"_Artistic") },
{ "plug-in-decor-menu", NULL, NC_("plug-in-action",
"_Decor") },
{ "plug-in-map-menu", NULL, NC_("plug-in-action",
"_Map") },
{ "plug-in-render-menu", NULL, NC_("plug-in-action",
"_Render") },
{ "plug-in-render-clouds-menu", NULL, NC_("plug-in-action",
"_Clouds") },
{ "plug-in-render-fractals-menu", NULL, NC_("plug-in-action",
"_Fractals") },
{ "plug-in-render-nature-menu", NULL, NC_("plug-in-action",
"_Nature") },
{ "plug-in-render-noise-menu", NULL, NC_("plug-in-action",
"N_oise") },
{ "plug-in-render-pattern-menu", NULL, NC_("plug-in-action",
"_Pattern") },
{ "plug-in-web-menu", NULL, NC_("plug-in-action",
"_Web") },
{ "plug-in-animation-menu", NULL, NC_("plug-in-action",
"An_imation") },
{ "plug-in-reset-all", GIMP_STOCK_RESET, { "plug-in-reset-all", GIMP_STOCK_RESET,
NC_("plug-in-action", "Reset all _Filters"), NULL, NC_("plug-in-action", "Reset all _Filters"), NULL,
NC_("plug-in-action", "Reset all plug-ins to their default settings"), NC_("plug-in-action", "Reset all plug-ins to their default settings"),
@ -131,43 +85,19 @@ static const GimpActionEntry plug_in_actions[] =
GIMP_HELP_FILTER_RESET_ALL } GIMP_HELP_FILTER_RESET_ALL }
}; };
static const GimpEnumActionEntry plug_in_repeat_actions[] =
{
{ "plug-in-repeat", "system-run",
NC_("plug-in-action", "Re_peat Last"), "<primary>F",
NC_("plug-in-action",
"Rerun the last used plug-in using the same settings"),
GIMP_RUN_WITH_LAST_VALS, FALSE,
GIMP_HELP_FILTER_REPEAT },
{ "plug-in-reshow", GIMP_STOCK_RESHOW_FILTER,
NC_("plug-in-action", "R_e-Show Last"), "<primary><shift>F",
NC_("plug-in-action", "Show the last used plug-in dialog again"),
GIMP_RUN_INTERACTIVE, FALSE,
GIMP_HELP_FILTER_RESHOW }
};
/* public functions */ /* public functions */
void void
plug_in_actions_setup (GimpActionGroup *group) plug_in_actions_setup (GimpActionGroup *group)
{ {
GimpPlugInManager *manager = group->gimp->plug_in_manager; GimpPlugInManager *manager = group->gimp->plug_in_manager;
GimpPlugInActionEntry *entries; GSList *list;
GSList *list;
gint n_entries;
gint i;
gimp_action_group_add_actions (group, "plug-in-action", gimp_action_group_add_actions (group, "plug-in-action",
plug_in_actions, plug_in_actions,
G_N_ELEMENTS (plug_in_actions)); G_N_ELEMENTS (plug_in_actions));
gimp_action_group_add_enum_actions (group, "plug-in-action",
plug_in_repeat_actions,
G_N_ELEMENTS (plug_in_repeat_actions),
G_CALLBACK (plug_in_repeat_cmd_callback));
for (list = gimp_plug_in_manager_get_menu_branches (manager); for (list = gimp_plug_in_manager_get_menu_branches (manager);
list; list;
list = g_slist_next (list)) list = g_slist_next (list))
@ -204,38 +134,6 @@ plug_in_actions_setup (GimpActionGroup *group)
g_signal_connect_object (group->gimp->pdb, "unregister-procedure", g_signal_connect_object (group->gimp->pdb, "unregister-procedure",
G_CALLBACK (plug_in_actions_unregister_procedure), G_CALLBACK (plug_in_actions_unregister_procedure),
group, 0); group, 0);
n_entries = gimp_plug_in_manager_history_size (manager);
entries = g_new0 (GimpPlugInActionEntry, n_entries);
for (i = 0; i < n_entries; i++)
{
entries[i].name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
entries[i].icon_name = NULL;
entries[i].label = "";
entries[i].accelerator = "";
entries[i].tooltip = NULL;
entries[i].procedure = NULL;
entries[i].help_id = GIMP_HELP_FILTER_RESHOW;
}
gimp_action_group_add_plug_in_actions (group, entries, n_entries,
G_CALLBACK (plug_in_history_cmd_callback));
for (i = 0; i < n_entries; i++)
{
gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
g_free ((gchar *) entries[i].name);
}
g_free (entries);
g_signal_connect_object (manager, "history-changed",
G_CALLBACK (plug_in_actions_history_changed),
group, 0);
plug_in_actions_history_changed (manager, group);
} }
void void
@ -246,7 +144,6 @@ plug_in_actions_update (GimpActionGroup *group,
GimpPlugInManager *manager = group->gimp->plug_in_manager; GimpPlugInManager *manager = group->gimp->plug_in_manager;
GimpDrawable *drawable = NULL; GimpDrawable *drawable = NULL;
GSList *list; GSList *list;
gint i;
if (image) if (image)
drawable = gimp_image_get_active_drawable (image); drawable = gimp_image_get_active_drawable (image);
@ -267,32 +164,6 @@ plug_in_actions_update (GimpActionGroup *group,
sensitive); sensitive);
} }
} }
if (manager->history &&
gimp_plug_in_procedure_get_sensitive (manager->history->data, drawable))
{
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", TRUE);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", TRUE);
}
else
{
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", FALSE);
}
for (list = manager->history, i = 0; list; list = list->next, i++)
{
GimpPlugInProcedure *proc = list->data;
gchar *name = g_strdup_printf ("plug-in-recent-%02d",
i + 1);
gboolean sensitive;
sensitive = gimp_plug_in_procedure_get_sensitive (proc, drawable);
gimp_action_group_set_action_sensitive (group, name, sensitive);
g_free (name);
}
} }
@ -522,115 +393,6 @@ plug_in_actions_add_proc (GimpActionGroup *group,
} }
} }
static void
plug_in_actions_history_changed (GimpPlugInManager *manager,
GimpActionGroup *group)
{
GimpPlugInProcedure *proc;
gint i;
proc = gimp_plug_in_manager_history_nth (manager, 0);
if (proc)
{
GtkAction *actual_action;
const gchar *label;
gchar *repeat;
gchar *reshow;
gboolean sensitive = FALSE;
label = gimp_plug_in_procedure_get_label (proc);
/* copy the sensitivity of the plug-in procedure's actual action
* instead of calling plug_in_actions_update() because doing the
* latter would set the sensitivity of this image's action on
* all images' actions. See bug #517683.
*/
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
repeat = g_strdup_printf (_("Re_peat \"%s\""), label);
reshow = g_strdup_printf (_("R_e-Show \"%s\""), label);
gimp_action_group_set_action_label (group, "plug-in-repeat", repeat);
gimp_action_group_set_action_label (group, "plug-in-reshow", reshow);
gimp_action_group_set_action_sensitive (group,
"plug-in-repeat", sensitive);
gimp_action_group_set_action_sensitive (group,
"plug-in-reshow", sensitive);
g_free (repeat);
g_free (reshow);
}
else
{
gimp_action_group_set_action_label (group, "plug-in-repeat",
_("Repeat Last"));
gimp_action_group_set_action_label (group, "plug-in-reshow",
_("Re-Show Last"));
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", FALSE);
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", FALSE);
}
for (i = 0; i < gimp_plug_in_manager_history_length (manager); i++)
{
GtkAction *action;
GtkAction *actual_action;
const gchar *label;
gchar *name;
gboolean sensitive = FALSE;
name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
proc = gimp_plug_in_manager_history_nth (manager, i);
if (proc->menu_label)
{
label = dgettext (gimp_plug_in_procedure_get_locale_domain (proc),
proc->menu_label);
}
else
{
label = gimp_plug_in_procedure_get_label (proc);
}
/* see comment above */
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
gimp_object_get_name (proc));
if (actual_action)
sensitive = gtk_action_get_sensitive (actual_action);
g_object_set (action,
"visible", TRUE,
"sensitive", sensitive,
"procedure", proc,
"label", label,
"icon-name", gimp_plug_in_procedure_get_icon_name (proc),
"tooltip", gimp_plug_in_procedure_get_blurb (proc),
NULL);
}
for (; i < gimp_plug_in_manager_history_size (manager); i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
g_free (name);
g_object_set (action,
"visible", FALSE,
"procedure", NULL,
NULL);
}
}
static gboolean static gboolean
plug_in_actions_check_translation (const gchar *original, plug_in_actions_check_translation (const gchar *original,
const gchar *translated) const gchar *translated)

View File

@ -28,6 +28,7 @@
#include "actions-types.h" #include "actions-types.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimp-filter-history.h"
#include "core/gimp-utils.h" #include "core/gimp-utils.h"
#include "core/gimpcontainer.h" #include "core/gimpcontainer.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
@ -39,7 +40,6 @@
#include "plug-in/gimppluginmanager.h" #include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginmanager-data.h" #include "plug-in/gimppluginmanager-data.h"
#include "plug-in/gimppluginmanager-history.h"
#include "pdb/gimpprocedure.h" #include "pdb/gimpprocedure.h"
@ -63,11 +63,13 @@
/* local function prototypes */ /* local function prototypes */
#if 0
static void plug_in_procedure_execute (GimpPlugInProcedure *procedure, static void plug_in_procedure_execute (GimpPlugInProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpDisplay *display, GimpDisplay *display,
GimpValueArray *args, GimpValueArray *args,
gint n_args); gint n_args);
#endif
static gint plug_in_collect_data_args (GtkAction *action, static gint plug_in_collect_data_args (GtkAction *action,
GimpObject *object, GimpObject *object,
@ -85,11 +87,13 @@ static gint plug_in_collect_item_args (GtkAction *action,
GParamSpec **pspecs, GParamSpec **pspecs,
GimpValueArray *args, GimpValueArray *args,
gint n_args); gint n_args);
#if 0
static gint plug_in_collect_display_args (GtkAction *action, static gint plug_in_collect_display_args (GtkAction *action,
GimpDisplay *display, GimpDisplay *display,
GParamSpec **pspecs, GParamSpec **pspecs,
GimpValueArray *args, GimpValueArray *args,
gint n_args); gint n_args);
#endif
static void plug_in_reset_all_response (GtkWidget *dialog, static void plug_in_reset_all_response (GtkWidget *dialog,
gint response_id, gint response_id,
Gimp *gimp); Gimp *gimp);
@ -193,66 +197,6 @@ plug_in_run_cmd_callback (GtkAction *action,
gimp_value_array_unref (args); gimp_value_array_unref (args);
} }
void
plug_in_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data)
{
GimpPlugInProcedure *procedure;
Gimp *gimp;
GimpDisplay *display;
GimpRunMode run_mode;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
run_mode = (GimpRunMode) value;
procedure = gimp_plug_in_manager_history_nth (gimp->plug_in_manager, 0);
if (procedure)
{
GimpValueArray *args;
gint n_args;
args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure));
g_value_set_int (gimp_value_array_index (args, 0), run_mode);
n_args = plug_in_collect_display_args (action, display,
GIMP_PROCEDURE (procedure)->args,
args, 1);
plug_in_procedure_execute (procedure, gimp, display, args, n_args);
gimp_value_array_unref (args);
}
}
void
plug_in_history_cmd_callback (GtkAction *action,
GimpPlugInProcedure *procedure,
gpointer data)
{
Gimp *gimp;
GimpDisplay *display;
GimpValueArray *args;
gint n_args;
return_if_no_gimp (gimp, data);
return_if_no_display (display, data);
args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure));
g_value_set_int (gimp_value_array_index (args, 0), GIMP_RUN_INTERACTIVE);
n_args = plug_in_collect_display_args (action, display,
GIMP_PROCEDURE (procedure)->args,
args, 1);
plug_in_procedure_execute (procedure, gimp, display, args, n_args);
gimp_value_array_unref (args);
}
void void
plug_in_reset_all_cmd_callback (GtkAction *action, plug_in_reset_all_cmd_callback (GtkAction *action,
gpointer data) gpointer data)
@ -289,7 +233,8 @@ plug_in_reset_all_cmd_callback (GtkAction *action,
/* private functions */ /* private functions */
static void /* FIXME history */
void
plug_in_procedure_execute (GimpPlugInProcedure *procedure, plug_in_procedure_execute (GimpPlugInProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpDisplay *display, GimpDisplay *display,
@ -319,7 +264,7 @@ plug_in_procedure_execute (GimpPlugInProcedure *procedure,
if (GIMP_PROCEDURE (procedure)->num_args >= 2 && if (GIMP_PROCEDURE (procedure)->num_args >= 2 &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (GIMP_PROCEDURE (procedure)->args[1])) GIMP_IS_PARAM_SPEC_IMAGE_ID (GIMP_PROCEDURE (procedure)->args[1]))
{ {
gimp_plug_in_manager_history_add (gimp->plug_in_manager, procedure); gimp_filter_history_add (gimp, procedure);
} }
} }
} }
@ -414,7 +359,8 @@ plug_in_collect_item_args (GtkAction *action,
return n_args; return n_args;
} }
static gint /* FIXME history */
gint
plug_in_collect_display_args (GtkAction *action, plug_in_collect_display_args (GtkAction *action,
GimpDisplay *display, GimpDisplay *display,
GParamSpec **pspecs, GParamSpec **pspecs,

View File

@ -22,15 +22,21 @@
void plug_in_run_cmd_callback (GtkAction *action, void plug_in_run_cmd_callback (GtkAction *action,
GimpPlugInProcedure *proc, GimpPlugInProcedure *proc,
gpointer data); gpointer data);
void plug_in_repeat_cmd_callback (GtkAction *action,
gint value,
gpointer data);
void plug_in_history_cmd_callback (GtkAction *action,
GimpPlugInProcedure *proc,
gpointer data);
void plug_in_reset_all_cmd_callback (GtkAction *action, void plug_in_reset_all_cmd_callback (GtkAction *action,
gpointer data); gpointer data);
/* FIXME history */
void plug_in_procedure_execute (GimpPlugInProcedure *procedure,
Gimp *gimp,
GimpDisplay *display,
GimpValueArray *args,
gint n_args);
gint plug_in_collect_display_args (GtkAction *action,
GimpDisplay *display,
GParamSpec **pspecs,
GimpValueArray *args,
gint n_args);
#endif /* __PLUG_IN_COMMANDS_H__ */ #endif /* __PLUG_IN_COMMANDS_H__ */

View File

@ -97,7 +97,7 @@ enum
PROP_UNDO_LEVELS, PROP_UNDO_LEVELS,
PROP_UNDO_SIZE, PROP_UNDO_SIZE,
PROP_UNDO_PREVIEW_SIZE, PROP_UNDO_PREVIEW_SIZE,
PROP_PLUG_IN_HISTORY_SIZE, PROP_FILTER_HISTORY_SIZE,
PROP_PLUGINRC_PATH, PROP_PLUGINRC_PATH,
PROP_LAYER_PREVIEWS, PROP_LAYER_PREVIEWS,
PROP_LAYER_PREVIEW_SIZE, PROP_LAYER_PREVIEW_SIZE,
@ -454,9 +454,9 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_VIEW_SIZE_LARGE, GIMP_VIEW_SIZE_LARGE,
GIMP_PARAM_STATIC_STRINGS | GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_PLUG_IN_HISTORY_SIZE, GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_FILTER_HISTORY_SIZE,
"plug-in-history-size", "plug-in-history-size", /* compat name */
PLUG_IN_HISTORY_SIZE_BLURB, FILTER_HISTORY_SIZE_BLURB,
0, 256, 10, 0, 256, 10,
GIMP_PARAM_STATIC_STRINGS | GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART); GIMP_CONFIG_PARAM_RESTART);
@ -749,8 +749,8 @@ gimp_core_config_set_property (GObject *object,
gimp_config_sync (g_value_get_object (value), gimp_config_sync (g_value_get_object (value),
G_OBJECT (core_config->default_grid), 0); G_OBJECT (core_config->default_grid), 0);
break; break;
case PROP_PLUG_IN_HISTORY_SIZE: case PROP_FILTER_HISTORY_SIZE:
core_config->plug_in_history_size = g_value_get_int (value); core_config->filter_history_size = g_value_get_int (value);
break; break;
case PROP_UNDO_LEVELS: case PROP_UNDO_LEVELS:
core_config->levels_of_undo = g_value_get_int (value); core_config->levels_of_undo = g_value_get_int (value);
@ -930,8 +930,8 @@ gimp_core_config_get_property (GObject *object,
case PROP_DEFAULT_GRID: case PROP_DEFAULT_GRID:
g_value_set_object (value, core_config->default_grid); g_value_set_object (value, core_config->default_grid);
break; break;
case PROP_PLUG_IN_HISTORY_SIZE: case PROP_FILTER_HISTORY_SIZE:
g_value_set_int (value, core_config->plug_in_history_size); g_value_set_int (value, core_config->filter_history_size);
break; break;
case PROP_UNDO_LEVELS: case PROP_UNDO_LEVELS:
g_value_set_int (value, core_config->levels_of_undo); g_value_set_int (value, core_config->levels_of_undo);

View File

@ -81,7 +81,7 @@ struct _GimpCoreConfig
gint levels_of_undo; gint levels_of_undo;
guint64 undo_size; guint64 undo_size;
GimpViewSize undo_preview_size; GimpViewSize undo_preview_size;
gint plug_in_history_size; gint filter_history_size;
gchar *plug_in_rc_path; gchar *plug_in_rc_path;
gboolean layer_previews; gboolean layer_previews;
GimpViewSize layer_preview_size; GimpViewSize layer_preview_size;

View File

@ -270,8 +270,8 @@ _("When enabled, the X server is queried for the mouse's current position " \
"be slower. Conversely, on some X servers enabling this option results " \ "be slower. Conversely, on some X servers enabling this option results " \
"in faster painting.") "in faster painting.")
#define PLUG_IN_HISTORY_SIZE_BLURB \ #define FILTER_HISTORY_SIZE_BLURB \
"How many recently used plug-ins to keep on the Filters menu." "How many recently used filters and plug-ins to keep on the Filters menu."
#define PLUG_IN_PATH_BLURB \ #define PLUG_IN_PATH_BLURB \
"Sets the plug-in search path." "Sets the plug-in search path."

View File

@ -37,6 +37,8 @@ libappcore_a_sources = \
gimp-contexts.h \ gimp-contexts.h \
gimp-edit.c \ gimp-edit.c \
gimp-edit.h \ gimp-edit.h \
gimp-filter-history.c \
gimp-filter-history.h \
gimp-gradients.c \ gimp-gradients.c \
gimp-gradients.h \ gimp-gradients.h \
gimp-gui.c \ gimp-gui.c \

View File

@ -0,0 +1,137 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
*
* gimp-filter-history.c
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "config/gimpcoreconfig.h"
#include "gimp.h"
#include "gimp-filter-history.h"
#include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginprocedure.h"
guint
gimp_filter_history_size (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), 0);
return MAX (1, gimp->config->filter_history_size);
}
guint
gimp_filter_history_length (Gimp *gimp)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), 0);
return g_list_length (gimp->filter_history);
}
GimpPlugInProcedure *
gimp_filter_history_nth (Gimp *gimp,
gint n)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
return g_list_nth_data (gimp->filter_history, n);
}
void
gimp_filter_history_add (Gimp *gimp,
GimpPlugInProcedure *procedure)
{
GList *link;
gint history_size;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure));
/* return early if the procedure is already at the top */
if (gimp->filter_history && gimp->filter_history->data == procedure)
return;
history_size = gimp_filter_history_size (gimp);
link = g_list_find (gimp->filter_history, procedure);
if (link)
{
gimp->filter_history = g_list_delete_link (gimp->filter_history, link);
gimp->filter_history = g_list_prepend (gimp->filter_history, procedure);
}
else
{
gimp->filter_history = g_list_prepend (gimp->filter_history,
g_object_ref (procedure));
}
link = g_list_nth (gimp->filter_history, history_size);
if (link)
{
gimp->filter_history = g_list_remove_link (gimp->filter_history, link);
g_object_unref (link->data);
g_list_free (link);
}
gimp_filter_history_changed (gimp);
}
void
gimp_filter_history_remove (Gimp *gimp,
GimpPlugInProcedure *procedure)
{
GList *link;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure));
link = g_list_find (gimp->filter_history, procedure);
if (link)
{
gimp->filter_history = g_list_delete_link (gimp->filter_history, link);
g_object_unref (procedure);
gimp_filter_history_changed (gimp);
}
}
void
gimp_filter_history_clear (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (gimp->filter_history)
{
g_list_free_full (gimp->filter_history, (GDestroyNotify) g_object_unref);
gimp->filter_history = NULL;
gimp_filter_history_changed (gimp);
}
}

View File

@ -0,0 +1,35 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimp-filter-history.h
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_FILTER_HISTORY_H__
#define __GIMP_FILTER_HISTORY_H__
guint gimp_filter_history_size (Gimp *gimp);
guint gimp_filter_history_length (Gimp *gimp);
GimpPlugInProcedure * gimp_filter_history_nth (Gimp *gimp,
gint n);
void gimp_filter_history_add (Gimp *gimp,
GimpPlugInProcedure *procedure);
void gimp_filter_history_remove (Gimp *gimp,
GimpPlugInProcedure *procedure);
void gimp_filter_history_clear (Gimp *gimp);
#endif /* __GIMP_FILTER_HISTORY_H__ */

View File

@ -44,6 +44,7 @@
#include "gimp.h" #include "gimp.h"
#include "gimp-contexts.h" #include "gimp-contexts.h"
#include "gimp-filter-history.h"
#include "gimp-gradients.h" #include "gimp-gradients.h"
#include "gimp-memsize.h" #include "gimp-memsize.h"
#include "gimp-modules.h" #include "gimp-modules.h"
@ -93,6 +94,7 @@ enum
RESTORE, RESTORE,
EXIT, EXIT,
BUFFER_CHANGED, BUFFER_CHANGED,
FILTER_HISTORY_CHANGED,
IMAGE_OPENED, IMAGE_OPENED,
LAST_SIGNAL LAST_SIGNAL
}; };
@ -186,6 +188,16 @@ gimp_class_init (GimpClass *klass)
gimp_marshal_VOID__VOID, gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
gimp_signals[FILTER_HISTORY_CHANGED] =
g_signal_new ("filter-history-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpClass,
filter_history_changed),
NULL, NULL,
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
gimp_signals[IMAGE_OPENED] = gimp_signals[IMAGE_OPENED] =
g_signal_new ("image-opened", g_signal_new ("image-opened",
G_TYPE_FROM_CLASS (klass), G_TYPE_FROM_CLASS (klass),
@ -348,6 +360,8 @@ gimp_dispose (GObject *object)
if (gimp->tool_preset_factory) if (gimp->tool_preset_factory)
gimp_data_factory_data_free (gimp->tool_preset_factory); gimp_data_factory_data_free (gimp->tool_preset_factory);
gimp_filter_history_clear (gimp);
G_OBJECT_CLASS (parent_class)->dispose (object); G_OBJECT_CLASS (parent_class)->dispose (object);
} }
@ -577,6 +591,11 @@ gimp_get_memsize (GimpObject *object,
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->plug_in_manager), memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->plug_in_manager),
gui_size); gui_size);
memsize += gimp_g_list_get_memsize_foreach (gimp->filter_history,
(GimpMemsizeFunc)
gimp_object_get_memsize,
gui_size);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->image_table), 0); memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->image_table), 0);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->item_table), 0); memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->item_table), 0);
@ -1436,6 +1455,14 @@ gimp_message_literal (Gimp *gimp,
gimp_show_message (gimp, handler, severity, NULL, message); gimp_show_message (gimp, handler, severity, NULL, message);
} }
void
gimp_filter_history_changed (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_signal_emit (gimp, gimp_signals[FILTER_HISTORY_CHANGED], 0);
}
void void
gimp_image_opened (Gimp *gimp, gimp_image_opened (Gimp *gimp,
GFile *file) GFile *file)

View File

@ -76,6 +76,8 @@ struct _Gimp
GimpPlugInManager *plug_in_manager; GimpPlugInManager *plug_in_manager;
GList *filter_history;
GimpContainer *images; GimpContainer *images;
guint32 next_guide_ID; guint32 next_guide_ID;
guint32 next_sample_point_ID; guint32 next_sample_point_ID;
@ -128,99 +130,103 @@ struct _GimpClass
{ {
GimpObjectClass parent_class; GimpObjectClass parent_class;
void (* initialize) (Gimp *gimp, void (* initialize) (Gimp *gimp,
GimpInitStatusFunc status_callback); GimpInitStatusFunc status_callback);
void (* restore) (Gimp *gimp, void (* restore) (Gimp *gimp,
GimpInitStatusFunc status_callback); GimpInitStatusFunc status_callback);
gboolean (* exit) (Gimp *gimp, gboolean (* exit) (Gimp *gimp,
gboolean force); gboolean force);
void (* buffer_changed) (Gimp *gimp); void (* buffer_changed) (Gimp *gimp);
void (* filter_history_changed) (Gimp *gimp);
/* emitted if an image is loaded and opened with a display */ /* emitted if an image is loaded and opened with a display */
void (* image_opened) (Gimp *gimp, void (* image_opened) (Gimp *gimp,
GFile *file); GFile *file);
}; };
GType gimp_get_type (void) G_GNUC_CONST; GType gimp_get_type (void) G_GNUC_CONST;
Gimp * gimp_new (const gchar *name, Gimp * gimp_new (const gchar *name,
const gchar *session_name, const gchar *session_name,
GFile *default_folder, GFile *default_folder,
gboolean be_verbose, gboolean be_verbose,
gboolean no_data, gboolean no_data,
gboolean no_fonts, gboolean no_fonts,
gboolean no_interface, gboolean no_interface,
gboolean use_shm, gboolean use_shm,
gboolean use_cpu_accel, gboolean use_cpu_accel,
gboolean console_messages, gboolean console_messages,
gboolean show_playground, gboolean show_playground,
GimpStackTraceMode stack_trace_mode, GimpStackTraceMode stack_trace_mode,
GimpPDBCompatMode pdb_compat_mode); GimpPDBCompatMode pdb_compat_mode);
void gimp_set_show_gui (Gimp *gimp, void gimp_set_show_gui (Gimp *gimp,
gboolean show_gui); gboolean show_gui);
gboolean gimp_get_show_gui (Gimp *gimp); gboolean gimp_get_show_gui (Gimp *gimp);
void gimp_load_config (Gimp *gimp, void gimp_load_config (Gimp *gimp,
GFile *alternate_system_gimprc, GFile *alternate_system_gimprc,
GFile *alternate_gimprc); GFile *alternate_gimprc);
void gimp_initialize (Gimp *gimp, void gimp_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback); GimpInitStatusFunc status_callback);
void gimp_restore (Gimp *gimp, void gimp_restore (Gimp *gimp,
GimpInitStatusFunc status_callback); GimpInitStatusFunc status_callback);
gboolean gimp_is_restored (Gimp *gimp); gboolean gimp_is_restored (Gimp *gimp);
void gimp_exit (Gimp *gimp, void gimp_exit (Gimp *gimp,
gboolean force); gboolean force);
GList * gimp_get_image_iter (Gimp *gimp); GList * gimp_get_image_iter (Gimp *gimp);
GList * gimp_get_display_iter (Gimp *gimp); GList * gimp_get_display_iter (Gimp *gimp);
GList * gimp_get_image_windows (Gimp *gimp); GList * gimp_get_image_windows (Gimp *gimp);
GList * gimp_get_paint_info_iter (Gimp *gimp); GList * gimp_get_paint_info_iter (Gimp *gimp);
GList * gimp_get_tool_info_iter (Gimp *gimp); GList * gimp_get_tool_info_iter (Gimp *gimp);
void gimp_set_global_buffer (Gimp *gimp, void gimp_set_global_buffer (Gimp *gimp,
GimpBuffer *buffer); GimpBuffer *buffer);
GimpImage * gimp_create_image (Gimp *gimp, GimpImage * gimp_create_image (Gimp *gimp,
gint width, gint width,
gint height, gint height,
GimpImageBaseType type, GimpImageBaseType type,
GimpPrecision precision, GimpPrecision precision,
gboolean attach_comment); gboolean attach_comment);
void gimp_set_default_context (Gimp *gimp, void gimp_set_default_context (Gimp *gimp,
GimpContext *context); GimpContext *context);
GimpContext * gimp_get_default_context (Gimp *gimp); GimpContext * gimp_get_default_context (Gimp *gimp);
void gimp_set_user_context (Gimp *gimp, void gimp_set_user_context (Gimp *gimp,
GimpContext *context); GimpContext *context);
GimpContext * gimp_get_user_context (Gimp *gimp); GimpContext * gimp_get_user_context (Gimp *gimp);
GimpToolInfo * gimp_get_tool_info (Gimp *gimp, GimpToolInfo * gimp_get_tool_info (Gimp *gimp,
const gchar *tool_name); const gchar *tool_name);
void gimp_message (Gimp *gimp, void gimp_message (Gimp *gimp,
GObject *handler, GObject *handler,
GimpMessageSeverity severity, GimpMessageSeverity severity,
const gchar *format, const gchar *format,
...) G_GNUC_PRINTF (4, 5); ...) G_GNUC_PRINTF (4, 5);
void gimp_message_valist (Gimp *gimp, void gimp_message_valist (Gimp *gimp,
GObject *handler, GObject *handler,
GimpMessageSeverity severity, GimpMessageSeverity severity,
const gchar *format, const gchar *format,
va_list args) G_GNUC_PRINTF (4, 0); va_list args) G_GNUC_PRINTF (4, 0);
void gimp_message_literal (Gimp *gimp, void gimp_message_literal (Gimp *gimp,
GObject *handler, GObject *handler,
GimpMessageSeverity severity, GimpMessageSeverity severity,
const gchar *message); const gchar *message);
void gimp_image_opened (Gimp *gimp, void gimp_filter_history_changed (Gimp *gimp);
GFile *file);
GFile * gimp_get_temp_file (Gimp *gimp, void gimp_image_opened (Gimp *gimp,
const gchar *extension); GFile *file);
GFile * gimp_get_temp_file (Gimp *gimp,
const gchar *extension);
#endif /* __GIMP_H__ */ #endif /* __GIMP_H__ */

View File

@ -20,6 +20,8 @@ libappmenus_a_SOURCES = \
dockable-menu.h \ dockable-menu.h \
file-menu.c \ file-menu.c \
file-menu.h \ file-menu.h \
filters-menu.c \
filters-menu.h \
image-menu.c \ image-menu.c \
image-menu.h \ image-menu.h \
plug-in-menus.c \ plug-in-menus.c \

63
app/menus/filters-menu.c Normal file
View File

@ -0,0 +1,63 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "menus-types.h"
#include "core/gimp.h"
#include "core/gimp-filter-history.h"
#include "widgets/gimpuimanager.h"
#include "filters-menu.h"
/* public functions */
void
filters_menu_setup (GimpUIManager *manager,
const gchar *ui_path)
{
guint merge_id;
gint i;
g_return_if_fail (GIMP_IS_UI_MANAGER (manager));
g_return_if_fail (ui_path != NULL);
merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager));
for (i = 0; i < gimp_filter_history_size (manager->gimp); i++)
{
gchar *action_name;
gchar *action_path;
action_name = g_strdup_printf ("filter-recent-%02d", i + 1);
action_path = g_strdup_printf ("%s/Filters/Recently Used/Filters",
ui_path);
gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id,
action_path, action_name, action_name,
GTK_UI_MANAGER_MENUITEM,
FALSE);
g_free (action_name);
g_free (action_path);
}
}

26
app/menus/filters-menu.h Normal file
View File

@ -0,0 +1,26 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FILTERS_MENU_H__
#define __FILTERS_MENU_H__
void filters_menu_setup (GimpUIManager *manager,
const gchar *ui_path);
#endif /* __FILTERS_MENU_H__ */

View File

@ -24,6 +24,7 @@
#include "menus-types.h" #include "menus-types.h"
#include "file-menu.h" #include "file-menu.h"
#include "filters-menu.h"
#include "image-menu.h" #include "image-menu.h"
#include "plug-in-menus.h" #include "plug-in-menus.h"
#include "window-menu.h" #include "window-menu.h"
@ -42,6 +43,7 @@ image_menu_setup (GimpUIManager *manager,
file_menu_setup (manager, ui_path); file_menu_setup (manager, ui_path);
windows_menu_setup (manager, ui_path); windows_menu_setup (manager, ui_path);
plug_in_menus_setup (manager, ui_path); plug_in_menus_setup (manager, ui_path);
filters_menu_setup (manager, ui_path);
path = g_strconcat (ui_path, "/View", NULL); path = g_strconcat (ui_path, "/View", NULL);
window_menu_setup (manager, "view", path); window_menu_setup (manager, "view", path);

View File

@ -98,12 +98,12 @@ plug_in_menus_setup (GimpUIManager *manager,
merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager)); merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager));
for (i = 0; i < manager->gimp->config->plug_in_history_size; i++) for (i = 0; i < manager->gimp->config->filter_history_size; i++)
{ {
gchar *action_name; gchar *action_name;
gchar *action_path; gchar *action_path;
action_name = g_strdup_printf ("plug-in-recent-%02d", i + 1); action_name = g_strdup_printf ("filter-recent-%02d", i + 1);
action_path = g_strdup_printf ("%s/Filters/Recently Used/Plug-Ins", action_path = g_strdup_printf ("%s/Filters/Recently Used/Plug-Ins",
ui_path); ui_path);

View File

@ -48,8 +48,6 @@ libappplug_in_a_SOURCES = \
gimppluginmanager-file.h \ gimppluginmanager-file.h \
gimppluginmanager-help-domain.c \ gimppluginmanager-help-domain.c \
gimppluginmanager-help-domain.h \ gimppluginmanager-help-domain.h \
gimppluginmanager-history.c \
gimppluginmanager-history.h \
gimppluginmanager-locale-domain.c \ gimppluginmanager-locale-domain.c \
gimppluginmanager-locale-domain.h \ gimppluginmanager-locale-domain.h \
gimppluginmanager-menu-branch.c \ gimppluginmanager-menu-branch.c \

View File

@ -1,125 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
*
* gimppluginmanager-history.c
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "libgimpbase/gimpbase.h"
#include "plug-in-types.h"
#include "config/gimpcoreconfig.h"
#include "core/gimp.h"
#include "gimppluginmanager.h"
#include "gimppluginmanager-history.h"
#include "gimppluginprocedure.h"
guint
gimp_plug_in_manager_history_size (GimpPlugInManager *manager)
{
g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), 0);
return MAX (1, manager->gimp->config->plug_in_history_size);
}
guint
gimp_plug_in_manager_history_length (GimpPlugInManager *manager)
{
g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), 0);
return g_slist_length (manager->history);
}
GimpPlugInProcedure *
gimp_plug_in_manager_history_nth (GimpPlugInManager *manager,
guint n)
{
g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), NULL);
return g_slist_nth_data (manager->history, n);
}
void
gimp_plug_in_manager_history_add (GimpPlugInManager *manager,
GimpPlugInProcedure *procedure)
{
GSList *list;
gint history_size;
g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure));
/* return early if the procedure is already at the top */
if (manager->history && manager->history->data == procedure)
return;
history_size = gimp_plug_in_manager_history_size (manager);
manager->history = g_slist_remove (manager->history, procedure);
manager->history = g_slist_prepend (manager->history, procedure);
list = g_slist_nth (manager->history, history_size);
if (list)
{
manager->history = g_slist_remove_link (manager->history, list);
g_slist_free (list);
}
gimp_plug_in_manager_history_changed (manager);
}
void
gimp_plug_in_manager_history_remove (GimpPlugInManager *manager,
GimpPlugInProcedure *procedure)
{
GSList *link;
g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure));
link = g_slist_find (manager->history, procedure);
if (link)
{
manager->history = g_slist_delete_link (manager->history, link);
gimp_plug_in_manager_history_changed (manager);
}
}
void
gimp_plug_in_manager_history_clear (GimpPlugInManager *manager)
{
g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
if (manager->history)
{
g_slist_free (manager->history);
manager->history = NULL;
gimp_plug_in_manager_history_changed (manager);
}
}

View File

@ -1,35 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimppluginmanager-history.h
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_PLUG_IN_MANAGER_HISTORY_H__
#define __GIMP_PLUG_IN_MANAGER_HISTORY_H__
guint gimp_plug_in_manager_history_size (GimpPlugInManager *manager);
guint gimp_plug_in_manager_history_length (GimpPlugInManager *manager);
GimpPlugInProcedure * gimp_plug_in_manager_history_nth (GimpPlugInManager *manager,
guint n);
void gimp_plug_in_manager_history_add (GimpPlugInManager *manager,
GimpPlugInProcedure *procedure);
void gimp_plug_in_manager_history_remove (GimpPlugInManager *manager,
GimpPlugInProcedure *procedure);
void gimp_plug_in_manager_history_clear (GimpPlugInManager *manager);
#endif /* __GIMP_PLUG_IN_MANAGER_HISTORY_H__ */

View File

@ -32,6 +32,7 @@
#include "config/gimpcoreconfig.h" #include "config/gimpcoreconfig.h"
#include "core/gimp.h" #include "core/gimp.h"
#include "core/gimp-filter-history.h"
#include "core/gimp-memsize.h" #include "core/gimp-memsize.h"
#include "core/gimpmarshal.h" #include "core/gimpmarshal.h"
@ -45,7 +46,6 @@
#include "gimppluginmanager.h" #include "gimppluginmanager.h"
#include "gimppluginmanager-data.h" #include "gimppluginmanager-data.h"
#include "gimppluginmanager-help-domain.h" #include "gimppluginmanager-help-domain.h"
#include "gimppluginmanager-history.h"
#include "gimppluginmanager-locale-domain.h" #include "gimppluginmanager-locale-domain.h"
#include "gimppluginmanager-menu-branch.h" #include "gimppluginmanager-menu-branch.h"
#include "gimppluginshm.h" #include "gimppluginshm.h"
@ -59,12 +59,10 @@ enum
PLUG_IN_OPENED, PLUG_IN_OPENED,
PLUG_IN_CLOSED, PLUG_IN_CLOSED,
MENU_BRANCH_ADDED, MENU_BRANCH_ADDED,
HISTORY_CHANGED,
LAST_SIGNAL LAST_SIGNAL
}; };
static void gimp_plug_in_manager_dispose (GObject *object);
static void gimp_plug_in_manager_finalize (GObject *object); static void gimp_plug_in_manager_finalize (GObject *object);
static gint64 gimp_plug_in_manager_get_memsize (GimpObject *object, static gint64 gimp_plug_in_manager_get_memsize (GimpObject *object,
@ -119,17 +117,6 @@ gimp_plug_in_manager_class_init (GimpPlugInManagerClass *klass)
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING); G_TYPE_STRING);
manager_signals[HISTORY_CHANGED] =
g_signal_new ("history-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpPlugInManagerClass,
history_changed),
NULL, NULL,
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->dispose = gimp_plug_in_manager_dispose;
object_class->finalize = gimp_plug_in_manager_finalize; object_class->finalize = gimp_plug_in_manager_finalize;
gimp_object_class->get_memsize = gimp_plug_in_manager_get_memsize; gimp_object_class->get_memsize = gimp_plug_in_manager_get_memsize;
@ -140,16 +127,6 @@ gimp_plug_in_manager_init (GimpPlugInManager *manager)
{ {
} }
static void
gimp_plug_in_manager_dispose (GObject *object)
{
GimpPlugInManager *manager = GIMP_PLUG_IN_MANAGER (object);
gimp_plug_in_manager_history_clear (manager);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void static void
gimp_plug_in_manager_finalize (GObject *object) gimp_plug_in_manager_finalize (GObject *object)
{ {
@ -239,7 +216,6 @@ gimp_plug_in_manager_get_memsize (GimpObject *object,
gimp_object_get_memsize, gimp_object_get_memsize,
gui_size); gui_size);
memsize += gimp_g_slist_get_memsize (manager->plug_in_stack, 0); memsize += gimp_g_slist_get_memsize (manager->plug_in_stack, 0);
memsize += gimp_g_slist_get_memsize (manager->history, 0);
memsize += 0; /* FIXME manager->shm */ memsize += 0; /* FIXME manager->shm */
memsize += gimp_object_get_memsize (GIMP_OBJECT (manager->interpreter_db), memsize += gimp_object_get_memsize (GIMP_OBJECT (manager->interpreter_db),
@ -361,7 +337,7 @@ gimp_plug_in_manager_add_procedure (GimpPlugInManager *manager,
manager->export_procs = g_slist_remove (manager->export_procs, tmp_proc); manager->export_procs = g_slist_remove (manager->export_procs, tmp_proc);
/* and from the history */ /* and from the history */
gimp_plug_in_manager_history_remove (manager, tmp_proc); gimp_filter_history_remove (manager->gimp, tmp_proc);
g_object_unref (tmp_proc); g_object_unref (tmp_proc);
@ -396,8 +372,8 @@ gimp_plug_in_manager_remove_temp_proc (GimpPlugInManager *manager,
manager->plug_in_procedures = g_slist_remove (manager->plug_in_procedures, manager->plug_in_procedures = g_slist_remove (manager->plug_in_procedures,
procedure); procedure);
gimp_plug_in_manager_history_remove (manager, gimp_filter_history_remove (manager->gimp,
GIMP_PLUG_IN_PROCEDURE (procedure)); GIMP_PLUG_IN_PROCEDURE (procedure));
gimp_pdb_unregister_procedure (manager->gimp->pdb, gimp_pdb_unregister_procedure (manager->gimp->pdb,
GIMP_PROCEDURE (procedure)); GIMP_PROCEDURE (procedure));
@ -461,11 +437,3 @@ gimp_plug_in_manager_plug_in_pop (GimpPlugInManager *manager)
else else
manager->current_plug_in = NULL; manager->current_plug_in = NULL;
} }
void
gimp_plug_in_manager_history_changed (GimpPlugInManager *manager)
{
g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
g_signal_emit (manager, manager_signals[HISTORY_CHANGED], 0);
}

View File

@ -55,7 +55,6 @@ struct _GimpPlugInManager
GimpPlugIn *current_plug_in; GimpPlugIn *current_plug_in;
GSList *open_plug_ins; GSList *open_plug_ins;
GSList *plug_in_stack; GSList *plug_in_stack;
GSList *history;
GimpPlugInShm *shm; GimpPlugInShm *shm;
GimpInterpreterDB *interpreter_db; GimpInterpreterDB *interpreter_db;
@ -77,7 +76,6 @@ struct _GimpPlugInManagerClass
GFile *file, GFile *file,
const gchar *menu_path, const gchar *menu_path,
const gchar *menu_label); const gchar *menu_label);
void (* history_changed) (GimpPlugInManager *manager);
}; };
@ -110,7 +108,5 @@ void gimp_plug_in_manager_plug_in_push (GimpPlugInManager *manager,
GimpPlugIn *plug_in); GimpPlugIn *plug_in);
void gimp_plug_in_manager_plug_in_pop (GimpPlugInManager *manager); void gimp_plug_in_manager_plug_in_pop (GimpPlugInManager *manager);
void gimp_plug_in_manager_history_changed (GimpPlugInManager *manager);
#endif /* __GIMP_PLUG_IN_MANAGER_H__ */ #endif /* __GIMP_PLUG_IN_MANAGER_H__ */

View File

@ -642,15 +642,15 @@
<menuitem action="context-colors-swap" /> <menuitem action="context-colors-swap" />
</menu> </menu>
<menu action="plug-in-menu" name="Filters"> <menu action="filters-menu" name="Filters">
<menuitem action="plug-in-repeat" /> <menuitem action="filters-repeat" />
<menuitem action="plug-in-reshow" /> <menuitem action="filters-reshow" />
<menu action="plug-in-recent-menu" name="Recently Used"> <menu action="filters-recent-menu" name="Recently Used">
<placeholder name="Plug-Ins" /> <placeholder name="Filters" />
</menu> </menu>
<menuitem action="plug-in-reset-all" /> <menuitem action="plug-in-reset-all" />
<separator /> <separator />
<menu action="plug-in-blur-menu" name="Blur"> <menu action="filters-blur-menu" name="Blur">
<menuitem action="filters-gaussian-blur" /> <menuitem action="filters-gaussian-blur" />
<menuitem action="filters-pixelize" /> <menuitem action="filters-pixelize" />
<menuitem action="filters-gaussian-blur-selective" /> <menuitem action="filters-gaussian-blur-selective" />
@ -660,14 +660,14 @@
<menuitem action="filters-motion-blur-zoom" /> <menuitem action="filters-motion-blur-zoom" />
</placeholder> </placeholder>
</menu> </menu>
<menu action="plug-in-enhance-menu" name="Enhance"> <menu action="filters-enhance-menu" name="Enhance">
<menuitem action="filters-antialias" /> <menuitem action="filters-antialias" />
<menuitem action="filters-deinterlace" /> <menuitem action="filters-deinterlace" />
<menuitem action="filters-noise-reduction" /> <menuitem action="filters-noise-reduction" />
<menuitem action="filters-red-eye-removal" /> <menuitem action="filters-red-eye-removal" />
<menuitem action="filters-unsharp-mask" /> <menuitem action="filters-unsharp-mask" />
</menu> </menu>
<menu action="plug-in-distorts-menu" name="Distorts"> <menu action="filters-distorts-menu" name="Distorts">
<menuitem action="filters-apply-lens" /> <menuitem action="filters-apply-lens" />
<menuitem action="filters-emboss" /> <menuitem action="filters-emboss" />
<menuitem action="filters-engrave" /> <menuitem action="filters-engrave" />
@ -683,7 +683,7 @@
<menuitem action="filters-whirl-pinch" /> <menuitem action="filters-whirl-pinch" />
<menuitem action="filters-wind" /> <menuitem action="filters-wind" />
</menu> </menu>
<menu action="plug-in-light-shadow-menu" name="Light and Shadow"> <menu action="filters-light-shadow-menu" name="Light and Shadow">
<placeholder name="Light"> <placeholder name="Light">
<menuitem action="filters-supernova" /> <menuitem action="filters-supernova" />
<menuitem action="filters-lens-flare" /> <menuitem action="filters-lens-flare" />
@ -696,7 +696,7 @@
<separator /> <separator />
<placeholder name="Glass" /> <placeholder name="Glass" />
</menu> </menu>
<menu action="plug-in-noise-menu" name="Noise"> <menu action="filters-noise-menu" name="Noise">
<menuitem action="filters-noise-cie-lch" /> <menuitem action="filters-noise-cie-lch" />
<menuitem action="filters-noise-hsv" /> <menuitem action="filters-noise-hsv" />
<menuitem action="filters-noise-hurl" /> <menuitem action="filters-noise-hurl" />
@ -705,20 +705,20 @@
<menuitem action="filters-noise-slur" /> <menuitem action="filters-noise-slur" />
<menuitem action="filters-noise-spread" /> <menuitem action="filters-noise-spread" />
</menu> </menu>
<menu action="plug-in-edge-detect-menu" name="Edge-Detect"> <menu action="filters-edge-detect-menu" name="Edge-Detect">
<menuitem action="filters-difference-of-gaussians" /> <menuitem action="filters-difference-of-gaussians" />
<menuitem action="filters-edge" /> <menuitem action="filters-edge" />
<menuitem action="filters-edge-laplace" /> <menuitem action="filters-edge-laplace" />
<menuitem action="filters-edge-sobel" /> <menuitem action="filters-edge-sobel" />
</menu> </menu>
<menu action="plug-in-generic-menu" name="Generic"> <menu action="filters-generic-menu" name="Generic">
<menuitem action="filters-convolution-matrix" /> <menuitem action="filters-convolution-matrix" />
<menuitem action="filters-distance-map" /> <menuitem action="filters-distance-map" />
<menuitem action="drawable-dilate" /> <menuitem action="drawable-dilate" />
<menuitem action="drawable-erode" /> <menuitem action="drawable-erode" />
</menu> </menu>
<menu action="plug-in-combine-menu" name="Combine" /> <menu action="filters-combine-menu" name="Combine" />
<menu action="plug-in-artistic-menu" name="Artistic"> <menu action="filters-artistic-menu" name="Artistic">
<menuitem action="filters-apply-canvas" /> <menuitem action="filters-apply-canvas" />
<menuitem action="filters-cartoon" /> <menuitem action="filters-cartoon" />
<menuitem action="filters-cubism" /> <menuitem action="filters-cubism" />
@ -727,8 +727,8 @@
<menuitem action="filters-photocopy" /> <menuitem action="filters-photocopy" />
<menuitem action="filters-softglow" /> <menuitem action="filters-softglow" />
</menu> </menu>
<menu action="plug-in-decor-menu" name="Decor" /> <menu action="filters-decor-menu" name="Decor" />
<menu action="plug-in-map-menu" name="Map"> <menu action="filters-map-menu" name="Map">
<menuitem action="filters-bump-map" /> <menuitem action="filters-bump-map" />
<menuitem action="filters-displace" /> <menuitem action="filters-displace" />
<menuitem action="filters-fractal-trace" /> <menuitem action="filters-fractal-trace" />
@ -737,18 +737,18 @@
<menuitem action="filters-tile-paper" /> <menuitem action="filters-tile-paper" />
<menuitem action="filters-tile-seamless" /> <menuitem action="filters-tile-seamless" />
</menu> </menu>
<menu action="plug-in-render-menu" name="Render"> <menu action="filters-render-menu" name="Render">
<menu action="plug-in-render-clouds-menu" name="Clouds" /> <menu action="filters-render-clouds-menu" name="Clouds" />
<menu action="plug-in-render-fractals-menu" name="Fractals" /> <menu action="filters-render-fractals-menu" name="Fractals" />
<menu action="plug-in-render-nature-menu" name="Nature" /> <menu action="filters-render-nature-menu" name="Nature" />
<menu action="plug-in-render-noise-menu" name="Noise"> <menu action="filters-render-noise-menu" name="Noise">
<menuitem action="filters-noise-cell" /> <menuitem action="filters-noise-cell" />
<menuitem action="filters-noise-perlin" /> <menuitem action="filters-noise-perlin" />
<menuitem action="filters-plasma" /> <menuitem action="filters-plasma" />
<menuitem action="filters-noise-simplex" /> <menuitem action="filters-noise-simplex" />
<menuitem action="filters-noise-solid" /> <menuitem action="filters-noise-solid" />
</menu> </menu>
<menu action="plug-in-render-pattern-menu" name="Pattern"> <menu action="filters-render-pattern-menu" name="Pattern">
<menuitem action="filters-checkerboard" /> <menuitem action="filters-checkerboard" />
<menuitem action="filters-diffraction-patterns" /> <menuitem action="filters-diffraction-patterns" />
<menuitem action="filters-grid" /> <menuitem action="filters-grid" />
@ -757,10 +757,10 @@
</menu> </menu>
<separator /> <separator />
</menu> </menu>
<menu action="plug-in-web-menu" name="Web"> <menu action="filters-web-menu" name="Web">
<menuitem action="filters-semi-flatten" /> <menuitem action="filters-semi-flatten" />
</menu> </menu>
<menu action="plug-in-animation-menu" name="Animation" > <menu action="filters-animation-menu" name="Animation" >
<placeholder name="Animators" /> <placeholder name="Animators" />
<separator /> <separator />
</menu> </menu>