Commit 6541c6b8 authored by Michael Natterer's avatar Michael Natterer 😴

app: add icons to the generated gimp-gegl-config-proxy classes

parent 7b009c69
......@@ -243,6 +243,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure *procedure,
GimpContainer *container;
settings = gimp_gegl_get_config_proxy (procedure->original_name,
gimp_viewable_get_icon_name (GIMP_VIEWABLE (procedure)),
GIMP_TYPE_SETTINGS);
container = gimp_gegl_get_config_container (G_TYPE_FROM_INSTANCE (settings));
......
......@@ -30,6 +30,7 @@
#include "core/gimplist.h"
#include "core/gimpparamspecs-duplicate.h"
#include "core/gimpviewable.h"
#include "gimp-gegl-config-proxy.h"
#include "gimp-gegl-utils.h"
......@@ -192,11 +193,13 @@ gimp_gegl_config_config_iface_init (GimpConfigInterface *iface)
GimpObject *
gimp_gegl_get_config_proxy (const gchar *operation,
const gchar *icon_name,
GType parent_type)
{
GType config_type;
g_return_val_if_fail (operation != NULL, NULL);
g_return_val_if_fail (icon_name != NULL, NULL);
g_return_val_if_fail (g_type_is_a (parent_type, GIMP_TYPE_OBJECT), NULL);
if (! config_types)
......@@ -248,6 +251,15 @@ gimp_gegl_get_config_proxy (const gchar *operation,
g_type_add_interface_static (config_type, GIMP_TYPE_CONFIG,
&config_info);
if (g_type_is_a (config_type, GIMP_TYPE_VIEWABLE))
{
GimpViewableClass *viewable_class = g_type_class_ref (config_type);
viewable_class->default_icon_name = g_strdup (icon_name);
g_type_class_unref (viewable_class);
}
g_hash_table_insert (config_types,
g_strdup (operation),
(gpointer) config_type);
......
......@@ -20,6 +20,7 @@
GimpObject * gimp_gegl_get_config_proxy (const gchar *operation,
const gchar *icon_name,
GType parent_type);
GimpContainer * gimp_gegl_get_config_container (GType config_type);
......
......@@ -247,6 +247,7 @@ gimp_operation_tool_get_operation (GimpImageMapTool *im_tool,
if (tool->operation)
*config = G_OBJECT (gimp_gegl_get_config_proxy (tool->operation,
tool->icon_name,
GIMP_TYPE_SETTINGS));
if (tool->undo_desc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment