gimp r26878 - in trunk: . app/tools
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26878 - in trunk: . app/tools
- Date: Fri, 5 Sep 2008 17:11:48 +0000 (UTC)
Author: neo
Date: Fri Sep 5 17:11:48 2008
New Revision: 26878
URL: http://svn.gnome.org/viewvc/gimp?rev=26878&view=rev
Log:
2008-09-05 Sven Neumann <sven gimp org>
* app/tools/gimpgegltool.c: added a blacklist of operations that
should not be shown. We may want to add more operations here.
Modified:
trunk/ChangeLog
trunk/app/tools/gimpgegltool.c
Modified: trunk/app/tools/gimpgegltool.c
==============================================================================
--- trunk/app/tools/gimpgegltool.c (original)
+++ trunk/app/tools/gimpgegltool.c Fri Sep 5 17:11:48 2008
@@ -221,29 +221,48 @@
g_free (pspecs);
}
-/* Builds a GList of the class structures of all subtypes
- * of type.
+static gboolean
+gimp_gegl_tool_operation_blacklisted (const gchar *name)
+{
+ static const gchar * const blacklist[] = { "introspect" };
+
+ gint i;
+
+ for (i = 0; i < G_N_ELEMENTS (blacklist); i++)
+ {
+ if (strcmp (name, blacklist[i]) == 0)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+/* Builds a GList of the class structures of all subtypes of type.
*/
static GList *
gimp_get_subtype_classes (GType type,
GList *classes)
{
- GObjectClass *klass;
- GType *ops;
- guint n_ops;
- gint i;
+ GeglOperationClass *klass;
+ GType *ops;
+ guint n_ops;
+ gint i;
- if (!type)
+ if (! type)
return classes;
- klass = g_type_class_ref (type);
+ klass = GEGL_OPERATION_CLASS (g_type_class_ref (type));
ops = g_type_children (type, &n_ops);
/* only add classes which have a name, this avoids
* the abstract base classes
*/
- if (GEGL_OPERATION_CLASS (klass)->name)
- classes = g_list_prepend (classes, klass);
+ if (klass->name)
+ {
+ if (! gimp_gegl_tool_operation_blacklisted (klass->name))
+ classes = g_list_prepend (classes, klass);
+ }
for (i = 0; i < n_ops; i++)
classes = gimp_get_subtype_classes (ops[i], classes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]