diff --git a/plug-ins/file-webp/file-webp-dialog.c b/plug-ins/file-webp/file-webp-dialog.c index 7f8aff1f1a..213798b99b 100644 --- a/plug-ins/file-webp/file-webp-dialog.c +++ b/plug-ins/file-webp/file-webp-dialog.c @@ -127,7 +127,7 @@ save_dialog (WebPSaveParams *params, /* Create the descriptive label at the top */ text = g_strdup_printf ("%s", _("WebP Options")); label = gtk_label_new (NULL); - gtk_label_set_markup(GTK_LABEL(label), text); + gtk_label_set_markup (GTK_LABEL(label), text); g_free (text); gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); @@ -227,7 +227,6 @@ save_dialog (WebPSaveParams *params, { GtkWidget *animation_box; GtkWidget *animation_box2; - GtkWidget *animation_label; GtkWidget *loop_anim_checkbox; GtkWidget *animation_expander; GtkWidget *animation_frame; diff --git a/plug-ins/file-webp/file-webp-save.c b/plug-ins/file-webp/file-webp-save.c index ea072e0ad2..c38d8b6f22 100644 --- a/plug-ins/file-webp/file-webp-save.c +++ b/plug-ins/file-webp/file-webp-save.c @@ -407,11 +407,15 @@ parse_ms_tag (const gchar *str) } static gint -get_layer_delay(gint32 layer) +get_layer_delay (gint32 layer) { - gchar *layer_name = gimp_item_get_name (layer); - gint delay_ms = parse_ms_tag (layer_name); + gchar *layer_name; + gint delay_ms; + + layer_name = gimp_item_get_name (layer); + delay_ms = parse_ms_tag (layer_name); g_free (layer_name); + return delay_ms; } diff --git a/plug-ins/file-webp/file-webp.c b/plug-ins/file-webp/file-webp.c index 0247e61586..3daa0edbf6 100644 --- a/plug-ins/file-webp/file-webp.c +++ b/plug-ins/file-webp/file-webp.c @@ -86,8 +86,8 @@ query (void) { GIMP_PDB_INT32, "exif", "Toggle saving exif data (0/1)" }, { GIMP_PDB_INT32, "iptc", "Toggle saving iptc data (0/1)" }, { GIMP_PDB_INT32, "xmp", "Toggle saving xmp data (0/1)" }, - { GIMP_PDB_INT32, "delay", "Delay to use when timestamp are not available or forced" }, - { GIMP_PDB_INT32, "force-delay", "Toggle to for delay" } + { GIMP_PDB_INT32, "delay", "Delay to use when timestamps are not available or forced" }, + { GIMP_PDB_INT32, "force-delay", "Force delay on all frames" } }; gimp_install_procedure (LOAD_PROC, @@ -188,9 +188,21 @@ run (const gchar *name, { case GIMP_RUN_WITH_LAST_VALS: case GIMP_RUN_INTERACTIVE: - /* Possibly retrieve data */ + /* Default settings. */ + params.lossless = FALSE; + params.animation = FALSE; + params.loop = TRUE; + params.quality = 90.0f; + params.alpha_quality = 100.0f; + params.exif = TRUE; + params.iptc = TRUE; + params.xmp = TRUE; + params.delay = 200; + params.force_delay = FALSE; + /* Possibly override with session data */ gimp_get_data (SAVE_PROC, ¶ms); - params.preset = g_strdup ("default"); /* can't serialize strings, so restore default */ + /* can't serialize strings, so restore default */ + params.preset = g_strdup ("default"); export = gimp_export_image (&image_ID, &drawable_ID, "WebP", GIMP_EXPORT_CAN_HANDLE_RGB | @@ -203,7 +215,6 @@ run (const gchar *name, { values[0].data.d_status = GIMP_PDB_CANCEL; status = GIMP_PDB_CANCEL; - break; } break; @@ -248,7 +259,7 @@ run (const gchar *name, if (status != GIMP_PDB_SUCCESS) { - g_free(params.preset); + g_free (params.preset); g_free (layers); return; }