mirror of https://github.com/GNOME/gimp.git
Revert "app: add a "Filters > Generic > GEGL Operations" submenu with generated actions."
This reverts commit 747cbf70db
.
This commit is contained in:
parent
39942c1260
commit
dc25c2bc97
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp-filter.h"
|
||||
#include "core/gimp-filter-history.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayermask.h"
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "operations/gimpoperationsettings.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-filter.h"
|
||||
#include "core/gimp-filter-history.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-filter.h"
|
||||
#include "core/gimp-filter-history.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
|
|
@ -54,8 +54,8 @@ libappcore_a_sources = \
|
|||
gimp-data-factories.h \
|
||||
gimp-edit.c \
|
||||
gimp-edit.h \
|
||||
gimp-filter.c \
|
||||
gimp-filter.h \
|
||||
gimp-filter-history.c \
|
||||
gimp-filter-history.h \
|
||||
gimp-gradients.c \
|
||||
gimp-gradients.h \
|
||||
gimp-gui.c \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimp-filter.c
|
||||
* 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
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include "config/gimpcoreconfig.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimp-filter.h"
|
||||
#include "gimp-filter-history.h"
|
||||
|
||||
#include "pdb/gimpprocedure.h"
|
||||
|
||||
|
@ -143,40 +143,6 @@ gimp_filter_history_clear (Gimp *gimp)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_filter_gegl_ops_add (Gimp *gimp,
|
||||
const gchar *action_name,
|
||||
const gchar *op_name)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (action_name != NULL);
|
||||
g_return_if_fail (op_name != NULL);
|
||||
|
||||
g_hash_table_replace (gimp->filter_gegl_ops, g_strdup (action_name), g_strdup (op_name));
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gimp_filter_gegl_ops_get (Gimp *gimp,
|
||||
const gchar *action_name)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (action_name != NULL, NULL);
|
||||
|
||||
return g_hash_table_lookup (gimp->filter_gegl_ops, action_name);
|
||||
}
|
||||
|
||||
GList *
|
||||
gimp_filter_gegl_ops_list (Gimp *gimp)
|
||||
{
|
||||
GList *actions;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
actions = g_hash_table_get_keys (gimp->filter_gegl_ops);
|
||||
|
||||
return g_list_sort (actions, (GCompareFunc) g_strcmp0);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimp-filter.h
|
||||
* 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
|
||||
|
@ -17,8 +17,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP__FILTER_H__
|
||||
#define __GIMP__FILTER_H__
|
||||
#ifndef __GIMP_FILTER_HISTORY_H__
|
||||
#define __GIMP_FILTER_HISTORY_H__
|
||||
|
||||
|
||||
gint gimp_filter_history_size (Gimp *gimp);
|
||||
|
@ -31,12 +31,5 @@ void gimp_filter_history_remove (Gimp *gimp,
|
|||
GimpProcedure *procedure);
|
||||
void gimp_filter_history_clear (Gimp *gimp);
|
||||
|
||||
void gimp_filter_gegl_ops_add (Gimp *gimp,
|
||||
const gchar *action_name,
|
||||
const gchar *op_name);
|
||||
const gchar * gimp_filter_gegl_ops_get (Gimp *gimp,
|
||||
const gchar *action_name);
|
||||
GList * gimp_filter_gegl_ops_list (Gimp *gimp);
|
||||
|
||||
|
||||
#endif /* __GIMP__FILTER_H__ */
|
||||
#endif /* __GIMP_FILTER_HISTORY_H__ */
|
|
@ -47,7 +47,7 @@
|
|||
#include "gimp.h"
|
||||
#include "gimp-contexts.h"
|
||||
#include "gimp-data-factories.h"
|
||||
#include "gimp-filter.h"
|
||||
#include "gimp-filter-history.h"
|
||||
#include "gimp-memsize.h"
|
||||
#include "gimp-modules.h"
|
||||
#include "gimp-parasites.h"
|
||||
|
@ -303,8 +303,6 @@ gimp_constructed (GObject *object)
|
|||
gimp->plug_in_manager = gimp_plug_in_manager_new (gimp);
|
||||
gimp->pdb = gimp_pdb_new (gimp);
|
||||
|
||||
gimp->filter_gegl_ops = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
|
||||
|
||||
xcf_init (gimp);
|
||||
file_data_init (gimp);
|
||||
|
||||
|
@ -436,8 +434,6 @@ gimp_finalize (GObject *object)
|
|||
if (gimp->module_db)
|
||||
gimp_modules_exit (gimp);
|
||||
|
||||
g_hash_table_unref (gimp->filter_gegl_ops);
|
||||
|
||||
gimp_paint_exit (gimp);
|
||||
|
||||
g_clear_object (&gimp->parasites);
|
||||
|
@ -490,7 +486,6 @@ gimp_get_memsize (GimpObject *object,
|
|||
(GimpMemsizeFunc)
|
||||
gimp_object_get_memsize,
|
||||
gui_size);
|
||||
/* TODO: get memsize of gimp->filter_gegl_ops */
|
||||
|
||||
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->image_table), 0);
|
||||
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->item_table), 0);
|
||||
|
|
|
@ -83,7 +83,6 @@ struct _Gimp
|
|||
GimpPlugInManager *plug_in_manager;
|
||||
|
||||
GList *filter_history;
|
||||
GHashTable *filter_gegl_ops; /* Map generated action names to GEGL operation names. */
|
||||
|
||||
GimpContainer *images;
|
||||
guint32 next_guide_id;
|
||||
|
|
|
@ -30,7 +30,7 @@ libappcore_sources = [
|
|||
'gimp-contexts.c',
|
||||
'gimp-data-factories.c',
|
||||
'gimp-edit.c',
|
||||
'gimp-filter.c',
|
||||
'gimp-filter-history.c',
|
||||
'gimp-gradients.c',
|
||||
'gimp-gui.c',
|
||||
'gimp-internal-data.c',
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "config/gimpdisplayconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-filter.h"
|
||||
#include "core/gimp-filter-history.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-pick-item.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "menus-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-filter.h"
|
||||
#include "core/gimp-filter-history.h"
|
||||
|
||||
#include "widgets/gimpuimanager.h"
|
||||
|
||||
|
@ -36,7 +36,6 @@ void
|
|||
filters_menu_setup (GimpUIManager *manager,
|
||||
const gchar *ui_path)
|
||||
{
|
||||
GList *actions;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (GIMP_IS_UI_MANAGER (manager));
|
||||
|
@ -53,10 +52,4 @@ filters_menu_setup (GimpUIManager *manager,
|
|||
|
||||
g_free (action_name);
|
||||
}
|
||||
|
||||
actions = gimp_filter_gegl_ops_list (manager->gimp);
|
||||
for (GList *iter = actions; iter; iter = iter->next)
|
||||
gimp_ui_manager_add_ui (manager, "/Filters/Generic/GEGL Operations",
|
||||
iter->data, NULL, FALSE);
|
||||
g_list_free (actions);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "config/gimpcoreconfig.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-filter.h"
|
||||
#include "core/gimp-filter-history.h"
|
||||
#include "core/gimp-memsize.h"
|
||||
#include "core/gimpmarshal.h"
|
||||
|
||||
|
|
|
@ -97,6 +97,12 @@ gimp_gegl_tool_class_init (GimpGeglToolClass *klass)
|
|||
tool_class->control = gimp_gegl_tool_control;
|
||||
|
||||
filter_tool_class->dialog = gimp_gegl_tool_dialog;
|
||||
|
||||
/* Store the mapping from tool identifier to operation name.
|
||||
* This data is leaking, otherwise we'd have to register a dynamic type with a
|
||||
* class_finalize() class method.
|
||||
**/
|
||||
klass->generated_ops = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -45,6 +45,8 @@ struct _GimpGeglTool
|
|||
struct _GimpGeglToolClass
|
||||
{
|
||||
GimpOperationToolClass parent_class;
|
||||
|
||||
GHashTable *generated_ops;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -605,9 +605,6 @@
|
|||
<item><attribute name="action">app.tools-measure</attribute></item>
|
||||
<item><attribute name="action">app.tools-zoom</attribute></item>
|
||||
</section>
|
||||
<section>
|
||||
<item><attribute name="action">app.tools-gegl</attribute></item>
|
||||
</section>
|
||||
<section>
|
||||
<item><attribute name="action">app.dialogs-toolbox</attribute></item>
|
||||
<item><attribute name="action">app.context-colors-default</attribute></item>
|
||||
|
@ -714,15 +711,11 @@
|
|||
<attribute name="label" translatable="yes" context="filters-action">_Generic</attribute>
|
||||
<item><attribute name="action">app.filters-convolution-matrix</attribute></item>
|
||||
<item><attribute name="action">app.filters-distance-map</attribute></item>
|
||||
<item><attribute name="action">app.tools-gegl</attribute></item>
|
||||
<item><attribute name="action">app.filters-gegl-graph</attribute></item>
|
||||
<item><attribute name="action">app.filters-normal-map</attribute></item>
|
||||
<item><attribute name="action">app.filters-dilate</attribute></item>
|
||||
<item><attribute name="action">app.filters-erode</attribute></item>
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes" context="filters-action">_GEGL Operations</attribute>
|
||||
<section>
|
||||
<item><attribute name="action">app.filters-gegl-graph</attribute></item>
|
||||
</section>
|
||||
</submenu>
|
||||
</submenu>
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes" context="filters-action">C_ombine</attribute>
|
||||
|
|
Loading…
Reference in New Issue