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 530335 - Allow Reply to selected address only
Allow Reply to selected address only
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.2.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: Rathin
Evolution QA team
: 653879 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-04-28 11:20 UTC by Kandepu Prasad
Modified: 2013-09-13 01:04 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Reply to any recipient of the mail by right clicking on that address & then Select "Send Reply To..." option (8.40 KB, patch)
2011-05-05 10:42 UTC, Rathin
needs-work Details | Review
Made the necessary changes, does the patch look good now? (8.46 KB, patch)
2011-06-14 05:10 UTC, Rathin
needs-work Details | Review
Patch modified according to your suggestions. (8.00 KB, patch)
2011-06-14 10:13 UTC, Rathin
reviewed Details | Review

Description Kandepu Prasad 2008-04-28 11:20:49 UTC
Downstream bug
https://bugzilla.novell.com/show_bug.cgi?id=352196

Summary:
Sometimes I get an email sent to multiple addressees.  If I want my reply to go
to only one of those addressees, (say the person is a cc'ed addressee) I have
to hit reply, remove all addresses and manually enter the correct addressee. 
Or, my other option is to reply all, delete the "To" addressee and move the
"CC" addressee to the "To" field.

Suggestion: There are options if you right-click any of the addressees in an
email.  Add a new option to "Reply to for this address only."
Comment 1 Rathin 2011-05-05 10:42:14 UTC
Created attachment 187271 [details] [review]
Reply to any recipient of the mail by right clicking on that address & then Select "Send Reply To..." option
Comment 2 Punit Jain 2011-05-17 15:47:18 UTC
Review of attachment 187271 [details] [review]:

Patch looks good for me.
Comment 3 Punit Jain 2011-05-17 15:47:19 UTC
Review of attachment 187271 [details] [review]:

Patch looks good for me.
Comment 4 Milan Crha 2011-05-27 13:47:35 UTC
Nope, it has memory management issues. You cannot allocate an object in e_mail_reader_reply_to_message() and do not unref it. You neither may unref it in get_recipient_cia(), as the caller will use freed memory afterwards.

What is the 'cia', by the way? Could you give it less cryptic name, please?
Comment 5 Rathin 2011-06-14 05:10:01 UTC
Created attachment 189871 [details] [review]
Made the necessary changes, does the patch look good now?
Comment 6 Milan Crha 2011-06-14 06:02:38 UTC
Thanks for the update. I guess you didn't get my complain about memory management, because the patch contains one of those above mentioned and couple other as well. 

a) You still call g_object_unref() in get_recipient_address(). You shouldn't do that. Use other way of indicating an error state.

b) there are coding style issues with the added 'if' in
e_mail_reader_reply_to_message()

c) Calling g_object_unref() on a NULL object produces a runtime warning, thus never do that.

d) do not unref 'address' in em_utils_reply_to_message(), the caller is responsible for its freeing (it's usually NULL, and the two whom are passing in an address pointer are unreffing it on their own, thus you introduced a double-free here)

I still didn't run the patch, these are only sever issues I see with the patch while reading it.
Comment 7 Rathin 2011-06-14 10:13:41 UTC
Created attachment 189886 [details] [review]
Patch modified according to your suggestions.

a) I removed the function get_recipient_address() and added it directly inline within the if block itself.

b) Fixed the coding style issues in if block

c) The g_object_unref() is only called for a valid address value and not for a NULL object

d) Removed the g_object_unref(address); statement in em_utils_reply_to_message() so that free'ing is done only once for it.

Please do comment if there are any other issues to be addressed.
Comment 8 Milan Crha 2011-06-14 12:24:33 UTC
Thanks for a quick update. It's almost it, the only thing is in e_mail_reader_reply_to_message(), the first unref of the 'address' variable, it should set the 'addresss' to NULL too, to not unref it below in the function again. I did this little change for you, and I also changed it slightly to not panic when something goes wrong (the same function, those g_return_if_fail() and 'return' statements), but that's really another minor thing.

After a little testing the patch works nicely. I also adapted it to git master, as this cannot go to stable release, because of new localized strings. Thanks for your help with this bug report.
Comment 9 Milan Crha 2011-06-14 12:28:12 UTC
Created commit f5794ef in evo master (3.1.3+)
Comment 10 Rathin 2011-06-14 17:06:40 UTC
Thanks a lot Milan
Comment 11 Akhil Laddha 2011-07-04 10:44:16 UTC
*** Bug 653879 has been marked as a duplicate of this bug. ***