Bug 589674 – "Send by Email" does not update "Filename"

Remove a conditional so that, in interactive mode, the Send by E-mail
feature always uses the name of the file as the default file field
value, instead of using the previously entered value of the field.
This commit is contained in:
Christopher Howard 2009-07-27 17:08:50 -08:00 committed by Martin Nordholts
parent 9c4a2ab4ea
commit 9cddfeba73
1 changed files with 10 additions and 11 deletions

View File

@ -232,19 +232,18 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
gimp_get_data (PLUG_IN_PROC, &mail_info);
if (! strlen (mail_info.filename))
{
gchar *filename = gimp_image_get_filename (image_ID);
{
gchar *filename = gimp_image_get_filename (image_ID);
if (filename)
{
gchar *basename = g_path_get_basename (filename);
if (filename)
{
gchar *basename = g_path_get_basename (filename);
g_strlcpy (mail_info.filename, basename, BUFFER_SIZE);
g_free (basename);
g_free (filename);
}
}
g_strlcpy (mail_info.filename, basename, BUFFER_SIZE);
g_free (basename);
g_free (filename);
}
}
if (! save_dialog ())
status = GIMP_PDB_CANCEL;