GIMP plugin: sync with master of GIMP repo
This commit is contained in:
@@ -35,9 +35,6 @@ struct _FileFormat
|
|||||||
const gchar *load_help;
|
const gchar *load_help;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define N_(s) s
|
|
||||||
#define _(s) s
|
|
||||||
|
|
||||||
static const FileFormat file_formats[] =
|
static const FileFormat file_formats[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@@ -20,18 +20,16 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
|
|
||||||
#include <libgimp/gimp.h>
|
#include <libgimp/gimp.h>
|
||||||
#include <libgimp/gimpui.h>
|
|
||||||
|
|
||||||
//#include "libgimp/stdplugins-intl.h"
|
#include "libgimp/stdplugins-intl.h"
|
||||||
|
|
||||||
#include "file-formats.h"
|
#include "file-formats.h"
|
||||||
|
|
||||||
@@ -39,6 +37,7 @@
|
|||||||
#define LOAD_THUMB_PROC "file-rawtherapee-load-thumb"
|
#define LOAD_THUMB_PROC "file-rawtherapee-load-thumb"
|
||||||
|
|
||||||
|
|
||||||
|
static void init (void);
|
||||||
static void query (void);
|
static void query (void);
|
||||||
static void run (const gchar *name,
|
static void run (const gchar *name,
|
||||||
gint nparams,
|
gint nparams,
|
||||||
@@ -55,7 +54,7 @@ static gint32 load_thumbnail_image (const gchar *filename,
|
|||||||
|
|
||||||
const GimpPlugInInfo PLUG_IN_INFO =
|
const GimpPlugInInfo PLUG_IN_INFO =
|
||||||
{
|
{
|
||||||
NULL, /* init_proc */
|
init, /* init_proc */
|
||||||
NULL, /* quit_proc */
|
NULL, /* quit_proc */
|
||||||
query, /* query proc */
|
query, /* query proc */
|
||||||
run, /* run_proc */
|
run, /* run_proc */
|
||||||
@@ -65,7 +64,7 @@ MAIN ()
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
query (void)
|
init (void)
|
||||||
{
|
{
|
||||||
static const GimpParamDef load_args[] =
|
static const GimpParamDef load_args[] =
|
||||||
{
|
{
|
||||||
@@ -168,6 +167,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 rawtherapee 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
|
static void
|
||||||
run (const gchar *name,
|
run (const gchar *name,
|
||||||
gint nparams,
|
gint nparams,
|
||||||
@@ -182,7 +192,7 @@ run (const gchar *name,
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
// INIT_I18N ();
|
INIT_I18N ();
|
||||||
|
|
||||||
run_mode = param[0].data.d_int32;
|
run_mode = param[0].data.d_int32;
|
||||||
|
|
||||||
@@ -278,7 +288,7 @@ load_image (const gchar *filename,
|
|||||||
if (g_spawn_sync (NULL,
|
if (g_spawn_sync (NULL,
|
||||||
argv,
|
argv,
|
||||||
NULL,
|
NULL,
|
||||||
// G_SPAWN_STDOUT_TO_DEV_NULL |
|
/*G_SPAWN_STDOUT_TO_DEV_NULL |*/
|
||||||
G_SPAWN_STDERR_TO_DEV_NULL |
|
G_SPAWN_STDERR_TO_DEV_NULL |
|
||||||
G_SPAWN_SEARCH_PATH,
|
G_SPAWN_SEARCH_PATH,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -293,7 +303,7 @@ load_image (const gchar *filename,
|
|||||||
gimp_image_set_filename (image_ID, filename);
|
gimp_image_set_filename (image_ID, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (rawtherapee_stdout) printf ("%s\n", rawtherapee_stdout);
|
/*if (rawtherapee_stdout) printf ("%s\n", rawtherapee_stdout);*/
|
||||||
g_free (rawtherapee_stdout);
|
g_free (rawtherapee_stdout);
|
||||||
|
|
||||||
g_unlink (filename_out);
|
g_unlink (filename_out);
|
||||||
@@ -312,9 +322,7 @@ load_thumbnail_image (const gchar *filename,
|
|||||||
gint32 image_ID = -1;
|
gint32 image_ID = -1;
|
||||||
gchar *filename_out = gimp_temp_name ("jpg");
|
gchar *filename_out = gimp_temp_name ("jpg");
|
||||||
gchar *thumb_pp3 = gimp_temp_name ("pp3");
|
gchar *thumb_pp3 = gimp_temp_name ("pp3");
|
||||||
gchar *size = g_strdup_printf ("%d", thumb_size);
|
|
||||||
FILE *thumb_pp3_f = fopen (thumb_pp3, "w");
|
FILE *thumb_pp3_f = fopen (thumb_pp3, "w");
|
||||||
gboolean pp3_ok = FALSE;
|
|
||||||
gchar *rawtherapee_stdout = NULL;
|
gchar *rawtherapee_stdout = NULL;
|
||||||
const char *pp3_content =
|
const char *pp3_content =
|
||||||
"[Version]\n"
|
"[Version]\n"
|
||||||
|
Reference in New Issue
Block a user