Merge lp:~alexlauni/do-plugins/gmail-recent-convos into lp:do-plugins

Proposed by Alex Launi
Status: Merged
Merged at revision: not available
Proposed branch: lp:~alexlauni/do-plugins/gmail-recent-convos
Merge into: lp:do-plugins
Diff against target: None lines
To merge this branch: bzr merge lp:~alexlauni/do-plugins/gmail-recent-convos
Reviewer Review Type Date Requested Status
Chris S. Approve
Review via email: mp+6653@code.launchpad.net

Commit message

Add action to view recent conversations with a contact

To post a comment you must log in.
Revision history for this message
Alex Launi (alexlauni) wrote :

Allows opening gmail's "View recent conversations" with a contact from Do

Revision history for this message
Chris S. (cszikszoy) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'DoPlugins.mds'
2--- DoPlugins.mds 2009-05-05 19:29:20 +0000
3+++ DoPlugins.mds 2009-05-17 08:43:00 +0000
4@@ -1,5 +1,4 @@
5-<Combine name="DoPlugins" fileversion="2.0" outputpath="build/bin/" releaseversion="0.4.9.9">
6- <Policies />
7+<Combine fileversion="2.0" outputpath="build/bin/" name="DoPlugins" releaseversion="0.4.9.9">
8 <Configurations active="Debug">
9 <Configuration name="Debug" ctype="CombineConfiguration">
10 <Entry build="True" name="Rhythmbox" configuration="Debug" />
11
12=== modified file 'GoogleContacts/GMailContacts.mdp'
13--- GoogleContacts/GMailContacts.mdp 2009-02-28 16:16:48 +0000
14+++ GoogleContacts/GMailContacts.mdp 2009-05-17 08:45:38 +0000
15@@ -1,4 +1,4 @@
16-<Project name="GoogleContacts" fileversion="2.0" language="C#" DefaultNamespace="GMail" clr-version="Net_2_0" targetFramework="2.0" ctype="DotNetProject">
17+<Project name="GoogleContacts" fileversion="2.0" language="C#" DefaultNamespace="GMail" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
18 <Configurations active="Debug">
19 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
20 <Output directory="bin/Debug" assembly="GoogleContacts" />
21@@ -31,6 +31,7 @@
22 <File name="Resources/GoogleContacts.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
23 <File name="Resources/icons/gmail-logo.png" subtype="Code" buildaction="EmbedAsResource" />
24 <File name="Resources/icons/phone.png" subtype="Code" buildaction="EmbedAsResource" />
25+ <File name="src/RecentConversationsAction.cs" subtype="Code" buildaction="Compile" />
26 </Contents>
27 <References>
28 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
29@@ -42,8 +43,8 @@
30 <ProjectReference type="Assembly" localcopy="True" refto="../BundledLibraries/Google.GData.Contacts.dll" />
31 <ProjectReference type="Assembly" localcopy="True" refto="../BundledLibraries/Google.GData.Extensions.dll" />
32 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
33- <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
34- <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
35- <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
36+ <ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../../usr/local/lib/gnome-do/Do.Platform.dll" />
37+ <ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../../usr/local/lib/gnome-do/Do.Platform.Linux.dll" />
38+ <ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../../usr/local/lib/gnome-do/Do.Universe.dll" />
39 </References>
40 </Project>
41\ No newline at end of file
42
43=== modified file 'GoogleContacts/Makefile.am'
44--- GoogleContacts/Makefile.am 2009-05-15 23:36:54 +0000
45+++ GoogleContacts/Makefile.am 2009-05-17 08:45:38 +0000
46@@ -12,7 +12,8 @@
47 src/GMailContactDetailItem.cs \
48 src/GMailContactItemSource.cs \
49 src/GMail.cs \
50- src/Preferences.cs
51+ src/Preferences.cs \
52+ src/RecentConversationsAction.cs
53
54 RESOURCES = \
55 Resources/GoogleContacts.addin.xml \
56
57=== modified file 'GoogleContacts/Resources/GoogleContacts.addin.xml'
58--- GoogleContacts/Resources/GoogleContacts.addin.xml 2009-05-07 19:49:44 +0000
59+++ GoogleContacts/Resources/GoogleContacts.addin.xml 2009-05-17 08:43:00 +0000
60@@ -1,7 +1,7 @@
61 <Addin
62 id="GMail"
63 namespace= "Do"
64- version="1.5"
65+ version="1.6"
66 name="Google Contacts"
67 description="Search your GMail contacts."
68 author="Alex Launi"
69@@ -20,4 +20,7 @@
70 <Extension path = "/Do/ItemSource">
71 <ItemSource type="GMail.GMailItemSource" />
72 </Extension>
73+ <Extension path= "/Do/Action">
74+ <Action type="GMail.RecentConversationsActions" />
75+ </Extension>
76 </Addin>
77
78=== added file 'GoogleContacts/src/RecentConversationsAction.cs'
79--- GoogleContacts/src/RecentConversationsAction.cs 1970-01-01 00:00:00 +0000
80+++ GoogleContacts/src/RecentConversationsAction.cs 2009-05-17 08:45:38 +0000
81@@ -0,0 +1,84 @@
82+// RecentConversationsActions.cs
83+//
84+// GNOME Do is the legal property of its developers, whose names are too numerous
85+// to list here. Please refer to the COPYRIGHT file distributed with this
86+// source distribution.
87+//
88+// This program is free software: you can redistribute it and/or modify
89+// it under the terms of the GNU General Public License as published by
90+// the Free Software Foundation, either version 3 of the License, or
91+// (at your option) any later version.
92+//
93+// This program is distributed in the hope that it will be useful,
94+// but WITHOUT ANY WARRANTY; without even the implied warranty of
95+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96+// GNU General Public License for more details.
97+//
98+// You should have received a copy of the GNU General Public License
99+// along with this program. If not, see <http://www.gnu.org/licenses/>.
100+//
101+
102+using System;
103+using System.Linq;
104+using System.Collections.Generic;
105+
106+using Mono.Unix;
107+
108+using Do.Platform;
109+using Do.Universe;
110+
111+namespace GMail
112+{
113+
114+ public class RecentConversationsActions : Act
115+ {
116+
117+ const string url = "https://mail.google.com/mail/?shva=1#search/from:({0})+OR+to:({0})";
118+
119+ public override string Name {
120+ get { return Catalog.GetString ("View recent conversations"); }
121+ }
122+
123+ public override string Description {
124+ get { return Catalog.GetString ("View recent emails and chat logs with a friend"); }
125+ }
126+
127+ public override string Icon {
128+ get { return "internet-group-chat"; }
129+ }
130+
131+ public override IEnumerable<Type> SupportedItemTypes {
132+ get {
133+ yield return typeof (ContactItem);
134+ yield return typeof (IContactDetailItem);
135+ }
136+ }
137+
138+ public override bool SupportsItem (Item item)
139+ {
140+ if (item is ContactItem)
141+ return !string.IsNullOrEmpty ((item as ContactItem).AnEmailAddress);
142+ else if (item is IContactDetailItem)
143+ return (item as IContactDetailItem).Key.Contains ("email");
144+
145+ return false;
146+ }
147+
148+ public override IEnumerable<Item> Perform (IEnumerable<Do.Universe.Item> items, IEnumerable<Do.Universe.Item> modItems)
149+ {
150+ foreach (Item item in items) {
151+ string email = "";
152+
153+ if (item is ContactItem)
154+ email = ((ContactItem) item).AnEmailAddress;
155+ else if (item is IContactDetailItem)
156+ email = ((IContactDetailItem) item).Value;
157+
158+ if (!string.IsNullOrEmpty (email))
159+ Services.Environment.OpenUrl (string.Format (url, email));
160+
161+ yield break;
162+ }
163+ }
164+ }
165+}
166
167=== modified file 'ImageShack/ImageShack.mdp'
168--- ImageShack/ImageShack.mdp 2009-03-04 05:10:41 +0000
169+++ ImageShack/ImageShack.mdp 2009-05-17 08:43:00 +0000
170@@ -32,10 +32,10 @@
171 <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
172 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
173 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
174+ <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
175+ <ProjectReference type="Gac" localcopy="True" refto="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
176 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.9.0.0, Culture=neutral" />
177 <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.9.0.0, Culture=neutral" />
178 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />
179- <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
180- <ProjectReference type="Gac" localcopy="True" refto="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
181 </References>
182 </Project>
183\ No newline at end of file

Subscribers

People subscribed via source and target branches