Bug 197868

Summary: clicking on email link brings up contacts
Product: [Fedora] Fedora Reporter: Matthias Clasen <mclasen>
Component: evolutionAssignee: Matthew Barnes <mbarnes>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rstrode, stuart
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-17 02:28:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 197822    
Attachments:
Description Flags
Proposed patch for #2 of Ray's 3-easy-steps
none
Proposed patch for #1 of Ray's 3-easy-steps
none
Proposed patch for #3 of Ray's 3-easy-steps
none
More sophisticated patch for #2. none

Description Matthias Clasen 2006-07-06 19:52:08 UTC
I have started evolution contacts from the main menu. After that,
clicking on an email link in e.g. gaim brings up a new composer 
window, but also the main window in  contacts mode. 

I think thats not supposed to happen.

This is with evo 2.7.3-7

Comment 1 Ray Strode [halfline] 2006-07-25 19:54:48 UTC
So we need to do three things:

1) fix the gconf schema for the mailto uri handler to have --component=mail in it
2) fix evolution's "am i the default mailer" check to be able to handle
--component=mail being in the command name
3) turn off the "am i the default mailer" check by default (another gconf schema
change)

Comment 2 Warren Togami 2006-07-26 16:28:54 UTC
*** Bug 190959 has been marked as a duplicate of this bug. ***

Comment 3 Matthew Barnes 2006-07-26 20:11:54 UTC
(In reply to comment #1)

Ray, can you point me to where #2 happens?

(... man, in a different context that question could be really bad!)

Comment 4 Matthias Clasen 2006-07-30 05:01:07 UTC
Matt, the check is done in plugins/default-mailer/default-mailer.c

Comment 5 Matthew Barnes 2006-08-09 20:12:20 UTC
Created attachment 133881 [details]
Proposed patch for #2 of Ray's 3-easy-steps

This patch sets the /desktop/gnome/url-handlers/mailto/command GConf key to

    evolution --component=mail %s

when a user tells Evolution to become the default mailer.

I also changed the logic that checks whether Evolution is the default mailer. 
Where before it tried to match the entire mailer invocation command exactly,
now it just looks for the substring "evolution" at the beginning of the
command.  This makes the check more robust so that an advanced user can
customize the way Evolution gets invoked without confusing Evolution's
default-mailer plugin.

Comment 6 Matthew Barnes 2006-08-09 20:27:16 UTC
(In reply to comment #1)

Ray, what is the rationale for #3?


Comment 7 Ray Strode [halfline] 2006-08-09 21:35:21 UTC
we should evolution as the default already.  If someone explicitly changed it,
they know how to change it back.  They don't need us to second guess their change.

At least I think that was the rationale. don't really remember the meeting that
well, though.

Comment 8 Matthew Barnes 2006-08-10 01:29:42 UTC
Okay, that makes sense.  In other words, it doesn't need to check if it's the
default mailer every time it starts because we ship it as the default mailer.

Comment 9 Matthew Barnes 2006-08-10 20:23:11 UTC
Created attachment 133985 [details]
Proposed patch for #1 of Ray's 3-easy-steps

This is for the gnome-vfs2 package.

Comment 10 Matthew Barnes 2006-08-10 20:24:27 UTC
Created attachment 133986 [details]
Proposed patch for #3 of Ray's 3-easy-steps

Comment 11 Matthew Barnes 2006-08-10 21:32:06 UTC
Created attachment 133995 [details]
More sophisticated patch for #2.

This version allows the mailto command to specify a path to the program.
e.g. /home/mbarnes/test/evolution-2.8 --component=mail %s

So with this logic, Evolution is the default mailer if the basename of the
first token in the command string starts with "evolution".

Comment 12 Matthew Barnes 2006-08-11 15:15:49 UTC
Sending these patches to Rawhide for a trial run.

evolution-2.7.91-2
gnome-vfs2-2.15.91-2.fc6

Comment 13 Matthew Barnes 2006-08-17 02:28:12 UTC
This seems to be working in Rawhide so I'm going to close this bug, but the
upstream bug remains open.  I may re-open this one if upstream finds a problem
with my proposed fix.