After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589674 - "Send by Email" does not update "Filename"
"Send by Email" does not update "Filename"
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.6.6
Other All
: Normal minor
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-07-25 06:24 UTC by Colin Brace
Modified: 2009-08-01 16:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Possible quick fix (1.61 KB, patch)
2009-07-28 01:27 UTC, Christopher Howard
committed Details | Review

Description Colin Brace 2009-07-25 06:24:17 UTC
I use the "Send by Email" feature (it is a plugin, right?) to submit photos to Flickr. It works well for this, but there are some shortcomings with regard to the way it handles user data.

First and foremost: when this feature is first evoked in a new Gimp session, it correctly supplies the current file name. However, when it is subsequently evoked, it always supplies the previously used file name. This is unhelpful. Every time the "Send by Email" is called, it should supply the *current* file name.

Second, and of lesser importance, it would be useful if this plugin remembered the "To" and "From" fields between Gimp sessions, as this data, at least in my case, tends not to change.

Thanks.



Other information:
Comment 1 Christopher Howard 2009-07-28 00:03:53 UTC
I am using the latest (or nearly latest) GIMP for the git master branch, and it does this for me as well. I am running on a Linux system.

Since this does not seem to be version specific, somebody should probably change "Version" to git-master.

I'm not an official git developer, but I'll take a look at the code and try to figure out more.
Comment 2 Christopher Howard 2009-07-28 01:27:13 UTC
Created attachment 139343 [details] [review]
Possible quick fix

This patch provides a quick fix for the first problem you mentioned. Previously the mail code was set so that, in interactive mode, it would only use the name of the current file for the default field value /if/ no previous value had been entered. Otherwise, it uses the previous value entered.

This patch modifies it so that the default field value is /always/ the name of the file.

However, this could be considered a negative thing in another possible world. That is, if a person /wanted/ all the files e-mailed out to be some other name than the file name (e.g., sprite_001, sprite_002, etc.) he might find it annoying that the program /did not/ use the previously entered value.

There are probably several ways to fix this so that both groups are kept happy. E.g., the code could be changed so that it only uses the previously entered value if it detects that the user has modified it from the actual filename. But I would want to get more input from the developers about what they want before I spent time trying to implement something like that.
Comment 3 Michael Schumacher 2009-07-28 08:29:43 UTC
You should open a thread on the gimp-developer mailing list to get the input.
Comment 4 Colin Brace 2009-07-28 20:09:31 UTC
(In reply to comment #2)

> However, this could be considered a negative thing in another possible world.
> That is, if a person /wanted/ all the files e-mailed out to be some other name
> than the file name 

I didn't realize until I read the above that the correct filename doesn't need to be entered in this field for the plugin to work. I naively thought that this field needed to match the filename on disk, and so I kept entering this manually. I just tested this and obviously it isn't the case.

At this point, it isn't important for me that this is fixed, since, in the case of Flickr, it uses its own internal filenames, and it uses the Subject line as the title of the picture. So, as I now realize, one can safely ignore this field

Still, the current behaviour is slightly disconcerting, and perhaps not particularly intuitive from a human interface point of view.
Comment 5 Martin Nordholts 2009-08-01 09:37:33 UTC
In GIMP 2.6, the filename determines how the file is exported. It is clearly better to always use the current image name. Thanks for the commit, I've pushed it to master and gimp-2-6:

commit 9cddfeba7353187cc9fc6557133d8ab31ffc5dc5
Author: Christopher Howard <choward@indicium.us>
Date:   Mon Jul 27 17:08:50 2009 -0800

    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.

 plug-ins/common/mail.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

Regarding remembering To and From across sessions, that's bug #63610. The Send by Email stuff needs to be reconsidered for 2.8, but that's outside of the scope of this bug report. Closing as FIXED.
Comment 6 Michael Natterer 2009-08-01 13:38:52 UTC
The code should use g_filename_display_filename() so it will work on
non-utf8 filenames. Reopening as reminder, will commit a fix tonight
unless somebody is faster.
Comment 7 Michael Natterer 2009-08-01 16:44:16 UTC
Done.

commit f712a316dfde34facdc604a29e082bc54882a83f
Author: Michael Natterer <mitch@gimp.org>
Date:   Sat Aug 1 18:39:18 2009 +0200

    Bug 589674 – "Send by Email" does not update "Filename"
    
    Use g_filename_display_basename() so it doesn't choke on non-utf8
    filenames.