Merge lp://qastaging/~psybers/do-plugins/gmaildocklet into lp://qastaging/do-plugins/docklets

Proposed by Robert Dyer
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~psybers/do-plugins/gmaildocklet
Merge into: lp://qastaging/do-plugins/docklets
Diff against target: None lines
To merge this branch: bzr merge lp://qastaging/~psybers/do-plugins/gmaildocklet
Reviewer Review Type Date Requested Status
Do Plugins Team Pending
Review via email: mp+8327@code.qastaging.launchpad.net
To post a comment you must log in.
63. By Robert Dyer <rdyer@narmada>

making it show the correct unread count

64. By Robert Dyer <rdyer@narmada>

making it more robust when a label has a lot of unread messages

65. By Robert Dyer <rdyer@narmada>

adding some html decoding

66. By Robert Dyer <rdyer@narmada>

adding some manual closes on streams

67. By Robert Dyer <rdyer@narmada>

merge trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2009-06-01 07:10:00 +0000
3+++ .bzrignore 2009-06-27 19:17:33 +0000
4@@ -7,6 +7,8 @@
5 aclocal.m4
6 autom4te.cache
7 build
8+bin
9+*.pidb
10 install-sh
11 intltool-*.in
12 Makefile.in.in
13
14=== added directory 'GMailDocklet'
15=== added file 'GMailDocklet/AssemblyInfo.cs'
16--- GMailDocklet/AssemblyInfo.cs 1970-01-01 00:00:00 +0000
17+++ GMailDocklet/AssemblyInfo.cs 2009-06-27 17:22:28 +0000
18@@ -0,0 +1,42 @@
19+//
20+// Copyright (C) 2009 GNOME Do
21+//
22+// This program is free software: you can redistribute it and/or modify
23+// it under the terms of the GNU General Public License as published by
24+// the Free Software Foundation, either version 3 of the License, or
25+// (at your option) any later version.
26+//
27+// This program is distributed in the hope that it will be useful,
28+// but WITHOUT ANY WARRANTY; without even the implied warranty of
29+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30+// GNU General Public License for more details.
31+//
32+// You should have received a copy of the GNU General Public License
33+// along with this program. If not, see <http://www.gnu.org/licenses/>.
34+//
35+using System.Reflection;
36+using System.Runtime.CompilerServices;
37+
38+// Information about this assembly is defined by the following attributes.
39+// Change them to the values specific to your project.
40+
41+[assembly: AssemblyTitle("GMailDocklet")]
42+[assembly: AssemblyDescription("")]
43+[assembly: AssemblyConfiguration("")]
44+[assembly: AssemblyCompany("")]
45+[assembly: AssemblyProduct("")]
46+[assembly: AssemblyCopyright("")]
47+[assembly: AssemblyTrademark("")]
48+[assembly: AssemblyCulture("")]
49+
50+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
51+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
52+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
53+
54+[assembly: AssemblyVersion("1.0.*")]
55+
56+// The following attributes are used to specify the signing key for the assembly,
57+// if desired. See the Mono documentation for more information about signing.
58+
59+[assembly: AssemblyDelaySign(false)]
60+[assembly: AssemblyKeyFile("")]
61
62=== added file 'GMailDocklet/GMailDocklet.csproj'
63--- GMailDocklet/GMailDocklet.csproj 1970-01-01 00:00:00 +0000
64+++ GMailDocklet/GMailDocklet.csproj 2009-07-02 08:16:56 +0000
65@@ -0,0 +1,93 @@
66+<?xml version="1.0" encoding="utf-8"?>
67+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
68+ <PropertyGroup>
69+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
70+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
71+ <ProductVersion>9.0.21022</ProductVersion>
72+ <SchemaVersion>2.0</SchemaVersion>
73+ <ProjectGuid>{4FDFFA11-F615-41D9-81BF-5A9AA5C8E2B9}</ProjectGuid>
74+ <OutputType>Library</OutputType>
75+ <AssemblyName>GMailDocklet</AssemblyName>
76+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
77+ </PropertyGroup>
78+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
79+ <DebugSymbols>true</DebugSymbols>
80+ <DebugType>full</DebugType>
81+ <Optimize>false</Optimize>
82+ <OutputPath>bin\Debug</OutputPath>
83+ <DefineConstants>DEBUG</DefineConstants>
84+ <ErrorReport>prompt</ErrorReport>
85+ <WarningLevel>4</WarningLevel>
86+ <ConsolePause>false</ConsolePause>
87+ </PropertyGroup>
88+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
89+ <DebugType>none</DebugType>
90+ <Optimize>false</Optimize>
91+ <OutputPath>bin\Release</OutputPath>
92+ <ErrorReport>prompt</ErrorReport>
93+ <WarningLevel>4</WarningLevel>
94+ <ConsolePause>false</ConsolePause>
95+ </PropertyGroup>
96+ <ItemGroup>
97+ <Reference Include="System" />
98+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
99+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
100+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
101+ <Reference Include="Mono.Cairo" />
102+ <Reference Include="Do.Interface.Linux, Version=0.9.0.0, Culture=neutral">
103+ <Package>do.interface.linux</Package>
104+ </Reference>
105+ <Reference Include="Do.Platform, Version=0.9.0.0, Culture=neutral">
106+ <Package>do.platform</Package>
107+ </Reference>
108+ <Reference Include="System.Core">
109+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
110+ </Reference>
111+ <Reference Include="System.Xml" />
112+ <Reference Include="Mono.Posix" />
113+ <Reference Include="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral">
114+ <Package>do.platform.linux</Package>
115+ </Reference>
116+ <Reference Include="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
117+ <Package>mono-addins-0.2</Package>
118+ </Reference>
119+ <Reference Include="System.Web" />
120+ <Reference Include="Do.Interface.Linux.Docky, Version=0.9.0.0, Culture=neutral, PublicKeyToken=null">
121+ <SpecificVersion>False</SpecificVersion>
122+ <HintPath>..\..\..\trunk\do\build\Do.Interface.Linux.Docky.dll</HintPath>
123+ </Reference>
124+ </ItemGroup>
125+ <ItemGroup>
126+ <Compile Include="AssemblyInfo.cs" />
127+ <Compile Include="gtk-gui\generated.cs" />
128+ <Compile Include="gtk-gui\GMail.GMailConfiguration.cs" />
129+ <Compile Include="src\Preferences.cs" />
130+ <Compile Include="src\GMailConfiguration.cs" />
131+ <Compile Include="src\GMailItemSource.cs" />
132+ <Compile Include="src\GMailItem.cs" />
133+ <Compile Include="src\GMailAtom.cs" />
134+ <Compile Include="src\GMailDocklet.cs" />
135+ <Compile Include="src\GMailLoginConfig.cs" />
136+ <Compile Include="src\GMailOptionsSource.cs" />
137+ <Compile Include="src\GMailErrorArgs.cs" />
138+ <Compile Include="src\GMailMenuButtonArgs.cs" />
139+ </ItemGroup>
140+ <ItemGroup>
141+ <Folder Include="src\" />
142+ <Folder Include="Resources\" />
143+ <Folder Include="Resources\icons\" />
144+ </ItemGroup>
145+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
146+ <ItemGroup>
147+ <EmbeddedResource Include="Resources\GMailDocklet.addin.xml" />
148+ <EmbeddedResource Include="Resources\icons\badge-blue.svg" />
149+ <EmbeddedResource Include="Resources\icons\badge-green.svg" />
150+ <EmbeddedResource Include="Resources\icons\badge-orange.svg" />
151+ <EmbeddedResource Include="Resources\icons\badge-yellow.svg" />
152+ <EmbeddedResource Include="Resources\icons\gmail-logo.png" />
153+ <EmbeddedResource Include="Resources\icons\gmail-logo-dark.png" />
154+ <EmbeddedResource Include="gtk-gui\gui.stetic">
155+ <LogicalName>gui.stetic</LogicalName>
156+ </EmbeddedResource>
157+ </ItemGroup>
158+</Project>
159
160=== added file 'GMailDocklet/Makefile.am'
161--- GMailDocklet/Makefile.am 1970-01-01 00:00:00 +0000
162+++ GMailDocklet/Makefile.am 2009-07-02 08:16:56 +0000
163@@ -0,0 +1,43 @@
164+include $(top_srcdir)/build.rules.mk
165+
166+ASSEMBLY=GMailDocklet
167+
168+FILES = \
169+ AssemblyInfo.cs \
170+ gtk-gui/GMail.GMailConfiguration.cs \
171+ gtk-gui/generated.cs \
172+ src/GMailDocklet.cs \
173+ src/GMailAtom.cs \
174+ src/GMailConfiguration.cs \
175+ src/GMailItemSource.cs \
176+ src/GMailOptionsSource.cs \
177+ src/GMailLoginConfig.cs \
178+ src/GMailItem.cs \
179+ src/GMailErrorArgs.cs \
180+ src/GMailMenuButtonArgs.cs \
181+ src/Preferences.cs
182+
183+RESOURCES = \
184+ gtk-gui/gui.stetic \
185+ Resources/GMailDocklet.addin.xml \
186+ Resources/icons/badge-blue.svg \
187+ Resources/icons/badge-green.svg \
188+ Resources/icons/badge-orange.svg \
189+ Resources/icons/badge-yellow.svg \
190+ Resources/icons/gmail-logo.png \
191+ Resources/icons/gmail-logo-dark.png
192+
193+REFERENCES = \
194+ System \
195+ System.Xml \
196+ System.Core \
197+ System.Web \
198+ Mono.Posix \
199+ Mono.Cairo \
200+ $(MONO_ADDINS_LIBS) \
201+ $(GNOME_DESKTOP_SHARP_20_LIBS) \
202+ $(GTK_SHARP_20_LIBS) \
203+ $(DO_INTERFACE_LINUX_LIBS) \
204+ $(DO_INTERFACE_LINUX_DOCKY_LIBS) \
205+ $(DO_PLATFORM_LIBS) \
206+ $(DO_PLATFORM_LINUX_LIBS)
207
208=== added directory 'GMailDocklet/Resources'
209=== added file 'GMailDocklet/Resources/GMailDocklet.addin.xml'
210--- GMailDocklet/Resources/GMailDocklet.addin.xml 1970-01-01 00:00:00 +0000
211+++ GMailDocklet/Resources/GMailDocklet.addin.xml 2009-07-02 08:16:56 +0000
212@@ -0,0 +1,28 @@
213+<Addin
214+ id="GMailDocklet"
215+ namespace="Do"
216+ version="1.0"
217+ name="GMail Docklet"
218+ description="See if you have mail"
219+ author="Robert Dyer"
220+ category="Docklet"
221+>
222+
223+ <Runtime>
224+ <Import assembly="GMailDocklet.dll"/>
225+ </Runtime>
226+
227+ <Dependencies>
228+ <Addin id="Interface.Linux.Docky" version="1.0" />
229+ <Addin id="Universe" version="1.0" />
230+ </Dependencies>
231+
232+ <Extension path = "/Do/ItemSource">
233+ <ItemSource type="GMail.GMailItemSource" />
234+ <ItemSource type="GMail.GMailOptionsSource" />
235+ </Extension>
236+
237+ <Extension path="/Docky/Docklet">
238+ <Docklet type="GMail.GMailDocklet" />
239+ </Extension>
240+</Addin>
241
242=== added directory 'GMailDocklet/Resources/icons'
243=== added file 'GMailDocklet/Resources/icons/badge-blue.svg'
244--- GMailDocklet/Resources/icons/badge-blue.svg 1970-01-01 00:00:00 +0000
245+++ GMailDocklet/Resources/icons/badge-blue.svg 2009-06-27 21:38:04 +0000
246@@ -0,0 +1,104 @@
247+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
248+<!-- Created with Inkscape (http://www.inkscape.org/) -->
249+<svg
250+ xmlns:dc="http://purl.org/dc/elements/1.1/"
251+ xmlns:cc="http://creativecommons.org/ns#"
252+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
253+ xmlns:svg="http://www.w3.org/2000/svg"
254+ xmlns="http://www.w3.org/2000/svg"
255+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
256+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
257+ width="48px"
258+ height="48px"
259+ id="svg2417"
260+ sodipodi:version="0.32"
261+ inkscape:version="0.46"
262+ sodipodi:docname="badge-blue.svg"
263+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
264+ <defs
265+ id="defs2419">
266+ <filter
267+ inkscape:collect="always"
268+ id="filter3180">
269+ <feGaussianBlur
270+ inkscape:collect="always"
271+ stdDeviation="1.6957446"
272+ id="feGaussianBlur3182" />
273+ </filter>
274+ <inkscape:perspective
275+ sodipodi:type="inkscape:persp3d"
276+ inkscape:vp_x="0 : 24 : 1"
277+ inkscape:vp_y="0 : 1000 : 0"
278+ inkscape:vp_z="48 : 24 : 1"
279+ inkscape:persp3d-origin="24 : 16 : 1"
280+ id="perspective2425" />
281+ </defs>
282+ <sodipodi:namedview
283+ id="base"
284+ pagecolor="#ffffff"
285+ bordercolor="#666666"
286+ borderopacity="1.0"
287+ inkscape:pageopacity="0.0"
288+ inkscape:pageshadow="2"
289+ inkscape:zoom="7"
290+ inkscape:cx="24"
291+ inkscape:cy="24"
292+ inkscape:current-layer="layer1"
293+ showgrid="true"
294+ inkscape:grid-bbox="true"
295+ inkscape:document-units="px"
296+ inkscape:window-width="1025"
297+ inkscape:window-height="879"
298+ inkscape:window-x="638"
299+ inkscape:window-y="213" />
300+ <metadata
301+ id="metadata2422">
302+ <rdf:RDF>
303+ <cc:Work
304+ rdf:about="">
305+ <dc:format>image/svg+xml</dc:format>
306+ <dc:type
307+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
308+ </cc:Work>
309+ </rdf:RDF>
310+ </metadata>
311+ <g
312+ id="layer1"
313+ inkscape:label="Layer 1"
314+ inkscape:groupmode="layer">
315+ <path
316+ sodipodi:type="star"
317+ style="fill:#000000;fill-opacity:0.25882353;stroke:none;stroke-width:0.1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3180)"
318+ id="path3170"
319+ sodipodi:sides="25"
320+ sodipodi:cx="39.700375"
321+ sodipodi:cy="15.17603"
322+ sodipodi:r1="28.845577"
323+ sodipodi:r2="33.935974"
324+ sodipodi:arg1="0.73855745"
325+ sodipodi:arg2="0.86422116"
326+ inkscape:flatsided="false"
327+ inkscape:rounded="0"
328+ inkscape:randomized="0"
329+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
330+ transform="matrix(0.6456022,0,0,0.6456022,-1.0606835,15.214892)" />
331+ <path
332+ sodipodi:type="star"
333+ style="fill:#3465a4;fill-opacity:1;stroke:none;stroke-width:0.10000000000000001;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
334+ id="path2398"
335+ sodipodi:sides="25"
336+ sodipodi:cx="39.700375"
337+ sodipodi:cy="15.17603"
338+ sodipodi:r1="28.845577"
339+ sodipodi:r2="33.935974"
340+ sodipodi:arg1="0.73855745"
341+ sodipodi:arg2="0.86422116"
342+ inkscape:flatsided="false"
343+ inkscape:rounded="0"
344+ inkscape:randomized="0"
345+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
346+ transform="matrix(0.6456022,0,0,0.6456022,-0.6485924,13.650789)"
347+ inkscape:export-xdpi="240"
348+ inkscape:export-ydpi="240" />
349+ </g>
350+</svg>
351
352=== added file 'GMailDocklet/Resources/icons/badge-green.svg'
353--- GMailDocklet/Resources/icons/badge-green.svg 1970-01-01 00:00:00 +0000
354+++ GMailDocklet/Resources/icons/badge-green.svg 2009-06-27 21:50:49 +0000
355@@ -0,0 +1,104 @@
356+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
357+<!-- Created with Inkscape (http://www.inkscape.org/) -->
358+<svg
359+ xmlns:dc="http://purl.org/dc/elements/1.1/"
360+ xmlns:cc="http://creativecommons.org/ns#"
361+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
362+ xmlns:svg="http://www.w3.org/2000/svg"
363+ xmlns="http://www.w3.org/2000/svg"
364+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
365+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
366+ width="48px"
367+ height="48px"
368+ id="svg2417"
369+ sodipodi:version="0.32"
370+ inkscape:version="0.46"
371+ sodipodi:docname="badge-green.svg"
372+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
373+ <defs
374+ id="defs2419">
375+ <filter
376+ inkscape:collect="always"
377+ id="filter3180">
378+ <feGaussianBlur
379+ inkscape:collect="always"
380+ stdDeviation="1.6957446"
381+ id="feGaussianBlur3182" />
382+ </filter>
383+ <inkscape:perspective
384+ sodipodi:type="inkscape:persp3d"
385+ inkscape:vp_x="0 : 24 : 1"
386+ inkscape:vp_y="0 : 1000 : 0"
387+ inkscape:vp_z="48 : 24 : 1"
388+ inkscape:persp3d-origin="24 : 16 : 1"
389+ id="perspective2425" />
390+ </defs>
391+ <sodipodi:namedview
392+ id="base"
393+ pagecolor="#ffffff"
394+ bordercolor="#666666"
395+ borderopacity="1.0"
396+ inkscape:pageopacity="0.0"
397+ inkscape:pageshadow="2"
398+ inkscape:zoom="7"
399+ inkscape:cx="24"
400+ inkscape:cy="24"
401+ inkscape:current-layer="layer1"
402+ showgrid="true"
403+ inkscape:grid-bbox="true"
404+ inkscape:document-units="px"
405+ inkscape:window-width="1025"
406+ inkscape:window-height="879"
407+ inkscape:window-x="638"
408+ inkscape:window-y="213" />
409+ <metadata
410+ id="metadata2422">
411+ <rdf:RDF>
412+ <cc:Work
413+ rdf:about="">
414+ <dc:format>image/svg+xml</dc:format>
415+ <dc:type
416+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
417+ </cc:Work>
418+ </rdf:RDF>
419+ </metadata>
420+ <g
421+ id="layer1"
422+ inkscape:label="Layer 1"
423+ inkscape:groupmode="layer">
424+ <path
425+ sodipodi:type="star"
426+ style="fill:#000000;fill-opacity:0.25882353;stroke:none;stroke-width:0.1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3180)"
427+ id="path3170"
428+ sodipodi:sides="25"
429+ sodipodi:cx="39.700375"
430+ sodipodi:cy="15.17603"
431+ sodipodi:r1="28.845577"
432+ sodipodi:r2="33.935974"
433+ sodipodi:arg1="0.73855745"
434+ sodipodi:arg2="0.86422116"
435+ inkscape:flatsided="false"
436+ inkscape:rounded="0"
437+ inkscape:randomized="0"
438+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
439+ transform="matrix(0.6456022,0,0,0.6456022,-1.0606835,15.214892)" />
440+ <path
441+ sodipodi:type="star"
442+ style="fill:#4e9a06;fill-opacity:1;stroke:none;stroke-width:0.10000000000000001;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
443+ id="path2398"
444+ sodipodi:sides="25"
445+ sodipodi:cx="39.700375"
446+ sodipodi:cy="15.17603"
447+ sodipodi:r1="28.845577"
448+ sodipodi:r2="33.935974"
449+ sodipodi:arg1="0.73855745"
450+ sodipodi:arg2="0.86422116"
451+ inkscape:flatsided="false"
452+ inkscape:rounded="0"
453+ inkscape:randomized="0"
454+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
455+ transform="matrix(0.6456022,0,0,0.6456022,-0.6485924,13.650789)"
456+ inkscape:export-xdpi="240"
457+ inkscape:export-ydpi="240" />
458+ </g>
459+</svg>
460
461=== added file 'GMailDocklet/Resources/icons/badge-orange.svg'
462--- GMailDocklet/Resources/icons/badge-orange.svg 1970-01-01 00:00:00 +0000
463+++ GMailDocklet/Resources/icons/badge-orange.svg 2009-06-27 21:50:49 +0000
464@@ -0,0 +1,104 @@
465+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
466+<!-- Created with Inkscape (http://www.inkscape.org/) -->
467+<svg
468+ xmlns:dc="http://purl.org/dc/elements/1.1/"
469+ xmlns:cc="http://creativecommons.org/ns#"
470+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
471+ xmlns:svg="http://www.w3.org/2000/svg"
472+ xmlns="http://www.w3.org/2000/svg"
473+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
474+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
475+ width="48px"
476+ height="48px"
477+ id="svg2417"
478+ sodipodi:version="0.32"
479+ inkscape:version="0.46"
480+ sodipodi:docname="badge-orange.svg"
481+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
482+ <defs
483+ id="defs2419">
484+ <filter
485+ inkscape:collect="always"
486+ id="filter3180">
487+ <feGaussianBlur
488+ inkscape:collect="always"
489+ stdDeviation="1.6957446"
490+ id="feGaussianBlur3182" />
491+ </filter>
492+ <inkscape:perspective
493+ sodipodi:type="inkscape:persp3d"
494+ inkscape:vp_x="0 : 24 : 1"
495+ inkscape:vp_y="0 : 1000 : 0"
496+ inkscape:vp_z="48 : 24 : 1"
497+ inkscape:persp3d-origin="24 : 16 : 1"
498+ id="perspective2425" />
499+ </defs>
500+ <sodipodi:namedview
501+ id="base"
502+ pagecolor="#ffffff"
503+ bordercolor="#666666"
504+ borderopacity="1.0"
505+ inkscape:pageopacity="0.0"
506+ inkscape:pageshadow="2"
507+ inkscape:zoom="7"
508+ inkscape:cx="24"
509+ inkscape:cy="24"
510+ inkscape:current-layer="layer1"
511+ showgrid="true"
512+ inkscape:grid-bbox="true"
513+ inkscape:document-units="px"
514+ inkscape:window-width="1025"
515+ inkscape:window-height="879"
516+ inkscape:window-x="638"
517+ inkscape:window-y="213" />
518+ <metadata
519+ id="metadata2422">
520+ <rdf:RDF>
521+ <cc:Work
522+ rdf:about="">
523+ <dc:format>image/svg+xml</dc:format>
524+ <dc:type
525+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
526+ </cc:Work>
527+ </rdf:RDF>
528+ </metadata>
529+ <g
530+ id="layer1"
531+ inkscape:label="Layer 1"
532+ inkscape:groupmode="layer">
533+ <path
534+ sodipodi:type="star"
535+ style="fill:#000000;fill-opacity:0.25882353;stroke:none;stroke-width:0.1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3180)"
536+ id="path3170"
537+ sodipodi:sides="25"
538+ sodipodi:cx="39.700375"
539+ sodipodi:cy="15.17603"
540+ sodipodi:r1="28.845577"
541+ sodipodi:r2="33.935974"
542+ sodipodi:arg1="0.73855745"
543+ sodipodi:arg2="0.86422116"
544+ inkscape:flatsided="false"
545+ inkscape:rounded="0"
546+ inkscape:randomized="0"
547+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
548+ transform="matrix(0.6456022,0,0,0.6456022,-1.0606835,15.214892)" />
549+ <path
550+ sodipodi:type="star"
551+ style="fill:#f57900;fill-opacity:1;stroke:none;stroke-width:0.1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
552+ id="path2398"
553+ sodipodi:sides="25"
554+ sodipodi:cx="39.700375"
555+ sodipodi:cy="15.17603"
556+ sodipodi:r1="28.845577"
557+ sodipodi:r2="33.935974"
558+ sodipodi:arg1="0.73855745"
559+ sodipodi:arg2="0.86422116"
560+ inkscape:flatsided="false"
561+ inkscape:rounded="0"
562+ inkscape:randomized="0"
563+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
564+ transform="matrix(0.6456022,0,0,0.6456022,-0.6485924,13.650789)"
565+ inkscape:export-xdpi="240"
566+ inkscape:export-ydpi="240" />
567+ </g>
568+</svg>
569
570=== added file 'GMailDocklet/Resources/icons/badge-yellow.svg'
571--- GMailDocklet/Resources/icons/badge-yellow.svg 1970-01-01 00:00:00 +0000
572+++ GMailDocklet/Resources/icons/badge-yellow.svg 2009-06-27 21:50:49 +0000
573@@ -0,0 +1,104 @@
574+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
575+<!-- Created with Inkscape (http://www.inkscape.org/) -->
576+<svg
577+ xmlns:dc="http://purl.org/dc/elements/1.1/"
578+ xmlns:cc="http://creativecommons.org/ns#"
579+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
580+ xmlns:svg="http://www.w3.org/2000/svg"
581+ xmlns="http://www.w3.org/2000/svg"
582+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
583+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
584+ width="48px"
585+ height="48px"
586+ id="svg2417"
587+ sodipodi:version="0.32"
588+ inkscape:version="0.46"
589+ sodipodi:docname="badge-yellow.svg"
590+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
591+ <defs
592+ id="defs2419">
593+ <filter
594+ inkscape:collect="always"
595+ id="filter3180">
596+ <feGaussianBlur
597+ inkscape:collect="always"
598+ stdDeviation="1.6957446"
599+ id="feGaussianBlur3182" />
600+ </filter>
601+ <inkscape:perspective
602+ sodipodi:type="inkscape:persp3d"
603+ inkscape:vp_x="0 : 24 : 1"
604+ inkscape:vp_y="0 : 1000 : 0"
605+ inkscape:vp_z="48 : 24 : 1"
606+ inkscape:persp3d-origin="24 : 16 : 1"
607+ id="perspective2425" />
608+ </defs>
609+ <sodipodi:namedview
610+ id="base"
611+ pagecolor="#ffffff"
612+ bordercolor="#666666"
613+ borderopacity="1.0"
614+ inkscape:pageopacity="0.0"
615+ inkscape:pageshadow="2"
616+ inkscape:zoom="7"
617+ inkscape:cx="24"
618+ inkscape:cy="24"
619+ inkscape:current-layer="layer1"
620+ showgrid="true"
621+ inkscape:grid-bbox="true"
622+ inkscape:document-units="px"
623+ inkscape:window-width="1025"
624+ inkscape:window-height="879"
625+ inkscape:window-x="638"
626+ inkscape:window-y="213" />
627+ <metadata
628+ id="metadata2422">
629+ <rdf:RDF>
630+ <cc:Work
631+ rdf:about="">
632+ <dc:format>image/svg+xml</dc:format>
633+ <dc:type
634+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
635+ </cc:Work>
636+ </rdf:RDF>
637+ </metadata>
638+ <g
639+ id="layer1"
640+ inkscape:label="Layer 1"
641+ inkscape:groupmode="layer">
642+ <path
643+ sodipodi:type="star"
644+ style="fill:#000000;fill-opacity:0.25882353;stroke:none;stroke-width:0.1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3180)"
645+ id="path3170"
646+ sodipodi:sides="25"
647+ sodipodi:cx="39.700375"
648+ sodipodi:cy="15.17603"
649+ sodipodi:r1="28.845577"
650+ sodipodi:r2="33.935974"
651+ sodipodi:arg1="0.73855745"
652+ sodipodi:arg2="0.86422116"
653+ inkscape:flatsided="false"
654+ inkscape:rounded="0"
655+ inkscape:randomized="0"
656+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
657+ transform="matrix(0.6456022,0,0,0.6456022,-1.0606835,15.214892)" />
658+ <path
659+ sodipodi:type="star"
660+ style="fill:#c4a000;fill-opacity:1;stroke:none;stroke-width:0.10000000000000001;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
661+ id="path2398"
662+ sodipodi:sides="25"
663+ sodipodi:cx="39.700375"
664+ sodipodi:cy="15.17603"
665+ sodipodi:r1="28.845577"
666+ sodipodi:r2="33.935974"
667+ sodipodi:arg1="0.73855745"
668+ sodipodi:arg2="0.86422116"
669+ inkscape:flatsided="false"
670+ inkscape:rounded="0"
671+ inkscape:randomized="0"
672+ d="M 61.029962,34.595505 L 61.732718,40.987387 L 55.530427,39.28986 L 54.621508,45.655697 L 49.036231,42.469053 L 46.572748,48.408858 L 41.955429,43.933326 L 38.092172,49.073877 L 34.732934,43.590672 L 29.712645,47.60897 L 27.822561,41.462621 L 21.960684,44.106182 L 21.658515,37.682888 L 15.323372,38.785607 L 16.628105,32.488965 L 10.217758,31.981554 L 13.047411,26.207208 L 6.9646445,24.121549 L 11.141421,19.23232 L 5.7684375,15.699464 L 11.029895,12.002562 L 6.7042989,7.2444902 L 12.71984,4.9722036 L 9.7134251,-0.71211626 L 16.105072,-1.4170106 L 14.606742,-7.670412 L 20.972883,-6.7636229 L 21.076783,-13.193182 L 27.017411,-10.731686 L 28.717014,-16.93341 L 33.858857,-13.071872 L 37.047369,-18.656083 L 41.067347,-13.637139 L 45.544423,-18.252961 L 48.189944,-12.391968 L 53.674273,-15.749372 L 54.779111,-9.4145986 L 60.926092,-11.302626 L 60.420826,-4.8921094 L 66.844221,-5.1921293 L 64.760598,0.89133476 L 71.056803,2.1981741 L 67.525744,7.5723389 L 73.299145,10.403924 L 68.54252,14.731111 L 73.430352,18.909523 L 67.747038,21.917839 L 71.442181,27.180532 L 65.189281,28.680954 L 67.459555,34.697255 L 61.029962,34.595505 z"
673+ transform="matrix(0.6456022,0,0,0.6456022,-0.6485924,13.650789)"
674+ inkscape:export-xdpi="240"
675+ inkscape:export-ydpi="240" />
676+ </g>
677+</svg>
678
679=== added file 'GMailDocklet/Resources/icons/gmail-logo-dark.png'
680Binary files GMailDocklet/Resources/icons/gmail-logo-dark.png 1970-01-01 00:00:00 +0000 and GMailDocklet/Resources/icons/gmail-logo-dark.png 2009-06-27 21:38:04 +0000 differ
681=== added file 'GMailDocklet/Resources/icons/gmail-logo.png'
682Binary files GMailDocklet/Resources/icons/gmail-logo.png 1970-01-01 00:00:00 +0000 and GMailDocklet/Resources/icons/gmail-logo.png 2009-06-27 20:58:20 +0000 differ
683=== added directory 'GMailDocklet/gtk-gui'
684=== added file 'GMailDocklet/gtk-gui/GMail.GMailConfiguration.cs'
685--- GMailDocklet/gtk-gui/GMail.GMailConfiguration.cs 1970-01-01 00:00:00 +0000
686+++ GMailDocklet/gtk-gui/GMail.GMailConfiguration.cs 2009-07-02 08:16:56 +0000
687@@ -0,0 +1,227 @@
688+// ------------------------------------------------------------------------------
689+// <autogenerated>
690+// This code was generated by a tool.
691+//
692+//
693+// Changes to this file may cause incorrect behavior and will be lost if
694+// the code is regenerated.
695+// </autogenerated>
696+// ------------------------------------------------------------------------------
697+
698+namespace GMail {
699+
700+
701+ public partial class GMailConfiguration {
702+
703+ private Gtk.Alignment alignment1;
704+
705+ private Gtk.VBox vbox1;
706+
707+ private Gtk.HBox hbox3;
708+
709+ private Gtk.Label label5;
710+
711+ private Gtk.Label label1;
712+
713+ private Gtk.SpinButton timeout;
714+
715+ private Gtk.HBox hbox1;
716+
717+ private Gtk.ScrolledWindow scrolledwindow1;
718+
719+ private Gtk.TreeView labelTreeView;
720+
721+ private Gtk.VBox vbox2;
722+
723+ private Gtk.Button btnMoveUp;
724+
725+ private Gtk.Button btnMoveDown;
726+
727+ private Gtk.Button btnRemove;
728+
729+ private Gtk.HBox hbox5;
730+
731+ private Gtk.Label label2;
732+
733+ private Gtk.Entry label;
734+
735+ private Gtk.Button btnAdd;
736+
737+ protected virtual void Build() {
738+ Stetic.Gui.Initialize(this);
739+ // Widget GMail.GMailConfiguration
740+ Stetic.BinContainer.Attach(this);
741+ this.Name = "GMail.GMailConfiguration";
742+ // Container child GMail.GMailConfiguration.Gtk.Container+ContainerChild
743+ this.alignment1 = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
744+ this.alignment1.Name = "alignment1";
745+ this.alignment1.BorderWidth = ((uint)(8));
746+ // Container child alignment1.Gtk.Container+ContainerChild
747+ this.vbox1 = new Gtk.VBox();
748+ this.vbox1.Name = "vbox1";
749+ this.vbox1.Spacing = 6;
750+ // Container child vbox1.Gtk.Box+BoxChild
751+ this.hbox3 = new Gtk.HBox();
752+ this.hbox3.Name = "hbox3";
753+ this.hbox3.Spacing = 6;
754+ // Container child hbox3.Gtk.Box+BoxChild
755+ this.label5 = new Gtk.Label();
756+ this.label5.Name = "label5";
757+ this.label5.LabelProp = Mono.Unix.Catalog.GetString("Check _Every");
758+ this.label5.UseUnderline = true;
759+ this.hbox3.Add(this.label5);
760+ Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox3[this.label5]));
761+ w1.Position = 0;
762+ w1.Expand = false;
763+ w1.Fill = false;
764+ // Container child hbox3.Gtk.Box+BoxChild
765+ this.label1 = new Gtk.Label();
766+ this.label1.Name = "label1";
767+ this.label1.LabelProp = Mono.Unix.Catalog.GetString("mins");
768+ this.hbox3.Add(this.label1);
769+ Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox3[this.label1]));
770+ w2.PackType = ((Gtk.PackType)(1));
771+ w2.Position = 1;
772+ w2.Expand = false;
773+ w2.Fill = false;
774+ // Container child hbox3.Gtk.Box+BoxChild
775+ this.timeout = new Gtk.SpinButton(1, 600, 1);
776+ this.timeout.CanFocus = true;
777+ this.timeout.Name = "timeout";
778+ this.timeout.Adjustment.PageIncrement = 5;
779+ this.timeout.ClimbRate = 1;
780+ this.timeout.Numeric = true;
781+ this.timeout.Value = 15;
782+ this.hbox3.Add(this.timeout);
783+ Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox3[this.timeout]));
784+ w3.PackType = ((Gtk.PackType)(1));
785+ w3.Position = 2;
786+ w3.Expand = false;
787+ w3.Fill = false;
788+ this.vbox1.Add(this.hbox3);
789+ Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox3]));
790+ w4.Position = 0;
791+ w4.Expand = false;
792+ w4.Fill = false;
793+ // Container child vbox1.Gtk.Box+BoxChild
794+ this.hbox1 = new Gtk.HBox();
795+ this.hbox1.Name = "hbox1";
796+ this.hbox1.Spacing = 6;
797+ // Container child hbox1.Gtk.Box+BoxChild
798+ this.scrolledwindow1 = new Gtk.ScrolledWindow();
799+ this.scrolledwindow1.CanFocus = true;
800+ this.scrolledwindow1.Name = "scrolledwindow1";
801+ this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
802+ // Container child scrolledwindow1.Gtk.Container+ContainerChild
803+ this.labelTreeView = new Gtk.TreeView();
804+ this.labelTreeView.CanFocus = true;
805+ this.labelTreeView.Name = "labelTreeView";
806+ this.scrolledwindow1.Add(this.labelTreeView);
807+ this.hbox1.Add(this.scrolledwindow1);
808+ Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow1]));
809+ w6.Position = 0;
810+ // Container child hbox1.Gtk.Box+BoxChild
811+ this.vbox2 = new Gtk.VBox();
812+ this.vbox2.Name = "vbox2";
813+ this.vbox2.Spacing = 6;
814+ // Container child vbox2.Gtk.Box+BoxChild
815+ this.btnMoveUp = new Gtk.Button();
816+ this.btnMoveUp.Sensitive = false;
817+ this.btnMoveUp.CanFocus = true;
818+ this.btnMoveUp.Name = "btnMoveUp";
819+ this.btnMoveUp.UseUnderline = true;
820+ this.btnMoveUp.Label = Mono.Unix.Catalog.GetString("Move _Up");
821+ this.vbox2.Add(this.btnMoveUp);
822+ Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.btnMoveUp]));
823+ w7.Position = 0;
824+ w7.Expand = false;
825+ w7.Fill = false;
826+ // Container child vbox2.Gtk.Box+BoxChild
827+ this.btnMoveDown = new Gtk.Button();
828+ this.btnMoveDown.Sensitive = false;
829+ this.btnMoveDown.CanFocus = true;
830+ this.btnMoveDown.Name = "btnMoveDown";
831+ this.btnMoveDown.UseUnderline = true;
832+ this.btnMoveDown.Label = Mono.Unix.Catalog.GetString("Move _Down");
833+ this.vbox2.Add(this.btnMoveDown);
834+ Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox2[this.btnMoveDown]));
835+ w8.Position = 1;
836+ w8.Expand = false;
837+ w8.Fill = false;
838+ // Container child vbox2.Gtk.Box+BoxChild
839+ this.btnRemove = new Gtk.Button();
840+ this.btnRemove.Sensitive = false;
841+ this.btnRemove.CanFocus = true;
842+ this.btnRemove.Name = "btnRemove";
843+ this.btnRemove.UseUnderline = true;
844+ this.btnRemove.Label = Mono.Unix.Catalog.GetString("_Remove");
845+ this.vbox2.Add(this.btnRemove);
846+ Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox2[this.btnRemove]));
847+ w9.Position = 2;
848+ w9.Expand = false;
849+ w9.Fill = false;
850+ this.hbox1.Add(this.vbox2);
851+ Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox2]));
852+ w10.Position = 1;
853+ w10.Expand = false;
854+ w10.Fill = false;
855+ this.vbox1.Add(this.hbox1);
856+ Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
857+ w11.Position = 1;
858+ w11.Expand = false;
859+ w11.Fill = false;
860+ // Container child vbox1.Gtk.Box+BoxChild
861+ this.hbox5 = new Gtk.HBox();
862+ this.hbox5.Name = "hbox5";
863+ this.hbox5.Spacing = 6;
864+ // Container child hbox5.Gtk.Box+BoxChild
865+ this.label2 = new Gtk.Label();
866+ this.label2.Name = "label2";
867+ this.label2.LabelProp = Mono.Unix.Catalog.GetString("Add _Label");
868+ this.label2.UseUnderline = true;
869+ this.hbox5.Add(this.label2);
870+ Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox5[this.label2]));
871+ w12.Position = 0;
872+ w12.Expand = false;
873+ w12.Fill = false;
874+ // Container child hbox5.Gtk.Box+BoxChild
875+ this.label = new Gtk.Entry();
876+ this.label.CanFocus = true;
877+ this.label.Name = "label";
878+ this.label.IsEditable = true;
879+ this.label.InvisibleChar = '●';
880+ this.label.Xalign = 1F;
881+ this.hbox5.Add(this.label);
882+ Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox5[this.label]));
883+ w13.Position = 1;
884+ // Container child hbox5.Gtk.Box+BoxChild
885+ this.btnAdd = new Gtk.Button();
886+ this.btnAdd.CanFocus = true;
887+ this.btnAdd.Name = "btnAdd";
888+ this.btnAdd.UseUnderline = true;
889+ this.btnAdd.Label = Mono.Unix.Catalog.GetString("_Add");
890+ this.hbox5.Add(this.btnAdd);
891+ Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.hbox5[this.btnAdd]));
892+ w14.Position = 2;
893+ w14.Expand = false;
894+ w14.Fill = false;
895+ this.vbox1.Add(this.hbox5);
896+ Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox5]));
897+ w15.Position = 2;
898+ w15.Expand = false;
899+ w15.Fill = false;
900+ this.alignment1.Add(this.vbox1);
901+ this.Add(this.alignment1);
902+ if ((this.Child != null)) {
903+ this.Child.ShowAll();
904+ }
905+ this.label5.MnemonicWidget = this.timeout;
906+ this.Show();
907+ this.timeout.FocusOutEvent += new Gtk.FocusOutEventHandler(this.OnTimeoutFocusOut);
908+ this.btnMoveUp.Clicked += new System.EventHandler(this.OnMoveUpClicked);
909+ this.btnMoveDown.Clicked += new System.EventHandler(this.OnMoveDownClicked);
910+ this.btnRemove.Clicked += new System.EventHandler(this.OnRemoveClicked);
911+ this.btnAdd.Clicked += new System.EventHandler(this.OnAddClicked);
912+ }
913+ }
914+}
915
916=== added file 'GMailDocklet/gtk-gui/generated.cs'
917--- GMailDocklet/gtk-gui/generated.cs 1970-01-01 00:00:00 +0000
918+++ GMailDocklet/gtk-gui/generated.cs 2009-07-02 08:16:56 +0000
919@@ -0,0 +1,82 @@
920+// ------------------------------------------------------------------------------
921+// <autogenerated>
922+// This code was generated by a tool.
923+//
924+//
925+// Changes to this file may cause incorrect behavior and will be lost if
926+// the code is regenerated.
927+// </autogenerated>
928+// ------------------------------------------------------------------------------
929+
930+namespace Stetic {
931+
932+
933+ internal class Gui {
934+
935+ private static bool initialized;
936+
937+ internal static void Initialize(Gtk.Widget iconRenderer) {
938+ if ((Stetic.Gui.initialized == false)) {
939+ Stetic.Gui.initialized = true;
940+ }
941+ }
942+ }
943+
944+ internal class BinContainer {
945+
946+ private Gtk.Widget child;
947+
948+ private Gtk.UIManager uimanager;
949+
950+ public static BinContainer Attach(Gtk.Bin bin) {
951+ BinContainer bc = new BinContainer();
952+ bin.SizeRequested += new Gtk.SizeRequestedHandler(bc.OnSizeRequested);
953+ bin.SizeAllocated += new Gtk.SizeAllocatedHandler(bc.OnSizeAllocated);
954+ bin.Added += new Gtk.AddedHandler(bc.OnAdded);
955+ return bc;
956+ }
957+
958+ private void OnSizeRequested(object sender, Gtk.SizeRequestedArgs args) {
959+ if ((this.child != null)) {
960+ args.Requisition = this.child.SizeRequest();
961+ }
962+ }
963+
964+ private void OnSizeAllocated(object sender, Gtk.SizeAllocatedArgs args) {
965+ if ((this.child != null)) {
966+ this.child.Allocation = args.Allocation;
967+ }
968+ }
969+
970+ private void OnAdded(object sender, Gtk.AddedArgs args) {
971+ this.child = args.Widget;
972+ }
973+
974+ public void SetUiManager(Gtk.UIManager uim) {
975+ this.uimanager = uim;
976+ this.child.Realized += new System.EventHandler(this.OnRealized);
977+ }
978+
979+ private void OnRealized(object sender, System.EventArgs args) {
980+ if ((this.uimanager != null)) {
981+ Gtk.Widget w;
982+ w = this.child.Toplevel;
983+ if (((w != null) && typeof(Gtk.Window).IsInstanceOfType(w))) {
984+ ((Gtk.Window)(w)).AddAccelGroup(this.uimanager.AccelGroup);
985+ this.uimanager = null;
986+ }
987+ }
988+ }
989+ }
990+
991+ internal class ActionGroups {
992+
993+ public static Gtk.ActionGroup GetActionGroup(System.Type type) {
994+ return Stetic.ActionGroups.GetActionGroup(type.FullName);
995+ }
996+
997+ public static Gtk.ActionGroup GetActionGroup(string name) {
998+ return null;
999+ }
1000+ }
1001+}
1002
1003=== added file 'GMailDocklet/gtk-gui/gui.stetic'
1004--- GMailDocklet/gtk-gui/gui.stetic 1970-01-01 00:00:00 +0000
1005+++ GMailDocklet/gtk-gui/gui.stetic 2009-07-02 08:16:56 +0000
1006@@ -0,0 +1,235 @@
1007+<?xml version="1.0" encoding="utf-8"?>
1008+<stetic-interface>
1009+ <configuration>
1010+ <images-root-path>..</images-root-path>
1011+ <target-gtk-version>2.12</target-gtk-version>
1012+ </configuration>
1013+ <import>
1014+ <widget-library name="Do.Interface.Linux, Version=0.9.0.0, Culture=neutral" />
1015+ <widget-library name="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />
1016+ <widget-library name="../../../../trunk/do/build/Do.Interface.Linux.Docky.dll" />
1017+ <widget-library name="../bin/Debug/GMailDocklet.dll" internal="true" />
1018+ </import>
1019+ <widget class="Gtk.Bin" id="GMail.GMailConfiguration" design-size="432 183">
1020+ <property name="MemberName" />
1021+ <child>
1022+ <widget class="Gtk.Alignment" id="alignment1">
1023+ <property name="MemberName" />
1024+ <property name="BorderWidth">8</property>
1025+ <child>
1026+ <widget class="Gtk.VBox" id="vbox1">
1027+ <property name="MemberName" />
1028+ <property name="Spacing">6</property>
1029+ <child>
1030+ <widget class="Gtk.HBox" id="hbox3">
1031+ <property name="MemberName" />
1032+ <property name="Spacing">6</property>
1033+ <child>
1034+ <widget class="Gtk.Label" id="label5">
1035+ <property name="MemberName" />
1036+ <property name="LabelProp" translatable="yes">Check _Every</property>
1037+ <property name="UseUnderline">True</property>
1038+ <property name="MnemonicWidget">timeout</property>
1039+ </widget>
1040+ <packing>
1041+ <property name="Position">0</property>
1042+ <property name="AutoSize">True</property>
1043+ <property name="Expand">False</property>
1044+ <property name="Fill">False</property>
1045+ </packing>
1046+ </child>
1047+ <child>
1048+ <widget class="Gtk.Label" id="label1">
1049+ <property name="MemberName" />
1050+ <property name="LabelProp" translatable="yes">mins</property>
1051+ </widget>
1052+ <packing>
1053+ <property name="PackType">End</property>
1054+ <property name="Position">1</property>
1055+ <property name="AutoSize">True</property>
1056+ <property name="Expand">False</property>
1057+ <property name="Fill">False</property>
1058+ </packing>
1059+ </child>
1060+ <child>
1061+ <widget class="Gtk.SpinButton" id="timeout">
1062+ <property name="MemberName" />
1063+ <property name="CanFocus">True</property>
1064+ <property name="Lower">1</property>
1065+ <property name="Upper">600</property>
1066+ <property name="PageIncrement">5</property>
1067+ <property name="StepIncrement">1</property>
1068+ <property name="ClimbRate">1</property>
1069+ <property name="Numeric">True</property>
1070+ <property name="Value">15</property>
1071+ <signal name="FocusOutEvent" handler="OnTimeoutFocusOut" />
1072+ </widget>
1073+ <packing>
1074+ <property name="PackType">End</property>
1075+ <property name="Position">2</property>
1076+ <property name="AutoSize">True</property>
1077+ <property name="Expand">False</property>
1078+ <property name="Fill">False</property>
1079+ </packing>
1080+ </child>
1081+ </widget>
1082+ <packing>
1083+ <property name="Position">0</property>
1084+ <property name="AutoSize">True</property>
1085+ <property name="Expand">False</property>
1086+ <property name="Fill">False</property>
1087+ </packing>
1088+ </child>
1089+ <child>
1090+ <widget class="Gtk.HBox" id="hbox1">
1091+ <property name="MemberName" />
1092+ <property name="Spacing">6</property>
1093+ <child>
1094+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
1095+ <property name="MemberName" />
1096+ <property name="CanFocus">True</property>
1097+ <property name="ShadowType">In</property>
1098+ <child>
1099+ <widget class="Gtk.TreeView" id="labelTreeView">
1100+ <property name="MemberName" />
1101+ <property name="CanFocus">True</property>
1102+ </widget>
1103+ </child>
1104+ </widget>
1105+ <packing>
1106+ <property name="Position">0</property>
1107+ <property name="AutoSize">True</property>
1108+ </packing>
1109+ </child>
1110+ <child>
1111+ <widget class="Gtk.VBox" id="vbox2">
1112+ <property name="MemberName" />
1113+ <property name="Spacing">6</property>
1114+ <child>
1115+ <widget class="Gtk.Button" id="btnMoveUp">
1116+ <property name="MemberName" />
1117+ <property name="Sensitive">False</property>
1118+ <property name="CanFocus">True</property>
1119+ <property name="Type">TextOnly</property>
1120+ <property name="Label" translatable="yes">Move _Up</property>
1121+ <property name="UseUnderline">True</property>
1122+ <signal name="Clicked" handler="OnMoveUpClicked" />
1123+ </widget>
1124+ <packing>
1125+ <property name="Position">0</property>
1126+ <property name="AutoSize">True</property>
1127+ <property name="Expand">False</property>
1128+ <property name="Fill">False</property>
1129+ </packing>
1130+ </child>
1131+ <child>
1132+ <widget class="Gtk.Button" id="btnMoveDown">
1133+ <property name="MemberName" />
1134+ <property name="Sensitive">False</property>
1135+ <property name="CanFocus">True</property>
1136+ <property name="Type">TextOnly</property>
1137+ <property name="Label" translatable="yes">Move _Down</property>
1138+ <property name="UseUnderline">True</property>
1139+ <signal name="Clicked" handler="OnMoveDownClicked" />
1140+ </widget>
1141+ <packing>
1142+ <property name="Position">1</property>
1143+ <property name="AutoSize">True</property>
1144+ <property name="Expand">False</property>
1145+ <property name="Fill">False</property>
1146+ </packing>
1147+ </child>
1148+ <child>
1149+ <widget class="Gtk.Button" id="btnRemove">
1150+ <property name="MemberName" />
1151+ <property name="Sensitive">False</property>
1152+ <property name="CanFocus">True</property>
1153+ <property name="Type">TextOnly</property>
1154+ <property name="Label" translatable="yes">_Remove</property>
1155+ <property name="UseUnderline">True</property>
1156+ <signal name="Clicked" handler="OnRemoveClicked" />
1157+ </widget>
1158+ <packing>
1159+ <property name="Position">2</property>
1160+ <property name="AutoSize">True</property>
1161+ <property name="Expand">False</property>
1162+ <property name="Fill">False</property>
1163+ </packing>
1164+ </child>
1165+ </widget>
1166+ <packing>
1167+ <property name="Position">1</property>
1168+ <property name="AutoSize">True</property>
1169+ <property name="Expand">False</property>
1170+ <property name="Fill">False</property>
1171+ </packing>
1172+ </child>
1173+ </widget>
1174+ <packing>
1175+ <property name="Position">1</property>
1176+ <property name="AutoSize">True</property>
1177+ <property name="Expand">False</property>
1178+ <property name="Fill">False</property>
1179+ </packing>
1180+ </child>
1181+ <child>
1182+ <widget class="Gtk.HBox" id="hbox5">
1183+ <property name="MemberName" />
1184+ <property name="Spacing">6</property>
1185+ <child>
1186+ <widget class="Gtk.Label" id="label2">
1187+ <property name="MemberName" />
1188+ <property name="LabelProp" translatable="yes">Add _Label</property>
1189+ <property name="UseUnderline">True</property>
1190+ <property name="MnemonicWidget">location</property>
1191+ </widget>
1192+ <packing>
1193+ <property name="Position">0</property>
1194+ <property name="AutoSize">True</property>
1195+ <property name="Expand">False</property>
1196+ <property name="Fill">False</property>
1197+ </packing>
1198+ </child>
1199+ <child>
1200+ <widget class="Gtk.Entry" id="label">
1201+ <property name="MemberName" />
1202+ <property name="CanFocus">True</property>
1203+ <property name="IsEditable">True</property>
1204+ <property name="InvisibleChar">●</property>
1205+ <property name="Xalign">1</property>
1206+ </widget>
1207+ <packing>
1208+ <property name="Position">1</property>
1209+ <property name="AutoSize">True</property>
1210+ </packing>
1211+ </child>
1212+ <child>
1213+ <widget class="Gtk.Button" id="btnAdd">
1214+ <property name="MemberName" />
1215+ <property name="CanFocus">True</property>
1216+ <property name="Type">TextOnly</property>
1217+ <property name="Label" translatable="yes">_Add</property>
1218+ <property name="UseUnderline">True</property>
1219+ <signal name="Clicked" handler="OnAddClicked" />
1220+ </widget>
1221+ <packing>
1222+ <property name="Position">2</property>
1223+ <property name="AutoSize">True</property>
1224+ <property name="Expand">False</property>
1225+ <property name="Fill">False</property>
1226+ </packing>
1227+ </child>
1228+ </widget>
1229+ <packing>
1230+ <property name="Position">2</property>
1231+ <property name="AutoSize">True</property>
1232+ <property name="Expand">False</property>
1233+ <property name="Fill">False</property>
1234+ </packing>
1235+ </child>
1236+ </widget>
1237+ </child>
1238+ </widget>
1239+ </child>
1240+ </widget>
1241+</stetic-interface>
1242
1243=== added directory 'GMailDocklet/src'
1244=== added file 'GMailDocklet/src/GMailAtom.cs'
1245--- GMailDocklet/src/GMailAtom.cs 1970-01-01 00:00:00 +0000
1246+++ GMailDocklet/src/GMailAtom.cs 2009-07-03 05:11:57 +0000
1247@@ -0,0 +1,274 @@
1248+//
1249+// Copyright (C) 2009 GNOME Do
1250+//
1251+// This program is free software: you can redistribute it and/or modify
1252+// it under the terms of the GNU General Public License as published by
1253+// the Free Software Foundation, either version 3 of the License, or
1254+// (at your option) any later version.
1255+//
1256+// This program is distributed in the hope that it will be useful,
1257+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1258+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1259+// GNU General Public License for more details.
1260+//
1261+// You should have received a copy of the GNU General Public License
1262+// along with this program. If not, see <http://www.gnu.org/licenses/>.
1263+//
1264+
1265+using System;
1266+using System.Collections.Generic;
1267+using System.Net;
1268+using System.Xml;
1269+
1270+using Gdk;
1271+using Gtk;
1272+using Cairo;
1273+using Mono.Unix;
1274+
1275+using Do.Interface;
1276+using Do.Interface.CairoUtils;
1277+using Do.Platform;
1278+using Do.Platform.Linux;
1279+
1280+using Docky.Core;
1281+using Docky.Interface;
1282+using Docky.Interface.Menus;
1283+
1284+namespace GMail
1285+{
1286+ public enum GMailState
1287+ {
1288+ Normal,
1289+ Reloading,
1290+ ManualReload,
1291+ Error
1292+ }
1293+
1294+ // remove when ServicePointManager.ServerCertificateValidationCallback implemented in mono
1295+ class CertHandler : System.Net.ICertificatePolicy
1296+ {
1297+ public bool CheckValidationResult(System.Net.ServicePoint srvPoint, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Net.WebRequest request, int certificateProblem)
1298+ {
1299+ return true;
1300+ }
1301+ }
1302+
1303+ public struct UnreadMessage
1304+ {
1305+ public string Topic;
1306+ public string From;
1307+ public string FromName;
1308+ public string FromEmail;
1309+ public DateTime SendDate;
1310+ public string Link;
1311+ }
1312+
1313+ /// <summary>
1314+ /// </summary>
1315+ public class GMailAtom
1316+ {
1317+ public static event EventHandler GMailChecked;
1318+ public static event EventHandler GMailChecking;
1319+ public static event EventHandler<GMailErrorArgs> GMailFailed;
1320+
1321+ public static GMailState State { get; protected set; }
1322+
1323+ public static int UnreadCount { get; protected set; }
1324+
1325+ public static bool HasUnread {
1326+ get {
1327+ return UnreadCount > 0 && State != GMailState.Error;
1328+ }
1329+ }
1330+
1331+ static GMailAtom () {
1332+ State = GMailState.ManualReload;
1333+ Services.Network.StateChanged += HandleStateChanged;
1334+ // this is not implemented in mono yet
1335+// ServicePointManager.ServerCertificateValidationCallback +=
1336+// (sender, cert, chain, errors) => { return true; };
1337+ }
1338+
1339+ static void HandleStateChanged (object o, NetworkStateChangedEventArgs state)
1340+ {
1341+ ResetTimer ();
1342+ }
1343+
1344+ static List<UnreadMessage> messages = new List<UnreadMessage> ();
1345+
1346+ public static IEnumerable<UnreadMessage> Messages {
1347+ get {
1348+ return messages as IEnumerable<UnreadMessage>;
1349+ }
1350+ }
1351+
1352+ static uint UpdateTimer { get; set; }
1353+
1354+ public static void ResetTimer (bool manual)
1355+ {
1356+ if (manual)
1357+ State = GMailState.ManualReload;
1358+ ResetTimer ();
1359+ }
1360+
1361+ public static void ResetTimer ()
1362+ {
1363+ if (UpdateTimer != 0)
1364+ GLib.Source.Remove (UpdateTimer);
1365+
1366+ if (!Services.Network.IsConnected)
1367+ return;
1368+
1369+ CheckGMail ();
1370+
1371+ UpdateTimer = GLib.Timeout.Add (Preferences.RefreshRate * 60 * 1000, () => { CheckGMail (); return true; });
1372+ }
1373+
1374+ public static void StopTimer ()
1375+ {
1376+ GLib.Source.Remove (UpdateTimer);
1377+ UpdateTimer = 0;
1378+ }
1379+
1380+ public static string CurrentLabel {
1381+ get {
1382+ if (Preferences.CurrentLabel >= 0 && Preferences.CurrentLabel < Preferences.Labels.Length)
1383+ return Preferences.Labels [Preferences.CurrentLabel];
1384+ else
1385+ return "Inbox";
1386+ }
1387+ }
1388+
1389+ public static bool ValidateCredentials (string username, string password)
1390+ {
1391+ try {
1392+ String[] login = username.Split (new char[] {'@'});
1393+ string user = login [0];
1394+ string domain = login.Length > 1 ? login [1] : "gmail.com";
1395+ string url = "https://mail.google.com/a/" + domain;
1396+ if (domain.Equals ("gmail.com") || domain.Equals ("googlemail.com"))
1397+ url = "https://mail.google.com/mail";
1398+ url += "/feed/atom/";
1399+
1400+ Log<GMailAtom>.Info ("Fetching Atom feed: " + url);
1401+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create (url);
1402+ request.UserAgent = @"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10";
1403+ request.Credentials = new NetworkCredential (user, password);
1404+ // remove when ServicePointManager.ServerCertificateValidationCallback implemented in mono
1405+ System.Net.ServicePointManager.CertificatePolicy = new CertHandler ();
1406+
1407+ using (HttpWebResponse response = (HttpWebResponse)request.GetResponse ())
1408+ ;
1409+ } catch (WebException e) {
1410+ if (e.Message.IndexOf ("401") != -1) return false;
1411+ } catch (Exception) { }
1412+
1413+ return true;
1414+ }
1415+
1416+ static void CheckGMail ()
1417+ {
1418+ Services.Application.RunOnThread (() => {
1419+ try {
1420+ Services.Application.RunOnMainThread (OnGMailChecking);
1421+
1422+ String[] login = Preferences.User.Split (new char[] {'@'});
1423+ string user = login [0];
1424+ string domain = login.Length > 1 ? login [1] : "gmail.com";
1425+ string url = "https://mail.google.com/a/" + domain;
1426+ if (domain.Equals ("gmail.com") || domain.Equals ("googlemail.com"))
1427+ url = "https://mail.google.com/mail";
1428+ url += "/feed/atom/" + CurrentLabel;
1429+
1430+ Log<GMailAtom>.Info ("Fetching Atom feed: " + url);
1431+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create (url);
1432+ request.UserAgent = @"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10";
1433+ request.Credentials = new NetworkCredential (user, Preferences.Password);
1434+ // remove when ServicePointManager.ServerCertificateValidationCallback implemented in mono
1435+ System.Net.ServicePointManager.CertificatePolicy = new CertHandler ();
1436+
1437+ XmlDocument xml = new XmlDocument ();
1438+ XmlNamespaceManager nsmgr = new XmlNamespaceManager (xml.NameTable);
1439+ nsmgr.AddNamespace ("atom", "http://purl.org/atom/ns#");
1440+
1441+ using (HttpWebResponse response = (HttpWebResponse)request.GetResponse ())
1442+ xml.Load (response.GetResponseStream ());
1443+
1444+ List<UnreadMessage> tmp = new List<UnreadMessage> ();
1445+ XmlNodeList nodelist = xml.SelectNodes ("//atom:entry", nsmgr);
1446+
1447+ for (int i = 0; i < nodelist.Count; i++)
1448+ {
1449+ XmlNode item = nodelist.Item (i);
1450+
1451+ UnreadMessage message = new UnreadMessage ();
1452+ message.Topic = item.SelectSingleNode ("atom:title", nsmgr).InnerText;
1453+ message.FromName = item.SelectSingleNode ("atom:author/atom:name", nsmgr).InnerText;
1454+ message.FromEmail = item.SelectSingleNode ("atom:author/atom:email", nsmgr).InnerText;
1455+ message.From = message.FromName + " <" + message.FromEmail + ">";
1456+ try {
1457+ message.SendDate = DateTime.Parse (item.SelectSingleNode ("atom:modified", nsmgr).InnerText);
1458+ } catch (Exception) {}
1459+ message.Link = item.SelectSingleNode ("atom:link", nsmgr).Attributes ["href"].InnerText;
1460+
1461+ tmp.Add (message);
1462+ }
1463+
1464+ if (tmp.Count > 5)
1465+ Services.Notifications.Notify (CurrentLabel, "You have " + tmp.Count + " unread messages", "gmail-logo.png@" + State.GetType ().Assembly.FullName);
1466+ else
1467+ foreach (UnreadMessage message in tmp)
1468+ if (message.SendDate > Preferences.LastChecked)
1469+ Services.Notifications.Notify (message.Topic, "From: " + message.From, "gmail-logo.png@" + State.GetType ().Assembly.FullName);
1470+
1471+ try {
1472+ Preferences.LastChecked = DateTime.Parse (xml.SelectSingleNode ("/atom:feed/atom:modified", nsmgr).InnerText);
1473+ } catch (Exception) { Preferences.LastChecked = DateTime.Now; }
1474+
1475+ messages = tmp;
1476+ UnreadCount = messages.Count;
1477+ Services.Application.RunOnMainThread (OnGMailChecked);
1478+ } catch (NullReferenceException) {
1479+ Services.Application.RunOnMainThread (() =>
1480+ OnGMailFailed ("Feed Error"));
1481+ } catch (XmlException) {
1482+ Services.Application.RunOnMainThread (() =>
1483+ OnGMailFailed ("Feed Error"));
1484+ } catch (WebException e) {
1485+ if (e.Message.IndexOf ("401") != -1)
1486+ Services.Application.RunOnMainThread (() =>
1487+ OnGMailFailed ("Invalid Username"));
1488+ else
1489+ Services.Application.RunOnMainThread (() =>
1490+ OnGMailFailed ("Network Error"));
1491+ } catch (Exception e) {
1492+ Log<GMailAtom>.Error (e.ToString ());
1493+ Services.Application.RunOnMainThread (() =>
1494+ OnGMailFailed ("General Error"));
1495+ }
1496+ });
1497+ }
1498+
1499+ public static void OnGMailChecked ()
1500+ {
1501+ State = GMailState.Normal;
1502+ if (GMailChecked != null)
1503+ GMailChecked (null, EventArgs.Empty);
1504+ }
1505+
1506+ public static void OnGMailChecking ()
1507+ {
1508+ if (State != GMailState.ManualReload)
1509+ State = GMailState.Reloading;
1510+ if (GMailChecking != null)
1511+ GMailChecking (null, EventArgs.Empty);
1512+ }
1513+
1514+ public static void OnGMailFailed (string error)
1515+ {
1516+ State = GMailState.Error;
1517+ if (GMailFailed != null)
1518+ GMailFailed (null, new GMailErrorArgs (error));
1519+ }
1520+ }
1521+}
1522
1523=== added file 'GMailDocklet/src/GMailConfiguration.cs'
1524--- GMailDocklet/src/GMailConfiguration.cs 1970-01-01 00:00:00 +0000
1525+++ GMailDocklet/src/GMailConfiguration.cs 2009-07-02 08:16:56 +0000
1526@@ -0,0 +1,170 @@
1527+//
1528+// Copyright (C) 2009 GNOME Do
1529+//
1530+// This program is free software: you can redistribute it and/or modify
1531+// it under the terms of the GNU General Public License as published by
1532+// the Free Software Foundation, either version 3 of the License, or
1533+// (at your option) any later version.
1534+//
1535+// This program is distributed in the hope that it will be useful,
1536+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1537+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1538+// GNU General Public License for more details.
1539+//
1540+// You should have received a copy of the GNU General Public License
1541+// along with this program. If not, see <http://www.gnu.org/licenses/>.
1542+//
1543+
1544+using System;
1545+using System.Collections.Generic;
1546+
1547+using Gtk;
1548+
1549+using Do.Platform;
1550+
1551+namespace GMail
1552+{
1553+ [System.ComponentModel.Category("File")]
1554+ [System.ComponentModel.ToolboxItem(true)]
1555+ public partial class GMailConfiguration : Bin
1556+ {
1557+ TreeStore labelTreeStore = new TreeStore (typeof (string));
1558+
1559+ public GMailConfiguration ()
1560+ {
1561+ Build ();
1562+
1563+ labelTreeView.Model = labelTreeStore;
1564+ labelTreeView.Selection.Changed += OnLabelSelectionChanged;
1565+ labelTreeView.AppendColumn ("Label", new CellRendererText (), "text", 0);
1566+ UpdateLabels ();
1567+
1568+ timeout.Value = Preferences.RefreshRate;
1569+ }
1570+
1571+ void UpdateLabels ()
1572+ {
1573+ labelTreeStore.Clear ();
1574+ for (int i = 0; i < Preferences.Labels.Length; i++)
1575+ labelTreeStore.AppendValues (Preferences.Labels [i]);
1576+ }
1577+
1578+ protected virtual void OnTimeoutFocusOut (object o, Gtk.FocusOutEventArgs args)
1579+ {
1580+ Preferences.RefreshRate = (uint) timeout.ValueAsInt;
1581+ }
1582+
1583+ protected virtual void OnLabelSelectionChanged (object o, System.EventArgs args)
1584+ {
1585+ TreeIter iter;
1586+ TreeModel model;
1587+
1588+ if (((TreeSelection)o).GetSelected (out model, out iter))
1589+ {
1590+ string selected = (string) model.GetValue (iter, 0);
1591+ int index = FindLabelIndex (selected);
1592+
1593+ label.Text = selected;
1594+ btnMoveUp.Sensitive = index > 0;
1595+ btnRemove.Sensitive = true;
1596+ } else {
1597+ btnMoveUp.Sensitive = false;
1598+ btnMoveDown.Sensitive = false;
1599+ btnRemove.Sensitive = false;
1600+ }
1601+ }
1602+
1603+ protected virtual void OnAddClicked (object sender, System.EventArgs e)
1604+ {
1605+ if (label.Text.Trim ().Length == 0)
1606+ return;
1607+ if (FindLabelIndex (label.Text) != -1)
1608+ return;
1609+
1610+ string[] labels = new string [Preferences.Labels.Length + 1];
1611+ Array.Copy (Preferences.Labels, 0, labels, 0, Preferences.Labels.Length);
1612+ labels [Preferences.Labels.Length] = label.Text.Trim ();
1613+
1614+ Preferences.Labels = labels;
1615+ UpdateLabels ();
1616+ }
1617+
1618+ int FindLabelIndex (string label)
1619+ {
1620+ for (int i = 0; i < Preferences.Labels.Length; i++)
1621+ if (Preferences.Labels [i].Equals (label))
1622+ return i;
1623+
1624+ return -1;
1625+ }
1626+
1627+ protected virtual void OnRemoveClicked (object sender, System.EventArgs e)
1628+ {
1629+ TreeIter iter;
1630+ TreeModel model;
1631+
1632+ if (labelTreeView.Selection.GetSelected (out model, out iter))
1633+ {
1634+ string removedLabel = (string) model.GetValue (iter, 0);
1635+ int index = FindLabelIndex (removedLabel);
1636+
1637+ string[] labels = new string [Preferences.Labels.Length - 1];
1638+ Array.Copy (Preferences.Labels, 0, labels, 0, index);
1639+ Array.Copy (Preferences.Labels, index + 1, labels, index, Preferences.Labels.Length - index - 1);
1640+
1641+ Preferences.Labels = labels;
1642+
1643+ if (removedLabel.Equals (GMailAtom.CurrentLabel) && Preferences.CurrentLabel >= 0)
1644+ Preferences.CurrentLabel--;
1645+
1646+ UpdateLabels ();
1647+ }
1648+ }
1649+
1650+ protected virtual void OnMoveDownClicked (object sender, System.EventArgs e)
1651+ {
1652+ TreeIter iter;
1653+ TreeModel model;
1654+
1655+ if (labelTreeView.Selection.GetSelected (out model, out iter))
1656+ {
1657+ TreePath[] paths = labelTreeView.Selection.GetSelectedRows ();
1658+ int index = FindLabelIndex ((string) model.GetValue (iter, 0));
1659+
1660+ string[] labels = Preferences.Labels;
1661+ string temp = labels [index];
1662+ labels [index] = labels [index + 1];
1663+ labels [index + 1] = temp;
1664+
1665+ Preferences.Labels = labels;
1666+ UpdateLabels ();
1667+ paths [0].Next ();
1668+ labelTreeView.Selection.SelectPath (paths [0]);
1669+ labelTreeView.ScrollToCell (paths [0], null, false, 0, 0);
1670+ }
1671+ }
1672+
1673+ protected virtual void OnMoveUpClicked (object sender, System.EventArgs e)
1674+ {
1675+ TreeIter iter;
1676+ TreeModel model;
1677+
1678+ if (labelTreeView.Selection.GetSelected (out model, out iter))
1679+ {
1680+ TreePath[] paths = labelTreeView.Selection.GetSelectedRows ();
1681+ int index = FindLabelIndex ((string) model.GetValue (iter, 0));
1682+
1683+ string[] labels = Preferences.Labels;
1684+ string temp = labels [index];
1685+ labels [index] = labels [index - 1];
1686+ labels [index - 1] = temp;
1687+
1688+ Preferences.Labels = labels;
1689+ UpdateLabels ();
1690+ paths [0].Prev ();
1691+ labelTreeView.Selection.SelectPath (paths [0]);
1692+ labelTreeView.ScrollToCell (paths [0], null, false, 0, 0);
1693+ }
1694+ }
1695+ }
1696+}
1697
1698=== added file 'GMailDocklet/src/GMailDocklet.cs'
1699--- GMailDocklet/src/GMailDocklet.cs 1970-01-01 00:00:00 +0000
1700+++ GMailDocklet/src/GMailDocklet.cs 2009-07-03 05:11:37 +0000
1701@@ -0,0 +1,221 @@
1702+//
1703+// Copyright (C) 2009 GNOME Do
1704+//
1705+// This program is free software: you can redistribute it and/or modify
1706+// it under the terms of the GNU General Public License as published by
1707+// the Free Software Foundation, either version 3 of the License, or
1708+// (at your option) any later version.
1709+//
1710+// This program is distributed in the hope that it will be useful,
1711+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1712+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1713+// GNU General Public License for more details.
1714+//
1715+// You should have received a copy of the GNU General Public License
1716+// along with this program. If not, see <http://www.gnu.org/licenses/>.
1717+//
1718+
1719+using System;
1720+using System.Linq;
1721+using System.Collections.Generic;
1722+
1723+using Gdk;
1724+using Gtk;
1725+using Cairo;
1726+using Mono.Unix;
1727+
1728+using Do.Interface;
1729+using Do.Interface.CairoUtils;
1730+using Do.Platform;
1731+using Do.Platform.Linux;
1732+
1733+using Docky.Core;
1734+using Docky.Interface;
1735+using Docky.Interface.Menus;
1736+
1737+namespace GMail
1738+{
1739+ /// <summary>
1740+ /// </summary>
1741+ public class GMailDocklet : AbstractDockletItem, IRightClickable
1742+ {
1743+ public override string Name {
1744+ get {
1745+ return Catalog.GetString ("GMail");
1746+ }
1747+ }
1748+
1749+ public override ScalingType ScalingType {
1750+ get {
1751+ return ScalingType.Downscaled;
1752+ }
1753+ }
1754+
1755+ /// <summary>
1756+ /// </summary>
1757+ public GMailDocklet ()
1758+ {
1759+ GMailAtom.GMailChecked += GMailCheckedHandler;
1760+ GMailAtom.GMailChecking += GMailCheckingHandler;
1761+ GMailAtom.GMailFailed += GMailFailedHandler;
1762+
1763+ SetText (Catalog.GetString ("Checking mail..."));
1764+ }
1765+
1766+ public void GMailCheckedHandler (object obj, EventArgs e)
1767+ {
1768+ string status = "";
1769+ if (GMailAtom.UnreadCount == 0)
1770+ status = Catalog.GetString ("No new mail");
1771+ else if (GMailAtom.UnreadCount == 1)
1772+ status = Catalog.GetString ("1 unread message");
1773+ else
1774+ status = GMailAtom.UnreadCount + Catalog.GetString (" unread messages");
1775+ SetText (GMailAtom.CurrentLabel + " - " + status);
1776+
1777+ RedrawIcon ();
1778+ }
1779+
1780+ public void GMailCheckingHandler (object obj, EventArgs e)
1781+ {
1782+ SetText (Catalog.GetString ("Checking mail..."));
1783+ RedrawIcon ();
1784+ }
1785+
1786+ public void GMailFailedHandler (object obj, GMailErrorArgs e)
1787+ {
1788+ SetText (Catalog.GetString (e.Error));
1789+ RedrawIcon ();
1790+ }
1791+
1792+ protected override Surface MakeIconSurface (Cairo.Surface similar, int size)
1793+ {
1794+ Surface tmp_surface = similar.CreateSimilar (similar.Content, size, size);
1795+
1796+ using (Context cr = new Context (tmp_surface)) {
1797+ string icon = "gmail-logo.png@";
1798+ if (GMailAtom.State == GMailState.ManualReload || GMailAtom.State == GMailState.Error)
1799+ icon = "gmail-logo-dark.png@";
1800+
1801+ using (Gdk.Pixbuf pbuf = IconProvider.PixbufFromIconName (icon + GetType ().Assembly.FullName, size))
1802+ {
1803+ CairoHelper.SetSourcePixbuf (cr, pbuf, 0, 0);
1804+ if (GMailAtom.State == GMailState.ManualReload || !GMailAtom.HasUnread)
1805+ cr.PaintWithAlpha (.5);
1806+ else
1807+ cr.Paint ();
1808+ }
1809+
1810+ if (GMailAtom.HasUnread)
1811+ {
1812+ using (Gdk.Pixbuf pbuf = IconProvider.PixbufFromIconName ("badge-yellow.svg@" + GetType ().Assembly.FullName, size / 2))
1813+ {
1814+ CairoHelper.SetSourcePixbuf (cr, pbuf, size / 2, 0);
1815+ cr.PaintWithAlpha (0.9);
1816+ }
1817+
1818+ TextRenderContext textContext = new TextRenderContext (cr, string.Empty, size / 2);
1819+ textContext.Alignment = Pango.Alignment.Center;
1820+ textContext.EllipsizeMode = Pango.EllipsizeMode.None;
1821+
1822+ if (GMailAtom.UnreadCount < 100)
1823+ textContext.FontSize = size / 4;
1824+ else
1825+ textContext.FontSize = size / 5;
1826+ textContext.LeftCenteredPoint = new Gdk.Point (size / 2, size / 4);
1827+
1828+ textContext.Text = string.Format ("<b>{0}</b>", GMailAtom.UnreadCount);
1829+
1830+ DockServices.DrawingService.TextPathAtPoint (textContext);
1831+ cr.LineWidth = 2;
1832+ cr.Color = new Cairo.Color (0, 0, 0, 0.4);
1833+ cr.Stroke ();
1834+
1835+ DockServices.DrawingService.TextPathAtPoint (textContext);
1836+ cr.Color = new Cairo.Color (1, 1, 1, 1);
1837+ cr.Fill ();
1838+ }
1839+ }
1840+
1841+ return tmp_surface;
1842+ }
1843+
1844+ void OpenInbox ()
1845+ {
1846+ string label = GMailAtom.CurrentLabel;
1847+ if (label.Equals ("Inbox"))
1848+ Services.Environment.OpenUrl ("https://mail.google.com/mail/");
1849+ else
1850+ Services.Environment.OpenUrl ("https://mail.google.com/mail/#label/" + label);
1851+ }
1852+
1853+ public override void Clicked (uint button, Gdk.ModifierType state, PointD position)
1854+ {
1855+ OpenInbox ();
1856+ AnimationType = ClickAnimationType.Bounce;
1857+ base.Clicked (button, state, position);
1858+ }
1859+
1860+ public override void Scrolled (Gdk.ScrollDirection direction)
1861+ {
1862+ if (Preferences.Labels.Length == 0)
1863+ return;
1864+
1865+ if (direction == Gdk.ScrollDirection.Up)
1866+ Preferences.CurrentLabel--;
1867+ else if (direction == Gdk.ScrollDirection.Down)
1868+ Preferences.CurrentLabel++;
1869+
1870+ if (Preferences.CurrentLabel < -1)
1871+ Preferences.CurrentLabel = Preferences.Labels.Length - 1;
1872+ if (Preferences.CurrentLabel >= Preferences.Labels.Length)
1873+ Preferences.CurrentLabel = -1;
1874+
1875+ GMailAtom.ResetTimer (true);
1876+ base.Scrolled (direction);
1877+ }
1878+
1879+ public override void Dispose ()
1880+ {
1881+ GMailAtom.GMailChecked -= GMailCheckedHandler;
1882+ GMailAtom.GMailChecking -= GMailCheckingHandler;
1883+ GMailAtom.GMailFailed -= GMailFailedHandler;
1884+
1885+ base.Dispose ();
1886+ }
1887+
1888+ #region IRightClickable implementation
1889+
1890+ public event EventHandler RemoveClicked;
1891+
1892+ public IEnumerable<AbstractMenuArgs> GetMenuItems ()
1893+ {
1894+ yield return new SeparatorMenuButtonArgs ();
1895+
1896+ yield return new SimpleMenuButtonArgs (() => {
1897+ OpenInbox ();
1898+ AnimationType = ClickAnimationType.Bounce;
1899+ SetLastClick ();
1900+ },
1901+ Catalog.GetString ("View ") + GMailAtom.CurrentLabel,
1902+ "gmail-logo.png@" + GetType ().Assembly.FullName);
1903+
1904+ yield return new SeparatorMenuButtonArgs ();
1905+
1906+ if (GMailAtom.HasUnread) {
1907+ foreach (UnreadMessage message in GMailAtom.Messages.Take (10))
1908+ yield return new GMailMenuButtonArgs (message);
1909+
1910+ yield return new SeparatorMenuButtonArgs ();
1911+ }
1912+
1913+ yield return new SimpleMenuButtonArgs (() => {
1914+ GMailAtom.ResetTimer (true);
1915+ RedrawIcon ();
1916+ },
1917+ Catalog.GetString ("Check Now"), Gtk.Stock.Refresh);
1918+ }
1919+
1920+ #endregion
1921+ }
1922+}
1923
1924=== added file 'GMailDocklet/src/GMailErrorArgs.cs'
1925--- GMailDocklet/src/GMailErrorArgs.cs 1970-01-01 00:00:00 +0000
1926+++ GMailDocklet/src/GMailErrorArgs.cs 2009-06-27 21:02:52 +0000
1927@@ -0,0 +1,43 @@
1928+//
1929+// Copyright (C) 2009 GNOME Do
1930+//
1931+// This program is free software: you can redistribute it and/or modify
1932+// it under the terms of the GNU General Public License as published by
1933+// the Free Software Foundation, either version 3 of the License, or
1934+// (at your option) any later version.
1935+//
1936+// This program is distributed in the hope that it will be useful,
1937+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1938+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1939+// GNU General Public License for more details.
1940+//
1941+// You should have received a copy of the GNU General Public License
1942+// along with this program. If not, see <http://www.gnu.org/licenses/>.
1943+//
1944+
1945+using System;
1946+
1947+namespace GMail
1948+{
1949+ /// <summary>
1950+ /// A class for passing error messages from GMail events.
1951+ /// </summary>
1952+ public class GMailErrorArgs : EventArgs
1953+ {
1954+ /// <value>
1955+ /// The error message generated.
1956+ /// </value>
1957+ public string Error { get; protected set; }
1958+
1959+ /// <summary>
1960+ /// Constructs a new GMailErrorArgs object.
1961+ /// </summary>
1962+ /// <param name="error">
1963+ /// A <see cref="System.String"/> representing the error message.
1964+ /// </param>
1965+ public GMailErrorArgs (string error)
1966+ {
1967+ Error = error;
1968+ }
1969+ }
1970+}
1971
1972=== added file 'GMailDocklet/src/GMailItem.cs'
1973--- GMailDocklet/src/GMailItem.cs 1970-01-01 00:00:00 +0000
1974+++ GMailDocklet/src/GMailItem.cs 2009-06-27 21:02:52 +0000
1975@@ -0,0 +1,57 @@
1976+// GMailItemSource.cs
1977+//
1978+// GNOME Do is the legal property of its developers, whose names are too
1979+// numerous to list here. Please refer to the COPYRIGHT file distributed with
1980+// this source distribution.
1981+//
1982+// This program is free software: you can redistribute it and/or modify it under
1983+// the terms of the GNU General Public License as published by the Free Software
1984+// Foundation, either version 3 of the License, or (at your option) any later
1985+// version.
1986+//
1987+// This program is distributed in the hope that it will be useful, but WITHOUT
1988+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1989+// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1990+// details.
1991+//
1992+// You should have received a copy of the GNU General Public License along with
1993+// this program. If not, see <http://www.gnu.org/licenses/>.
1994+//
1995+
1996+using System;
1997+using System.Threading;
1998+using System.Collections.Generic;
1999+
2000+using Mono.Addins;
2001+
2002+using Do.Universe;
2003+using Do.Platform.Linux;
2004+
2005+namespace GMail
2006+{
2007+ public class GMailItem : Item, IUrlItem
2008+ {
2009+ UnreadMessage Message { get; set; }
2010+
2011+ public string Url { get; protected set; }
2012+
2013+ public override string Name {
2014+ get { return Message.Topic; }
2015+ }
2016+
2017+ public override string Description {
2018+ get { return Message.From; }
2019+ }
2020+
2021+ public override string Icon {
2022+ get { return "gmail-logo.png@" + GetType ().Assembly.FullName; }
2023+ }
2024+
2025+ public GMailItem (UnreadMessage message)
2026+ {
2027+ Message = message;
2028+ Url = message.Link;
2029+ }
2030+ }
2031+}
2032+
2033
2034=== added file 'GMailDocklet/src/GMailItemSource.cs'
2035--- GMailDocklet/src/GMailItemSource.cs 1970-01-01 00:00:00 +0000
2036+++ GMailDocklet/src/GMailItemSource.cs 2009-07-02 08:16:56 +0000
2037@@ -0,0 +1,97 @@
2038+// GMailItemSource.cs
2039+//
2040+// GNOME Do is the legal property of its developers, whose names are too
2041+// numerous to list here. Please refer to the COPYRIGHT file distributed with
2042+// this source distribution.
2043+//
2044+// This program is free software: you can redistribute it and/or modify it under
2045+// the terms of the GNU General Public License as published by the Free Software
2046+// Foundation, either version 3 of the License, or (at your option) any later
2047+// version.
2048+//
2049+// This program is distributed in the hope that it will be useful, but WITHOUT
2050+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2051+// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2052+// details.
2053+//
2054+// You should have received a copy of the GNU General Public License along with
2055+// this program. If not, see <http://www.gnu.org/licenses/>.
2056+//
2057+
2058+using System;
2059+using System.Collections.Generic;
2060+
2061+using Mono.Addins;
2062+
2063+using Do.Universe;
2064+using Do.Platform;
2065+using Do.Platform.Linux;
2066+
2067+namespace GMail
2068+{
2069+ public sealed class GMailItemSource : ItemSource, IConfigurable
2070+ {
2071+ #region IConfigurable implementation
2072+ public override string Name {
2073+ get { return AddinManager.CurrentLocalizer.GetString ("GMail"); }
2074+ }
2075+
2076+ public override string Description {
2077+ get { return AddinManager.CurrentLocalizer.GetString ("Index your GMail inbox"); }
2078+ }
2079+
2080+ public override string Icon {
2081+ get { return "gmail-logo.png@" + GetType ().Assembly.FullName; }
2082+ }
2083+
2084+ public Gtk.Bin GetConfiguration ()
2085+ {
2086+ return new GMailLoginConfig ();
2087+ }
2088+
2089+ #endregion
2090+
2091+ public GMailItemSource()
2092+ {
2093+ Services.Core.UniverseInitialized += HandleInitialized;
2094+ Preferences.RefreshRateChanged += HandlePreferencesChanged;
2095+ Preferences.LabelsChanged += HandlePreferencesChanged;
2096+ Preferences.CurrentLabelChanged += HandlePreferencesChanged;
2097+ }
2098+
2099+ void HandlePreferencesChanged (object o, EventArgs e)
2100+ {
2101+ GMailAtom.ResetTimer ();
2102+ }
2103+
2104+ /// <summary>
2105+ /// Handles when the <see cref="UniverseManager"/> is Initialized to
2106+ /// reload weather data on startup
2107+ /// </summary>
2108+ /// <param name="sender">
2109+ /// Ignored
2110+ /// </param>
2111+ /// <param name="e">
2112+ /// Ignored
2113+ /// </param>
2114+ void HandleInitialized (object sender, EventArgs e)
2115+ {
2116+ Services.Core.UniverseInitialized -= HandleInitialized;
2117+ GMailAtom.ResetTimer (true);
2118+ }
2119+
2120+ public override IEnumerable<Type> SupportedItemTypes {
2121+ get { yield return typeof (GMailItem); }
2122+ }
2123+
2124+ public override IEnumerable<Item> Items {
2125+ get {
2126+ if (GMailAtom.HasUnread)
2127+ foreach (UnreadMessage message in GMailAtom.Messages)
2128+ yield return new GMailItem (message);
2129+
2130+ yield break;
2131+ }
2132+ }
2133+ }
2134+}
2135
2136=== added file 'GMailDocklet/src/GMailLoginConfig.cs'
2137--- GMailDocklet/src/GMailLoginConfig.cs 1970-01-01 00:00:00 +0000
2138+++ GMailDocklet/src/GMailLoginConfig.cs 2009-07-02 08:16:56 +0000
2139@@ -0,0 +1,66 @@
2140+/* GMailConfig.cs
2141+ *
2142+ * GNOME Do is the legal property of its developers. Please refer to the
2143+ * COPYRIGHT file distributed with this
2144+ * source distribution.
2145+ *
2146+ * This program is free software: you can redistribute it and/or modify
2147+ * it under the terms of the GNU General Public License as published by
2148+ * the Free Software Foundation, either version 3 of the License, or
2149+ * (at your option) any later version.
2150+ *
2151+ * This program is distributed in the hope that it will be useful,
2152+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2153+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2154+ * GNU General Public License for more details.
2155+ *
2156+ * You should have received a copy of the GNU General Public License
2157+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2158+ */
2159+
2160+
2161+using System;
2162+using System.Text.RegularExpressions;
2163+
2164+using Gtk;
2165+
2166+using Do.Platform.Linux;
2167+
2168+namespace GMail
2169+{
2170+ public class GMailLoginConfig : AbstractLoginWidget
2171+ {
2172+ const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\."
2173+ + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*"
2174+ + @"[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?";
2175+
2176+ const string Uri = "https://www.google.com/accounts/NewAccount?service=mail";
2177+
2178+ public GMailLoginConfig () : base ("GMail", Uri)
2179+ {
2180+ Username = Preferences.User;
2181+ Password = Preferences.Password;
2182+ }
2183+
2184+ protected override void SaveAccountData (string username, string password)
2185+ {
2186+ Preferences.User = username;
2187+ Preferences.Password = password;
2188+ GMailAtom.ResetTimer ();
2189+ }
2190+
2191+ protected override bool Validate (string username, string password)
2192+ {
2193+ if (!ValidateUsername (username))
2194+ return false;
2195+ return GMailAtom.ValidateCredentials (username, password);
2196+ }
2197+
2198+ bool ValidateUsername (string username)
2199+ {
2200+ if (username.IndexOf ('@') != -1)
2201+ return new Regex (EmailPattern, RegexOptions.Compiled).IsMatch (username);
2202+ return true;
2203+ }
2204+ }
2205+}
2206
2207=== added file 'GMailDocklet/src/GMailMenuButtonArgs.cs'
2208--- GMailDocklet/src/GMailMenuButtonArgs.cs 1970-01-01 00:00:00 +0000
2209+++ GMailDocklet/src/GMailMenuButtonArgs.cs 2009-06-30 19:42:02 +0000
2210@@ -0,0 +1,42 @@
2211+//
2212+// Copyright (C) 2008 GNOME Do
2213+//
2214+// This program is free software: you can redistribute it and/or modify
2215+// it under the terms of the GNU General Public License as published by
2216+// the Free Software Foundation, either version 3 of the License, or
2217+// (at your option) any later version.
2218+//
2219+// This program is distributed in the hope that it will be useful,
2220+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2221+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2222+// GNU General Public License for more details.
2223+//
2224+// You should have received a copy of the GNU General Public License
2225+// along with this program. If not, see <http://www.gnu.org/licenses/>.
2226+//
2227+
2228+using System;
2229+
2230+using Do.Platform;
2231+using Docky.Interface.Menus;
2232+
2233+namespace GMail
2234+{
2235+ public class GMailMenuButtonArgs : AbstractMenuButtonArgs
2236+ {
2237+ UnreadMessage message;
2238+
2239+ public GMailMenuButtonArgs (UnreadMessage message) : base (message.Topic + " - From: " + message.FromName, "gmail-logo.png@" + message.GetType ().Assembly.FullName)
2240+ {
2241+ UseTooltip = true;
2242+ Dark = true;
2243+ this.message = message;
2244+ }
2245+
2246+ public override void Action ()
2247+ {
2248+ Services.Environment.OpenUrl (message.Link);
2249+ }
2250+ }
2251+}
2252+
2253
2254=== added file 'GMailDocklet/src/GMailOptionsSource.cs'
2255--- GMailDocklet/src/GMailOptionsSource.cs 1970-01-01 00:00:00 +0000
2256+++ GMailDocklet/src/GMailOptionsSource.cs 2009-07-02 08:16:56 +0000
2257@@ -0,0 +1,66 @@
2258+// GMailItemSource.cs
2259+//
2260+// GNOME Do is the legal property of its developers, whose names are too
2261+// numerous to list here. Please refer to the COPYRIGHT file distributed with
2262+// this source distribution.
2263+//
2264+// This program is free software: you can redistribute it and/or modify it under
2265+// the terms of the GNU General Public License as published by the Free Software
2266+// Foundation, either version 3 of the License, or (at your option) any later
2267+// version.
2268+//
2269+// This program is distributed in the hope that it will be useful, but WITHOUT
2270+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2271+// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2272+// details.
2273+//
2274+// You should have received a copy of the GNU General Public License along with
2275+// this program. If not, see <http://www.gnu.org/licenses/>.
2276+//
2277+
2278+using System;
2279+using System.Collections.Generic;
2280+
2281+using Mono.Addins;
2282+
2283+using Do.Universe;
2284+using Do.Platform;
2285+using Do.Platform.Linux;
2286+
2287+namespace GMail
2288+{
2289+ public sealed class GMailOptionsSource : ItemSource, IConfigurable
2290+ {
2291+ #region IConfigurable implementation
2292+ public override string Name {
2293+ get { return AddinManager.CurrentLocalizer.GetString ("Options"); }
2294+ }
2295+
2296+ public override string Description {
2297+ get { return AddinManager.CurrentLocalizer.GetString ("Index your GMail inbox"); }
2298+ }
2299+
2300+ public override string Icon {
2301+ get { return "gmail-logo.png@" + GetType ().Assembly.FullName; }
2302+ }
2303+
2304+ public Gtk.Bin GetConfiguration ()
2305+ {
2306+ return new GMailConfiguration ();
2307+ }
2308+
2309+ #endregion
2310+
2311+ public GMailOptionsSource()
2312+ {
2313+ }
2314+
2315+ public override IEnumerable<Type> SupportedItemTypes {
2316+ get { yield break; }
2317+ }
2318+
2319+ public override IEnumerable<Item> Items {
2320+ get { yield break; }
2321+ }
2322+ }
2323+}
2324
2325=== added file 'GMailDocklet/src/Preferences.cs'
2326--- GMailDocklet/src/Preferences.cs 1970-01-01 00:00:00 +0000
2327+++ GMailDocklet/src/Preferences.cs 2009-07-02 08:16:56 +0000
2328@@ -0,0 +1,172 @@
2329+//
2330+// Copyright (C) 2009 GNOME Do
2331+//
2332+// This program is free software: you can redistribute it and/or modify
2333+// it under the terms of the GNU General Public License as published by
2334+// the Free Software Foundation, either version 3 of the License, or
2335+// (at your option) any later version.
2336+//
2337+// This program is distributed in the hope that it will be useful,
2338+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2339+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2340+// GNU General Public License for more details.
2341+//
2342+// You should have received a copy of the GNU General Public License
2343+// along with this program. If not, see <http://www.gnu.org/licenses/>.
2344+//
2345+
2346+using System;
2347+
2348+using Do.Platform;
2349+
2350+namespace GMail
2351+{
2352+ /// <summary>
2353+ /// Handles all GMail preferences.
2354+ /// </summary>
2355+ internal class Preferences
2356+ {
2357+ const string UserKey = "User";
2358+ const string PasswordKey = "Password";
2359+ const string RefreshRateKey = "RefreshRate";
2360+ const string FeedUrlKey = "Feed";
2361+ const string LabelsKey = "Labels";
2362+ const string CurrentLabelKey = "CurrentLabel";
2363+ const string LastCheckedKey = "LastChecked";
2364+
2365+ static IPreferences prefs = Services.Preferences.Get<Preferences> ();
2366+
2367+ /// <value>
2368+ /// </value>
2369+ public static event EventHandler UserChanged;
2370+
2371+ /// <value>
2372+ /// </value>
2373+ public static void OnUserChanged ()
2374+ {
2375+ if (UserChanged != null)
2376+ UserChanged (null, EventArgs.Empty);
2377+ }
2378+
2379+ /// <value>
2380+ /// </value>
2381+ public static string User {
2382+ get { return prefs.Get<string> (UserKey, ""); }
2383+ set { prefs.Set<string> (UserKey, value); Preferences.OnUserChanged (); }
2384+ }
2385+
2386+ /// <value>
2387+ /// </value>
2388+ public static event EventHandler PasswordChanged;
2389+
2390+ /// <value>
2391+ /// </value>
2392+ public static void OnPasswordChanged ()
2393+ {
2394+ if (PasswordChanged != null)
2395+ PasswordChanged (null, EventArgs.Empty);
2396+ }
2397+
2398+ /// <value>
2399+ /// </value>
2400+ public static string Password {
2401+ get { return prefs.GetSecure<string> (PasswordKey, ""); }
2402+ set { prefs.SetSecure<string> (PasswordKey, value); Preferences.OnPasswordChanged (); }
2403+ }
2404+
2405+ /// <value>
2406+ /// </value>
2407+ public static event EventHandler RefreshRateChanged;
2408+
2409+ /// <value>
2410+ /// </value>
2411+ public static void OnRefreshRateChanged ()
2412+ {
2413+ if (RefreshRateChanged != null)
2414+ RefreshRateChanged (null, EventArgs.Empty);
2415+ }
2416+
2417+ /// <value>
2418+ /// </value>
2419+ public static uint RefreshRate {
2420+ get { return (uint) prefs.Get<int> (RefreshRateKey, 15); }
2421+ set { prefs.Set<int> (RefreshRateKey, (int) value); Preferences.OnRefreshRateChanged (); }
2422+ }
2423+
2424+ /// <value>
2425+ /// </value>
2426+ public static event EventHandler FeedUrlChanged;
2427+
2428+ /// <value>
2429+ /// </value>
2430+ public static void OnFeedUrlChanged ()
2431+ {
2432+ if (FeedUrlChanged != null)
2433+ FeedUrlChanged (null, EventArgs.Empty);
2434+ }
2435+
2436+ /// <value>
2437+ /// </value>
2438+ public static string FeedUrl {
2439+ get { return prefs.Get<string> (FeedUrlKey, "mail.google.com/mail/feed/atom"); }
2440+ set { prefs.Set<string> (FeedUrlKey, value); Preferences.OnFeedUrlChanged (); }
2441+ }
2442+
2443+ /// <value>
2444+ /// </value>
2445+ public static event EventHandler LabelsChanged;
2446+
2447+ /// <value>
2448+ /// </value>
2449+ public static void OnLabelsChanged ()
2450+ {
2451+ if (LabelsChanged != null)
2452+ LabelsChanged (null, EventArgs.Empty);
2453+ }
2454+
2455+ /// <value>
2456+ /// </value>
2457+ public static string[] Labels {
2458+ get { return prefs.Get<string[]> (LabelsKey, new string[] {}); }
2459+ set { prefs.Set<string[]> (LabelsKey, value); Preferences.OnLabelsChanged (); }
2460+ }
2461+
2462+ /// <value>
2463+ /// </value>
2464+ public static event EventHandler CurrentLabelChanged;
2465+
2466+ /// <value>
2467+ /// </value>
2468+ public static void OnCurrentLabelChanged ()
2469+ {
2470+ if (CurrentLabelChanged != null)
2471+ CurrentLabelChanged (null, EventArgs.Empty);
2472+ }
2473+
2474+ /// <value>
2475+ /// </value>
2476+ public static int CurrentLabel {
2477+ get { return prefs.Get<int> (CurrentLabelKey, -1); }
2478+ set { prefs.Set<int> (CurrentLabelKey, value); Preferences.OnCurrentLabelChanged (); }
2479+ }
2480+
2481+ /// <value>
2482+ /// </value>
2483+ public static event EventHandler LastCheckedChanged;
2484+
2485+ /// <value>
2486+ /// </value>
2487+ public static void OnLastCheckedChanged ()
2488+ {
2489+ if (LastCheckedChanged != null)
2490+ LastCheckedChanged (null, EventArgs.Empty);
2491+ }
2492+
2493+ /// <value>
2494+ /// </value>
2495+ public static DateTime LastChecked {
2496+ get { return DateTime.Parse (prefs.Get<string> (LastCheckedKey, DateTime.Now.ToString ())); }
2497+ set { prefs.Set<string> (LastCheckedKey, value.ToString ()); Preferences.OnLastCheckedChanged (); }
2498+ }
2499+ }
2500+}
2501
2502=== modified file 'Makefile.am'
2503--- Makefile.am 2009-06-01 07:02:21 +0000
2504+++ Makefile.am 2009-06-27 17:22:28 +0000
2505@@ -5,6 +5,7 @@
2506 po \
2507 BatteryMonitor \
2508 CPUMonitorDocklet \
2509+ GMailDocklet \
2510 SwitcherDocklet \
2511 VolumeDocklet \
2512 WeatherDocklet \
2513
2514=== modified file 'WeatherDocklet/src/WeatherItem.cs'
2515--- WeatherDocklet/src/WeatherItem.cs 2009-05-28 20:20:48 +0000
2516+++ WeatherDocklet/src/WeatherItem.cs 2009-06-27 20:58:20 +0000
2517@@ -79,6 +79,7 @@
2518 this.run = null;
2519 this.i = i;
2520 }
2521+
2522 public override string Name {
2523 get { return name; }
2524 }
2525
2526=== modified file 'configure.ac'
2527--- configure.ac 2009-06-26 05:54:57 +0000
2528+++ configure.ac 2009-06-27 17:23:08 +0000
2529@@ -112,6 +112,7 @@
2530 AC_CONFIG_FILES([
2531 BatteryMonitor/Makefile
2532 CPUMonitorDocklet/Makefile
2533+GMailDocklet/Makefile
2534 SwitcherDocklet/Makefile
2535 VolumeDocklet/Makefile
2536 WeatherDocklet/Makefile

Subscribers

People subscribed via source and target branches