[gimp] plug-ins: merge file-rawtherapee/ into file-raw/
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: merge file-rawtherapee/ into file-raw/
- Date: Mon, 24 Jul 2017 18:59:07 +0000 (UTC)
commit 87438c885a3c42acab9a0a3e0e5f97c55fc29fbb
Author: Michael Natterer <mitch gimp org>
Date: Mon Jul 24 20:58:25 2017 +0200
plug-ins: merge file-rawtherapee/ into file-raw/
and use the same file-formats.h
configure.ac | 1 -
plug-ins/Makefile.am | 1 -
plug-ins/file-raw/Makefile.am | 18 +-
.../file-rawtherapee.c | 33 ++-
plug-ins/file-rawtherapee/.gitignore | 7 -
plug-ins/file-rawtherapee/Makefile.am | 32 --
plug-ins/file-rawtherapee/file-formats.h | 313 --------------------
po-plug-ins/POTFILES.in | 3 +-
8 files changed, 42 insertions(+), 366 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0538b51..84de0aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2523,7 +2523,6 @@ plug-ins/file-ico/Makefile
plug-ins/file-jpeg/Makefile
plug-ins/file-psd/Makefile
plug-ins/file-raw/Makefile
-plug-ins/file-rawtherapee/Makefile
plug-ins/file-sgi/Makefile
plug-ins/file-tiff/Makefile
plug-ins/file-webp/Makefile
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 2351b33..8b45df8 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -41,7 +41,6 @@ SUBDIRS = \
file-jpeg \
file-psd \
file-raw \
- file-rawtherapee \
file-sgi \
file-tiff \
$(file_webp) \
diff --git a/plug-ins/file-raw/Makefile.am b/plug-ins/file-raw/Makefile.am
index 10ff53b..72f59de 100644
--- a/plug-ins/file-raw/Makefile.am
+++ b/plug-ins/file-raw/Makefile.am
@@ -12,6 +12,7 @@ endif
# if HAVE_WINDRES
# include $(top_srcdir)/build/windows/gimprc-plug-ins.rule
# file_darktable_RC = file-darktable.rc.o
+# file_rawtherapee_RC = file-rawtherapee.rc.o
# endif
AM_LDFLAGS = $(mwindows)
@@ -24,12 +25,18 @@ AM_CPPFLAGS = \
$(GTK_CFLAGS) \
$(GEGL_CFLAGS)
-libexec_PROGRAMS = file-darktable
+libexec_PROGRAMS = \
+ file-darktable \
+ file-rawtherapee
file_darktable_SOURCES = \
file-darktable.c \
file-formats.h
+file_rawtherapee_SOURCES = \
+ file-rawtherapee.c \
+ file-formats.h
+
file_darktable_LDADD = \
$(libgimp) \
$(libgimpbase) \
@@ -39,6 +46,15 @@ file_darktable_LDADD = \
$(INTLLIBS) \
$(file_darktable_RC)
+file_rawtherapee_LDADD = \
+ $(libgimp) \
+ $(libgimpbase) \
+ $(CAIRO_LIBS) \
+ $(GEGL_LIBS) \
+ $(RT_LIBS) \
+ $(INTLLIBS) \
+ $(file_rawtherapee_RC)
+
filerawdata_DATA = \
file-darktable-export-on-exit.lua \
file-darktable-get-size.lua
diff --git a/plug-ins/file-rawtherapee/file-rawtherapee.c b/plug-ins/file-raw/file-rawtherapee.c
similarity index 92%
rename from plug-ins/file-rawtherapee/file-rawtherapee.c
rename to plug-ins/file-raw/file-rawtherapee.c
index d78c30a..a032d72 100644
--- a/plug-ins/file-rawtherapee/file-rawtherapee.c
+++ b/plug-ins/file-raw/file-rawtherapee.c
@@ -140,10 +140,17 @@ init (void)
for (i = 0; i < G_N_ELEMENTS (file_formats); i++)
{
const FileFormat *format = &file_formats[i];
+ gchar *load_proc;
+ gchar *load_blurb;
+ gchar *load_help;
- gimp_install_procedure (format->load_proc,
- format->load_blurb,
- format->load_help,
+ load_proc = g_strdup_printf (format->load_proc_format, "rawtherapee");
+ load_blurb = g_strdup_printf (format->load_blurb_format, "rawtherapee");
+ load_help = g_strdup_printf (format->load_help_format, "rawtherapee");
+
+ gimp_install_procedure (load_proc,
+ load_blurb,
+ load_help,
"Alberto Griggio",
"Alberto Griggio",
"2017",
@@ -154,15 +161,19 @@ init (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
- gimp_register_file_handler_mime (format->load_proc,
+ gimp_register_file_handler_mime (load_proc,
format->mime_type);
- gimp_register_file_handler_raw (format->load_proc);
- gimp_register_magic_load_handler (format->load_proc,
+ gimp_register_file_handler_raw (load_proc);
+ gimp_register_magic_load_handler (load_proc,
format->extensions,
"",
format->magic);
- gimp_register_thumbnail_loader (format->load_proc, LOAD_THUMB_PROC);
+ gimp_register_thumbnail_loader (load_proc, LOAD_THUMB_PROC);
+
+ g_free (load_proc);
+ g_free (load_blurb);
+ g_free (load_help);
}
}
@@ -204,9 +215,13 @@ run (const gchar *name,
/* check if the format passed is actually supported & load */
for (i = 0; i < G_N_ELEMENTS (file_formats); i++)
{
- const FileFormat *format = &file_formats[i];
+ const FileFormat *format = &file_formats[i];
+ gchar *load_proc = NULL;
+
+ if (format->load_proc_format)
+ load_proc = g_strdup_printf (format->load_proc_format, "rawtherapee");
- if (format->load_proc && ! strcmp (name, format->load_proc))
+ if (load_proc && ! strcmp (name, load_proc))
{
image_ID = load_image (param[1].data.d_string, run_mode, &error);
diff --git a/po-plug-ins/POTFILES.in b/po-plug-ins/POTFILES.in
index 59a31c7..d61748f 100644
--- a/po-plug-ins/POTFILES.in
+++ b/po-plug-ins/POTFILES.in
@@ -118,8 +118,7 @@ plug-ins/file-psd/psd-util.c
plug-ins/file-psd/psd.c
plug-ins/file-raw/file-darktable.c
plug-ins/file-raw/file-formats.h
-plug-ins/file-rawtherapee/file-formats.h
-plug-ins/file-rawtherapee/file-rawtherapee.c
+plug-ins/file-raw/file-rawtherapee.c
plug-ins/file-sgi/sgi.c
plug-ins/file-tiff/file-tiff.c
plug-ins/file-tiff/file-tiff-load.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]