[Evolution-hackers] Controlling Evo from an external program

Not Zed notzed@ximian.com
Mon, 28 Jun 2004 09:54:00 +0800


--=-M001DfMN+6w+FBrNbqy1
Content-Type: multipart/alternative; boundary="=-5R95P/U740t5KkhBySwZ"


--=-5R95P/U740t5KkhBySwZ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


its not going to help you much, the interfaces have changed somewhat in
1.5.

the send receive thing should work, but you wont be able to switch
views.  not sure if you can even switch views in 1.4 anyway.  none of
the interfaces have really been designed for external access.

what is mairix and why are you using that to search email from evo?

On Sun, 2004-06-27 at 01:20 -0400, Tessa Lau wrote:

> Hi,
> 
> I'm trying to integrate mairix (the search tool) into Evolution.  I have
> mairix set up to create a virtual Maildir folder containing the results
> of a search.  After doing a search, I want to programmatically tell
> Evolution to do a Send/Receive, and then display the contents of the
> "mairix" folder in my Maildir store.
> 
> This old thread on the evo-hackers mailing list indicates that the way
> to script Evolution is via the CORBA interfaces:
> http://www.mail-archive.com/evolution-hackers@ximian.com/msg01342.html
> 
> So, I'm trying do this from Python+ORBit, but I'm running into a few
> problems.  First, trying to invoke sendReceive() causes a segfault with
> Evo 1.4.6, GNOME 2.6, and Python 2.3.4 (on Debian unstable):
> 
>  import bonobo, ORBit
>  evo = bonobo.activation.activate(
>  	"repo_ids.has('IDL:GNOME/Evolution/ShellComponent:1.0')")
>  evo.sendReceive(0)
> 
> (calling other methods, such as selectUserFolder and handleURI, does
> cause Evo to do the right thing in response, so other things are working
> correctly)
> 
> I also can't figure out (from reading the .idl files) how to make Evo
> display a different folder in the main window.  I think I have to
> construct a URI for the folder, but I haven't found that syntax
> documented anywhere.  Am I on the right path?
> 
> Thanks,
> --Tessa
> _______________________________________________
> evolution-hackers maillist  -  evolution-hackers@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/evolution-hackers

-- 

Michael Zucchi <notzed@ximian.com>

Novell's Evolution and Free Software
Developer

--=-5R95P/U740t5KkhBySwZ
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.1.16">
</HEAD>
<BODY>
<BR>
its not going to help you much, the interfaces have changed somewhat in 1.5.<BR>
<BR>
the send receive thing should work, but you wont be able to switch views.&nbsp; not sure if you can even switch views in 1.4 anyway.&nbsp; none of the interfaces have really been designed for external access.<BR>
<BR>
what is mairix and why are you using that to search email from evo?<BR>
<BR>
On Sun, 2004-06-27 at 01:20 -0400, Tessa Lau wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi,</FONT>

<FONT COLOR="#000000">I'm trying to integrate mairix (the search tool) into Evolution.  I have</FONT>
<FONT COLOR="#000000">mairix set up to create a virtual Maildir folder containing the results</FONT>
<FONT COLOR="#000000">of a search.  After doing a search, I want to programmatically tell</FONT>
<FONT COLOR="#000000">Evolution to do a Send/Receive, and then display the contents of the</FONT>
<FONT COLOR="#000000">&quot;mairix&quot; folder in my Maildir store.</FONT>

<FONT COLOR="#000000">This old thread on the evo-hackers mailing list indicates that the way</FONT>
<FONT COLOR="#000000">to script Evolution is via the CORBA interfaces:</FONT>
<FONT COLOR="#000000"><A HREF="http://www.mail-archive.com/evolution-hackers@ximian.com/msg01342.html">http://www.mail-archive.com/evolution-hackers@ximian.com/msg01342.html</A></FONT>

<FONT COLOR="#000000">So, I'm trying do this from Python+ORBit, but I'm running into a few</FONT>
<FONT COLOR="#000000">problems.  First, trying to invoke sendReceive() causes a segfault with</FONT>
<FONT COLOR="#000000">Evo 1.4.6, GNOME 2.6, and Python 2.3.4 (on Debian unstable):</FONT>

<FONT COLOR="#000000"> import bonobo, ORBit</FONT>
<FONT COLOR="#000000"> evo = bonobo.activation.activate(</FONT>
<FONT COLOR="#000000"> 	&quot;repo_ids.has('IDL:GNOME/Evolution/ShellComponent:1.0')&quot;)</FONT>
<FONT COLOR="#000000"> evo.sendReceive(0)</FONT>

