[gimp] app: use the proper public GEGL API to get to the op's description



commit f77b599c5514bebde758f7a5d3c3012c78a7e418
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 20 17:34:04 2013 +0200

    app: use the proper public GEGL API to get to the op's description
    
    and use existing GIMP action API to set the tooltip.

 app/actions/filters-actions.c |   24 +++++-------------------
 1 files changed, 5 insertions(+), 19 deletions(-)
---
diff --git a/app/actions/filters-actions.c b/app/actions/filters-actions.c
index 85650f8..3d28f6e 100644
--- a/app/actions/filters-actions.c
+++ b/app/actions/filters-actions.c
@@ -219,27 +219,13 @@ filters_actions_setup (GimpActionGroup *group)
   for (i = 0; i < G_N_ELEMENTS (filters_actions); i++)
     {
       const GimpStringActionEntry *entry = &filters_actions[i];
-      GtkAction                   *action;
-      GType                        op_type;
+      const gchar                 *description;
 
-      action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
-                                            entry->name);
+      description = gegl_operation_get_key (entry->value, "description");
 
-      op_type = gegl_operation_gtype_from_name (entry->value);
-
-      if (action && op_type)
-        {
-          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);
-        }
+      if (description)
+        gimp_action_group_set_action_tooltip (group, entry->name,
+                                              description);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]