[gimp] app: Add gimp_procedure_name_compare()



commit be91f01291a01f7c242cab6c223b58bb8c8af33c
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu May 5 00:08:37 2011 +0200

    app: Add gimp_procedure_name_compare()

 app/pdb/gimpprocedure.c |    8 ++++++++
 app/pdb/gimpprocedure.h |    4 ++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c
index 59f1b36..cd8b6f2 100644
--- a/app/pdb/gimpprocedure.c
+++ b/app/pdb/gimpprocedure.c
@@ -579,6 +579,14 @@ gimp_procedure_create_override (GimpProcedure   *procedure,
   return new_procedure;
 }
 
+gint
+gimp_procedure_name_compare (GimpProcedure *proc1,
+                             GimpProcedure *proc2)
+{
+  /* Assume there always is a name, don't bother with NULL checks */
+  return strcmp (proc1->original_name,
+                 proc2->original_name);
+}
 
 /*  private functions  */
 
diff --git a/app/pdb/gimpprocedure.h b/app/pdb/gimpprocedure.h
index 01863bb..9b3b476 100644
--- a/app/pdb/gimpprocedure.h
+++ b/app/pdb/gimpprocedure.h
@@ -140,5 +140,9 @@ void            gimp_procedure_execute_async      (GimpProcedure    *procedure,
                                                    GimpObject       *display,
                                                    GError          **error);
 
+gint            gimp_procedure_name_compare       (GimpProcedure    *proc1,
+                                                   GimpProcedure    *proc2);
+
+
 
 #endif  /*  __GIMP_PROCEDURE_H__  */



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