<FONT COLOR="#000000">(calling other methods, such as selectUserFolder and handleURI, does</FONT>
<FONT COLOR="#000000">cause Evo to do the right thing in response, so other things are working</FONT>
<FONT COLOR="#000000">correctly)</FONT>

<FONT COLOR="#000000">I also can't figure out (from reading the .idl files) how to make Evo</FONT>
<FONT COLOR="#000000">display a different folder in the main window.  I think I have to</FONT>
<FONT COLOR="#000000">construct a URI for the folder, but I haven't found that syntax</FONT>
<FONT COLOR="#000000">documented anywhere.  Am I on the right path?</FONT>

<FONT COLOR="#000000">Thanks,</FONT>
<FONT COLOR="#000000">--Tessa</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">evolution-hackers maillist  -  <A HREF="mailto:evolution-hackers@lists.ximian.com">evolution-hackers@lists.ximian.com</A></FONT>
<FONT COLOR="#000000"><A HREF="http://lists.ximian.com/mailman/listinfo/evolution-hackers">http://lists.ximian.com/mailman/listinfo/evolution-hackers</A></FONT>
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<TABLE CELLSPACING="6">
<TR>
<TD>
<IMG SRC="cid:1088387607.4365.0.camel@lostzed.mmc.com.au" WIDTH="48" HEIGHT="48" ALIGN="top" ALT="" BORDER="0">
</TD>
<TD>
<B>Michael Zucchi</B> &lt;<A HREF="mailto:notzed@ximian.com">notzed@ximian.com</A>&gt;<BR>
<BR>
<I>Novell's <A HREF="http://codeblogs.ximian.com/blogs/evolution/">Evolution</A> and <A HREF="http://www.gnu.org/philosophy/free-sw.html">Free Software</A> Developer</I>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-5R95P/U740t5KkhBySwZ--

--=-M001DfMN+6w+FBrNbqy1
Content-ID: <1088387607.4365.0.camel@lostzed.mmc.com.au>
Content-Disposition: attachment; filename=zed-48.small.jpg
Content-Type: application/octet-stream; name=zed-48.small.jpg
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4p
LSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09P
T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAAwADADASIA
AhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAwQFAgYB/8QALhAAAgEDAgUEAQIHAAAAAAAAAQID
BBEhABIFEzFBURQigZEGYXE0UmJyobHx/8QAFwEBAQEBAAAAAAAAAAAAAAAABAMCAf/EAB0RAAID
AQEAAwAAAAAAAAAAAAABAgMREjEiMkH/2gAMAwEAAhEDEQA/AK8sEEq35nLaP3e1cW/m8kfdtAfh
824L7I1YFrnaRt8+L40U1ECxiGjLzSCocRYuQhubW7jIxrcFZRzU7q3sh3e8deWvX67/AKX0Xegi
TixevoZdxjhnkk2xBj2Z7DIA74Gs+kgpoaamPLllqE5yPuO4i1+nix7+NS3qatikPNZa+idmjLGx
YE+7r16DHgnTEtRWTVIraiknUrE42mJvYTY/IyfjT66YZjNzkzSSRTrEYTuz0tbpg6oV1V62op5G
3QhV9yn+7t8DXPDiZlaepq0AYIBGEFtuRc2/WwH7aroXho98jNG5RVa4wDYNbzqNsefqdcnmM0J0
pp1kKyRywsdpU46EX/19aT4ioWgmanATG0Mpvcd89750arjMg2L1DfQtnSixTMW5hO0ZBZsEg5t5
xodU+8fhit7jZz4ChQWS99U1lC0H8RNZx74xK2DkAG48ePOtU0UUsQLC6kki/wC+jqtMpeLapjYg
XJyNLcxyr1EUHaWaEspHXPbXVcNkUcCUOjvNv2kAdAehOkVo4LrDEFG9hcnPe+rlUsNNSenUIWkk
ZHfbflqFC475IvqdnyWaRsgl6MNwysp13y8uLG3cTk6LBwCmliFR6lw7XBKdMdj50t+X8RkWOnhV
rbnLfX/dUPx1ivAoTJnmFm+CdIVEIx6XpFQSZxVVH6KrkRRaAudn9I8HXhniSPcyC/ntqzxOjMNS
6uNyMbqT0I1Ogoad6pF5S23C4t1zqOa8Y7xbEDSxmesguHDId4DKQDjGqMqHmNLGygFnujAZF8DF
820/xYpQ8RWcRLtkBINuh6Ef5B0tNRH0L7UEjGzCVTZirDBGfJ+NasrcMf4CnLp6f//Z


--=-M001DfMN+6w+FBrNbqy1--