[gimp-gap] fixes for #660443, #659447 and build with gimp-2.7.x
- From: Wolfgang Hofer <wolfgangh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-gap] fixes for #660443, #659447 and build with gimp-2.7.x
- Date: Sun, 2 Oct 2011 09:38:18 +0000 (UTC)
commit 6ad20524198e35c3735b2097192f91d1d0f186ab
Author: Wolfgang Hofer <wolfgangh svn gnome org>
Date: Sun Oct 2 11:36:03 2011 +0200
fixes for #660443, #659447 and build with gimp-2.7.x
ChangeLog | 23 ++++++++++++
gap/Makefile.am | 4 +-
gap/gap_morph_tween_dialog.c | 67 +++++++++++++++++++++++++---------
libgapbase/gap_base.c | 3 +-
vid_common/gap_cme_gui.c | 4 ++-
vid_enc_ffmpeg/gap_enc_ffmpeg_main.c | 10 ++++-
6 files changed, 87 insertions(+), 24 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 88a89b3..d327377 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2011-10-02 Wolfgang Hofer <hof gimp org>
+
+- explicitly link with libm (patch provided by Ismail Donmez <idonmez suse com>. #660443)
+- added plural handling for several strings as suggested in #659447
+- include the public visible header (libgimpwidgets/gimpwidgets.h)
+ instead of the private headers gimpwidgetstypes.h gimphelpui.h
+ (this fix is required to build GIMP-GAP for GIMP-2.7.x or latest GIT versions
+ note that GIMP-GAP is still backwards compatible to GIMP-2.6.x versions)
+- Disabled Tween frame morphing in case called on a single frame image
+ (and show information "This operation requires more than one frame."
+ in the dialog window)
+
+
+ * libgapbase/gap_base.c
+ * vid_enc_ffmpeg/gap_enc_ffmpeg_main.c
+ * vid_common/gap_cme_gui.c
+ * gap/gap_morph_tween_dialog.c
+ * gap/Makefile.am
+
+
+
+
+
2011-09-18 Wolfgang Hofer <hof gimp org>
- fixed configure / compile problems in MinGW environment
diff --git a/gap/Makefile.am b/gap/Makefile.am
old mode 100755
new mode 100644
index 26620f1..0ff839b
--- a/gap/Makefile.am
+++ b/gap/Makefile.am
@@ -455,7 +455,7 @@ AM_LDFLAGS = $(mwindows)
LDADD = $(GIMP_LIBS)
-gap_plugins_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
+gap_plugins_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS) -lm
gap_movepath_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
gap_bluebox_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
gap_colormask_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
@@ -464,7 +464,7 @@ gap_fmac_LDADD = $(GAPVIDEOAPI) $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_
gap_fmac_varying_LDADD = $(GAPVIDEOAPI) $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
gap_frontends_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
gap_decode_mplayer_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
-gap_morph_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
+gap_morph_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS) -lm
gap_name2layer_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
gap_navigator_dialog_LDADD = $(LIBGIMPGAP) $(LIBGAPBASE) $(GIMP_LIBS)
gap_player_LDADD = $(GAPVIDEOAPI) $(WAVPLAYCLIENT) ${LIBGAPSTORY} $(LIBGAPBASE) $(GIMP_LIBS)
diff --git a/gap/gap_morph_tween_dialog.c b/gap/gap_morph_tween_dialog.c
index 5d92aca..e85562b 100644
--- a/gap/gap_morph_tween_dialog.c
+++ b/gap/gap_morph_tween_dialog.c
@@ -1059,6 +1059,8 @@ gap_morph_frame_tweens_dialog(GapAnimInfo *ainfo_ptr, GapMorphGlobalParams *mgpp
GtkWidget *progressBar;
gint row;
gboolean isFrameMissing;
+ gboolean isOpertionPossible;
+ gint missingFrames;
mgpp->range_from = ainfo_ptr->curr_frame_nr;
mgpp->range_to = ainfo_ptr->frame_nr_after_curr_frame_nr;
@@ -1068,6 +1070,7 @@ gap_morph_frame_tweens_dialog(GapAnimInfo *ainfo_ptr, GapMorphGlobalParams *mgpp
mtg->morph_filesel = NULL;
mtg->ret = -1;
isFrameMissing = FALSE;
+ isOpertionPossible = TRUE;
p_check_workpoint_file_and_use_single_fade_if_missing(mgpp);
@@ -1077,6 +1080,12 @@ gap_morph_frame_tweens_dialog(GapAnimInfo *ainfo_ptr, GapMorphGlobalParams *mgpp
mgpp->range_to = ainfo_ptr->last_frame_nr;
}
+ missingFrames = (mgpp->range_to - mgpp->range_from) -1;
+ if (missingFrames < 0)
+ {
+ isOpertionPossible = FALSE;
+ }
+
if(gap_debug)
{
printf("gap_morph_frame_tweens_dialog: mgpp->range_from%d mgpp->range_to:%d first:%d, curr:%d, last:%d after_curr:%d\n"
@@ -1092,7 +1101,9 @@ gap_morph_frame_tweens_dialog(GapAnimInfo *ainfo_ptr, GapMorphGlobalParams *mgpp
gimp_ui_init (GAP_MORPH_TWEEN_PLUGIN_NAME, TRUE);
- dialog = gimp_dialog_new (_("Create Tween Frames"), GAP_MORPH_TWEEN_PLUGIN_NAME,
+ if (isOpertionPossible)
+ {
+ dialog = gimp_dialog_new (_("Create Tween Frames"), GAP_MORPH_TWEEN_PLUGIN_NAME,
NULL, 0,
gimp_standard_help_func, GAP_MORPH_TWEEN_HELP_ID,
@@ -1100,6 +1111,17 @@ gap_morph_frame_tweens_dialog(GapAnimInfo *ainfo_ptr, GapMorphGlobalParams *mgpp
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
+ }
+ else
+ {
+ dialog = gimp_dialog_new (_("Create Tween Frames"), GAP_MORPH_TWEEN_PLUGIN_NAME,
+ NULL, 0,
+ gimp_standard_help_func, GAP_MORPH_TWEEN_HELP_ID,
+
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+
+ NULL);
+ }
mtg->shell = dialog;
@@ -1138,27 +1160,38 @@ gap_morph_frame_tweens_dialog(GapAnimInfo *ainfo_ptr, GapMorphGlobalParams *mgpp
GTK_FILL, GTK_FILL, 4, 0);
gtk_widget_show (label);
- if (isFrameMissing)
+ if (isOpertionPossible)
{
- char *msg;
- msg = g_strdup_printf(_("this operation creates %d missing frames between frame %d and %d")
- ,(int)(mgpp->range_to - mgpp->range_from) -1
- ,(int)mgpp->range_from
- ,(int)mgpp->range_to
- );
- label = gtk_label_new (msg);
- g_free(msg);
- mgpp->overwrite_flag = FALSE;
+ if (isFrameMissing)
+ {
+ char *msg;
+ msg = g_strdup_printf(ngettext("This operation creates %d missing frame between frame %d and %d"
+ ,"this operation creates %d missing frames between frame %d and %d"
+ ,(int)missingFrames)
+ ,(int)missingFrames
+ ,(int)mgpp->range_from
+ ,(int)mgpp->range_to
+ );
+ label = gtk_label_new (msg);
+ g_free(msg);
+ mgpp->overwrite_flag = FALSE;
+ }
+ else
+ {
+ label = gtk_label_new (_("This operation creates copies of all frames in the specified range\n"
+ "and the specifed number of tweens as additional tween frames\n"
+ "between all the processed frames in the specified subdirectory.\n"
+ "Provide workpointfiles (one per frame) for morphing based tween rendering\n"
+ "(this can be done with the Morph Workpoint Generator)"));
+ mgpp->overwrite_flag = TRUE;
+ }
}
else
{
- label = gtk_label_new (_("this operation creates copies of all frames in the specified range\n"
- "and the specifed number of tweens as additional tween frames\n"
- "between all the processed frames in the specified subdirectory.\n"
- "Provide workpointfiles (one per frame) for morphing based tween rendering\n"
- "(this can be done with the Morph Workpoint Generator)"));
- mgpp->overwrite_flag = TRUE;
+ label = gtk_label_new (_("This operation requires more than one frame."));
+ mgpp->overwrite_flag = FALSE;
}
+
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 1, 3, row, row + 1,
GTK_FILL, GTK_FILL, 4, 0);
diff --git a/libgapbase/gap_base.c b/libgapbase/gap_base.c
index 82a0d6a..a2ebd63 100644
--- a/libgapbase/gap_base.c
+++ b/libgapbase/gap_base.c
@@ -51,8 +51,7 @@
/* GIMP includes */
#include "gtk/gtk.h"
#include "libgimp/gimp.h"
-#include <libgimpwidgets/gimpwidgetstypes.h>
-#include <libgimpwidgets/gimphelpui.h>
+#include <libgimpwidgets/gimpwidgets.h>
#ifdef G_OS_WIN32
#include <io.h>
diff --git a/vid_common/gap_cme_gui.c b/vid_common/gap_cme_gui.c
index 70fbc5c..bae848c 100644
--- a/vid_common/gap_cme_gui.c
+++ b/vid_common/gap_cme_gui.c
@@ -975,7 +975,9 @@ p_update_aud_info (GapCmeGlobalParams *gpp
* valid_playlist_references holds the number of valid tracks
* (where samplerate matches the desired samplerate and bits == 16)
*/
- g_snprintf(txt, sizeof(txt), _("List[%d] has [%d] valid tracks, Bit:%d Chan:%d Rate:%d")
+ g_snprintf(txt, sizeof(txt), ngettext("List[%d] has [%d] valid track, Bit:%d Chan:%d Rate:%d"
+ , "List[%d] has [%d] valid tracks, Bit:%d Chan:%d Rate:%d"
+ , (int)valid_playlist_references )
, (int)all_playlist_references
, (int)valid_playlist_references
, (int)bits
diff --git a/vid_enc_ffmpeg/gap_enc_ffmpeg_main.c b/vid_enc_ffmpeg/gap_enc_ffmpeg_main.c
index 8e5f7db..8f89160 100644
--- a/vid_enc_ffmpeg/gap_enc_ffmpeg_main.c
+++ b/vid_enc_ffmpeg/gap_enc_ffmpeg_main.c
@@ -1862,9 +1862,15 @@ p_open_audio_input_files(t_awk_array *awp, GapGveFFMpegGlobalParams *gpp)
}
else
{
- g_message(_("The file: %s\n"
+ g_message(ngettext("The file: %s\n"
"contains too many audio-input tracks\n"
- "(only %d tracks are used, the rest are ignored).")
+ "(only %d track is used, the rest is ignored)."
+
+ ,"The file: %s\n"
+ "contains too many audio-input tracks\n"
+ "(only %d tracks are used, the rest is ignored)."
+
+ , (int) MAX_AUDIO_STREAMS)
, gpp->val.audioname1
, (int) MAX_AUDIO_STREAMS
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]