mirror of https://github.com/GNOME/gimp.git
app: use the proper public GEGL API to get to the op's description
and use existing GIMP action API to set the tooltip.
This commit is contained in:
parent
8e823ec655
commit
f77b599c55
|
@ -219,27 +219,13 @@ filters_actions_setup (GimpActionGroup *group)
|
||||||
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];
|
||||||
GtkAction *action;
|
const gchar *description;
|
||||||
GType op_type;
|
|
||||||
|
|
||||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
description = gegl_operation_get_key (entry->value, "description");
|
||||||
entry->name);
|
|
||||||
|
|
||||||
op_type = gegl_operation_gtype_from_name (entry->value);
|
if (description)
|
||||||
|
gimp_action_group_set_action_tooltip (group, entry->name,
|
||||||
if (action && op_type)
|
description);
|
||||||
{
|
|
||||||
GeglOperationClass *op_class;
|
|
||||||
const gchar *description;
|
|
||||||
|
|
||||||
op_class = g_type_class_ref (op_type);
|
|
||||||
|
|
||||||
description = gegl_operation_class_get_key (op_class, "description");
|
|
||||||
|
|
||||||
gtk_action_set_tooltip (action, description);
|
|
||||||
|
|
||||||
g_type_class_unref (op_class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue