applied GAP patches


--Sven
This commit is contained in:
Sven Neumann 2000-02-07 18:40:20 +00:00
parent fbf464bea0
commit 743aaa7dee
9 changed files with 1024 additions and 916 deletions

View File

@ -1,3 +1,13 @@
Mon Feb 7 19:26:26 CET 2000 Sven Neumann <sven@gimp.org>
* app/gimphelp.c: fixed one of those errors you only notice if
you have glib compiled w/o debugging (fixes bug #6006).
* plug-ins/gap/gap_decode_mpeg_main.c
* plug-ins/gap/gap_exchange_image.c
* plug-ins/gap/gap_pdb_calls.[ch]: applied patches from
Wolfgang Hofer <hof@hotbot.com>
Mon Feb 7 17:37:40 GMT 2000 Nick Lamb <njl195@zepler.org.uk>
* plug-ins/gdyntext/font_selection.c:

View File

@ -80,7 +80,10 @@ gimp_idle_help (gpointer help_data)
help_data = g_strdup ("welcome.html");
#ifdef DEBUG_HELP
g_print ("Help Page: %s\n", (gchar *) help_data);
if (help_data)
g_print ("Help Page: %s\n", (gchar *) help_data);
else
g_print ("Help Page: NULL\n");
#endif /* DEBUG_HELP */
switch (help_browser)

View File

@ -80,7 +80,10 @@ gimp_idle_help (gpointer help_data)
help_data = g_strdup ("welcome.html");
#ifdef DEBUG_HELP
g_print ("Help Page: %s\n", (gchar *) help_data);
if (help_data)
g_print ("Help Page: %s\n", (gchar *) help_data);
else
g_print ("Help Page: NULL\n");
#endif /* DEBUG_HELP */
switch (help_browser)

View File

@ -58,6 +58,7 @@
/*
* Changelog:
*
* 2000/02/07 v1.1.16a: hof: replaced sprintf by g_strdup_printf
* 2000/01/06 v1.1.14a: hof: save thumbnails .xvpics p_gimp_file_save_thumbnail
* store framerate in video_info file
* 1999/11/25 v1.1.11.b: Initial release. [hof]
@ -210,7 +211,6 @@ run (char *name,
char l_filename[500];
int l_par;
image_ID = -1;
*nreturn_vals = 1;
*return_vals = values;
@ -357,6 +357,7 @@ MPEG_frame_period_ms(gint mpeg_rate_code, char *basename)
vin_ptr = p_get_video_info(basename);
l_rc = 0;
l_framerate = 24.0;
switch(mpeg_rate_code)
{
case 1: l_rc = 44; l_framerate = 23.976; break;
@ -382,10 +383,12 @@ MPEG_frame_period_ms(gint mpeg_rate_code, char *basename)
}
static void
p_build_gap_framename(char *framename, gint32 frame_nr, char *basename, char *ext)
static char *
p_build_gap_framename(gint32 frame_nr, char *basename, char *ext)
{
sprintf(framename, "%s%04d.%s", basename, (int)frame_nr, ext);
char *framename;
framename = g_strdup_printf("%s%04d.%s", basename, (int)frame_nr, ext);
return(framename);
}
static gint32
@ -412,8 +415,8 @@ load_image (char *filename,
/* mpeg structure */
ImageDesc img;
gchar layername[200]; /* FIXME? */
gchar framename[500];
gchar *layername = NULL;
gchar *framename = NULL;
first_image_ID = -1;
l_overwrite_mode = 0;
@ -423,7 +426,7 @@ load_image (char *filename,
printf("Error: file %s not found\n", filename);
return (-1);
}
p_build_gap_framename(framename, first_frame, basename, "xcf");
framename = p_build_gap_framename(first_frame, basename, "xcf");
temp = g_malloc (strlen (filename) + 16);
if (!temp) gimp_quit ();
@ -481,7 +484,8 @@ load_image (char *filename,
framenumber = 1;
while (moreframes)
{
p_build_gap_framename(framename, framenumber, basename, "xcf");
g_free(framename);
framename = p_build_gap_framename(framenumber, basename, "xcf");
if (last_frame > 0)
{
gimp_progress_update ((gdouble)framenumber / (gdouble)last_frame );
@ -525,16 +529,17 @@ load_image (char *filename,
}
if (delay > 0)
sprintf(layername, "Frame %d (%dms)",
layername = g_strdup_printf("Frame %d (%dms)",
framenumber, delay);
else
sprintf(layername, "Frame %d",
layername = g_strdup_printf("Frame %d",
framenumber);
layer_ID = gimp_layer_new (image_ID, layername,
wwidth,
wheight,
RGBA_IMAGE, 100, NORMAL_MODE);
g_free(layername);
gimp_image_add_layer (image_ID, layer_ID, 0);
gimp_layer_set_visible(layer_ID, l_visible);
drawable = gimp_drawable_get (layer_ID);

View File

@ -5,7 +5,7 @@
*
* basic anim functions:
* This Plugin drops the content of the destination
* image (all layers,channels & guides)
* image (all layers,channels, paths, parasites & guides)
* and then moves (steal) the content of a source image to dst. image
*
*/
@ -28,6 +28,7 @@
*/
/* revision history:
* 1.1.16a 2000/02/05 hof: handle path lockedstaus and image unit
* 1.1.15b 2000/01/30 hof: handle image specific parasites
* 1.1.15a 2000/01/25 hof: stopped gimp 1.0.x support (removed p_copy_content)
* handle pathes
@ -296,6 +297,8 @@ p_steal_content(gint32 dst_image_id, gint32 src_image_id)
{
p_gimp_path_set_points(dst_image_id, l_path_names[l_idx],
l_path_type, l_num_points, l_path_points);
p_gimp_path_set_locked(dst_image_id, l_path_names[l_idx],
p_gimp_path_get_locked(src_image_id, l_path_names[l_idx]));
}
if(l_path_points) g_free(l_path_points);
@ -335,7 +338,10 @@ p_steal_content(gint32 dst_image_id, gint32 src_image_id)
g_free(l_parasite_names[l_idx]);
}
g_free(l_parasite_names);
/* copy the image unit */
gimp_image_set_unit(dst_image_id,
gimp_image_get_unit(src_image_id));
l_rc = 0;

View File

@ -23,6 +23,7 @@
*/
/* revision history:
* version 1.1.16a; 2000/02/05 hof: path lockedstaus
* version 1.1.15b; 2000/01/30 hof: image parasites
* version 1.1.15a; 2000/01/26 hof: pathes
* removed old gimp 1.0.x PDB Interfaces
@ -639,7 +640,8 @@ p_gimp_file_save_thumbnail(gint32 image_id, char* filename)
*/
gint
p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height, unsigned char **th_data)
p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height,
gint32 *th_data_count, unsigned char **th_data)
{
static char *l_called_proc = "gimp_file_load_thumbnail";
GParam *return_vals;
@ -655,7 +657,8 @@ p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height,
{
*th_width = return_vals[1].data.d_int32;
*th_height = return_vals[2].data.d_int32;
*th_data = (unsigned char *)return_vals[3].data.d_int8array;
*th_data_count = return_vals[3].data.d_int32;
*th_data = (unsigned char *)return_vals[4].data.d_int8array;
return (0); /* OK */
}
printf("GAP: Error: PDB call of %s failed\n", l_called_proc);
@ -867,6 +870,58 @@ p_gimp_path_set_current(gint32 image_id, char *name)
return(-1);
} /* end p_gimp_path_set_current */
/* ============================================================================
* p_gimp_path_get_locked
*
* ============================================================================
*/
gint32
p_gimp_path_get_locked(gint32 image_id, gchar *name)
{
static gchar *l_called_proc = "gimp_path_get_locked";
GParam *return_vals;
int nreturn_vals;
return_vals = gimp_run_procedure (l_called_proc,
&nreturn_vals,
PARAM_IMAGE, image_id,
PARAM_STRING, name,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
return(return_vals[1].data.d_int32); /* OK */
}
printf("GAP: Error: PDB call of %s failed\n", l_called_proc);
return(FALSE);
} /* end p_gimp_path_get_locked */
/* ============================================================================
* p_gimp_path_set_locked
*
* ============================================================================
*/
gint
p_gimp_path_set_locked(gint32 image_id, gchar *name, gint32 lockstatus)
{
static gchar *l_called_proc = "gimp_path_set_locked";
GParam *return_vals;
int nreturn_vals;
return_vals = gimp_run_procedure (l_called_proc,
&nreturn_vals,
PARAM_IMAGE, image_id,
PARAM_STRING, name,
PARAM_INT32, lockstatus,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
return(0); /* OK */
}
printf("GAP: Error: PDB call of %s failed\n", l_called_proc);
return(-1);
} /* end p_gimp_path_set_locked */
/* ============================================================================
* p_gimp_image_parasite_list
@ -913,10 +968,7 @@ p_alloc_video_info_name(char *basename)
return(NULL);
}
l_len = strlen(basename);
l_str = g_malloc(l_len+8);
sprintf(l_str, "%svin.gap", basename);
l_str = g_strdup_printf("%svin.gap", basename);
return(l_str);
}

View File

@ -21,6 +21,7 @@
*/
/* revision history:
* version 1.1.16a; 2000/02/05 hof: path lockedstaus
* version 1.1.15b; 2000/01/30 hof: image parasites
* version 1.1.15a; 2000/01/26 hof: pathes, removed gimp 1.0.x support
* version 1.1.14a; 2000/01/06 hof: thumbnail save/load,
@ -66,7 +67,7 @@ gint p_gimp_drawable_set_image(gint32 drawable_id, gint32 image_id);
char* p_gimp_gimprc_query(char *key);
gint p_gimp_file_save_thumbnail(gint32 image_id, char* filename);
gint p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height, unsigned char **th_data);
gint p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height, gint32 *th_data_count, unsigned char **th_data);
gint p_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
gint32 *th_width, gint32 *th_height, gint32 *th_bpp,
@ -84,6 +85,8 @@ gint p_gimp_path_delete(gint32 image_id, char *name);
char **p_gimp_path_list(gint32 image_id, gint32 *num_paths);
gint p_gimp_path_set_current(gint32 image_id, char *name);
char *p_gimp_path_get_current(gint32 image_id);
gint32 p_gimp_path_get_locked(gint32 image_id, gchar *name);
gint p_gimp_path_set_locked(gint32 image_id, gchar *name, gint32 lockstatus);
gchar** p_gimp_image_parasite_list (gint32 image_id, gint32 *num_parasites);

View File

@ -1,3 +1,9 @@
Mon Feb 7 18:50:25 CET 2000 Sven Neumann <sven@gimp.org>
* de.po: msgmerge managed to make the translation for a menu
path a help text of several lines. This crashed the gimp on
startup (bug #5590). Updated while I was on it.
Mon Feb 7 01:18:33 CET 2000 Sven Neumann <sven@gimp.org>
* en_GB.po: removed fuzzy comment from header

File diff suppressed because it is too large Load Diff