[gimp] app: Add a sanity check for required gegl ops.
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Add a sanity check for required gegl ops.
- Date: Tue, 30 Jul 2013 02:41:21 +0000 (UTC)
commit f464695a1b2f777a7208a7ed61a44b6415fa0db8
Author: Michael Henning <drawoc darkrefraction com>
Date: Mon Jul 29 22:35:10 2013 -0400
app: Add a sanity check for required gegl ops.
The check is in place, but the list still needs to be populated.
app/sanity.c | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/app/sanity.c b/app/sanity.c
index 8434c15..d7ac1b2 100644
--- a/app/sanity.c
+++ b/app/sanity.c
@@ -40,6 +40,7 @@ static gchar * sanity_check_freetype (void);
static gchar * sanity_check_gdk_pixbuf (void);
static gchar * sanity_check_babl (void);
static gchar * sanity_check_gegl (void);
+static gchar * sanity_check_gegl_ops (void);
static gchar * sanity_check_filename_encoding (void);
@@ -75,6 +76,9 @@ sanity_check (void)
abort_message = sanity_check_gegl ();
if (! abort_message)
+ abort_message = sanity_check_gegl_ops ();
+
+ if (! abort_message)
abort_message = sanity_check_filename_encoding ();
return abort_message;
@@ -419,6 +423,43 @@ sanity_check_gegl (void)
}
static gchar *
+sanity_check_gegl_ops (void)
+{
+ gchar **operations;
+ guint n_operations;
+ gint i, j;
+
+ static const gchar* required_ops[] = {
+ "gegl:buffer-sink",
+ "gegl:buffer-source"
+ };
+
+ operations = gegl_list_operations (&n_operations);
+ for (i = 0; i < G_N_ELEMENTS (required_ops); i++)
+ {
+ gboolean present = FALSE;
+ for (j = 0; j < n_operations; j++)
+ {
+ if (!strcmp (required_ops[i], operations[j]))
+ {
+ present = TRUE;
+ break;
+ }
+ }
+ if (!present)
+ return g_strdup_printf
+ ("GEGL operation missing!\n\n"
+ "GIMP requires the GEGL operation \"%s\". \n"
+ "This operation cannot be found. Check your \n"
+ "GEGL install and ensure it has been compiled \n"
+ "with any dependencies required for GIMP.\n",
+ required_ops [i]);
+ }
+ g_free (operations);
+ return NULL;
+}
+
+static gchar *
sanity_check_filename_encoding (void)
{
gchar *result;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]