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 731177 - Only add signature to draft once
Only add signature to draft once
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: composer
master
Other Linux
: Normal normal
: 0.8.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-03 21:32 UTC by Jim Nelson
Modified: 2014-06-10 19:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't add signature on drafts (998 bytes, patch)
2014-06-05 04:43 UTC, Gustavo Rubio
none Details | Review

Description Jim Nelson 2014-06-03 21:32:38 UTC
If the user has configured a signature, composes a new message, saves the draft, then opens the draft for editing, the signature is added again.  The signature should only be added when creating a new message.
Comment 1 Gustavo Rubio 2014-06-05 04:42:35 UTC
Jim, just pulled from master. Did a really quick fix although I'm not sure if that is the way to go.

I see a is_referred_draft boolean on the ComposerWidget constructor which I'm guessing is what is used to tell the widget whether this is a draft or not, so basically I just check if it that is true or false besides checking for the use_signature property which we used before, if is_referred_draft is true then we don't call add_signature.

So if using that constructor property is the right approach please let me know. I also see an EmailFlags object in Geary.Email.email_flags which we could use to call obj.email_flags.is_draft() but I'm not sure.

I'm attaching the patch that is applicable to master.

Thanks!
Comment 2 Gustavo Rubio 2014-06-05 04:43:40 UTC
Created attachment 277921 [details] [review]
Don't add signature on drafts

Don't add signature when composer widget is displayed for drafts.
Comment 3 Jim Nelson 2014-06-10 19:39:22 UTC
Looks good to me!

Pushed to master, commit 2cdec7