[gimp] plug-ins: move conditional gimp_install_procedure() of file-darktable...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: move conditional gimp_install_procedure() of file-darktable...
- Date: Tue, 27 Jun 2017 20:47:26 +0000 (UTC)
commit 5ee96b174132721a251d8702336257b601accb54
Author: Jehan <jehan girinstud io>
Date: Tue Jun 27 22:45:31 2017 +0200
plug-ins: move conditional gimp_install_procedure() of file-darktable...
... to init().
Otherwise presence of darktable is not checked at every startup.
plug-ins/file-darktable/file-darktable.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/file-darktable/file-darktable.c b/plug-ins/file-darktable/file-darktable.c
index 77dac25..f32d38c 100644
--- a/plug-ins/file-darktable/file-darktable.c
+++ b/plug-ins/file-darktable/file-darktable.c
@@ -42,6 +42,7 @@
static gchar *get_executable_path (const gchar *suffix,
gboolean *search_path);
+static void init (void);
static void query (void);
static void run (const gchar *name,
gint nparams,
@@ -60,7 +61,7 @@ static gint32 load_thumbnail_image (const gchar *filename,
const GimpPlugInInfo PLUG_IN_INFO =
{
- NULL, /* init_proc */
+ init, /* init_proc */
NULL, /* quit_proc */
query, /* query proc */
run, /* run_proc */
@@ -126,7 +127,7 @@ get_executable_path (const gchar *suffix,
}
static void
-query (void)
+init (void)
{
static const GimpParamDef load_args[] =
{
@@ -241,6 +242,17 @@ query (void)
}
static void
+query (void)
+{
+ /* query() is run only the first time for efficiency. Yet this plugin
+ * is dependent on the presence of darktable which may be installed
+ * or uninstalled between GIMP startups. Therefore we should move the
+ * usual gimp_install_procedure() to init() so that the check is done
+ * at every startup instead.
+ */
+}
+
+static void
run (const gchar *name,
gint nparams,
const GimpParam *param,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]