[gimp] plug-ins: Change MNG capability from LAYERS_AS_ANIMATION to LAYERS
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: Change MNG capability from LAYERS_AS_ANIMATION to LAYERS
- Date: Tue, 16 Feb 2010 19:00:54 +0000 (UTC)
commit ac1baa5374b92423d618dbba46dd97addf9a7fd7
Author: Martin Nordholts <martinn src gnome org>
Date: Tue Feb 16 08:45:57 2010 +0100
plug-ins: Change MNG capability from LAYERS_AS_ANIMATION to LAYERS
When NULL is passed as format_name to gimp_export_image(), there is no
dialog where the user can make choices. Having the capability
GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION in this case in practice
means "always merge". So to allow MNG animations, change to just
GIMP_EXPORT_CAN_HANDLE_LAYERS. We don't need to offer merging in the
export options since MNG is a format explicitly for animation, so if
there are enough layers, we'll always export as an animation.
Also set a tooltip explaining why the animation options are disabled
when they are disabled.
plug-ins/common/file-mng.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index 4ce53e0..8c4a76d 100644
--- a/plug-ins/common/file-mng.c
+++ b/plug-ins/common/file-mng.c
@@ -1499,7 +1499,16 @@ mng_save_dialog (gint32 image_id)
gtk_widget_show (vbox);
gtk_widget_show (frame);
- gtk_widget_set_sensitive (frame, num_layers > 1);
+ if (num_layers <= 1)
+ {
+ gtk_widget_set_sensitive (frame, FALSE);
+ gimp_help_set_help_data (frame,
+ _("These options are only available when "
+ "the exported image has more than one "
+ "layer. The image you are exporting only has "
+ "one layer."),
+ NULL);
+ }
gtk_widget_show (main_vbox);
gtk_widget_show (dialog);
@@ -1592,7 +1601,7 @@ run (const gchar *name,
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
- GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION));
+ GIMP_EXPORT_CAN_HANDLE_LAYERS));
}
if (export == GIMP_EXPORT_CANCEL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]