Merge lp:~cszikszoy/do-plugins/MA-Config-Extension into lp:do-plugins
- MA-Config-Extension
- Merge into trunk
Proposed by
Chris S.
Status: | Needs review |
---|---|
Proposed branch: | lp:~cszikszoy/do-plugins/MA-Config-Extension |
Merge into: | lp:do-plugins |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~cszikszoy/do-plugins/MA-Config-Extension |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Do Plugins Team | Pending | ||
Review via email: mp+7701@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Unmerged revisions
- 635. By Chris S.
-
change extension name to Configuration
- 634. By Chris S.
-
remove stupid stuff
- 633. By Chris S.
-
finalize confluence fix
- 632. By Chris S.
-
merge confluence fix
- 631. By Chris S.
-
more plugin fixes
- 630. By Chris S.
-
remove unnecessary file
- 629. By Chris S.
-
fix JIRA mess
- 628. By Chris S.
-
update plugins to use /Do/Config MA extension for configuration pages
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Bibtex/Bibtex.mdp' | |||
2 | --- Bibtex/Bibtex.mdp 2009-02-28 16:16:48 +0000 | |||
3 | +++ Bibtex/Bibtex.mdp 2009-06-20 02:11:31 +0000 | |||
4 | @@ -35,5 +35,6 @@ | |||
5 | 35 | <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 35 | <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
6 | 36 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 36 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
7 | 37 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 37 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
8 | 38 | <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
9 | 38 | </References> | 39 | </References> |
10 | 39 | </Project> | 40 | </Project> |
11 | 40 | \ No newline at end of file | 41 | \ No newline at end of file |
12 | 41 | 42 | ||
13 | === modified file 'Bibtex/Resources/Bibtex.addin.xml' | |||
14 | --- Bibtex/Resources/Bibtex.addin.xml 2009-03-31 23:19:25 +0000 | |||
15 | +++ Bibtex/Resources/Bibtex.addin.xml 2009-06-19 08:23:32 +0000 | |||
16 | @@ -15,6 +15,7 @@ | |||
17 | 15 | 15 | ||
18 | 16 | <Dependencies> | 16 | <Dependencies> |
19 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
20 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
21 | 18 | </Dependencies> | 19 | </Dependencies> |
22 | 19 | 20 | ||
23 | 20 | <Extension path = "/Do/Action"> | 21 | <Extension path = "/Do/Action"> |
24 | @@ -23,4 +24,7 @@ | |||
25 | 23 | <Extension path = "/Do/ItemSource"> | 24 | <Extension path = "/Do/ItemSource"> |
26 | 24 | <ItemSource type="Bibtex.BibtexItemSource" /> | 25 | <ItemSource type="Bibtex.BibtexItemSource" /> |
27 | 25 | </Extension> | 26 | </Extension> |
28 | 27 | <Extension path= "/Do/Config"> | ||
29 | 28 | <Config type="Bibtex.Configuration" /> | ||
30 | 29 | </Extension> | ||
31 | 26 | </Addin> | 30 | </Addin> |
32 | 27 | 31 | ||
33 | === modified file 'Bibtex/gtk-gui/gui.stetic' | |||
34 | --- Bibtex/gtk-gui/gui.stetic 2009-01-22 12:54:17 +0000 | |||
35 | +++ Bibtex/gtk-gui/gui.stetic 2009-06-20 02:11:31 +0000 | |||
36 | @@ -2,8 +2,11 @@ | |||
37 | 2 | <stetic-interface> | 2 | <stetic-interface> |
38 | 3 | <configuration> | 3 | <configuration> |
39 | 4 | <images-root-path>..</images-root-path> | 4 | <images-root-path>..</images-root-path> |
41 | 5 | <target-gtk-version>2.12.1</target-gtk-version> | 5 | <target-gtk-version>2.12</target-gtk-version> |
42 | 6 | </configuration> | 6 | </configuration> |
43 | 7 | <import> | ||
44 | 8 | <widget-library name="../bin/Debug/Bibtex.dll" internal="true" /> | ||
45 | 9 | </import> | ||
46 | 7 | <widget class="Gtk.Bin" id="Bibtex.Configuration" design-size="375 300"> | 10 | <widget class="Gtk.Bin" id="Bibtex.Configuration" design-size="375 300"> |
47 | 8 | <property name="MemberName" /> | 11 | <property name="MemberName" /> |
48 | 9 | <child> | 12 | <child> |
49 | @@ -97,4 +100,4 @@ | |||
50 | 97 | </widget> | 100 | </widget> |
51 | 98 | </child> | 101 | </child> |
52 | 99 | </widget> | 102 | </widget> |
54 | 100 | </stetic-interface> | 103 | </stetic-interface> |
55 | 101 | \ No newline at end of file | 104 | \ No newline at end of file |
56 | 102 | 105 | ||
57 | === modified file 'Bibtex/gtk-gui/objects.xml' | |||
58 | --- Bibtex/gtk-gui/objects.xml 2008-12-29 18:23:07 +0000 | |||
59 | +++ Bibtex/gtk-gui/objects.xml 2009-06-20 02:30:06 +0000 | |||
60 | @@ -1,5 +1,5 @@ | |||
61 | 1 | <objects attr-sync="on"> | 1 | <objects attr-sync="on"> |
63 | 2 | <object type="Do.Addins.Bibtex.Configuration" palette-category="Bibtex" allow-children="false" base-type="Gtk.Bin"> | 2 | <object type="Bibtex.Configuration" palette-category="Bibtex" allow-children="false" base-type="Gtk.Bin"> |
64 | 3 | <itemgroups> | 3 | <itemgroups> |
65 | 4 | <itemgroup label="Configuration Properties"> | 4 | <itemgroup label="Configuration Properties"> |
66 | 5 | <property name="BibtexFilePath" /> | 5 | <property name="BibtexFilePath" /> |
67 | 6 | 6 | ||
68 | === modified file 'Bibtex/src/BibtexItemSource.cs' | |||
69 | --- Bibtex/src/BibtexItemSource.cs 2009-05-29 09:39:41 +0000 | |||
70 | +++ Bibtex/src/BibtexItemSource.cs 2009-06-19 19:14:09 +0000 | |||
71 | @@ -25,9 +25,11 @@ | |||
72 | 25 | using Do.Platform.Linux; | 25 | using Do.Platform.Linux; |
73 | 26 | 26 | ||
74 | 27 | 27 | ||
76 | 28 | namespace Bibtex { | 28 | namespace Bibtex |
77 | 29 | { | ||
78 | 29 | 30 | ||
80 | 30 | public class BibtexItemSource : ItemSource, IConfigurable { | 31 | public class BibtexItemSource : ItemSource |
81 | 32 | { | ||
82 | 31 | 33 | ||
83 | 32 | Regex fileRegex = new Regex (@"file\s=\s\{(.*?)\}", | 34 | Regex fileRegex = new Regex (@"file\s=\s\{(.*?)\}", |
84 | 33 | RegexOptions.IgnoreCase | 35 | RegexOptions.IgnoreCase |
85 | 34 | 36 | ||
86 | === modified file 'Bibtex/src/Configuration.cs' | |||
87 | --- Bibtex/src/Configuration.cs 2009-01-22 12:54:17 +0000 | |||
88 | +++ Bibtex/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
89 | @@ -19,13 +19,15 @@ | |||
90 | 19 | */ | 19 | */ |
91 | 20 | using System; | 20 | using System; |
92 | 21 | using Do.Platform; | 21 | using Do.Platform; |
93 | 22 | using Do.Platform.Linux; | ||
94 | 23 | using Mono.Unix; | ||
95 | 22 | 24 | ||
96 | 23 | namespace Bibtex | 25 | namespace Bibtex |
97 | 24 | { | 26 | { |
98 | 25 | 27 | ||
99 | 26 | [System.ComponentModel.Category("Bibtex")] | 28 | [System.ComponentModel.Category("Bibtex")] |
100 | 27 | [System.ComponentModel.ToolboxItem(true)] | 29 | [System.ComponentModel.ToolboxItem(true)] |
102 | 28 | public partial class Configuration : Gtk.Bin | 30 | public partial class Configuration : Gtk.Bin, IConfigurable |
103 | 29 | { | 31 | { |
104 | 30 | private static IPreferences prefs; | 32 | private static IPreferences prefs; |
105 | 31 | 33 | ||
106 | @@ -41,6 +43,15 @@ | |||
107 | 41 | prefs = Do.Platform.Services.Preferences.Get<Bibtex.Configuration>(); | 43 | prefs = Do.Platform.Services.Preferences.Get<Bibtex.Configuration>(); |
108 | 42 | } | 44 | } |
109 | 43 | 45 | ||
110 | 46 | public string Title { | ||
111 | 47 | get { return Catalog.GetString ("Bibtex"); } | ||
112 | 48 | } | ||
113 | 49 | |||
114 | 50 | public Gtk.Bin GetConfiguration () | ||
115 | 51 | { | ||
116 | 52 | return this; | ||
117 | 53 | } | ||
118 | 54 | |||
119 | 44 | public static string BibtexFilePath { | 55 | public static string BibtexFilePath { |
120 | 45 | get { return prefs.Get<string>("bibtexfilepath", System.IO.Path.Combine (System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "bibtex.bib")); } | 56 | get { return prefs.Get<string>("bibtexfilepath", System.IO.Path.Combine (System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "bibtex.bib")); } |
121 | 46 | set { prefs.Set <string> ("bibtexfilepath", value); } | 57 | set { prefs.Set <string> ("bibtexfilepath", value); } |
122 | 47 | 58 | ||
123 | === modified file 'Confluence/Confluence.mdp' | |||
124 | --- Confluence/Confluence.mdp 2009-02-28 16:16:48 +0000 | |||
125 | +++ Confluence/Confluence.mdp 2009-06-20 02:16:49 +0000 | |||
126 | @@ -1,9 +1,10 @@ | |||
128 | 1 | <Project name="Confluence" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="2.0" ctype="DotNetProject"> | 1 | <Project name="Confluence" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject"> |
129 | 2 | <Configurations active="Debug"> | 2 | <Configurations active="Debug"> |
130 | 3 | <Configuration name="Debug" ctype="DotNetProjectConfiguration"> | 3 | <Configuration name="Debug" ctype="DotNetProjectConfiguration"> |
131 | 4 | <Output directory="bin/Debug" assembly="Confluence" /> | 4 | <Output directory="bin/Debug" assembly="Confluence" /> |
132 | 5 | <Build debugmode="True" target="Library" /> | 5 | <Build debugmode="True" target="Library" /> |
133 | 6 | <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> | 6 | <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> |
134 | 7 | <EnvironmentVariables /> | ||
135 | 7 | <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> | 8 | <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> |
136 | 8 | </Configuration> | 9 | </Configuration> |
137 | 9 | <Configuration name="Release" ctype="DotNetProjectConfiguration"> | 10 | <Configuration name="Release" ctype="DotNetProjectConfiguration"> |
138 | @@ -22,7 +23,6 @@ | |||
139 | 22 | <File name="gtk-gui/Confluence.ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" /> | 23 | <File name="gtk-gui/Confluence.ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" /> |
140 | 23 | <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" /> | 24 | <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" /> |
141 | 24 | <File name="src/ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" /> | 25 | <File name="src/ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" /> |
142 | 25 | <File name="src/ConfluenceConfiguration.cs" subtype="Code" buildaction="Compile" /> | ||
143 | 26 | <File name="Resources/Confluence.addin.xml" subtype="Code" buildaction="EmbedAsResource" /> | 26 | <File name="Resources/Confluence.addin.xml" subtype="Code" buildaction="EmbedAsResource" /> |
144 | 27 | <File name="Resources/icons/confluence.png" subtype="Code" buildaction="Nothing" /> | 27 | <File name="Resources/icons/confluence.png" subtype="Code" buildaction="Nothing" /> |
145 | 28 | </Contents> | 28 | </Contents> |
146 | @@ -31,7 +31,6 @@ | |||
147 | 31 | <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | 31 | <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> |
148 | 32 | <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | 32 | <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> |
149 | 33 | <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> | 33 | <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> |
150 | 34 | <ProjectReference type="Gac" localcopy="True" refto="gconf-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
151 | 35 | <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | 34 | <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
152 | 36 | <ProjectReference type="Gac" localcopy="True" refto="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | 35 | <ProjectReference type="Gac" localcopy="True" refto="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
153 | 37 | <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | 36 | <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> |
154 | 38 | 37 | ||
155 | === modified file 'Confluence/Makefile.am' | |||
156 | --- Confluence/Makefile.am 2009-01-09 07:45:01 +0000 | |||
157 | +++ Confluence/Makefile.am 2009-06-20 02:11:31 +0000 | |||
158 | @@ -5,7 +5,6 @@ | |||
159 | 5 | FILES = \ | 5 | FILES = \ |
160 | 6 | gtk-gui/Confluence.ConfluenceConfigWidget.cs \ | 6 | gtk-gui/Confluence.ConfluenceConfigWidget.cs \ |
161 | 7 | gtk-gui/generated.cs \ | 7 | gtk-gui/generated.cs \ |
162 | 8 | src/ConfluenceConfiguration.cs \ | ||
163 | 9 | src/ConfluenceConfigWidget.cs \ | 8 | src/ConfluenceConfigWidget.cs \ |
164 | 10 | src/ConfluenceSearchAction.cs \ | 9 | src/ConfluenceSearchAction.cs \ |
165 | 11 | src/Remote/ConfluenceSoapServiceService.cs | 10 | src/Remote/ConfluenceSoapServiceService.cs |
166 | @@ -24,5 +23,4 @@ | |||
167 | 24 | System.Web.Services \ | 23 | System.Web.Services \ |
168 | 25 | System.Xml \ | 24 | System.Xml \ |
169 | 26 | $(GTK_SHARP_20_LIBS) \ | 25 | $(GTK_SHARP_20_LIBS) \ |
170 | 27 | $(GCONF_SHARP_20_LIBS) \ | ||
171 | 28 | $(DO_PLATFORM_LINUX_LIBS) | 26 | $(DO_PLATFORM_LINUX_LIBS) |
172 | 29 | 27 | ||
173 | === modified file 'Confluence/Resources/Confluence.addin.xml' | |||
174 | --- Confluence/Resources/Confluence.addin.xml 2009-03-31 23:19:25 +0000 | |||
175 | +++ Confluence/Resources/Confluence.addin.xml 2009-06-20 02:39:35 +0000 | |||
176 | @@ -15,10 +15,13 @@ | |||
177 | 15 | 15 | ||
178 | 16 | <Dependencies> | 16 | <Dependencies> |
179 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
180 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
181 | 18 | </Dependencies> | 19 | </Dependencies> |
182 | 19 | 20 | ||
183 | 20 | <Extension path = "/Do/Action"> | 21 | <Extension path = "/Do/Action"> |
184 | 21 | <Action type="Confluence.ConfluenceSearchAction" /> | 22 | <Action type="Confluence.ConfluenceSearchAction" /> |
185 | 22 | </Extension> | 23 | </Extension> |
187 | 23 | 24 | <Extension path= "/Do/Config"> | |
188 | 25 | <Config type="Confluence.ConfluenceConfigWidget" /> | ||
189 | 26 | </Extension> | ||
190 | 24 | </Addin> | 27 | </Addin> |
191 | 25 | 28 | ||
192 | === modified file 'Confluence/gtk-gui/objects.xml' | |||
193 | --- Confluence/gtk-gui/objects.xml 2008-12-29 18:23:07 +0000 | |||
194 | +++ Confluence/gtk-gui/objects.xml 2009-06-20 02:11:31 +0000 | |||
195 | @@ -1,6 +1,13 @@ | |||
196 | 1 | <objects attr-sync="on"> | 1 | <objects attr-sync="on"> |
197 | 2 | <object type="Confluence.ConfluenceConfigWidget" palette-category="Confluence" allow-children="false" base-type="Gtk.Bin"> | 2 | <object type="Confluence.ConfluenceConfigWidget" palette-category="Confluence" allow-children="false" base-type="Gtk.Bin"> |
199 | 3 | <itemgroups /> | 3 | <itemgroups> |
200 | 4 | <itemgroup label="ConfluenceConfigWidget Properties"> | ||
201 | 5 | <property name="BaseURL" /> | ||
202 | 6 | <property name="UserName" /> | ||
203 | 7 | <property name="Password" /> | ||
204 | 8 | <property name="MaxResults" /> | ||
205 | 9 | </itemgroup> | ||
206 | 10 | </itemgroups> | ||
207 | 4 | <signals /> | 11 | <signals /> |
208 | 5 | </object> | 12 | </object> |
209 | 6 | </objects> | 13 | </objects> |
210 | 7 | \ No newline at end of file | 14 | \ No newline at end of file |
211 | 8 | 15 | ||
212 | === modified file 'Confluence/src/ConfluenceConfigWidget.cs' | |||
213 | --- Confluence/src/ConfluenceConfigWidget.cs 2008-12-24 04:37:17 +0000 | |||
214 | +++ Confluence/src/ConfluenceConfigWidget.cs 2009-06-20 02:39:35 +0000 | |||
215 | @@ -16,59 +16,101 @@ | |||
216 | 16 | 16 | ||
217 | 17 | using System; | 17 | using System; |
218 | 18 | 18 | ||
219 | 19 | using Do.Platform; | ||
220 | 20 | using Do.Platform.Linux; | ||
221 | 21 | using Mono.Unix; | ||
222 | 22 | |||
223 | 19 | namespace Confluence | 23 | namespace Confluence |
224 | 20 | { | 24 | { |
225 | 21 | [System.ComponentModel.Category("Confluence")] | 25 | [System.ComponentModel.Category("Confluence")] |
226 | 22 | [System.ComponentModel.ToolboxItem(true)] | 26 | [System.ComponentModel.ToolboxItem(true)] |
236 | 23 | public partial class ConfluenceConfigWidget : Gtk.Bin | 27 | public partial class ConfluenceConfigWidget : Gtk.Bin, IConfigurable |
237 | 24 | { | 28 | { |
238 | 25 | private ConfluenceSearchAction _confluenceSearch; | 29 | private readonly int DefaultMaxResults = 20; |
239 | 26 | 30 | static IPreferences Prefs; | |
240 | 27 | public ConfluenceConfigWidget(ConfluenceSearchAction confluenceSearch) | 31 | |
241 | 28 | { | 32 | public ConfluenceConfigWidget () |
242 | 29 | this.Build(); | 33 | { |
243 | 30 | _confluenceSearch = confluenceSearch; | 34 | this.Build (); |
244 | 31 | SetFieldsFromConfig( _confluenceSearch.Config ); | 35 | SetFieldsFromConfig (); |
245 | 36 | } | ||
246 | 37 | |||
247 | 38 | static ConfluenceConfigWidget () | ||
248 | 39 | { | ||
249 | 40 | Prefs = Services.Preferences.Get<Confluence.ConfluenceConfigWidget> (); | ||
250 | 41 | } | ||
251 | 42 | |||
252 | 43 | public string Title { | ||
253 | 44 | get { return Catalog.GetString ("Confluence"); } | ||
254 | 45 | } | ||
255 | 46 | |||
256 | 47 | public Gtk.Bin GetConfiguration () | ||
257 | 48 | { | ||
258 | 49 | return this; | ||
259 | 32 | } | 50 | } |
260 | 33 | 51 | ||
261 | 34 | protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e) | 52 | protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e) |
262 | 35 | { | 53 | { |
266 | 36 | _confluenceSearch.Log( "Re-init Confluence Plugin with new settings..." ); | 54 | GetConfigFromFields (); |
264 | 37 | |||
265 | 38 | _confluenceSearch.Config = GetConfigFromFields(); | ||
267 | 39 | 55 | ||
268 | 40 | // Write the config back out to the fields to reflect how we saved it | 56 | // Write the config back out to the fields to reflect how we saved it |
270 | 41 | SetFieldsFromConfig( _confluenceSearch.Config ); | 57 | SetFieldsFromConfig (); |
271 | 42 | } | 58 | } |
272 | 43 | 59 | ||
273 | 44 | // Bindings... | 60 | // Bindings... |
274 | 45 | 61 | ||
302 | 46 | private void SetFieldsFromConfig( IConfluenceConfiguration config ) | 62 | private void SetFieldsFromConfig () |
303 | 47 | { | 63 | { |
304 | 48 | _entryBaseUrl.Text = config.BaseUrl; | 64 | _entryBaseUrl.Text = BaseURL; |
305 | 49 | _entryUsername.Text = config.Username; | 65 | _entryUsername.Text = UserName; |
306 | 50 | _entryPassword.Text = config.Password; | 66 | _entryPassword.Text = Password; |
307 | 51 | _entryMaxSearchResults.Text = Convert.ToString(config.MaxSearchResults); | 67 | _entryMaxSearchResults.Text = MaxResults.ToString (); |
308 | 52 | } | 68 | } |
309 | 53 | 69 | ||
310 | 54 | private IConfluenceConfiguration GetConfigFromFields() | 70 | private void GetConfigFromFields () |
311 | 55 | { | 71 | { |
312 | 56 | ConfluenceConfiguration config = new ConfluenceConfiguration(); | 72 | BaseURL = _entryBaseUrl.Text; |
313 | 57 | config.BaseUrl = _entryBaseUrl.Text; | 73 | UserName = _entryUsername.Text; |
314 | 58 | config.Username = _entryUsername.Text; | 74 | Password = _entryPassword.Text; |
315 | 59 | config.Password = _entryPassword.Text; | 75 | |
316 | 60 | 76 | try { | |
317 | 61 | try | 77 | MaxResults = Convert.ToInt32(_entryMaxSearchResults.Text); |
318 | 62 | { | 78 | } catch (FormatException) { |
319 | 63 | config.MaxSearchResults = Convert.ToInt32(_entryMaxSearchResults.Text); | 79 | Log<ConfluenceConfigWidget>.Debug ("Invalid max search results specified. Setting to default value."); |
320 | 64 | } | 80 | MaxResults = DefaultMaxResults; |
321 | 65 | catch (FormatException) | 81 | } |
322 | 66 | { | 82 | } |
323 | 67 | _confluenceSearch.Log( "Invalid max search results specified. Setting to default value." ); | 83 | |
324 | 68 | config.MaxSearchResults = config.DefaultMaxSearchResults; | 84 | public static string BaseURL |
325 | 69 | } | 85 | { |
326 | 70 | 86 | get { | |
327 | 71 | return config; | 87 | return Prefs.Get<string> ("BaseURL", ""); |
328 | 72 | } | 88 | } |
329 | 89 | set { Prefs.Set<string> ("BaseURL", value); } | ||
330 | 90 | } | ||
331 | 91 | |||
332 | 92 | public static string UserName | ||
333 | 93 | { | ||
334 | 94 | get { | ||
335 | 95 | return Prefs.Get<string> ("UserName", ""); | ||
336 | 96 | } | ||
337 | 97 | set { Prefs.Set<string> ("UserName", value); } | ||
338 | 98 | } | ||
339 | 99 | |||
340 | 100 | public static string Password | ||
341 | 101 | { | ||
342 | 102 | get { | ||
343 | 103 | return Prefs.GetSecure<string> ("Password", ""); | ||
344 | 104 | } | ||
345 | 105 | set { Prefs.SetSecure<string> ("Password", value); } | ||
346 | 106 | } | ||
347 | 107 | |||
348 | 108 | public static int MaxResults | ||
349 | 109 | { | ||
350 | 110 | get { | ||
351 | 111 | return Prefs.Get<int> ("MaxResults", 20); | ||
352 | 112 | } | ||
353 | 113 | set { Prefs.Set<int> ("MaxResults", value); } | ||
354 | 114 | } | ||
355 | 73 | } | 115 | } |
356 | 74 | } | 116 | } |
357 | 75 | 117 | ||
358 | === removed file 'Confluence/src/ConfluenceConfiguration.cs' | |||
359 | --- Confluence/src/ConfluenceConfiguration.cs 2008-12-24 04:37:17 +0000 | |||
360 | +++ Confluence/src/ConfluenceConfiguration.cs 1970-01-01 00:00:00 +0000 | |||
361 | @@ -1,149 +0,0 @@ | |||
362 | 1 | // | ||
363 | 2 | // This program is free software; you can redistribute it and/or modify | ||
364 | 3 | // it under the terms of the GNU General Public License as published by | ||
365 | 4 | // the Free Software Foundation; either version 3 of the License, or | ||
366 | 5 | // (at your option) any later version. | ||
367 | 6 | // | ||
368 | 7 | // This program is distributed in the hope that it will be useful, | ||
369 | 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
370 | 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
371 | 10 | // GNU General Public License for more details. | ||
372 | 11 | // | ||
373 | 12 | // You should have received a copy of the GNU General Public License | ||
374 | 13 | // along with this program; if not, write to the Free Software | ||
375 | 14 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
376 | 15 | // | ||
377 | 16 | |||
378 | 17 | using System; | ||
379 | 18 | |||
380 | 19 | |||
381 | 20 | namespace Confluence | ||
382 | 21 | { | ||
383 | 22 | public interface IConfluenceConfiguration | ||
384 | 23 | { | ||
385 | 24 | string BaseUrl | ||
386 | 25 | { | ||
387 | 26 | get; | ||
388 | 27 | } | ||
389 | 28 | |||
390 | 29 | string Username | ||
391 | 30 | { | ||
392 | 31 | get; | ||
393 | 32 | } | ||
394 | 33 | |||
395 | 34 | string Password | ||
396 | 35 | { | ||
397 | 36 | get; | ||
398 | 37 | } | ||
399 | 38 | |||
400 | 39 | int MaxSearchResults | ||
401 | 40 | { | ||
402 | 41 | get; | ||
403 | 42 | } | ||
404 | 43 | |||
405 | 44 | /// <value> | ||
406 | 45 | /// To be valid, all required fields must be filled out | ||
407 | 46 | /// </value> | ||
408 | 47 | bool IsValid(); | ||
409 | 48 | } | ||
410 | 49 | |||
411 | 50 | /// <summary> | ||
412 | 51 | /// Configuration that uses gconf to do the magic | ||
413 | 52 | /// </summary> | ||
414 | 53 | public class ConfluenceConfiguration : IConfluenceConfiguration | ||
415 | 54 | { | ||
416 | 55 | /// <summary> | ||
417 | 56 | /// The gnome conf key that contains the base url for our Confluence installation. | ||
418 | 57 | /// ie. http://opensource.atlassian.com/confluence/spring | ||
419 | 58 | /// </summary> | ||
420 | 59 | private const string _sGCONF_KEY= "/apps/gnome-do/plugins/Confluence"; | ||
421 | 60 | |||
422 | 61 | private GConf.Client _gconf; | ||
423 | 62 | |||
424 | 63 | public ConfluenceConfiguration() | ||
425 | 64 | { | ||
426 | 65 | _gconf= new GConf.Client(); | ||
427 | 66 | |||
428 | 67 | // Set defaults | ||
429 | 68 | MaxSearchResults = DefaultMaxSearchResults; | ||
430 | 69 | } | ||
431 | 70 | |||
432 | 71 | private void SetConfValue( string key, string val ) | ||
433 | 72 | { | ||
434 | 73 | _gconf.Set( _sGCONF_KEY + "/" + key, val ); | ||
435 | 74 | } | ||
436 | 75 | |||
437 | 76 | private string GetConfValue( string key, string fallback ) | ||
438 | 77 | { | ||
439 | 78 | try | ||
440 | 79 | { | ||
441 | 80 | return _gconf.Get( _sGCONF_KEY + "/" + key ) as String; | ||
442 | 81 | } | ||
443 | 82 | catch( GConf.NoSuchKeyException ) | ||
444 | 83 | { | ||
445 | 84 | return fallback; | ||
446 | 85 | } | ||
447 | 86 | } | ||
448 | 87 | |||
449 | 88 | public string BaseUrl | ||
450 | 89 | { | ||
451 | 90 | get { return GetConfValue( "baseUrl", "" ); } | ||
452 | 91 | set | ||
453 | 92 | { | ||
454 | 93 | value = value.Trim(); | ||
455 | 94 | if (value.EndsWith("/")) | ||
456 | 95 | { | ||
457 | 96 | char[] trimChars = { '/' }; | ||
458 | 97 | value = value.TrimEnd(trimChars); | ||
459 | 98 | } | ||
460 | 99 | |||
461 | 100 | SetConfValue( "baseUrl", value ); | ||
462 | 101 | } | ||
463 | 102 | } | ||
464 | 103 | |||
465 | 104 | public string Username | ||
466 | 105 | { | ||
467 | 106 | get { return GetConfValue( "username", "" ); } | ||
468 | 107 | set { SetConfValue( "username", value ); } | ||
469 | 108 | } | ||
470 | 109 | |||
471 | 110 | public string Password | ||
472 | 111 | { | ||
473 | 112 | get { return GetConfValue( "password", "" ); } | ||
474 | 113 | set { SetConfValue( "password", value ); } | ||
475 | 114 | } | ||
476 | 115 | |||
477 | 116 | public int MaxSearchResults | ||
478 | 117 | { | ||
479 | 118 | get | ||
480 | 119 | { | ||
481 | 120 | try | ||
482 | 121 | { | ||
483 | 122 | return Convert.ToInt32(GetConfValue( "maxSearchResults", "" )); | ||
484 | 123 | } | ||
485 | 124 | catch (FormatException) | ||
486 | 125 | { | ||
487 | 126 | return DefaultMaxSearchResults; | ||
488 | 127 | } | ||
489 | 128 | } | ||
490 | 129 | |||
491 | 130 | set { SetConfValue( "maxSearchResults", Convert.ToString( value )); } | ||
492 | 131 | } | ||
493 | 132 | |||
494 | 133 | public int DefaultMaxSearchResults | ||
495 | 134 | { | ||
496 | 135 | get | ||
497 | 136 | { | ||
498 | 137 | return 20; | ||
499 | 138 | } | ||
500 | 139 | } | ||
501 | 140 | |||
502 | 141 | /// <value> | ||
503 | 142 | /// To be valid, all required fields must be filled out | ||
504 | 143 | /// </value> | ||
505 | 144 | public bool IsValid() | ||
506 | 145 | { | ||
507 | 146 | return BaseUrl.Length>0; | ||
508 | 147 | } | ||
509 | 148 | } | ||
510 | 149 | } | ||
511 | 150 | 0 | ||
512 | === modified file 'Confluence/src/ConfluenceSearchAction.cs' | |||
513 | --- Confluence/src/ConfluenceSearchAction.cs 2008-12-24 04:37:17 +0000 | |||
514 | +++ Confluence/src/ConfluenceSearchAction.cs 2009-06-20 02:39:35 +0000 | |||
515 | @@ -20,123 +20,56 @@ | |||
516 | 20 | using System.Linq; | 20 | using System.Linq; |
517 | 21 | using System.Collections.Generic; | 21 | using System.Collections.Generic; |
518 | 22 | using Do.Universe; | 22 | using Do.Universe; |
519 | 23 | using Do.Universe.Common; | ||
520 | 24 | using Do.Platform; | ||
521 | 23 | using Do.Platform.Linux; | 25 | using Do.Platform.Linux; |
522 | 24 | using Mono.Unix; | 26 | using Mono.Unix; |
523 | 25 | 27 | ||
524 | 26 | |||
525 | 27 | /// <summary> | 28 | /// <summary> |
526 | 28 | /// Do plug-in that returns search results from a Confluence wiki back to | 29 | /// Do plug-in that returns search results from a Confluence wiki back to |
527 | 29 | /// gnome-do for display and selection by the user | 30 | /// gnome-do for display and selection by the user |
528 | 30 | /// </summary> | 31 | /// </summary> |
529 | 31 | namespace Confluence | 32 | namespace Confluence |
530 | 32 | { | 33 | { |
534 | 33 | 34 | public class ConfluenceSearchAction : Act | |
532 | 34 | // No longer in Do, have to subclass | ||
533 | 35 | public class BookmarkItem : Item, IBookmarkItem | ||
535 | 36 | { | 35 | { |
536 | 37 | protected string name, url; | ||
537 | 38 | public BookmarkItem (string name, string url) | ||
538 | 39 | { | ||
539 | 40 | this.name = name; | ||
540 | 41 | this.url = url; | ||
541 | 42 | } | ||
542 | 43 | |||
543 | 44 | public override string Name | ||
544 | 45 | { | ||
545 | 46 | get { return name; } | ||
546 | 47 | } | ||
547 | 48 | |||
548 | 49 | public override string Description | ||
549 | 50 | { | ||
550 | 51 | get { return url; } | ||
551 | 52 | } | ||
552 | 53 | |||
553 | 54 | public override string Icon | ||
554 | 55 | { | ||
555 | 56 | get { return "www"; } | ||
556 | 57 | } | ||
557 | 58 | |||
558 | 59 | public string Url | ||
559 | 60 | { | ||
560 | 61 | get { return url; } | ||
561 | 62 | } | ||
562 | 63 | } | ||
563 | 64 | |||
564 | 65 | public class ConfluenceSearchAction : Act, IConfigurable | ||
565 | 66 | { | ||
566 | 67 | /// <summary> | ||
567 | 68 | /// Our configuration for Confluence properties | ||
568 | 69 | /// </summary> | ||
569 | 70 | private IConfluenceConfiguration _config; | ||
570 | 71 | |||
571 | 72 | /// <summary> | ||
572 | 73 | /// Initializes ConfluenceSearchAction | ||
573 | 74 | /// </summary> | ||
574 | 75 | public ConfluenceSearchAction() | ||
575 | 76 | { | ||
576 | 77 | _config = new ConfluenceConfiguration(); | ||
577 | 78 | } | ||
578 | 79 | |||
579 | 80 | /// <value> | 36 | /// <value> |
580 | 81 | /// The name of the plugin | 37 | /// The name of the plugin |
581 | 82 | /// </value> | 38 | /// </value> |
584 | 83 | public override string Name | 39 | public override string Name { |
583 | 84 | { | ||
585 | 85 | get { return Catalog.GetString ("Search Confluence"); } | 40 | get { return Catalog.GetString ("Search Confluence"); } |
586 | 86 | } | 41 | } |
587 | 87 | 42 | ||
588 | 88 | /// <value> | 43 | /// <value> |
589 | 89 | /// A description of the plugin | 44 | /// A description of the plugin |
590 | 90 | /// </value> | 45 | /// </value> |
593 | 91 | public override string Description | 46 | public override string Description { |
592 | 92 | { | ||
594 | 93 | get { return Catalog.GetString ("Searches Confluence and returns results to Do"); } | 47 | get { return Catalog.GetString ("Searches Confluence and returns results to Do"); } |
595 | 94 | } | 48 | } |
596 | 95 | 49 | ||
597 | 96 | /// <value> | 50 | /// <value> |
598 | 97 | /// Confluence icon | 51 | /// Confluence icon |
599 | 98 | /// </value> | 52 | /// </value> |
603 | 99 | public override string Icon | 53 | public override string Icon { |
604 | 100 | { | 54 | get { return "confluence.png@"+GetType ().Assembly.FullName; } |
602 | 101 | get { return "confluence.png@"+GetType().Assembly.FullName; } | ||
605 | 102 | } | 55 | } |
606 | 103 | 56 | ||
607 | 104 | /// <value> | 57 | /// <value> |
608 | 105 | /// ITextItem | 58 | /// ITextItem |
609 | 106 | /// </value> | 59 | /// </value> |
615 | 107 | public override IEnumerable<Type> SupportedItemTypes | 60 | public override IEnumerable<Type> SupportedItemTypes { |
616 | 108 | { | 61 | get { |
617 | 109 | get | 62 | yield return typeof (ITextItem); |
613 | 110 | { | ||
614 | 111 | return new Type[] { typeof (ITextItem) }; | ||
618 | 112 | } | 63 | } |
619 | 113 | } | 64 | } |
620 | 114 | 65 | ||
621 | 115 | /// <value> | 66 | /// <value> |
622 | 116 | /// false | 67 | /// false |
623 | 117 | /// </value> | 68 | /// </value> |
626 | 118 | public override bool ModifierItemsOptional | 69 | public override bool ModifierItemsOptional { |
625 | 119 | { | ||
627 | 120 | get { return false; } | 70 | get { return false; } |
628 | 121 | } | 71 | } |
629 | 122 | 72 | ||
630 | 123 | /// <value> | ||
631 | 124 | /// The config class | ||
632 | 125 | /// </value> | ||
633 | 126 | public IConfluenceConfiguration Config | ||
634 | 127 | { | ||
635 | 128 | get { return _config; } | ||
636 | 129 | set { _config= value; } | ||
637 | 130 | } | ||
638 | 131 | |||
639 | 132 | /// <summary> | ||
640 | 133 | /// Create the configuration dialog | ||
641 | 134 | /// </summary> | ||
642 | 135 | public Gtk.Bin GetConfiguration() | ||
643 | 136 | { | ||
644 | 137 | return new ConfluenceConfigWidget( this ); | ||
645 | 138 | } | ||
646 | 139 | |||
647 | 140 | /// <summary> | 73 | /// <summary> |
648 | 141 | /// Actual code performed when action is executed in Do | 74 | /// Actual code performed when action is executed in Do |
649 | 142 | /// </summary> | 75 | /// </summary> |
650 | @@ -149,51 +82,34 @@ | |||
651 | 149 | /// <returns> | 82 | /// <returns> |
652 | 150 | /// Array of Bookmark Items. URLs to search results <see cref="IItem"/> | 83 | /// Array of Bookmark Items. URLs to search results <see cref="IItem"/> |
653 | 151 | /// </returns> | 84 | /// </returns> |
659 | 152 | public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems) { | 85 | public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems) |
660 | 153 | 86 | { | |
661 | 154 | try | 87 | List<BookmarkItem> results = new List<BookmarkItem> (); |
662 | 155 | { | 88 | try { |
663 | 156 | ConfluenceSoapServiceService soapService = new ConfluenceSoapServiceService(_config.BaseUrl); | 89 | ConfluenceSoapServiceService soapService = new ConfluenceSoapServiceService (ConfluenceConfigWidget.BaseURL); |
664 | 157 | 90 | ||
665 | 158 | // Only login if username AND password were provided in the config. | 91 | // Only login if username AND password were provided in the config. |
666 | 159 | // Otherwise, use anonymous access with a null token. | 92 | // Otherwise, use anonymous access with a null token. |
667 | 160 | String token = null; | 93 | String token = null; |
672 | 161 | if (_config.Username != null && _config.Username.Trim().Length != 0 && | 94 | if (!string.IsNullOrEmpty (ConfluenceConfigWidget.UserName) && |
673 | 162 | _config.Password != null && _config.Password.Trim().Length != 0) | 95 | !string.IsNullOrEmpty (ConfluenceConfigWidget.Password)) { |
674 | 163 | { | 96 | token = soapService.login (ConfluenceConfigWidget.UserName, ConfluenceConfigWidget.Password); |
671 | 164 | token = soapService.login(_config.Username, _config.Password); | ||
675 | 165 | } | 97 | } |
676 | 166 | 98 | ||
677 | 167 | string query = (items.First () as ITextItem).Text; | 99 | string query = (items.First () as ITextItem).Text; |
678 | 168 | RemoteSearchResult[] results = soapService.search(token, query, _config.MaxSearchResults); | ||
679 | 169 | 100 | ||
684 | 170 | List<Item> retItems = new List<Item> (); | 101 | foreach (RemoteSearchResult result in soapService.search (token, query, ConfluenceConfigWidget.MaxResults)) { |
685 | 171 | foreach (RemoteSearchResult result in results) | 102 | results.Add (new BookmarkItem (result.title, result.url)); |
682 | 172 | { | ||
683 | 173 | retItems.Add(new BookmarkItem(result.title, result.url)); | ||
686 | 174 | } | 103 | } |
709 | 175 | 104 | } catch (Exception e) { | |
710 | 176 | return retItems.ToArray(); | 105 | Log<ConfluenceSearchAction>.Error ("Unable to search Confluence: {0}", e.Message); |
711 | 177 | } | 106 | Log<ConfluenceSearchAction>.Debug (e.StackTrace); |
712 | 178 | catch( Exception e ) | 107 | } |
713 | 179 | { | 108 | |
714 | 180 | Log( "Unable to search Confluence: {0}", e ); | 109 | foreach (BookmarkItem result in results) |
715 | 181 | return null; | 110 | yield return result; |
716 | 182 | } | 111 | |
717 | 183 | } | 112 | yield break; |
696 | 184 | |||
697 | 185 | /// <summary> | ||
698 | 186 | /// Temporary logging method until it's provided to plugins | ||
699 | 187 | /// </summary> | ||
700 | 188 | public void Log( string message, params object[] args ) | ||
701 | 189 | { | ||
702 | 190 | string prefix= string.Format( "[Info {0:00}:{1:00}:{2:00}.{3:000}] [Confluence] ", | ||
703 | 191 | DateTime.Now.Hour, | ||
704 | 192 | DateTime.Now.Minute, | ||
705 | 193 | DateTime.Now.Second, | ||
706 | 194 | DateTime.Now.Millisecond ); | ||
707 | 195 | |||
708 | 196 | Console.WriteLine( prefix + string.Format( message, args ) ); | ||
718 | 197 | } | 113 | } |
719 | 198 | } | 114 | } |
720 | 199 | } | 115 | } |
721 | 200 | 116 | ||
722 | === modified file 'Del.icio.us/Resources/delicious.addin.xml' | |||
723 | --- Del.icio.us/Resources/delicious.addin.xml 2009-03-31 23:19:25 +0000 | |||
724 | +++ Del.icio.us/Resources/delicious.addin.xml 2009-06-19 08:23:32 +0000 | |||
725 | @@ -15,6 +15,7 @@ | |||
726 | 15 | 15 | ||
727 | 16 | <Dependencies> | 16 | <Dependencies> |
728 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
729 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
730 | 18 | </Dependencies> | 19 | </Dependencies> |
731 | 19 | 20 | ||
732 | 20 | <!-- Extensions included in this assembly --> | 21 | <!-- Extensions included in this assembly --> |
733 | @@ -26,4 +27,7 @@ | |||
734 | 26 | <ItemSource type="Delicious.BookmarksItemSource" /> | 27 | <ItemSource type="Delicious.BookmarksItemSource" /> |
735 | 27 | <ItemSource type="Delicious.TagsItemSource" /> | 28 | <ItemSource type="Delicious.TagsItemSource" /> |
736 | 28 | </Extension> | 29 | </Extension> |
737 | 30 | <Extension path= "/Do/Config"> | ||
738 | 31 | <Config type="Delicious.Configuration" /> | ||
739 | 32 | </Extension> | ||
740 | 29 | </Addin> | 33 | </Addin> |
741 | 30 | 34 | ||
742 | === modified file 'Del.icio.us/src/BookmarksItemSource.cs' | |||
743 | --- Del.icio.us/src/BookmarksItemSource.cs 2009-05-29 09:39:41 +0000 | |||
744 | +++ Del.icio.us/src/BookmarksItemSource.cs 2009-06-19 08:23:32 +0000 | |||
745 | @@ -31,7 +31,7 @@ | |||
746 | 31 | 31 | ||
747 | 32 | namespace Delicious | 32 | namespace Delicious |
748 | 33 | { | 33 | { |
750 | 34 | public class BookmarksItemSource : ItemSource, IConfigurable | 34 | public class BookmarksItemSource : ItemSource |
751 | 35 | { | 35 | { |
752 | 36 | public override string Name { | 36 | public override string Name { |
753 | 37 | get { return Catalog.GetString ("Del.icio.us bookmarks"); } | 37 | get { return Catalog.GetString ("Del.icio.us bookmarks"); } |
754 | @@ -68,10 +68,5 @@ | |||
755 | 68 | updateBookmarks.IsBackground = true; | 68 | updateBookmarks.IsBackground = true; |
756 | 69 | updateBookmarks.Start (); | 69 | updateBookmarks.Start (); |
757 | 70 | } | 70 | } |
758 | 71 | |||
759 | 72 | public Gtk.Bin GetConfiguration () | ||
760 | 73 | { | ||
761 | 74 | return new Configuration (); | ||
762 | 75 | } | ||
763 | 76 | } | 71 | } |
764 | 77 | } | 72 | } |
765 | 78 | 73 | ||
766 | === modified file 'Del.icio.us/src/Configuration.cs' | |||
767 | --- Del.icio.us/src/Configuration.cs 2009-01-16 01:25:56 +0000 | |||
768 | +++ Del.icio.us/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
769 | @@ -21,10 +21,11 @@ | |||
770 | 21 | 21 | ||
771 | 22 | using System; | 22 | using System; |
772 | 23 | using Do.Platform.Linux; | 23 | using Do.Platform.Linux; |
773 | 24 | using Mono.Unix; | ||
774 | 24 | 25 | ||
775 | 25 | namespace Delicious | 26 | namespace Delicious |
776 | 26 | { | 27 | { |
778 | 27 | public class Configuration : AbstractLoginWidget | 28 | public class Configuration : AbstractLoginWidget, IConfigurable |
779 | 28 | { | 29 | { |
780 | 29 | public Configuration () : base ("del.icio.us", "https://secure.delicious.com/register") | 30 | public Configuration () : base ("del.icio.us", "https://secure.delicious.com/register") |
781 | 30 | { | 31 | { |
782 | @@ -32,6 +33,15 @@ | |||
783 | 32 | Password = Delicious.Preferences.Password; | 33 | Password = Delicious.Preferences.Password; |
784 | 33 | } | 34 | } |
785 | 34 | 35 | ||
786 | 36 | public string Title { | ||
787 | 37 | get { return Catalog.GetString ("del.icio.us"); } | ||
788 | 38 | } | ||
789 | 39 | |||
790 | 40 | public Gtk.Bin GetConfiguration () | ||
791 | 41 | { | ||
792 | 42 | return this; | ||
793 | 43 | } | ||
794 | 44 | |||
795 | 35 | protected override void SaveAccountData(string username, string password) | 45 | protected override void SaveAccountData(string username, string password) |
796 | 36 | { | 46 | { |
797 | 37 | Delicious.Preferences.Username = username; | 47 | Delicious.Preferences.Username = username; |
798 | 38 | 48 | ||
799 | === modified file 'Dropbox/Resources/Dropbox.addin.xml' | |||
800 | --- Dropbox/Resources/Dropbox.addin.xml 2009-05-10 17:04:26 +0000 | |||
801 | +++ Dropbox/Resources/Dropbox.addin.xml 2009-06-19 08:23:32 +0000 | |||
802 | @@ -15,6 +15,7 @@ | |||
803 | 15 | 15 | ||
804 | 16 | <Dependencies> | 16 | <Dependencies> |
805 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
806 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
807 | 18 | </Dependencies> | 19 | </Dependencies> |
808 | 19 | 20 | ||
809 | 20 | <Extension path="/Do/Action"> | 21 | <Extension path="/Do/Action"> |
810 | @@ -27,5 +28,7 @@ | |||
811 | 27 | <Action type="Dropbox.DropboxRevisionsAction" /> | 28 | <Action type="Dropbox.DropboxRevisionsAction" /> |
812 | 28 | <Action type="Dropbox.DropboxWebInterfaceAction" /> | 29 | <Action type="Dropbox.DropboxWebInterfaceAction" /> |
813 | 29 | </Extension> | 30 | </Extension> |
815 | 30 | 31 | <Extension path= "/Do/Config"> | |
816 | 32 | <Config type="Dropbox.DropboxConfig" /> | ||
817 | 33 | </Extension> | ||
818 | 31 | </Addin> | 34 | </Addin> |
819 | 32 | 35 | ||
820 | === modified file 'Dropbox/src/Config/DropboxConfig.cs' | |||
821 | --- Dropbox/src/Config/DropboxConfig.cs 2009-06-06 16:40:38 +0000 | |||
822 | +++ Dropbox/src/Config/DropboxConfig.cs 2009-06-19 08:23:32 +0000 | |||
823 | @@ -27,13 +27,14 @@ | |||
824 | 27 | using Gtk; | 27 | using Gtk; |
825 | 28 | 28 | ||
826 | 29 | using Do.Platform; | 29 | using Do.Platform; |
827 | 30 | using Do.Platform.Linux; | ||
828 | 30 | 31 | ||
829 | 31 | namespace Dropbox | 32 | namespace Dropbox |
830 | 32 | { | 33 | { |
831 | 33 | 34 | ||
832 | 34 | [System.ComponentModel.Category("File")] | 35 | [System.ComponentModel.Category("File")] |
833 | 35 | [System.ComponentModel.ToolboxItem(true)] | 36 | [System.ComponentModel.ToolboxItem(true)] |
835 | 36 | public partial class DropboxConfig : Gtk.Bin | 37 | public partial class DropboxConfig : Gtk.Bin, IConfigurable |
836 | 37 | { | 38 | { |
837 | 38 | private static string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal); | 39 | private static string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal); |
838 | 39 | private static string base_path = System.IO.Path.Combine (home_path, "Dropbox"); | 40 | private static string base_path = System.IO.Path.Combine (home_path, "Dropbox"); |
839 | @@ -45,6 +46,15 @@ | |||
840 | 45 | Build (); | 46 | Build (); |
841 | 46 | RefreshView (); | 47 | RefreshView (); |
842 | 47 | } | 48 | } |
843 | 49 | |||
844 | 50 | public string Title { | ||
845 | 51 | get { return Catalog.GetString ("Dropbox"); } | ||
846 | 52 | } | ||
847 | 53 | |||
848 | 54 | public Gtk.Bin GetConfiguration () | ||
849 | 55 | { | ||
850 | 56 | return this; | ||
851 | 57 | } | ||
852 | 48 | 58 | ||
853 | 49 | private void RefreshView () | 59 | private void RefreshView () |
854 | 50 | { | 60 | { |
855 | 51 | 61 | ||
856 | === modified file 'Dropbox/src/DropboxStartAction.cs' | |||
857 | --- Dropbox/src/DropboxStartAction.cs 2009-06-14 15:24:47 +0000 | |||
858 | +++ Dropbox/src/DropboxStartAction.cs 2009-06-19 08:23:32 +0000 | |||
859 | @@ -34,7 +34,7 @@ | |||
860 | 34 | { | 34 | { |
861 | 35 | 35 | ||
862 | 36 | 36 | ||
864 | 37 | public class DropboxStartAction : Act, IConfigurable | 37 | public class DropboxStartAction : Act |
865 | 38 | { | 38 | { |
866 | 39 | 39 | ||
867 | 40 | public override string Name { | 40 | public override string Name { |
868 | @@ -64,11 +64,5 @@ | |||
869 | 64 | 64 | ||
870 | 65 | yield break; | 65 | yield break; |
871 | 66 | } | 66 | } |
872 | 67 | |||
873 | 68 | public Gtk.Bin GetConfiguration () | ||
874 | 69 | { | ||
875 | 70 | return new DropboxConfig(); | ||
876 | 71 | } | ||
877 | 72 | |||
878 | 73 | } | 67 | } |
879 | 74 | } | 68 | } |
880 | 75 | 69 | ||
881 | === modified file 'File/Resources/File.addin.xml' | |||
882 | --- File/Resources/File.addin.xml 2009-03-31 23:19:25 +0000 | |||
883 | +++ File/Resources/File.addin.xml 2009-06-19 08:23:32 +0000 | |||
884 | @@ -15,6 +15,7 @@ | |||
885 | 15 | 15 | ||
886 | 16 | <Dependencies> | 16 | <Dependencies> |
887 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
888 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
889 | 18 | </Dependencies> | 19 | </Dependencies> |
890 | 19 | 20 | ||
891 | 20 | <Extension path="/Do/ItemSource"> | 21 | <Extension path="/Do/ItemSource"> |
892 | @@ -30,4 +31,7 @@ | |||
893 | 30 | <Action type="Do.FilesAndFolders.RenameAction" /> | 31 | <Action type="Do.FilesAndFolders.RenameAction" /> |
894 | 31 | <Action type="Do.FilesAndFolders.MoveToTrashAction" /> | 32 | <Action type="Do.FilesAndFolders.MoveToTrashAction" /> |
895 | 32 | </Extension> | 33 | </Extension> |
896 | 34 | <Extension path= "/Do/Config"> | ||
897 | 35 | <Config type="Do.FilesAndFolders.Configuration" /> | ||
898 | 36 | </Extension> | ||
899 | 33 | </Addin> | 37 | </Addin> |
900 | 34 | 38 | ||
901 | === modified file 'File/src/Do/Do.FilesAndFolders/Configuration.cs' | |||
902 | --- File/src/Do/Do.FilesAndFolders/Configuration.cs 2009-03-05 01:12:21 +0000 | |||
903 | +++ File/src/Do/Do.FilesAndFolders/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
904 | @@ -24,11 +24,13 @@ | |||
905 | 24 | using Gtk; | 24 | using Gtk; |
906 | 25 | using Mono.Unix; | 25 | using Mono.Unix; |
907 | 26 | 26 | ||
908 | 27 | using Do.Platform.Linux; | ||
909 | 28 | |||
910 | 27 | namespace Do.FilesAndFolders | 29 | namespace Do.FilesAndFolders |
911 | 28 | { | 30 | { |
912 | 29 | [System.ComponentModel.Category("File")] | 31 | [System.ComponentModel.Category("File")] |
913 | 30 | [System.ComponentModel.ToolboxItem(true)] | 32 | [System.ComponentModel.ToolboxItem(true)] |
915 | 31 | public partial class Configuration : Gtk.Bin | 33 | public partial class Configuration : Gtk.Bin, IConfigurable |
916 | 32 | { | 34 | { |
917 | 33 | PathNodeView[] nodeViews = new PathNodeView[2]; | 35 | PathNodeView[] nodeViews = new PathNodeView[2]; |
918 | 34 | 36 | ||
919 | @@ -56,6 +58,15 @@ | |||
920 | 56 | notebook1.Page = 0; | 58 | notebook1.Page = 0; |
921 | 57 | 59 | ||
922 | 58 | } | 60 | } |
923 | 61 | |||
924 | 62 | public string Title { | ||
925 | 63 | get { return Catalog.GetString ("Files and Folders"); } | ||
926 | 64 | } | ||
927 | 65 | |||
928 | 66 | public Gtk.Bin GetConfiguration () | ||
929 | 67 | { | ||
930 | 68 | return this; | ||
931 | 69 | } | ||
932 | 59 | 70 | ||
933 | 60 | private PathNodeView GetCurrentView () | 71 | private PathNodeView GetCurrentView () |
934 | 61 | { | 72 | { |
935 | 62 | 73 | ||
936 | === modified file 'File/src/Do/Do.FilesAndFolders/FileItemSource.cs' | |||
937 | --- File/src/Do/Do.FilesAndFolders/FileItemSource.cs 2009-06-17 01:07:23 +0000 | |||
938 | +++ File/src/Do/Do.FilesAndFolders/FileItemSource.cs 2009-06-19 19:14:09 +0000 | |||
939 | @@ -33,7 +33,7 @@ | |||
940 | 33 | /// <summary> | 33 | /// <summary> |
941 | 34 | /// Indexes files recursively starting in a specific directory. | 34 | /// Indexes files recursively starting in a specific directory. |
942 | 35 | /// </summary> | 35 | /// </summary> |
944 | 36 | public class FileItemSource : ItemSource, IConfigurable { | 36 | public class FileItemSource : ItemSource { |
945 | 37 | 37 | ||
946 | 38 | IEnumerable<Item> items; | 38 | IEnumerable<Item> items; |
947 | 39 | bool maximum_files_warned; | 39 | bool maximum_files_warned; |
948 | @@ -60,11 +60,6 @@ | |||
949 | 60 | public override IEnumerable<Item> Items { | 60 | public override IEnumerable<Item> Items { |
950 | 61 | get { return items; } | 61 | get { return items; } |
951 | 62 | } | 62 | } |
952 | 63 | |||
953 | 64 | public Gtk.Bin GetConfiguration () | ||
954 | 65 | { | ||
955 | 66 | return new Configuration (); | ||
956 | 67 | } | ||
957 | 68 | 63 | ||
958 | 69 | public override IEnumerable<Type> SupportedItemTypes { | 64 | public override IEnumerable<Type> SupportedItemTypes { |
959 | 70 | get { | 65 | get { |
960 | 71 | 66 | ||
961 | === modified file 'Flickr/Flickr.mdp' | |||
962 | --- Flickr/Flickr.mdp 2009-04-30 01:03:44 +0000 | |||
963 | +++ Flickr/Flickr.mdp 2009-06-19 08:23:32 +0000 | |||
964 | @@ -21,7 +21,6 @@ | |||
965 | 21 | <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" /> | 21 | <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" /> |
966 | 22 | <File name="src/AccountConfig.cs" subtype="Code" buildaction="Compile" /> | 22 | <File name="src/AccountConfig.cs" subtype="Code" buildaction="Compile" /> |
967 | 23 | <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" /> | 23 | <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" /> |
968 | 24 | <File name="src/FlickrItemSource.cs" subtype="Code" buildaction="Compile" /> | ||
969 | 25 | <File name="gtk-gui/Flickr.UploadConfig.cs" subtype="Code" buildaction="Compile" /> | 24 | <File name="gtk-gui/Flickr.UploadConfig.cs" subtype="Code" buildaction="Compile" /> |
970 | 26 | <File name="src/UploadConfig.cs" subtype="Code" buildaction="Compile" /> | 25 | <File name="src/UploadConfig.cs" subtype="Code" buildaction="Compile" /> |
971 | 27 | <File name="gtk-gui/Flickr.AccountConfig.cs" subtype="Code" buildaction="Compile" /> | 26 | <File name="gtk-gui/Flickr.AccountConfig.cs" subtype="Code" buildaction="Compile" /> |
972 | 28 | 27 | ||
973 | === modified file 'Flickr/Makefile.am' | |||
974 | --- Flickr/Makefile.am 2009-05-07 16:03:28 +0000 | |||
975 | +++ Flickr/Makefile.am 2009-06-19 08:23:32 +0000 | |||
976 | @@ -10,7 +10,6 @@ | |||
977 | 10 | gtk-gui/Flickr.UploadDialog.cs \ | 10 | gtk-gui/Flickr.UploadDialog.cs \ |
978 | 11 | gtk-gui/generated.cs \ | 11 | gtk-gui/generated.cs \ |
979 | 12 | src/AccountConfig.cs \ | 12 | src/AccountConfig.cs \ |
980 | 13 | src/FlickrItemSource.cs \ | ||
981 | 14 | src/UploadAction.cs \ | 13 | src/UploadAction.cs \ |
982 | 15 | src/UploadPool.cs \ | 14 | src/UploadPool.cs \ |
983 | 16 | src/UploadDialog.cs \ | 15 | src/UploadDialog.cs \ |
984 | 17 | 16 | ||
985 | === modified file 'Flickr/Resources/Flickr.addin.xml' | |||
986 | --- Flickr/Resources/Flickr.addin.xml 2009-03-31 23:19:25 +0000 | |||
987 | +++ Flickr/Resources/Flickr.addin.xml 2009-06-19 08:23:32 +0000 | |||
988 | @@ -15,12 +15,14 @@ | |||
989 | 15 | 15 | ||
990 | 16 | <Dependencies> | 16 | <Dependencies> |
991 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
992 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
993 | 18 | </Dependencies> | 19 | </Dependencies> |
994 | 19 | 20 | ||
995 | 20 | <Extension path= "/Do/Action"> | 21 | <Extension path= "/Do/Action"> |
996 | 21 | <Action type="Flickr.UploadAction"/> | 22 | <Action type="Flickr.UploadAction"/> |
997 | 22 | </Extension> | 23 | </Extension> |
1000 | 23 | <Extension path = "/Do/ItemSource"> | 24 | <Extension path= "/Do/Config"> |
1001 | 24 | <ItemSource type="Flickr.FlickrItemSource" /> | 25 | <Config type="Flickr.AccountConfig" /> |
1002 | 26 | <Config type="Flickr.UploadConfig" /> | ||
1003 | 25 | </Extension> | 27 | </Extension> |
1004 | 26 | </Addin> | 28 | </Addin> |
1005 | 27 | 29 | ||
1006 | === modified file 'Flickr/src/AccountConfig.cs' | |||
1007 | --- Flickr/src/AccountConfig.cs 2008-12-24 03:48:49 +0000 | |||
1008 | +++ Flickr/src/AccountConfig.cs 2009-06-19 08:23:32 +0000 | |||
1009 | @@ -25,10 +25,11 @@ | |||
1010 | 25 | using FlickrNet; | 25 | using FlickrNet; |
1011 | 26 | 26 | ||
1012 | 27 | using Do.Platform; | 27 | using Do.Platform; |
1013 | 28 | using Do.Platform.Linux; | ||
1014 | 28 | 29 | ||
1015 | 29 | namespace Flickr | 30 | namespace Flickr |
1016 | 30 | { | 31 | { |
1018 | 31 | public partial class AccountConfig : Gtk.Bin | 32 | public partial class AccountConfig : Gtk.Bin, IConfigurable |
1019 | 32 | { | 33 | { |
1020 | 33 | private FlickrNet.Flickr flickr; | 34 | private FlickrNet.Flickr flickr; |
1021 | 34 | private static IPreferences prefs; | 35 | private static IPreferences prefs; |
1022 | @@ -46,6 +47,15 @@ | |||
1023 | 46 | } else | 47 | } else |
1024 | 47 | flickr = new FlickrNet.Flickr (ApiKey, ApiSecret); | 48 | flickr = new FlickrNet.Flickr (ApiKey, ApiSecret); |
1025 | 48 | } | 49 | } |
1026 | 50 | |||
1027 | 51 | public string Title { | ||
1028 | 52 | get { return Catalog.GetString ("Account"); } | ||
1029 | 53 | } | ||
1030 | 54 | |||
1031 | 55 | public Gtk.Bin GetConfiguration () | ||
1032 | 56 | { | ||
1033 | 57 | return this; | ||
1034 | 58 | } | ||
1035 | 49 | 59 | ||
1036 | 50 | static AccountConfig () | 60 | static AccountConfig () |
1037 | 51 | { | 61 | { |
1038 | @@ -115,10 +125,5 @@ | |||
1039 | 115 | auth_btn.Clicked -= new EventHandler (OnCompleteBtnClicked); | 125 | auth_btn.Clicked -= new EventHandler (OnCompleteBtnClicked); |
1040 | 116 | auth_btn.Clicked += new EventHandler (OnAuthBtnClicked); | 126 | auth_btn.Clicked += new EventHandler (OnAuthBtnClicked); |
1041 | 117 | } | 127 | } |
1042 | 118 | |||
1043 | 119 | public Gtk.Bin GetConfiguration () | ||
1044 | 120 | { | ||
1045 | 121 | return this; | ||
1046 | 122 | } | ||
1047 | 123 | } | 128 | } |
1048 | 124 | } | ||
1049 | 125 | \ No newline at end of file | 129 | \ No newline at end of file |
1050 | 130 | } | ||
1051 | 126 | 131 | ||
1052 | === removed file 'Flickr/src/FlickrItemSource.cs' | |||
1053 | --- Flickr/src/FlickrItemSource.cs 2008-12-24 03:48:49 +0000 | |||
1054 | +++ Flickr/src/FlickrItemSource.cs 1970-01-01 00:00:00 +0000 | |||
1055 | @@ -1,54 +0,0 @@ | |||
1056 | 1 | /* FlickrItemSource.cs | ||
1057 | 2 | * | ||
1058 | 3 | * GNOME Do is the legal property of its developers. Please refer to the | ||
1059 | 4 | * COPYRIGHT file distributed with this | ||
1060 | 5 | * source distribution. | ||
1061 | 6 | * | ||
1062 | 7 | * This program is free software: you can redistribute it and/or modify | ||
1063 | 8 | * it under the terms of the GNU General Public License as published by | ||
1064 | 9 | * the Free Software Foundation, either version 3 of the License, or | ||
1065 | 10 | * (at your option) any later version. | ||
1066 | 11 | * | ||
1067 | 12 | * This program is distributed in the hope that it will be useful, | ||
1068 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1069 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1070 | 15 | * GNU General Public License for more details. | ||
1071 | 16 | * | ||
1072 | 17 | * You should have received a copy of the GNU General Public License | ||
1073 | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1074 | 19 | */ | ||
1075 | 20 | |||
1076 | 21 | |||
1077 | 22 | using System; | ||
1078 | 23 | using System.Collections.Generic; | ||
1079 | 24 | using Mono.Unix; | ||
1080 | 25 | |||
1081 | 26 | using Do.Universe; | ||
1082 | 27 | using Do.Platform.Linux; | ||
1083 | 28 | |||
1084 | 29 | namespace Flickr | ||
1085 | 30 | { | ||
1086 | 31 | public class FlickrItemSource : ItemSource, IConfigurable | ||
1087 | 32 | { | ||
1088 | 33 | public override string Name { | ||
1089 | 34 | get { return Catalog.GetString ("Account"); } | ||
1090 | 35 | } | ||
1091 | 36 | |||
1092 | 37 | public override string Description { | ||
1093 | 38 | get { return ""; } | ||
1094 | 39 | } | ||
1095 | 40 | |||
1096 | 41 | public override string Icon { | ||
1097 | 42 | get { return "flickr.png@" + GetType ().Assembly.FullName; } | ||
1098 | 43 | } | ||
1099 | 44 | |||
1100 | 45 | public override IEnumerable<Type> SupportedItemTypes { | ||
1101 | 46 | get { yield break; } | ||
1102 | 47 | } | ||
1103 | 48 | |||
1104 | 49 | public Gtk.Bin GetConfiguration () | ||
1105 | 50 | { | ||
1106 | 51 | return new AccountConfig (); | ||
1107 | 52 | } | ||
1108 | 53 | } | ||
1109 | 54 | } | ||
1110 | 55 | 0 | ||
1111 | === modified file 'Flickr/src/UploadAction.cs' | |||
1112 | --- Flickr/src/UploadAction.cs 2009-04-19 02:03:26 +0000 | |||
1113 | +++ Flickr/src/UploadAction.cs 2009-06-19 08:23:32 +0000 | |||
1114 | @@ -32,7 +32,7 @@ | |||
1115 | 32 | 32 | ||
1116 | 33 | namespace Flickr | 33 | namespace Flickr |
1117 | 34 | { | 34 | { |
1119 | 35 | public class UploadAction : Act, IConfigurable | 35 | public class UploadAction : Act |
1120 | 36 | { | 36 | { |
1121 | 37 | const string ImageExtensions = ".jpg .jpeg .gif .png .tiff"; | 37 | const string ImageExtensions = ".jpg .jpeg .gif .png .tiff"; |
1122 | 38 | 38 | ||
1123 | @@ -120,11 +120,6 @@ | |||
1124 | 120 | yield break; | 120 | yield break; |
1125 | 121 | } | 121 | } |
1126 | 122 | 122 | ||
1127 | 123 | public Gtk.Bin GetConfiguration () | ||
1128 | 124 | { | ||
1129 | 125 | return new UploadConfig (); | ||
1130 | 126 | } | ||
1131 | 127 | |||
1132 | 128 | bool FileIsPicture (IFileItem item) | 123 | bool FileIsPicture (IFileItem item) |
1133 | 129 | { | 124 | { |
1134 | 130 | return FileIsPicture (item.Path); | 125 | return FileIsPicture (item.Path); |
1135 | 131 | 126 | ||
1136 | === modified file 'Flickr/src/UploadConfig.cs' | |||
1137 | --- Flickr/src/UploadConfig.cs 2008-10-31 17:53:44 +0000 | |||
1138 | +++ Flickr/src/UploadConfig.cs 2009-06-19 08:23:32 +0000 | |||
1139 | @@ -21,12 +21,14 @@ | |||
1140 | 21 | 21 | ||
1141 | 22 | using System; | 22 | using System; |
1142 | 23 | using Gtk; | 23 | using Gtk; |
1143 | 24 | using Mono.Unix; | ||
1144 | 25 | using Do.Platform.Linux; | ||
1145 | 24 | 26 | ||
1146 | 25 | namespace Flickr | 27 | namespace Flickr |
1147 | 26 | { | 28 | { |
1148 | 27 | [System.ComponentModel.Category("Flickr")] | 29 | [System.ComponentModel.Category("Flickr")] |
1149 | 28 | [System.ComponentModel.ToolboxItem(true)] | 30 | [System.ComponentModel.ToolboxItem(true)] |
1151 | 29 | public partial class UploadConfig : Gtk.Bin | 31 | public partial class UploadConfig : Gtk.Bin, IConfigurable |
1152 | 30 | { | 32 | { |
1153 | 31 | public UploadConfig() | 33 | public UploadConfig() |
1154 | 32 | { | 34 | { |
1155 | @@ -41,6 +43,16 @@ | |||
1156 | 41 | friends_chk.Active = AccountConfig.FriendsAllowed; | 43 | friends_chk.Active = AccountConfig.FriendsAllowed; |
1157 | 42 | family_chk.Active = AccountConfig.FamilyAllowed; | 44 | family_chk.Active = AccountConfig.FamilyAllowed; |
1158 | 43 | } | 45 | } |
1159 | 46 | |||
1160 | 47 | public string Title { | ||
1161 | 48 | get { return Catalog.GetString ("Uploading"); } | ||
1162 | 49 | } | ||
1163 | 50 | |||
1164 | 51 | public Gtk.Bin GetConfiguration () | ||
1165 | 52 | { | ||
1166 | 53 | return this; | ||
1167 | 54 | } | ||
1168 | 55 | |||
1169 | 44 | protected void OnTagsEdited (object sender, EventArgs args) | 56 | protected void OnTagsEdited (object sender, EventArgs args) |
1170 | 45 | { | 57 | { |
1171 | 46 | AccountConfig.Tags = tags_text.Buffer.Text; | 58 | AccountConfig.Tags = tags_text.Buffer.Text; |
1172 | @@ -70,4 +82,4 @@ | |||
1173 | 70 | AccountConfig.FamilyAllowed = family_chk.Active; | 82 | AccountConfig.FamilyAllowed = family_chk.Active; |
1174 | 71 | } | 83 | } |
1175 | 72 | } | 84 | } |
1176 | 73 | } | ||
1177 | 74 | \ No newline at end of file | 85 | \ No newline at end of file |
1178 | 86 | } | ||
1179 | 75 | 87 | ||
1180 | === modified file 'GoogleCalendar/Resources/GoogleCalendar.addin.xml' | |||
1181 | --- GoogleCalendar/Resources/GoogleCalendar.addin.xml 2009-05-07 19:49:44 +0000 | |||
1182 | +++ GoogleCalendar/Resources/GoogleCalendar.addin.xml 2009-06-19 08:23:32 +0000 | |||
1183 | @@ -15,6 +15,7 @@ | |||
1184 | 15 | 15 | ||
1185 | 16 | <Dependencies> | 16 | <Dependencies> |
1186 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
1187 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
1188 | 18 | </Dependencies> | 19 | </Dependencies> |
1189 | 19 | 20 | ||
1190 | 20 | <Extension path="/Do/ItemSource"> | 21 | <Extension path="/Do/ItemSource"> |
1191 | @@ -27,4 +28,7 @@ | |||
1192 | 27 | <Action type="GCalendar.ViewCalendarAction" /> | 28 | <Action type="GCalendar.ViewCalendarAction" /> |
1193 | 28 | <Action type="GCalendar.ViewEventAction" /> | 29 | <Action type="GCalendar.ViewEventAction" /> |
1194 | 29 | </Extension> | 30 | </Extension> |
1195 | 31 | <Extension path= "/Do/Config"> | ||
1196 | 32 | <Config type="GCalendar.Configuration" /> | ||
1197 | 33 | </Extension> | ||
1198 | 30 | </Addin> | 34 | </Addin> |
1199 | 31 | 35 | ||
1200 | === modified file 'GoogleCalendar/src/Configuration.cs' | |||
1201 | --- GoogleCalendar/src/Configuration.cs 2009-01-01 01:25:16 +0000 | |||
1202 | +++ GoogleCalendar/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
1203 | @@ -29,7 +29,7 @@ | |||
1204 | 29 | 29 | ||
1205 | 30 | namespace GCalendar | 30 | namespace GCalendar |
1206 | 31 | { | 31 | { |
1208 | 32 | public class Configuration : AbstractLoginWidget | 32 | public class Configuration : AbstractLoginWidget, IConfigurable |
1209 | 33 | { | 33 | { |
1210 | 34 | const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\." | 34 | const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\." |
1211 | 35 | + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*" | 35 | + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*" |
1212 | @@ -43,6 +43,15 @@ | |||
1213 | 43 | Username = GCal.Preferences.Username; | 43 | Username = GCal.Preferences.Username; |
1214 | 44 | Password = GCal.Preferences.Password; | 44 | Password = GCal.Preferences.Password; |
1215 | 45 | } | 45 | } |
1216 | 46 | |||
1217 | 47 | public string Title { | ||
1218 | 48 | get { return Catalog.GetString ("Google Calendar"); } | ||
1219 | 49 | } | ||
1220 | 50 | |||
1221 | 51 | public Gtk.Bin GetConfiguration () | ||
1222 | 52 | { | ||
1223 | 53 | return this; | ||
1224 | 54 | } | ||
1225 | 46 | 55 | ||
1226 | 47 | protected override bool Validate (string username, string password) | 56 | protected override bool Validate (string username, string password) |
1227 | 48 | { | 57 | { |
1228 | @@ -63,4 +72,4 @@ | |||
1229 | 63 | return new Regex (EmailPattern, RegexOptions.Compiled).IsMatch (username); | 72 | return new Regex (EmailPattern, RegexOptions.Compiled).IsMatch (username); |
1230 | 64 | } | 73 | } |
1231 | 65 | } | 74 | } |
1232 | 66 | } | ||
1233 | 67 | \ No newline at end of file | 75 | \ No newline at end of file |
1234 | 76 | } | ||
1235 | 68 | 77 | ||
1236 | === modified file 'GoogleCalendar/src/GCalendarItemSource.cs' | |||
1237 | --- GoogleCalendar/src/GCalendarItemSource.cs 2008-12-31 21:16:30 +0000 | |||
1238 | +++ GoogleCalendar/src/GCalendarItemSource.cs 2009-06-19 19:14:09 +0000 | |||
1239 | @@ -30,7 +30,7 @@ | |||
1240 | 30 | 30 | ||
1241 | 31 | namespace GCalendar | 31 | namespace GCalendar |
1242 | 32 | { | 32 | { |
1244 | 33 | public sealed class GCalendarItemSource : ItemSource, IConfigurable | 33 | public sealed class GCalendarItemSource : ItemSource |
1245 | 34 | { | 34 | { |
1246 | 35 | public GCalendarItemSource () | 35 | public GCalendarItemSource () |
1247 | 36 | { | 36 | { |
1248 | @@ -69,10 +69,5 @@ | |||
1249 | 69 | thread.IsBackground = true; | 69 | thread.IsBackground = true; |
1250 | 70 | thread.Start (); | 70 | thread.Start (); |
1251 | 71 | } | 71 | } |
1252 | 72 | |||
1253 | 73 | public Gtk.Bin GetConfiguration () | ||
1254 | 74 | { | ||
1255 | 75 | return new Configuration (); | ||
1256 | 76 | } | ||
1257 | 77 | } | 72 | } |
1258 | 78 | } | 73 | } |
1259 | 79 | 74 | ||
1260 | === modified file 'GoogleContacts/Resources/GoogleContacts.addin.xml' | |||
1261 | --- GoogleContacts/Resources/GoogleContacts.addin.xml 2009-05-17 08:43:00 +0000 | |||
1262 | +++ GoogleContacts/Resources/GoogleContacts.addin.xml 2009-06-19 08:23:32 +0000 | |||
1263 | @@ -15,6 +15,7 @@ | |||
1264 | 15 | 15 | ||
1265 | 16 | <Dependencies> | 16 | <Dependencies> |
1266 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
1267 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
1268 | 18 | </Dependencies> | 19 | </Dependencies> |
1269 | 19 | 20 | ||
1270 | 20 | <Extension path = "/Do/ItemSource"> | 21 | <Extension path = "/Do/ItemSource"> |
1271 | @@ -23,4 +24,7 @@ | |||
1272 | 23 | <Extension path= "/Do/Action"> | 24 | <Extension path= "/Do/Action"> |
1273 | 24 | <Action type="GMail.RecentConversationsActions" /> | 25 | <Action type="GMail.RecentConversationsActions" /> |
1274 | 25 | </Extension> | 26 | </Extension> |
1275 | 27 | <Extension path= "/Do/Config"> | ||
1276 | 28 | <Config type="GMail.GMailConfig" /> | ||
1277 | 29 | </Extension> | ||
1278 | 26 | </Addin> | 30 | </Addin> |
1279 | 27 | 31 | ||
1280 | === modified file 'GoogleContacts/src/GMailConfig.cs' | |||
1281 | --- GoogleContacts/src/GMailConfig.cs 2008-12-24 05:37:47 +0000 | |||
1282 | +++ GoogleContacts/src/GMailConfig.cs 2009-06-19 08:23:32 +0000 | |||
1283 | @@ -25,10 +25,11 @@ | |||
1284 | 25 | using Gtk; | 25 | using Gtk; |
1285 | 26 | 26 | ||
1286 | 27 | using Do.Platform.Linux; | 27 | using Do.Platform.Linux; |
1287 | 28 | using Mono.Unix; | ||
1288 | 28 | 29 | ||
1289 | 29 | namespace GMail | 30 | namespace GMail |
1290 | 30 | { | 31 | { |
1292 | 31 | public class GMailConfig : AbstractLoginWidget | 32 | public class GMailConfig : AbstractLoginWidget, IConfigurable |
1293 | 32 | { | 33 | { |
1294 | 33 | const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\." | 34 | const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\." |
1295 | 34 | + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*" | 35 | + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*" |
1296 | @@ -42,6 +43,15 @@ | |||
1297 | 42 | Password = GMail.Preferences.Password; | 43 | Password = GMail.Preferences.Password; |
1298 | 43 | } | 44 | } |
1299 | 44 | 45 | ||
1300 | 46 | public string Title { | ||
1301 | 47 | get { return Catalog.GetString ("GMail"); } | ||
1302 | 48 | } | ||
1303 | 49 | |||
1304 | 50 | public Gtk.Bin GetConfiguration () | ||
1305 | 51 | { | ||
1306 | 52 | return this; | ||
1307 | 53 | } | ||
1308 | 54 | |||
1309 | 45 | protected override void SaveAccountData(string username, string password) | 55 | protected override void SaveAccountData(string username, string password) |
1310 | 46 | { | 56 | { |
1311 | 47 | GMail.Preferences.Username = username; | 57 | GMail.Preferences.Username = username; |
1312 | 48 | 58 | ||
1313 | === modified file 'GoogleContacts/src/GMailContactItemSource.cs' | |||
1314 | --- GoogleContacts/src/GMailContactItemSource.cs 2008-12-24 04:42:14 +0000 | |||
1315 | +++ GoogleContacts/src/GMailContactItemSource.cs 2009-06-19 08:23:32 +0000 | |||
1316 | @@ -29,7 +29,7 @@ | |||
1317 | 29 | 29 | ||
1318 | 30 | namespace GMail | 30 | namespace GMail |
1319 | 31 | { | 31 | { |
1321 | 32 | public sealed class GMailItemSource : ItemSource, IConfigurable | 32 | public sealed class GMailItemSource : ItemSource |
1322 | 33 | { | 33 | { |
1323 | 34 | public GMailItemSource() | 34 | public GMailItemSource() |
1324 | 35 | { | 35 | { |
1325 | @@ -70,10 +70,5 @@ | |||
1326 | 70 | thread.IsBackground = true; | 70 | thread.IsBackground = true; |
1327 | 71 | thread.Start (); | 71 | thread.Start (); |
1328 | 72 | } | 72 | } |
1329 | 73 | |||
1330 | 74 | public Gtk.Bin GetConfiguration () | ||
1331 | 75 | { | ||
1332 | 76 | return new GMailConfig (); | ||
1333 | 77 | } | ||
1334 | 78 | } | 73 | } |
1335 | 79 | } | 74 | } |
1336 | 80 | 75 | ||
1337 | === modified file 'GoogleDocs/Resources/GoogleDocs.addin.xml' | |||
1338 | --- GoogleDocs/Resources/GoogleDocs.addin.xml 2009-06-17 20:40:03 +0000 | |||
1339 | +++ GoogleDocs/Resources/GoogleDocs.addin.xml 2009-06-19 08:23:32 +0000 | |||
1340 | @@ -15,6 +15,7 @@ | |||
1341 | 15 | 15 | ||
1342 | 16 | <Dependencies> | 16 | <Dependencies> |
1343 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
1344 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
1345 | 18 | </Dependencies> | 19 | </Dependencies> |
1346 | 19 | 20 | ||
1347 | 20 | <Extension path="/Do/ItemSource"> | 21 | <Extension path="/Do/ItemSource"> |
1348 | @@ -25,4 +26,7 @@ | |||
1349 | 25 | <Action type="GDocs.GDocsUploadDocument" /> | 26 | <Action type="GDocs.GDocsUploadDocument" /> |
1350 | 26 | <Action type="GDocs.GDocsTrashDocument" /> | 27 | <Action type="GDocs.GDocsTrashDocument" /> |
1351 | 27 | </Extension> | 28 | </Extension> |
1352 | 29 | <Extension path= "/Do/Config"> | ||
1353 | 30 | <Config type="GDocs.Configuration" /> | ||
1354 | 31 | </Extension> | ||
1355 | 28 | </Addin> | 32 | </Addin> |
1356 | 29 | 33 | ||
1357 | === modified file 'GoogleDocs/src/Configuration.cs' | |||
1358 | --- GoogleDocs/src/Configuration.cs 2009-06-09 22:50:11 +0000 | |||
1359 | +++ GoogleDocs/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
1360 | @@ -26,7 +26,7 @@ | |||
1361 | 26 | 26 | ||
1362 | 27 | namespace GDocs | 27 | namespace GDocs |
1363 | 28 | { | 28 | { |
1365 | 29 | public class Configuration : AbstractLoginWidget | 29 | public class Configuration : AbstractLoginWidget, IConfigurable |
1366 | 30 | { | 30 | { |
1367 | 31 | const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\." | 31 | const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\." |
1368 | 32 | + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*" | 32 | + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*" |
1369 | @@ -40,6 +40,15 @@ | |||
1370 | 40 | Password = GDocs.Preferences.Password; | 40 | Password = GDocs.Preferences.Password; |
1371 | 41 | } | 41 | } |
1372 | 42 | 42 | ||
1373 | 43 | public string Title { | ||
1374 | 44 | get { return Catalog.GetString ("Google Docs"); } | ||
1375 | 45 | } | ||
1376 | 46 | |||
1377 | 47 | public Gtk.Bin GetConfiguration () | ||
1378 | 48 | { | ||
1379 | 49 | return this; | ||
1380 | 50 | } | ||
1381 | 51 | |||
1382 | 43 | protected override bool Validate (string username, string password) | 52 | protected override bool Validate (string username, string password) |
1383 | 44 | { | 53 | { |
1384 | 45 | return ValidateUsername (username) && | 54 | return ValidateUsername (username) && |
1385 | 46 | 55 | ||
1386 | === modified file 'GoogleDocs/src/GDocsItemSource.cs' | |||
1387 | --- GoogleDocs/src/GDocsItemSource.cs 2009-06-09 22:50:11 +0000 | |||
1388 | +++ GoogleDocs/src/GDocsItemSource.cs 2009-06-19 08:23:32 +0000 | |||
1389 | @@ -27,7 +27,7 @@ | |||
1390 | 27 | 27 | ||
1391 | 28 | namespace GDocs | 28 | namespace GDocs |
1392 | 29 | { | 29 | { |
1394 | 30 | public sealed class GDocsItemSource : ItemSource, IConfigurable | 30 | public sealed class GDocsItemSource : ItemSource |
1395 | 31 | { | 31 | { |
1396 | 32 | public override string Name { | 32 | public override string Name { |
1397 | 33 | get { return Catalog.GetString ("Google Docs"); } | 33 | get { return Catalog.GetString ("Google Docs"); } |
1398 | @@ -60,10 +60,5 @@ | |||
1399 | 60 | updateDocs.IsBackground = true; | 60 | updateDocs.IsBackground = true; |
1400 | 61 | updateDocs.Start (); | 61 | updateDocs.Start (); |
1401 | 62 | } | 62 | } |
1402 | 63 | |||
1403 | 64 | public Gtk.Bin GetConfiguration () | ||
1404 | 65 | { | ||
1405 | 66 | return new Configuration (); | ||
1406 | 67 | } | ||
1407 | 68 | } | 63 | } |
1408 | 69 | } | 64 | } |
1409 | 70 | 65 | ||
1410 | === modified file 'GoogleSearch/Resources/GoogleSearch.addin.xml' | |||
1411 | --- GoogleSearch/Resources/GoogleSearch.addin.xml 2009-03-31 23:19:25 +0000 | |||
1412 | +++ GoogleSearch/Resources/GoogleSearch.addin.xml 2009-06-19 08:23:32 +0000 | |||
1413 | @@ -15,6 +15,7 @@ | |||
1414 | 15 | 15 | ||
1415 | 16 | <Dependencies> | 16 | <Dependencies> |
1416 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
1417 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
1418 | 18 | </Dependencies> | 19 | </Dependencies> |
1419 | 19 | 20 | ||
1420 | 20 | <!-- Extensions included in this assembly --> | 21 | <!-- Extensions included in this assembly --> |
1421 | @@ -23,4 +24,7 @@ | |||
1422 | 23 | <Action type="InlineGoogleSearch.InlineGoogleSearch" /> | 24 | <Action type="InlineGoogleSearch.InlineGoogleSearch" /> |
1423 | 24 | <Action type="InlineGoogleSearch.ImFeelingLucky" /> | 25 | <Action type="InlineGoogleSearch.ImFeelingLucky" /> |
1424 | 25 | </Extension> | 26 | </Extension> |
1425 | 27 | <Extension path= "/Do/Config"> | ||
1426 | 28 | <Config type="InlineGoogleSearch.InlineGoogleSearchConfig" /> | ||
1427 | 29 | </Extension> | ||
1428 | 26 | </Addin> | 30 | </Addin> |
1429 | 27 | 31 | ||
1430 | === modified file 'GoogleSearch/src/InlineGoogleSearch.cs' | |||
1431 | --- GoogleSearch/src/InlineGoogleSearch.cs 2009-02-11 19:17:18 +0000 | |||
1432 | +++ GoogleSearch/src/InlineGoogleSearch.cs 2009-06-19 08:23:32 +0000 | |||
1433 | @@ -71,7 +71,7 @@ | |||
1434 | 71 | /// <summary> | 71 | /// <summary> |
1435 | 72 | /// Class Definition | 72 | /// Class Definition |
1436 | 73 | /// </summary> | 73 | /// </summary> |
1438 | 74 | public class InlineGoogleSearch : Act, IConfigurable { | 74 | public class InlineGoogleSearch : Act { |
1439 | 75 | 75 | ||
1440 | 76 | /// <value> | 76 | /// <value> |
1441 | 77 | /// Search Google | 77 | /// Search Google |
1442 | @@ -81,7 +81,7 @@ | |||
1443 | 81 | return Catalog.GetString ("Search Google"); | 81 | return Catalog.GetString ("Search Google"); |
1444 | 82 | } | 82 | } |
1445 | 83 | } | 83 | } |
1447 | 84 | 84 | ||
1448 | 85 | /// <value> | 85 | /// <value> |
1449 | 86 | /// Searches google and returns results to Do | 86 | /// Searches google and returns results to Do |
1450 | 87 | /// </value> | 87 | /// </value> |
1451 | @@ -162,16 +162,5 @@ | |||
1452 | 162 | public InlineGoogleSearch () | 162 | public InlineGoogleSearch () |
1453 | 163 | { | 163 | { |
1454 | 164 | } | 164 | } |
1455 | 165 | |||
1456 | 166 | /// <summary> | ||
1457 | 167 | /// Calls config dialog | ||
1458 | 168 | /// </summary> | ||
1459 | 169 | /// <returns> | ||
1460 | 170 | /// InlineGoogleSearchConfig Widget <see cref="Gtk.Bin"/> | ||
1461 | 171 | /// </returns> | ||
1462 | 172 | public Gtk.Bin GetConfiguration () | ||
1463 | 173 | { | ||
1464 | 174 | return new InlineGoogleSearchConfig (); | ||
1465 | 175 | } | ||
1466 | 176 | } | 165 | } |
1467 | 177 | } | 166 | } |
1468 | 178 | 167 | ||
1469 | === modified file 'GoogleSearch/src/InlineGoogleSearchConfig.cs' | |||
1470 | --- GoogleSearch/src/InlineGoogleSearchConfig.cs 2009-01-10 23:05:04 +0000 | |||
1471 | +++ GoogleSearch/src/InlineGoogleSearchConfig.cs 2009-06-19 08:23:32 +0000 | |||
1472 | @@ -20,6 +20,9 @@ | |||
1473 | 20 | using System; | 20 | using System; |
1474 | 21 | 21 | ||
1475 | 22 | using Do.Platform; | 22 | using Do.Platform; |
1476 | 23 | using Do.Platform.Linux; | ||
1477 | 24 | |||
1478 | 25 | using Mono.Unix; | ||
1479 | 23 | 26 | ||
1480 | 24 | /// <summary> | 27 | /// <summary> |
1481 | 25 | /// Do plug-in that returns search results from google back to gnome-do for | 28 | /// Do plug-in that returns search results from google back to gnome-do for |
1482 | @@ -30,7 +33,7 @@ | |||
1483 | 30 | /// <summary> | 33 | /// <summary> |
1484 | 31 | /// Config Dialog for InlineGoogleSearch | 34 | /// Config Dialog for InlineGoogleSearch |
1485 | 32 | /// </summary> | 35 | /// </summary> |
1487 | 33 | public partial class InlineGoogleSearchConfig : Gtk.Bin { | 36 | public partial class InlineGoogleSearchConfig : Gtk.Bin, IConfigurable { |
1488 | 34 | /// <summary> | 37 | /// <summary> |
1489 | 35 | /// Do.Addins.Util Preferences | 38 | /// Do.Addins.Util Preferences |
1490 | 36 | /// </summary> | 39 | /// </summary> |
1491 | @@ -72,6 +75,15 @@ | |||
1492 | 72 | { | 75 | { |
1493 | 73 | prefs = Services.Preferences.Get<InlineGoogleSearchConfig>(); | 76 | prefs = Services.Preferences.Get<InlineGoogleSearchConfig>(); |
1494 | 74 | } | 77 | } |
1495 | 78 | |||
1496 | 79 | public string Title { | ||
1497 | 80 | get { return Catalog.GetString ("Google Search"); } | ||
1498 | 81 | } | ||
1499 | 82 | |||
1500 | 83 | public Gtk.Bin GetConfiguration () | ||
1501 | 84 | { | ||
1502 | 85 | return this; | ||
1503 | 86 | } | ||
1504 | 75 | 87 | ||
1505 | 76 | /// <value> | 88 | /// <value> |
1506 | 77 | /// Default Value: "moderate" | 89 | /// Default Value: "moderate" |
1507 | 78 | 90 | ||
1508 | === modified file 'ImageShack/Resources/ImageShack.addin.xml' | |||
1509 | --- ImageShack/Resources/ImageShack.addin.xml 2009-03-31 23:19:25 +0000 | |||
1510 | +++ ImageShack/Resources/ImageShack.addin.xml 2009-06-19 08:23:32 +0000 | |||
1511 | @@ -15,9 +15,13 @@ | |||
1512 | 15 | 15 | ||
1513 | 16 | <Dependencies> | 16 | <Dependencies> |
1514 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
1515 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
1516 | 18 | </Dependencies> | 19 | </Dependencies> |
1517 | 19 | 20 | ||
1518 | 20 | <Extension path= "/Do/Action"> | 21 | <Extension path= "/Do/Action"> |
1519 | 21 | <Action type="ImageShack.ImageShackAction" /> | 22 | <Action type="ImageShack.ImageShackAction" /> |
1520 | 22 | </Extension> | 23 | </Extension> |
1521 | 24 | <Extension path= "/Do/Config"> | ||
1522 | 25 | <Config type="ImageShack.ImageShackConfig" /> | ||
1523 | 26 | </Extension> | ||
1524 | 23 | </Addin> | 27 | </Addin> |
1525 | 24 | 28 | ||
1526 | === modified file 'ImageShack/src/ImageShackAction.cs' | |||
1527 | --- ImageShack/src/ImageShackAction.cs 2009-03-04 05:10:41 +0000 | |||
1528 | +++ ImageShack/src/ImageShackAction.cs 2009-06-19 08:23:32 +0000 | |||
1529 | @@ -36,7 +36,7 @@ | |||
1530 | 36 | 36 | ||
1531 | 37 | namespace ImageShack | 37 | namespace ImageShack |
1532 | 38 | { | 38 | { |
1534 | 39 | public class ImageShackAction : Act, IConfigurable | 39 | public class ImageShackAction : Act |
1535 | 40 | { | 40 | { |
1536 | 41 | static readonly Dictionary<string, string> image_mime_type_mapping = new Dictionary<string,string> | 41 | static readonly Dictionary<string, string> image_mime_type_mapping = new Dictionary<string,string> |
1537 | 42 | { | 42 | { |
1538 | @@ -195,4 +195,4 @@ | |||
1539 | 195 | return image_mime_type_mapping.ContainsKey (Path.GetExtension (file.Path)); | 195 | return image_mime_type_mapping.ContainsKey (Path.GetExtension (file.Path)); |
1540 | 196 | } | 196 | } |
1541 | 197 | } | 197 | } |
1542 | 198 | } | ||
1543 | 199 | \ No newline at end of file | 198 | \ No newline at end of file |
1544 | 199 | } | ||
1545 | 200 | 200 | ||
1546 | === modified file 'ImageShack/src/ImageShackConfig.cs' | |||
1547 | --- ImageShack/src/ImageShackConfig.cs 2008-12-24 04:44:00 +0000 | |||
1548 | +++ ImageShack/src/ImageShackConfig.cs 2009-06-19 08:23:32 +0000 | |||
1549 | @@ -21,10 +21,12 @@ | |||
1550 | 21 | using System.Text.RegularExpressions; | 21 | using System.Text.RegularExpressions; |
1551 | 22 | 22 | ||
1552 | 23 | using Do.Platform; | 23 | using Do.Platform; |
1553 | 24 | using Do.Platform.Linux; | ||
1554 | 25 | using Mono.Unix; | ||
1555 | 24 | 26 | ||
1556 | 25 | namespace ImageShack | 27 | namespace ImageShack |
1557 | 26 | { | 28 | { |
1559 | 27 | public partial class ImageShackConfig : Gtk.Bin | 29 | public partial class ImageShackConfig : Gtk.Bin, IConfigurable |
1560 | 28 | { | 30 | { |
1561 | 29 | private static IPreferences prefs; | 31 | private static IPreferences prefs; |
1562 | 30 | private readonly static string RegistrationUrl = "http://profile.imageshack.us/registration/"; | 32 | private readonly static string RegistrationUrl = "http://profile.imageshack.us/registration/"; |
1563 | @@ -41,6 +43,15 @@ | |||
1564 | 41 | { | 43 | { |
1565 | 42 | prefs = Services.Preferences.Get<ImageShackConfig> (); | 44 | prefs = Services.Preferences.Get<ImageShackConfig> (); |
1566 | 43 | } | 45 | } |
1567 | 46 | |||
1568 | 47 | public string Title { | ||
1569 | 48 | get { return Catalog.GetString ("Imageshack"); } | ||
1570 | 49 | } | ||
1571 | 50 | |||
1572 | 51 | public Gtk.Bin GetConfiguration () | ||
1573 | 52 | { | ||
1574 | 53 | return this; | ||
1575 | 54 | } | ||
1576 | 44 | 55 | ||
1577 | 45 | public static string RegistrationCode { | 56 | public static string RegistrationCode { |
1578 | 46 | get { return prefs.Get<string> ("RegistrationCode",""); } | 57 | get { return prefs.Get<string> ("RegistrationCode",""); } |
1579 | 47 | 58 | ||
1580 | === modified file 'JIRA/JIRA.mdp' | |||
1581 | --- JIRA/JIRA.mdp 2009-01-09 08:10:40 +0000 | |||
1582 | +++ JIRA/JIRA.mdp 2009-06-20 02:30:06 +0000 | |||
1583 | @@ -17,10 +17,8 @@ | |||
1584 | 17 | <File name="src/JIRAIssueSource.cs" subtype="Code" buildaction="Compile" /> | 17 | <File name="src/JIRAIssueSource.cs" subtype="Code" buildaction="Compile" /> |
1585 | 18 | <File name="src/JIRAIssueItem.cs" subtype="Code" buildaction="Compile" /> | 18 | <File name="src/JIRAIssueItem.cs" subtype="Code" buildaction="Compile" /> |
1586 | 19 | <File name="src/JIRAIssueAction.cs" subtype="Code" buildaction="Compile" /> | 19 | <File name="src/JIRAIssueAction.cs" subtype="Code" buildaction="Compile" /> |
1587 | 20 | <File name="src/JIRAConfiguration.cs" subtype="Code" buildaction="Compile" /> | ||
1588 | 21 | <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" /> | 20 | <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" /> |
1589 | 22 | <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" /> | 21 | <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" /> |
1590 | 23 | <File name="gtk-gui/JIRA.ConfigWidget.cs" subtype="Code" buildaction="Compile" /> | ||
1591 | 24 | <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" /> | 22 | <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" /> |
1592 | 25 | <File name="src/ConfigWidget.cs" subtype="Code" buildaction="Compile" /> | 23 | <File name="src/ConfigWidget.cs" subtype="Code" buildaction="Compile" /> |
1593 | 26 | <File name="src/Remote" subtype="Directory" buildaction="Compile" /> | 24 | <File name="src/Remote" subtype="Directory" buildaction="Compile" /> |
1594 | @@ -30,6 +28,7 @@ | |||
1595 | 30 | <File name="src/Remote/JIRAServerFacade.cs" subtype="Code" buildaction="Compile" /> | 28 | <File name="src/Remote/JIRAServerFacade.cs" subtype="Code" buildaction="Compile" /> |
1596 | 31 | <File name="Resources/JIRA.addin.xml" subtype="Code" buildaction="EmbedAsResource" /> | 29 | <File name="Resources/JIRA.addin.xml" subtype="Code" buildaction="EmbedAsResource" /> |
1597 | 32 | <File name="Resources/icons/jira.png" subtype="Code" buildaction="EmbedAsResource" /> | 30 | <File name="Resources/icons/jira.png" subtype="Code" buildaction="EmbedAsResource" /> |
1598 | 31 | <File name="gtk-gui/JIRA.ConfigWidget.cs" subtype="Code" buildaction="Compile" /> | ||
1599 | 33 | </Contents> | 32 | </Contents> |
1600 | 34 | <References> | 33 | <References> |
1601 | 35 | <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | 34 | <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> |
1602 | @@ -38,7 +37,6 @@ | |||
1603 | 38 | <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | 37 | <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
1604 | 39 | <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | 38 | <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> |
1605 | 40 | <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | 39 | <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> |
1606 | 41 | <ProjectReference type="Gac" localcopy="True" refto="gconf-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
1607 | 42 | <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | 40 | <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> |
1608 | 43 | <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 41 | <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
1609 | 44 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> | 42 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" /> |
1610 | 45 | 43 | ||
1611 | === modified file 'JIRA/Makefile.am' | |||
1612 | --- JIRA/Makefile.am 2009-01-09 07:45:01 +0000 | |||
1613 | +++ JIRA/Makefile.am 2009-06-19 19:14:09 +0000 | |||
1614 | @@ -12,7 +12,6 @@ | |||
1615 | 12 | src/Remote/JIRARssClient.cs \ | 12 | src/Remote/JIRARssClient.cs \ |
1616 | 13 | src/Remote/JIRAServerFacade.cs \ | 13 | src/Remote/JIRAServerFacade.cs \ |
1617 | 14 | src/Remote/AtlassianJiraSoapService.cs \ | 14 | src/Remote/AtlassianJiraSoapService.cs \ |
1618 | 15 | src/JIRAConfiguration.cs \ | ||
1619 | 16 | src/JIRAIssueSource.cs | 15 | src/JIRAIssueSource.cs |
1620 | 17 | 16 | ||
1621 | 18 | RESOURCES = \ | 17 | RESOURCES = \ |
1622 | @@ -28,5 +27,4 @@ | |||
1623 | 28 | $(DO_PLATFORM_LIBS) \ | 27 | $(DO_PLATFORM_LIBS) \ |
1624 | 29 | $(DO_PLATFORM_LINUX_LIBS) \ | 28 | $(DO_PLATFORM_LINUX_LIBS) \ |
1625 | 30 | $(DO_UNIVERSE_LIBS) \ | 29 | $(DO_UNIVERSE_LIBS) \ |
1628 | 31 | $(GTK_SHARP_20_LIBS) \ | 30 | $(GTK_SHARP_20_LIBS) |
1627 | 32 | $(GCONF_SHARP_20_LIBS) | ||
1629 | 33 | 31 | ||
1630 | === modified file 'JIRA/Resources/JIRA.addin.xml' | |||
1631 | --- JIRA/Resources/JIRA.addin.xml 2009-03-31 23:19:25 +0000 | |||
1632 | +++ JIRA/Resources/JIRA.addin.xml 2009-06-19 19:14:09 +0000 | |||
1633 | @@ -15,6 +15,7 @@ | |||
1634 | 15 | 15 | ||
1635 | 16 | <Dependencies> | 16 | <Dependencies> |
1636 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
1637 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
1638 | 18 | </Dependencies> | 19 | </Dependencies> |
1639 | 19 | 20 | ||
1640 | 20 | <Extension path="/Do/Action"> | 21 | <Extension path="/Do/Action"> |
1641 | @@ -23,6 +24,7 @@ | |||
1642 | 23 | <Extension path = "/Do/ItemSource"> | 24 | <Extension path = "/Do/ItemSource"> |
1643 | 24 | <ItemSource type="JIRA.JIRAIssueSource" /> | 25 | <ItemSource type="JIRA.JIRAIssueSource" /> |
1644 | 25 | </Extension> | 26 | </Extension> |
1647 | 26 | 27 | <Extension path= "/Do/Config"> | |
1648 | 27 | 28 | <Config type="JIRA.ConfigWidget" /> | |
1649 | 29 | </Extension> | ||
1650 | 28 | </Addin> | 30 | </Addin> |
1651 | 29 | 31 | ||
1652 | === modified file 'JIRA/gtk-gui/gui.stetic' | |||
1653 | --- JIRA/gtk-gui/gui.stetic 2009-01-09 07:25:58 +0000 | |||
1654 | +++ JIRA/gtk-gui/gui.stetic 2009-06-20 02:39:35 +0000 | |||
1655 | @@ -217,4 +217,214 @@ | |||
1656 | 217 | </widget> | 217 | </widget> |
1657 | 218 | </child> | 218 | </child> |
1658 | 219 | </widget> | 219 | </widget> |
1659 | 220 | <widget class="Gtk.Bin" id="JIRA.ConfigWidget" design-size="300 161"> | ||
1660 | 221 | <property name="MemberName" /> | ||
1661 | 222 | <child> | ||
1662 | 223 | <widget class="Gtk.Table" id="table2"> | ||
1663 | 224 | <property name="MemberName" /> | ||
1664 | 225 | <property name="NRows">5</property> | ||
1665 | 226 | <property name="NColumns">2</property> | ||
1666 | 227 | <property name="RowSpacing">6</property> | ||
1667 | 228 | <property name="ColumnSpacing">6</property> | ||
1668 | 229 | <child> | ||
1669 | 230 | <placeholder /> | ||
1670 | 231 | </child> | ||
1671 | 232 | <child> | ||
1672 | 233 | <widget class="Gtk.Entry" id="_entryBaseUrl"> | ||
1673 | 234 | <property name="MemberName" /> | ||
1674 | 235 | <property name="Tooltip" translatable="yes">The base url location to your JIRA install. ie. http://issues.apache.org/jira</property> | ||
1675 | 236 | <property name="CanFocus">True</property> | ||
1676 | 237 | <property name="Text" translatable="yes">http://issues.apache.org/issues</property> | ||
1677 | 238 | <property name="IsEditable">True</property> | ||
1678 | 239 | <property name="InvisibleChar">●</property> | ||
1679 | 240 | </widget> | ||
1680 | 241 | <packing> | ||
1681 | 242 | <property name="LeftAttach">1</property> | ||
1682 | 243 | <property name="RightAttach">2</property> | ||
1683 | 244 | <property name="AutoSize">False</property> | ||
1684 | 245 | <property name="YOptions">Fill</property> | ||
1685 | 246 | <property name="XExpand">True</property> | ||
1686 | 247 | <property name="XFill">True</property> | ||
1687 | 248 | <property name="XShrink">False</property> | ||
1688 | 249 | <property name="YExpand">False</property> | ||
1689 | 250 | <property name="YFill">True</property> | ||
1690 | 251 | <property name="YShrink">False</property> | ||
1691 | 252 | </packing> | ||
1692 | 253 | </child> | ||
1693 | 254 | <child> | ||
1694 | 255 | <widget class="Gtk.Entry" id="_entryPassword"> | ||
1695 | 256 | <property name="MemberName" /> | ||
1696 | 257 | <property name="CanFocus">True</property> | ||
1697 | 258 | <property name="IsEditable">True</property> | ||
1698 | 259 | <property name="Visibility">False</property> | ||
1699 | 260 | <property name="InvisibleChar">●</property> | ||
1700 | 261 | </widget> | ||
1701 | 262 | <packing> | ||
1702 | 263 | <property name="TopAttach">2</property> | ||
1703 | 264 | <property name="BottomAttach">3</property> | ||
1704 | 265 | <property name="LeftAttach">1</property> | ||
1705 | 266 | <property name="RightAttach">2</property> | ||
1706 | 267 | <property name="AutoSize">True</property> | ||
1707 | 268 | <property name="XOptions">Fill</property> | ||
1708 | 269 | <property name="YOptions">Fill</property> | ||
1709 | 270 | <property name="XExpand">False</property> | ||
1710 | 271 | <property name="XFill">True</property> | ||
1711 | 272 | <property name="XShrink">False</property> | ||
1712 | 273 | <property name="YExpand">False</property> | ||
1713 | 274 | <property name="YFill">True</property> | ||
1714 | 275 | <property name="YShrink">False</property> | ||
1715 | 276 | </packing> | ||
1716 | 277 | </child> | ||
1717 | 278 | <child> | ||
1718 | 279 | <widget class="Gtk.Entry" id="_entryProjects"> | ||
1719 | 280 | <property name="MemberName" /> | ||
1720 | 281 | <property name="Tooltip" translatable="yes">Comma separated list of projects</property> | ||
1721 | 282 | <property name="CanFocus">True</property> | ||
1722 | 283 | <property name="Text" translatable="yes">VFS,NET</property> | ||
1723 | 284 | <property name="IsEditable">True</property> | ||
1724 | 285 | <property name="InvisibleChar">●</property> | ||
1725 | 286 | </widget> | ||
1726 | 287 | <packing> | ||
1727 | 288 | <property name="TopAttach">3</property> | ||
1728 | 289 | <property name="BottomAttach">4</property> | ||
1729 | 290 | <property name="LeftAttach">1</property> | ||
1730 | 291 | <property name="RightAttach">2</property> | ||
1731 | 292 | <property name="AutoSize">True</property> | ||
1732 | 293 | <property name="XOptions">Fill</property> | ||
1733 | 294 | <property name="YOptions">Fill</property> | ||
1734 | 295 | <property name="XExpand">False</property> | ||
1735 | 296 | <property name="XFill">True</property> | ||
1736 | 297 | <property name="XShrink">False</property> | ||
1737 | 298 | <property name="YExpand">False</property> | ||
1738 | 299 | <property name="YFill">True</property> | ||
1739 | 300 | <property name="YShrink">False</property> | ||
1740 | 301 | </packing> | ||
1741 | 302 | </child> | ||
1742 | 303 | <child> | ||
1743 | 304 | <widget class="Gtk.Entry" id="_entryUsername"> | ||
1744 | 305 | <property name="MemberName" /> | ||
1745 | 306 | <property name="CanFocus">True</property> | ||
1746 | 307 | <property name="Text" translatable="yes">username1</property> | ||
1747 | 308 | <property name="IsEditable">True</property> | ||
1748 | 309 | <property name="InvisibleChar">●</property> | ||
1749 | 310 | </widget> | ||
1750 | 311 | <packing> | ||
1751 | 312 | <property name="TopAttach">1</property> | ||
1752 | 313 | <property name="BottomAttach">2</property> | ||
1753 | 314 | <property name="LeftAttach">1</property> | ||
1754 | 315 | <property name="RightAttach">2</property> | ||
1755 | 316 | <property name="AutoSize">True</property> | ||
1756 | 317 | <property name="XOptions">Fill</property> | ||
1757 | 318 | <property name="YOptions">Fill</property> | ||
1758 | 319 | <property name="XExpand">False</property> | ||
1759 | 320 | <property name="XFill">True</property> | ||
1760 | 321 | <property name="XShrink">False</property> | ||
1761 | 322 | <property name="YExpand">False</property> | ||
1762 | 323 | <property name="YFill">True</property> | ||
1763 | 324 | <property name="YShrink">False</property> | ||
1764 | 325 | </packing> | ||
1765 | 326 | </child> | ||
1766 | 327 | <child> | ||
1767 | 328 | <widget class="Gtk.Label" id="_labelBaseUrl"> | ||
1768 | 329 | <property name="MemberName" /> | ||
1769 | 330 | <property name="LabelProp">Base Url</property> | ||
1770 | 331 | </widget> | ||
1771 | 332 | <packing> | ||
1772 | 333 | <property name="AutoSize">False</property> | ||
1773 | 334 | <property name="XOptions">Fill</property> | ||
1774 | 335 | <property name="YOptions">Fill</property> | ||
1775 | 336 | <property name="XExpand">False</property> | ||
1776 | 337 | <property name="XFill">True</property> | ||
1777 | 338 | <property name="XShrink">False</property> | ||
1778 | 339 | <property name="YExpand">False</property> | ||
1779 | 340 | <property name="YFill">True</property> | ||
1780 | 341 | <property name="YShrink">False</property> | ||
1781 | 342 | </packing> | ||
1782 | 343 | </child> | ||
1783 | 344 | <child> | ||
1784 | 345 | <widget class="Gtk.Label" id="_labelPassword"> | ||
1785 | 346 | <property name="MemberName" /> | ||
1786 | 347 | <property name="LabelProp">Password</property> | ||
1787 | 348 | </widget> | ||
1788 | 349 | <packing> | ||
1789 | 350 | <property name="TopAttach">2</property> | ||
1790 | 351 | <property name="BottomAttach">3</property> | ||
1791 | 352 | <property name="AutoSize">True</property> | ||
1792 | 353 | <property name="XOptions">Fill</property> | ||
1793 | 354 | <property name="YOptions">Fill</property> | ||
1794 | 355 | <property name="XExpand">False</property> | ||
1795 | 356 | <property name="XFill">True</property> | ||
1796 | 357 | <property name="XShrink">False</property> | ||
1797 | 358 | <property name="YExpand">False</property> | ||
1798 | 359 | <property name="YFill">True</property> | ||
1799 | 360 | <property name="YShrink">False</property> | ||
1800 | 361 | </packing> | ||
1801 | 362 | </child> | ||
1802 | 363 | <child> | ||
1803 | 364 | <widget class="Gtk.Label" id="_labelProjects"> | ||
1804 | 365 | <property name="MemberName" /> | ||
1805 | 366 | <property name="LabelProp">Projects</property> | ||
1806 | 367 | </widget> | ||
1807 | 368 | <packing> | ||
1808 | 369 | <property name="TopAttach">3</property> | ||
1809 | 370 | <property name="BottomAttach">4</property> | ||
1810 | 371 | <property name="AutoSize">True</property> | ||
1811 | 372 | <property name="XOptions">Fill</property> | ||
1812 | 373 | <property name="YOptions">Fill</property> | ||
1813 | 374 | <property name="XExpand">False</property> | ||
1814 | 375 | <property name="XFill">True</property> | ||
1815 | 376 | <property name="XShrink">False</property> | ||
1816 | 377 | <property name="YExpand">False</property> | ||
1817 | 378 | <property name="YFill">True</property> | ||
1818 | 379 | <property name="YShrink">False</property> | ||
1819 | 380 | </packing> | ||
1820 | 381 | </child> | ||
1821 | 382 | <child> | ||
1822 | 383 | <widget class="Gtk.Label" id="_labelUsername"> | ||
1823 | 384 | <property name="MemberName" /> | ||
1824 | 385 | <property name="LabelProp">Username</property> | ||
1825 | 386 | </widget> | ||
1826 | 387 | <packing> | ||
1827 | 388 | <property name="TopAttach">1</property> | ||
1828 | 389 | <property name="BottomAttach">2</property> | ||
1829 | 390 | <property name="AutoSize">True</property> | ||
1830 | 391 | <property name="XOptions">Fill</property> | ||
1831 | 392 | <property name="YOptions">Fill</property> | ||
1832 | 393 | <property name="XExpand">False</property> | ||
1833 | 394 | <property name="XFill">True</property> | ||
1834 | 395 | <property name="XShrink">False</property> | ||
1835 | 396 | <property name="YExpand">False</property> | ||
1836 | 397 | <property name="YFill">True</property> | ||
1837 | 398 | <property name="YShrink">False</property> | ||
1838 | 399 | </packing> | ||
1839 | 400 | </child> | ||
1840 | 401 | <child> | ||
1841 | 402 | <widget class="Gtk.Button" id="_saveButton"> | ||
1842 | 403 | <property name="MemberName" /> | ||
1843 | 404 | <property name="CanFocus">True</property> | ||
1844 | 405 | <property name="Type">TextOnly</property> | ||
1845 | 406 | <property name="Label">Save</property> | ||
1846 | 407 | <property name="UseUnderline">True</property> | ||
1847 | 408 | <property name="Xalign">0</property> | ||
1848 | 409 | <signal name="Released" handler="OnSaveButtonReleased" /> | ||
1849 | 410 | </widget> | ||
1850 | 411 | <packing> | ||
1851 | 412 | <property name="TopAttach">4</property> | ||
1852 | 413 | <property name="BottomAttach">5</property> | ||
1853 | 414 | <property name="LeftAttach">1</property> | ||
1854 | 415 | <property name="RightAttach">2</property> | ||
1855 | 416 | <property name="AutoSize">False</property> | ||
1856 | 417 | <property name="XOptions">0</property> | ||
1857 | 418 | <property name="YOptions">Fill</property> | ||
1858 | 419 | <property name="XExpand">False</property> | ||
1859 | 420 | <property name="XFill">False</property> | ||
1860 | 421 | <property name="XShrink">False</property> | ||
1861 | 422 | <property name="YExpand">False</property> | ||
1862 | 423 | <property name="YFill">True</property> | ||
1863 | 424 | <property name="YShrink">False</property> | ||
1864 | 425 | </packing> | ||
1865 | 426 | </child> | ||
1866 | 427 | </widget> | ||
1867 | 428 | </child> | ||
1868 | 429 | </widget> | ||
1869 | 220 | </stetic-interface> | 430 | </stetic-interface> |
1870 | 221 | \ No newline at end of file | 431 | \ No newline at end of file |
1871 | 222 | 432 | ||
1872 | === modified file 'JIRA/gtk-gui/objects.xml' | |||
1873 | --- JIRA/gtk-gui/objects.xml 2008-12-24 04:37:17 +0000 | |||
1874 | +++ JIRA/gtk-gui/objects.xml 2009-06-19 19:14:09 +0000 | |||
1875 | @@ -1,6 +1,13 @@ | |||
1876 | 1 | <objects attr-sync="on"> | 1 | <objects attr-sync="on"> |
1877 | 2 | <object type="JIRA.ConfigWidget" palette-category="JIRA" allow-children="false" base-type="Gtk.Bin"> | 2 | <object type="JIRA.ConfigWidget" palette-category="JIRA" allow-children="false" base-type="Gtk.Bin"> |
1879 | 3 | <itemgroups /> | 3 | <itemgroups> |
1880 | 4 | <itemgroup label="ConfigWidget Properties"> | ||
1881 | 5 | <property name="ProjectsString" /> | ||
1882 | 6 | <property name="BaseURL" /> | ||
1883 | 7 | <property name="UserName" /> | ||
1884 | 8 | <property name="Password" /> | ||
1885 | 9 | </itemgroup> | ||
1886 | 10 | </itemgroups> | ||
1887 | 4 | <signals /> | 11 | <signals /> |
1888 | 5 | </object> | 12 | </object> |
1889 | 6 | </objects> | 13 | </objects> |
1890 | 7 | \ No newline at end of file | 14 | \ No newline at end of file |
1891 | 8 | 15 | ||
1892 | === modified file 'JIRA/src/ConfigWidget.cs' | |||
1893 | --- JIRA/src/ConfigWidget.cs 2008-12-24 04:37:17 +0000 | |||
1894 | +++ JIRA/src/ConfigWidget.cs 2009-06-20 02:26:06 +0000 | |||
1895 | @@ -16,67 +16,113 @@ | |||
1896 | 16 | using System; | 16 | using System; |
1897 | 17 | using System.Collections.Generic; | 17 | using System.Collections.Generic; |
1898 | 18 | 18 | ||
1899 | 19 | using Do.Platform; | ||
1900 | 20 | using Do.Platform.Linux; | ||
1901 | 21 | |||
1902 | 22 | using Mono.Unix; | ||
1903 | 23 | |||
1904 | 19 | namespace JIRA | 24 | namespace JIRA |
1905 | 20 | { | 25 | { |
1906 | 21 | [System.ComponentModel.Category("JIRA")] | 26 | [System.ComponentModel.Category("JIRA")] |
1907 | 22 | [System.ComponentModel.ToolboxItem(true)] | 27 | [System.ComponentModel.ToolboxItem(true)] |
1911 | 23 | public partial class ConfigWidget : Gtk.Bin | 28 | public partial class ConfigWidget : Gtk.Bin, IConfigurable |
1912 | 24 | { | 29 | { |
1913 | 25 | private JIRAIssueSource _issueSource; | 30 | static private IPreferences prefs; |
1914 | 26 | 31 | ||
1916 | 27 | public ConfigWidget( JIRAIssueSource issueSource ) | 32 | public ConfigWidget () |
1917 | 28 | { | 33 | { |
1921 | 29 | this.Build(); | 34 | this.Build (); |
1919 | 30 | |||
1920 | 31 | _issueSource= issueSource; | ||
1922 | 32 | 35 | ||
1924 | 33 | SetFieldsFromConfig( _issueSource.Config ); | 36 | SetFieldsFromConfig (); |
1925 | 37 | } | ||
1926 | 38 | |||
1927 | 39 | static ConfigWidget () | ||
1928 | 40 | { | ||
1929 | 41 | prefs = Do.Platform.Services.Preferences.Get<JIRA.ConfigWidget> (); | ||
1930 | 42 | } | ||
1931 | 43 | |||
1932 | 44 | public string Title { | ||
1933 | 45 | get { return Catalog.GetString ("JIRA"); } | ||
1934 | 46 | } | ||
1935 | 47 | |||
1936 | 48 | public Gtk.Bin GetConfiguration () | ||
1937 | 49 | { | ||
1938 | 50 | return this; | ||
1939 | 34 | } | 51 | } |
1940 | 35 | 52 | ||
1941 | 36 | protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e) | 53 | protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e) |
1942 | 37 | { | 54 | { |
1948 | 38 | _issueSource.Log( "Re-init JIRA Plugin with new settings..." ); | 55 | GetConfigFromFields (); |
1944 | 39 | |||
1945 | 40 | _issueSource.Config= GetConfigFromFields(); | ||
1946 | 41 | _issueSource.Config.Persist(); | ||
1947 | 42 | |||
1949 | 43 | // Write the config back out to the fields to reflect how we saved it | 56 | // Write the config back out to the fields to reflect how we saved it |
1951 | 44 | SetFieldsFromConfig( _issueSource.Config ); | 57 | SetFieldsFromConfig (); |
1952 | 45 | } | 58 | } |
1953 | 46 | 59 | ||
1954 | 47 | // Bindings... | 60 | // Bindings... |
1955 | 48 | 61 | ||
1982 | 49 | private void SetFieldsFromConfig( IJIRAConfiguration config ) | 62 | private void SetFieldsFromConfig () |
1983 | 50 | { | 63 | { |
1984 | 51 | config.Load(); | 64 | _entryBaseUrl.Text = BaseURL; |
1985 | 52 | 65 | _entryUsername.Text = UserName; | |
1986 | 53 | _entryBaseUrl.Text= config.BaseUrl; | 66 | _entryPassword.Text = Password; |
1987 | 54 | _entryUsername.Text= config.Username; | 67 | _entryProjects.Text = ProjectsString; |
1988 | 55 | _entryPassword.Text= config.Password; | 68 | } |
1989 | 56 | _entryProjects.Text= string.Join( ",", config.Projects ); | 69 | |
1990 | 57 | } | 70 | private void GetConfigFromFields () |
1991 | 58 | 71 | { | |
1992 | 59 | private IJIRAConfiguration GetConfigFromFields() | 72 | BaseURL = _entryBaseUrl.Text; |
1993 | 60 | { | 73 | UserName = _entryUsername.Text; |
1994 | 61 | JIRAConfiguration config= new JIRAConfiguration(); | 74 | Password = _entryPassword.Text; |
1995 | 62 | config.BaseUrl= _entryBaseUrl.Text; | 75 | ProjectsString = _entryProjects.Text; |
1996 | 63 | config.Username= _entryUsername.Text; | 76 | } |
1997 | 64 | config.Password= _entryPassword.Text; | 77 | |
1998 | 65 | 78 | public static List<string> Projects { | |
1999 | 66 | // Split up the projects, and make sure they're correct | 79 | get { |
2000 | 67 | List<string> projects= new List<string>(); | 80 | List<string> projects = new List<string> (); |
2001 | 68 | foreach( string str in _entryProjects.Text.Split( new char[] { ',', ';', ':', ' ' } ) ) | 81 | foreach (string str in ProjectsString.Split (new char[] { ',', ';', ':', ' ' })) { |
2002 | 69 | { | 82 | string project = str.Trim (); |
2003 | 70 | string project= str.Trim(); | 83 | |
2004 | 71 | 84 | if (project.Length > 0) { | |
2005 | 72 | if( project.Length> 0 ) | 85 | projects.Add (project); |
2006 | 73 | { | 86 | } |
1981 | 74 | projects.Add( project ); | ||
2007 | 75 | } | 87 | } |
2012 | 76 | } | 88 | return projects; |
2013 | 77 | 89 | } | |
2014 | 78 | config.Projects= projects.ToArray(); | 90 | } |
2015 | 79 | return config; | 91 | |
2016 | 92 | public static string ProjectsString { | ||
2017 | 93 | get { | ||
2018 | 94 | return prefs.Get<string> ("Projects", ""); | ||
2019 | 95 | } | ||
2020 | 96 | set { | ||
2021 | 97 | prefs.Set<string> ("Projects", value); | ||
2022 | 98 | } | ||
2023 | 99 | } | ||
2024 | 100 | |||
2025 | 101 | public static string BaseURL { | ||
2026 | 102 | get { | ||
2027 | 103 | return prefs.Get<string> ("BaseURL", ""); | ||
2028 | 104 | } | ||
2029 | 105 | set { | ||
2030 | 106 | prefs.Set<string> ("BaseURL", value); | ||
2031 | 107 | } | ||
2032 | 108 | } | ||
2033 | 109 | |||
2034 | 110 | public static string UserName { | ||
2035 | 111 | get { | ||
2036 | 112 | return prefs.Get<string> ("UserName", ""); | ||
2037 | 113 | } | ||
2038 | 114 | set { | ||
2039 | 115 | prefs.Set<string> ("UserName", value); | ||
2040 | 116 | } | ||
2041 | 117 | } | ||
2042 | 118 | |||
2043 | 119 | public static string Password { | ||
2044 | 120 | get { | ||
2045 | 121 | return prefs.GetSecure<string> ("Password", ""); | ||
2046 | 122 | } | ||
2047 | 123 | set { | ||
2048 | 124 | prefs.SetSecure<string> ("Password", value); | ||
2049 | 125 | } | ||
2050 | 80 | } | 126 | } |
2051 | 81 | } | 127 | } |
2052 | 82 | } | 128 | } |
2053 | 83 | 129 | ||
2054 | === removed file 'JIRA/src/JIRAConfiguration.cs' | |||
2055 | --- JIRA/src/JIRAConfiguration.cs 2008-12-24 04:37:17 +0000 | |||
2056 | +++ JIRA/src/JIRAConfiguration.cs 1970-01-01 00:00:00 +0000 | |||
2057 | @@ -1,189 +0,0 @@ | |||
2058 | 1 | // | ||
2059 | 2 | // This program is free software; you can redistribute it and/or modify | ||
2060 | 3 | // it under the terms of the GNU General Public License as published by | ||
2061 | 4 | // the Free Software Foundation; either version 3 of the License, or | ||
2062 | 5 | // (at your option) any later version. | ||
2063 | 6 | // | ||
2064 | 7 | // This program is distributed in the hope that it will be useful, | ||
2065 | 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2066 | 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2067 | 10 | // GNU General Public License for more details. | ||
2068 | 11 | // | ||
2069 | 12 | // You should have received a copy of the GNU General Public License | ||
2070 | 13 | // along with this program; if not, write to the Free Software | ||
2071 | 14 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
2072 | 15 | // | ||
2073 | 16 | using System; | ||
2074 | 17 | using Do.Platform; | ||
2075 | 18 | using Do.Universe; | ||
2076 | 19 | |||
2077 | 20 | |||
2078 | 21 | |||
2079 | 22 | namespace JIRA | ||
2080 | 23 | { | ||
2081 | 24 | |||
2082 | 25 | |||
2083 | 26 | |||
2084 | 27 | public interface IJIRAConfiguration | ||
2085 | 28 | { | ||
2086 | 29 | string BaseUrl | ||
2087 | 30 | { | ||
2088 | 31 | get; | ||
2089 | 32 | } | ||
2090 | 33 | |||
2091 | 34 | string Username | ||
2092 | 35 | { | ||
2093 | 36 | get; | ||
2094 | 37 | } | ||
2095 | 38 | |||
2096 | 39 | string Password | ||
2097 | 40 | { | ||
2098 | 41 | get; | ||
2099 | 42 | } | ||
2100 | 43 | |||
2101 | 44 | string[] Projects | ||
2102 | 45 | { | ||
2103 | 46 | get; | ||
2104 | 47 | } | ||
2105 | 48 | |||
2106 | 49 | /// <value> | ||
2107 | 50 | /// To be valid, all fields must be filled out | ||
2108 | 51 | /// </value> | ||
2109 | 52 | bool IsValid(); | ||
2110 | 53 | |||
2111 | 54 | /// <summary> | ||
2112 | 55 | /// Persist the properties of this configuration bean to an underlying store | ||
2113 | 56 | /// </summary> | ||
2114 | 57 | void Persist(); | ||
2115 | 58 | |||
2116 | 59 | /// <summary> | ||
2117 | 60 | /// Pre-fill the properties of this bean from the underlying store | ||
2118 | 61 | /// </summary> | ||
2119 | 62 | void Load(); | ||
2120 | 63 | } | ||
2121 | 64 | |||
2122 | 65 | /// <summary> | ||
2123 | 66 | /// Configuration that uses gconf to do the magic | ||
2124 | 67 | /// </summary> | ||
2125 | 68 | public class JIRAConfiguration : IJIRAConfiguration | ||
2126 | 69 | { | ||
2127 | 70 | private string _baseUrl; | ||
2128 | 71 | private string _username; | ||
2129 | 72 | private string _password; | ||
2130 | 73 | private string[] _projects; | ||
2131 | 74 | |||
2132 | 75 | static private IPreferences prefs; | ||
2133 | 76 | |||
2134 | 77 | /// <summary> | ||
2135 | 78 | /// The gnome conf key that contains the base url for our JIRA installation. | ||
2136 | 79 | /// ie. http://issues.apache.org/jira | ||
2137 | 80 | /// </summary> | ||
2138 | 81 | private const string _sGCONF_KEY= "/apps/gnome-do/plugins/JIRA"; | ||
2139 | 82 | |||
2140 | 83 | private GConf.Client _gconf; | ||
2141 | 84 | |||
2142 | 85 | public JIRAConfiguration() | ||
2143 | 86 | { | ||
2144 | 87 | _gconf= new GConf.Client(); | ||
2145 | 88 | } | ||
2146 | 89 | |||
2147 | 90 | static JIRAConfiguration() | ||
2148 | 91 | { | ||
2149 | 92 | prefs = Do.Platform.Services.Preferences.Get<JIRA.JIRAConfiguration>(); | ||
2150 | 93 | } | ||
2151 | 94 | |||
2152 | 95 | private void SetConfValue( string key, string val ) | ||
2153 | 96 | { | ||
2154 | 97 | _gconf.Set( _sGCONF_KEY +"/"+key, val ); | ||
2155 | 98 | } | ||
2156 | 99 | |||
2157 | 100 | private string GetConfValue( string key, string fallback ) | ||
2158 | 101 | { | ||
2159 | 102 | try | ||
2160 | 103 | { | ||
2161 | 104 | return _gconf.Get( _sGCONF_KEY+"/"+key ) as String; | ||
2162 | 105 | } | ||
2163 | 106 | catch( GConf.NoSuchKeyException ) | ||
2164 | 107 | { | ||
2165 | 108 | return fallback; | ||
2166 | 109 | } | ||
2167 | 110 | } | ||
2168 | 111 | |||
2169 | 112 | public string BaseUrl | ||
2170 | 113 | { | ||
2171 | 114 | get { return _baseUrl ?? ""; } | ||
2172 | 115 | set { _baseUrl= value; } | ||
2173 | 116 | } | ||
2174 | 117 | public string Username | ||
2175 | 118 | { | ||
2176 | 119 | get { return _username ?? ""; } | ||
2177 | 120 | set { _username= value; } | ||
2178 | 121 | } | ||
2179 | 122 | |||
2180 | 123 | public string Password | ||
2181 | 124 | { | ||
2182 | 125 | get { return _password ?? ""; } | ||
2183 | 126 | set { _password= value; } | ||
2184 | 127 | } | ||
2185 | 128 | public string[] Projects | ||
2186 | 129 | { | ||
2187 | 130 | get { return _projects ?? new string[ 0 ]; } | ||
2188 | 131 | set { _projects= value; } | ||
2189 | 132 | } | ||
2190 | 133 | |||
2191 | 134 | /// <value> | ||
2192 | 135 | /// To be valid, all fields must be filled out | ||
2193 | 136 | /// </value> | ||
2194 | 137 | public bool IsValid() | ||
2195 | 138 | { | ||
2196 | 139 | return _baseUrl!=null | ||
2197 | 140 | && _username!=null | ||
2198 | 141 | && _password!=null | ||
2199 | 142 | && _projects!=null; | ||
2200 | 143 | } | ||
2201 | 144 | |||
2202 | 145 | public void Load() | ||
2203 | 146 | { | ||
2204 | 147 | _baseUrl= GetConfValue( "baseUrl", null ); | ||
2205 | 148 | |||
2206 | 149 | string projStr= GetConfValue( "projects", "" ); | ||
2207 | 150 | _projects= projStr.Length>0 ? projStr.Split( ',' ) : null; | ||
2208 | 151 | |||
2209 | 152 | // Use the gnome-do framework for retrieving from the keychain | ||
2210 | 153 | _username = prefs.GetSecure("username", ""); | ||
2211 | 154 | _password = prefs.GetSecure("password", ""); | ||
2212 | 155 | } | ||
2213 | 156 | |||
2214 | 157 | public void Persist() | ||
2215 | 158 | { | ||
2216 | 159 | prefs.Set("baseUrl", _baseUrl ); | ||
2217 | 160 | prefs.Set("projects", string.Join(",", _projects)); | ||
2218 | 161 | prefs.SetSecure("username", _username ); | ||
2219 | 162 | prefs.GetSecure("password", _password ); | ||
2220 | 163 | } | ||
2221 | 164 | |||
2222 | 165 | |||
2223 | 166 | /// <summary> | ||
2224 | 167 | /// Do a migration to the gnome keyring and return true if we do a migrate, false if | ||
2225 | 168 | /// we've done it previously | ||
2226 | 169 | /// </summary> | ||
2227 | 170 | /// <returns> | ||
2228 | 171 | /// A <see cref="System.Boolean"/> | ||
2229 | 172 | /// </returns> | ||
2230 | 173 | public bool DoMigrate() | ||
2231 | 174 | { | ||
2232 | 175 | // Because we used to write the username/password to gconf, provide a migration | ||
2233 | 176 | // strategy that will haul the values into the keyring and clear them out of | ||
2234 | 177 | // gconf | ||
2235 | 178 | if( "".Equals( GetConfValue( "password", "" ) ) ) return false; | ||
2236 | 179 | |||
2237 | 180 | prefs.SetSecure("username", GetConfValue("username", null)); | ||
2238 | 181 | prefs.SetSecure("password", GetConfValue("password", null)); | ||
2239 | 182 | |||
2240 | 183 | SetConfValue( "username", "" ); | ||
2241 | 184 | SetConfValue( "password", "" ); | ||
2242 | 185 | |||
2243 | 186 | return true; | ||
2244 | 187 | } | ||
2245 | 188 | } | ||
2246 | 189 | } | ||
2247 | 190 | 0 | ||
2248 | === modified file 'JIRA/src/JIRAIssueAction.cs' | |||
2249 | --- JIRA/src/JIRAIssueAction.cs 2008-12-24 04:37:17 +0000 | |||
2250 | +++ JIRA/src/JIRAIssueAction.cs 2009-06-20 02:26:06 +0000 | |||
2251 | @@ -18,7 +18,7 @@ | |||
2252 | 18 | using System.Text.RegularExpressions; | 18 | using System.Text.RegularExpressions; |
2253 | 19 | using Do.Universe.Common; | 19 | using Do.Universe.Common; |
2254 | 20 | using Do.Universe; | 20 | using Do.Universe; |
2256 | 21 | using GConf; | 21 | using Mono.Unix; |
2257 | 22 | 22 | ||
2258 | 23 | namespace JIRA | 23 | namespace JIRA |
2259 | 24 | { | 24 | { |
2260 | @@ -26,12 +26,12 @@ | |||
2261 | 26 | { | 26 | { |
2262 | 27 | public override string Name | 27 | public override string Name |
2263 | 28 | { | 28 | { |
2265 | 29 | get { return "View JIRA Issue"; } | 29 | get { return Catalog.GetString ("View JIRA Issue"); } |
2266 | 30 | } | 30 | } |
2267 | 31 | 31 | ||
2268 | 32 | public override string Description | 32 | public override string Description |
2269 | 33 | { | 33 | { |
2271 | 34 | get { return "Views the specified JIRA Issue"; } | 34 | get { return Catalog.GetString ("Views the specified JIRA Issue"); } |
2272 | 35 | } | 35 | } |
2273 | 36 | 36 | ||
2274 | 37 | public override string Icon | 37 | public override string Icon |
2275 | @@ -44,24 +44,25 @@ | |||
2276 | 44 | /// </value> | 44 | /// </value> |
2277 | 45 | public override IEnumerable<Type> SupportedItemTypes | 45 | public override IEnumerable<Type> SupportedItemTypes |
2278 | 46 | { | 46 | { |
2280 | 47 | get { return new Type[] { typeof (JIRAIssueItem) }; } | 47 | get { |
2281 | 48 | yield return typeof (JIRAIssueItem); | ||
2282 | 49 | } | ||
2283 | 48 | } | 50 | } |
2284 | 49 | 51 | ||
2285 | 50 | 52 | ||
2286 | 51 | /// <summary> | 53 | /// <summary> |
2287 | 52 | /// Which the matching code, return JIRA link | 54 | /// Which the matching code, return JIRA link |
2288 | 53 | /// </returns> | 55 | /// </returns> |
2290 | 54 | public override IEnumerable<Item> Perform( IEnumerable<Item> items, IEnumerable<Item> modItems ) | 56 | public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems) |
2291 | 55 | { | 57 | { |
2293 | 56 | List<Item> urls= new List<Item>(); | 58 | List<Item> urls= new List<Item> (); |
2294 | 57 | 59 | ||
2295 | 58 | // Build up full urls from the issue codes | 60 | // Build up full urls from the issue codes |
2299 | 59 | foreach( Item item in items ) | 61 | foreach (Item item in items) { |
2300 | 60 | { | 62 | urls.Add (new TextItem ((item as JIRAIssueItem).Url)); |
2298 | 61 | urls.Add( new TextItem( ( item as JIRAIssueItem ).Url ) ); | ||
2301 | 62 | } | 63 | } |
2302 | 63 | 64 | ||
2304 | 64 | return base.Perform( urls.ToArray(), modItems ); | 65 | return base.Perform (urls.ToArray(), modItems); |
2305 | 65 | } | 66 | } |
2306 | 66 | } | 67 | } |
2307 | 67 | } | 68 | } |
2308 | 68 | \ No newline at end of file | 69 | \ No newline at end of file |
2309 | 69 | 70 | ||
2310 | === modified file 'JIRA/src/JIRAIssueSource.cs' | |||
2311 | --- JIRA/src/JIRAIssueSource.cs 2009-05-29 09:39:41 +0000 | |||
2312 | +++ JIRA/src/JIRAIssueSource.cs 2009-06-19 19:14:09 +0000 | |||
2313 | @@ -16,26 +16,25 @@ | |||
2314 | 16 | using System; | 16 | using System; |
2315 | 17 | using System.Text; | 17 | using System.Text; |
2316 | 18 | using System.Threading; | 18 | using System.Threading; |
2317 | 19 | using System.Collections; | ||
2318 | 19 | using System.Collections.Generic; | 20 | using System.Collections.Generic; |
2320 | 20 | using System.Collections; | 21 | |
2321 | 21 | using Do.Universe; | 22 | using Do.Universe; |
2322 | 23 | using Do.Platform; | ||
2323 | 22 | using Do.Platform.Linux; | 24 | using Do.Platform.Linux; |
2324 | 23 | using Atlassian; | 25 | using Atlassian; |
2325 | 24 | using JIRA.Remote; | 26 | using JIRA.Remote; |
2326 | 25 | 27 | ||
2327 | 28 | using Mono.Unix; | ||
2328 | 29 | |||
2329 | 26 | 30 | ||
2330 | 27 | namespace JIRA | 31 | namespace JIRA |
2331 | 28 | { | 32 | { |
2332 | 29 | /// <summary> | 33 | /// <summary> |
2333 | 30 | /// Provider of issues that meet our requirements (ie. certain projects, open criteria) | 34 | /// Provider of issues that meet our requirements (ie. certain projects, open criteria) |
2334 | 31 | /// </summary> | 35 | /// </summary> |
2342 | 32 | public class JIRAIssueSource : ItemSource, IConfigurable | 36 | public class JIRAIssueSource : ItemSource |
2343 | 33 | { | 37 | { |
2337 | 34 | /// <summary> | ||
2338 | 35 | /// Our configuration for JIRA properties | ||
2339 | 36 | /// </summary> | ||
2340 | 37 | private IJIRAConfiguration _config; | ||
2341 | 38 | |||
2344 | 39 | /// <summary> | 38 | /// <summary> |
2345 | 40 | /// Server facade for handling issue download | 39 | /// Server facade for handling issue download |
2346 | 41 | /// </summary> | 40 | /// </summary> |
2347 | @@ -44,164 +43,131 @@ | |||
2348 | 44 | /// <summary> | 43 | /// <summary> |
2349 | 45 | /// True when the plugin has init and updates of items should occur | 44 | /// True when the plugin has init and updates of items should occur |
2350 | 46 | /// </summary> | 45 | /// </summary> |
2352 | 47 | private bool _hasInit= false; | 46 | private bool _hasInit = false; |
2353 | 48 | 47 | ||
2354 | 49 | /// <summary> | 48 | /// <summary> |
2355 | 50 | /// Current list of outstanding issues | 49 | /// Current list of outstanding issues |
2356 | 51 | /// </summary> | 50 | /// </summary> |
2358 | 52 | private readonly List<Item> _items= new List<Item>(); | 51 | private readonly List<Item> _items = new List<Item> (); |
2359 | 53 | 52 | ||
2360 | 54 | /// <summary> | 53 | /// <summary> |
2361 | 55 | /// ProjectIds we're watching | 54 | /// ProjectIds we're watching |
2362 | 56 | /// </summary> | 55 | /// </summary> |
2364 | 57 | private readonly List<long> _projectIds= new List<long>(); | 56 | private readonly List<long> _projectIds = new List<long> (); |
2365 | 58 | 57 | ||
2366 | 59 | /// <summary> | 58 | /// <summary> |
2367 | 60 | /// Statuses that are available within this JIRA installation | 59 | /// Statuses that are available within this JIRA installation |
2368 | 61 | /// </summary> | 60 | /// </summary> |
2370 | 62 | private readonly List<int> _projectStatuses= new List<int>(); | 61 | private readonly List<int> _projectStatuses = new List<int> (); |
2371 | 63 | 62 | ||
2372 | 64 | /// <summary> | 63 | /// <summary> |
2373 | 65 | /// Lock object for query thread safety, locks should always be taken in the order | 64 | /// Lock object for query thread safety, locks should always be taken in the order |
2374 | 66 | /// of query lock, then item lock | 65 | /// of query lock, then item lock |
2375 | 67 | /// </summary> | 66 | /// </summary> |
2377 | 68 | private readonly object _lock= new object(); | 67 | private readonly object _lock = new object (); |
2378 | 69 | 68 | ||
2379 | 70 | 69 | ||
2380 | 71 | /// <summary> | 70 | /// <summary> |
2381 | 72 | /// Constructor (preloads config) | 71 | /// Constructor (preloads config) |
2382 | 73 | /// </summary> | 72 | /// </summary> |
2393 | 74 | public JIRAIssueSource() | 73 | public JIRAIssueSource () |
2394 | 75 | { | 74 | { |
2385 | 76 | _config= new JIRAConfiguration(); | ||
2386 | 77 | |||
2387 | 78 | // Do the migration if need be | ||
2388 | 79 | if( ( (JIRAConfiguration) _config ).DoMigrate() ) | ||
2389 | 80 | { | ||
2390 | 81 | Log( "Migrated credentials to gnome keyring" ); | ||
2391 | 82 | } | ||
2392 | 83 | |||
2395 | 84 | // Run the initial query | 75 | // Run the initial query |
2419 | 85 | UpdateItems(); | 76 | UpdateItems (); |
2420 | 86 | } | 77 | } |
2421 | 87 | 78 | ||
2422 | 88 | public override string Name { get { return "JIRA Issues"; } } | 79 | public override string Name { |
2423 | 89 | public override string Description { get { return "Indexes JIRA Issues from a given repository"; } } | 80 | get { |
2424 | 90 | public override string Icon { get { return "jira.png@"+GetType().Assembly.FullName; } } | 81 | return Catalog.GetString ("JIRA Issues"); |
2425 | 91 | 82 | } | |
2426 | 92 | public IJIRAConfiguration Config | 83 | } |
2427 | 93 | { | 84 | |
2428 | 94 | get { return _config; } | 85 | public override string Description { |
2429 | 95 | set | 86 | get { |
2430 | 96 | { | 87 | return Catalog.GetString ("Indexes JIRA Issues from a given repository"); |
2431 | 97 | _config= value; | 88 | } |
2432 | 98 | _hasInit= false; | 89 | } |
2433 | 99 | } | 90 | |
2434 | 100 | } | 91 | public override string Icon { |
2435 | 101 | 92 | get { | |
2436 | 102 | /// <summary> | 93 | return "jira.png@"+GetType ().Assembly.FullName; |
2437 | 103 | /// Create the configuration dialog | 94 | } |
2415 | 104 | /// </summary> | ||
2416 | 105 | public Gtk.Bin GetConfiguration() | ||
2417 | 106 | { | ||
2418 | 107 | return new ConfigWidget( this ); | ||
2438 | 108 | } | 95 | } |
2439 | 109 | 96 | ||
2440 | 110 | public override IEnumerable<Type> SupportedItemTypes | 97 | public override IEnumerable<Type> SupportedItemTypes |
2441 | 111 | { | 98 | { |
2445 | 112 | get | 99 | get { |
2446 | 113 | { | 100 | yield return typeof (JIRAIssueItem); |
2444 | 114 | return new Type[] { typeof( JIRAIssueItem ) }; | ||
2447 | 115 | } | 101 | } |
2448 | 116 | } | 102 | } |
2449 | 117 | 103 | ||
2450 | 118 | public override IEnumerable<Item> Items | 104 | public override IEnumerable<Item> Items |
2451 | 119 | { | 105 | { |
2456 | 120 | get | 106 | get { |
2457 | 121 | { | 107 | lock (_items) { |
2454 | 122 | lock( _items ) | ||
2455 | 123 | { | ||
2458 | 124 | return _items; | 108 | return _items; |
2459 | 125 | } | 109 | } |
2460 | 126 | } | 110 | } |
2461 | 127 | } | 111 | } |
2462 | 128 | |||
2463 | 129 | /// <summary> | ||
2464 | 130 | /// Not Supported | ||
2465 | 131 | /// </summary> | ||
2466 | 132 | public override IEnumerable<Item> ChildrenOfItem( Item parent ) | ||
2467 | 133 | { | ||
2468 | 134 | yield break; | ||
2469 | 135 | } | ||
2470 | 136 | 112 | ||
2471 | 137 | /// <summary> | 113 | /// <summary> |
2472 | 138 | /// Called semi-regularly such that we can poll the JIRA web service to see | 114 | /// Called semi-regularly such that we can poll the JIRA web service to see |
2473 | 139 | /// if there are any new issues matching our projects request list. This is called | 115 | /// if there are any new issues matching our projects request list. This is called |
2474 | 140 | /// by gnome-do, and we don't want to block too long! | 116 | /// by gnome-do, and we don't want to block too long! |
2475 | 141 | /// </summary> | 117 | /// </summary> |
2477 | 142 | public override void UpdateItems() | 118 | public override void UpdateItems () |
2478 | 143 | { | 119 | { |
2479 | 144 | // We do all our updates on another thread... | 120 | // We do all our updates on another thread... |
2481 | 145 | new Thread( DoUpdateItems ).Start(); | 121 | Services.Application.RunOnThread (() => { DoUpdateItems (); }); |
2482 | 146 | } | 122 | } |
2483 | 147 | 123 | ||
2484 | 148 | 124 | ||
2486 | 149 | private void DoUpdateItems() | 125 | private void DoUpdateItems () |
2487 | 150 | { | 126 | { |
2488 | 151 | // If we didn't aquire the lock, we won't call update items now | 127 | // If we didn't aquire the lock, we won't call update items now |
2490 | 152 | if( !Monitor.TryEnter( _lock ) ) return; | 128 | if (!Monitor.TryEnter(_lock)) return; |
2491 | 153 | 129 | ||
2494 | 154 | try | 130 | try { |
2493 | 155 | { | ||
2495 | 156 | // We aquired the lock, but make sure we inited correctly | 131 | // We aquired the lock, but make sure we inited correctly |
2498 | 157 | if( !_hasInit ) | 132 | if (!_hasInit) { |
2497 | 158 | { | ||
2499 | 159 | // Do the init role | 133 | // Do the init role |
2501 | 160 | DoInit(); | 134 | DoInit (); |
2502 | 161 | return; | 135 | return; |
2503 | 162 | } | 136 | } |
2504 | 163 | 137 | ||
2505 | 164 | // We've previous init, so we're just looking for deltas | 138 | // We've previous init, so we're just looking for deltas |
2507 | 165 | List<JIRAIssueItem> changedIssues= ConvertFromRemoteIssues( _service.GetRecentlyUpdatedIssues( _projectIds ) ); | 139 | List<JIRAIssueItem> changedIssues = ConvertFromRemoteIssues (_service.GetRecentlyUpdatedIssues (_projectIds)); |
2508 | 166 | 140 | ||
2509 | 167 | // Find Issues that have become closed... and purge them | 141 | // Find Issues that have become closed... and purge them |
2513 | 168 | List<string> closedIssues= changedIssues | 142 | List<string> closedIssues = changedIssues |
2514 | 169 | .FindAll( delegate( JIRAIssueItem item ) { return item.IsClosed; } ) | 143 | .FindAll( delegate (JIRAIssueItem item) { return item.IsClosed; } ) |
2515 | 170 | .ConvertAll<string>( delegate( JIRAIssueItem item ) { return item.Name; } ); | 144 | .ConvertAll<string> (delegate( JIRAIssueItem item) { return item.Name; } ); |
2516 | 171 | 145 | ||
2517 | 172 | // Do a quick lock while we remove the items that are now closed | 146 | // Do a quick lock while we remove the items that are now closed |
2521 | 173 | lock( _items ) | 147 | lock (_items) { |
2522 | 174 | { | 148 | int removedItems = _items.RemoveAll (delegate (Item item) { return closedIssues.Contains (item.Name ); } ); |
2520 | 175 | int removedItems= _items.RemoveAll( delegate( Item item ) { return closedIssues.Contains( item.Name ); } ); | ||
2523 | 176 | 149 | ||
2527 | 177 | if( removedItems>0 ) | 150 | if (removedItems > 0) { |
2528 | 178 | { | 151 | Log.Debug ("Removed: {0} resolved/closed issues", removedItems); |
2526 | 179 | Log( "Removed: {0} resolved/closed issues", removedItems ); | ||
2529 | 180 | } | 152 | } |
2530 | 181 | } | 153 | } |
2531 | 182 | 154 | ||
2532 | 183 | // Find and add the issues that aren't closed, but are new! | 155 | // Find and add the issues that aren't closed, but are new! |
2535 | 184 | List<string> currentIssues= _items.ConvertAll<string>( delegate( Item item ) { return item.Name; } ); | 156 | List<string> currentIssues = _items.ConvertAll<string>( delegate (Item item) { return item.Name; } ); |
2536 | 185 | List<JIRAIssueItem> newIssues= changedIssues.FindAll( delegate( JIRAIssueItem item ) { return !item.IsClosed && !currentIssues.Contains( item.Name ); } ); | 157 | List<JIRAIssueItem> newIssues = changedIssues.FindAll( delegate (JIRAIssueItem item) { return !item.IsClosed && !currentIssues.Contains (item.Name); } ); |
2537 | 186 | 158 | ||
2541 | 187 | lock( _items ) | 159 | lock (_items) { |
2542 | 188 | { | 160 | _items.AddRange (newIssues.ToArray()); |
2540 | 189 | _items.AddRange( newIssues.ToArray() ); | ||
2543 | 190 | } | 161 | } |
2544 | 191 | 162 | ||
2545 | 192 | // Notify what's changed | 163 | // Notify what's changed |
2549 | 193 | if( newIssues.Count>0 ) | 164 | if (newIssues.Count > 0) { |
2550 | 194 | { | 165 | Log.Debug ("Added: {0} new issues", newIssues.Count); |
2548 | 195 | Log( "Added: {0} new issues", newIssues.Count ); | ||
2551 | 196 | } | 166 | } |
2560 | 197 | } | 167 | } catch (Exception e) { |
2561 | 198 | catch( Exception e ) | 168 | Log.Error ("Unable to update JIRA items: {0}", e); |
2562 | 199 | { | 169 | } finally { |
2563 | 200 | Log( "Unable to update JIRA items: {0}", e ); | 170 | Monitor.Exit (_lock); |
2556 | 201 | } | ||
2557 | 202 | finally | ||
2558 | 203 | { | ||
2559 | 204 | Monitor.Exit( _lock ); | ||
2564 | 205 | } | 171 | } |
2565 | 206 | } | 172 | } |
2566 | 207 | 173 | ||
2567 | @@ -209,117 +175,82 @@ | |||
2568 | 209 | /// Determine the project ids of the given project codes by contacting the JIRA soap service. | 175 | /// Determine the project ids of the given project codes by contacting the JIRA soap service. |
2569 | 210 | /// Then do an initial query for issues with these given ids | 176 | /// Then do an initial query for issues with these given ids |
2570 | 211 | /// </summary> | 177 | /// </summary> |
2572 | 212 | private void DoInit() | 178 | private void DoInit () |
2573 | 213 | { | 179 | { |
2577 | 214 | try | 180 | try { |
2578 | 215 | { | 181 | Monitor.Enter (_lock); |
2576 | 216 | Monitor.Enter( _lock ); | ||
2579 | 217 | 182 | ||
2580 | 218 | // Pre cleaning... | 183 | // Pre cleaning... |
2581 | 219 | _hasInit= true; // by the time this is done, we will have init... | 184 | _hasInit= true; // by the time this is done, we will have init... |
2603 | 220 | _projectStatuses.Clear(); | 185 | _projectStatuses.Clear (); |
2604 | 221 | _projectIds.Clear(); | 186 | _projectIds.Clear (); |
2605 | 222 | 187 | ||
2606 | 223 | lock( _items ) | 188 | lock (_items) { |
2607 | 224 | { | 189 | _items.Clear (); |
2608 | 225 | _items.Clear(); | 190 | } |
2609 | 226 | } | 191 | |
2610 | 227 | 192 | Log.Debug ("Initializing repository: " + ConfigWidget.BaseURL); | |
2590 | 228 | // Check to make sure the config is valid... | ||
2591 | 229 | _config.Load(); | ||
2592 | 230 | |||
2593 | 231 | if( !_config.IsValid() ) | ||
2594 | 232 | { | ||
2595 | 233 | Log( "Configuration for JIRA is not valid, see the plugin settings page" ); | ||
2596 | 234 | |||
2597 | 235 | // we failed to init | ||
2598 | 236 | _hasInit= false; | ||
2599 | 237 | return; | ||
2600 | 238 | } | ||
2601 | 239 | |||
2602 | 240 | Log( "Initializing repository: "+_config.BaseUrl ); | ||
2611 | 241 | 193 | ||
2612 | 242 | // init the service connection | 194 | // init the service connection |
2614 | 243 | _service= new JIRAServerFacade( _config.BaseUrl, _config.Username, _config.Password ); | 195 | _service= new JIRAServerFacade (ConfigWidget.BaseURL, ConfigWidget.UserName, ConfigWidget.Password); |
2615 | 244 | 196 | ||
2616 | 245 | // Identify the available resolutions for an issue | 197 | // Identify the available resolutions for an issue |
2619 | 246 | foreach( RemoteStatus status in _service.getStatuses() ) | 198 | foreach (RemoteStatus status in _service.getStatuses()) { |
2618 | 247 | { | ||
2620 | 248 | _projectStatuses.Add( int.Parse( status.id ) ); | 199 | _projectStatuses.Add( int.Parse( status.id ) ); |
2621 | 249 | 200 | ||
2623 | 250 | Log( "Init Status: {0} => {1}", status.name, status.id ); | 201 | Log.Debug ("Init Status: {0} => {1}", status.name, status.id); |
2624 | 251 | } | 202 | } |
2625 | 252 | 203 | ||
2626 | 253 | // We want all issues that have a status that isn't 5 or 6 (resolved/closed) | 204 | // We want all issues that have a status that isn't 5 or 6 (resolved/closed) |
2627 | 254 | // we need to do it this way because JIRA doesn't support logical operators | 205 | // we need to do it this way because JIRA doesn't support logical operators |
2628 | 255 | // for exclusion: see JRA-1560 | 206 | // for exclusion: see JRA-1560 |
2632 | 256 | List<int> reqStatuses= new List<int>( _projectStatuses ); | 207 | List<int> reqStatuses = new List<int> (_projectStatuses); |
2633 | 257 | reqStatuses.Remove( JIRAIssueItem.STATUS_RESOLVED ); | 208 | reqStatuses.Remove (JIRAIssueItem.STATUS_RESOLVED); |
2634 | 258 | reqStatuses.Remove( JIRAIssueItem.STATUS_CLOSED ); | 209 | reqStatuses.Remove (JIRAIssueItem.STATUS_CLOSED); |
2635 | 259 | 210 | ||
2636 | 260 | // Identify the project id's that we're interested in | 211 | // Identify the project id's that we're interested in |
2641 | 261 | foreach( string projectKey in _config.Projects ) | 212 | foreach (string projectKey in ConfigWidget.Projects) { |
2642 | 262 | { | 213 | RemoteProject project = _service.getProjectByKey (projectKey); |
2643 | 263 | RemoteProject project= _service.getProjectByKey( projectKey ); | 214 | long projectId = long.Parse (project.id); |
2640 | 264 | long projectId= long.Parse( project.id ); | ||
2644 | 265 | 215 | ||
2645 | 266 | // Use the rss client to discover the issues for this project that are open | 216 | // Use the rss client to discover the issues for this project that are open |
2650 | 267 | List<JIRAIssueItem> issues= ConvertFromRemoteIssues( | 217 | List<JIRAIssueItem> issues = ConvertFromRemoteIssues ( |
2651 | 268 | _service.GetAllIssuesWithStatus( | 218 | _service.GetAllIssuesWithStatus ( |
2652 | 269 | new List<long>( new long[]{ projectId } ), | 219 | new List<long> (new long[] {projectId}), |
2653 | 270 | reqStatuses ) ); | 220 | reqStatuses)); |
2654 | 271 | 221 | ||
2655 | 272 | // Store this project and it's issues | 222 | // Store this project and it's issues |
2657 | 273 | _projectIds.Add( projectId ); | 223 | _projectIds.Add (projectId); |
2658 | 274 | 224 | ||
2662 | 275 | lock( _items ) | 225 | lock (_items) { |
2663 | 276 | { | 226 | _items.AddRange (issues.ToArray()); |
2661 | 277 | _items.AddRange( issues.ToArray() ); | ||
2664 | 278 | } | 227 | } |
2665 | 279 | 228 | ||
2668 | 280 | Log( "Init Project: {0} [{1}=>{2}] with: {3} issues.", | 229 | Log.Debug ("Init Project: {0} [{1}=>{2}] with: {3} issues.", |
2669 | 281 | project.name, project.key, project.id, issues.Count ); | 230 | project.name, project.key, project.id, issues.Count); |
2670 | 282 | } | 231 | } |
2671 | 283 | 232 | ||
2680 | 284 | } | 233 | } catch (System.Web.Services.Protocols.SoapException e) { |
2681 | 285 | catch( System.Web.Services.Protocols.SoapException e ) | 234 | Log.Error ("Failure (re-)initializating JIRA plugin...\n{0}", e); |
2682 | 286 | { | 235 | Log.Debug (e.StackTrace); |
2683 | 287 | Log( "Failure (re-)initializating JIRA plugin...\n{0}", e ); | 236 | } finally { |
2684 | 288 | } | 237 | Monitor.Exit (_lock); |
2677 | 289 | finally | ||
2678 | 290 | { | ||
2679 | 291 | Monitor.Exit( _lock ); | ||
2685 | 292 | } | 238 | } |
2686 | 293 | } | 239 | } |
2687 | 294 | 240 | ||
2688 | 295 | 241 | ||
2690 | 296 | private List<JIRAIssueItem> ConvertFromRemoteIssues( IList<RemoteIssue> issues ) | 242 | private List<JIRAIssueItem> ConvertFromRemoteIssues (IList<RemoteIssue> issues) |
2691 | 297 | { | 243 | { |
2693 | 298 | List<JIRAIssueItem> result= new List<JIRAIssueItem>(); | 244 | List<JIRAIssueItem> result = new List<JIRAIssueItem> (); |
2694 | 299 | 245 | ||
2700 | 300 | foreach( RemoteIssue inIssue in issues ) | 246 | foreach (RemoteIssue inIssue in issues) { |
2701 | 301 | { | 247 | JIRAIssueItem outIssue = new JIRAIssueItem (inIssue.key, ConfigWidget.BaseURL); |
2702 | 302 | JIRAIssueItem outIssue= new JIRAIssueItem( inIssue.key, _config.BaseUrl ); | 248 | outIssue.setDescription (inIssue.summary); |
2703 | 303 | outIssue.setDescription(inIssue.summary); | 249 | outIssue.Status = int.Parse (inIssue.status); |
2699 | 304 | outIssue.Status= int.Parse( inIssue.status ); | ||
2704 | 305 | 250 | ||
2706 | 306 | result.Add( outIssue ); | 251 | result.Add (outIssue); |
2707 | 307 | } | 252 | } |
2708 | 308 | return result; | 253 | return result; |
2709 | 309 | } | 254 | } |
2710 | 310 | |||
2711 | 311 | /// <summary> | ||
2712 | 312 | /// Temporary logging method until it's provided to plugins | ||
2713 | 313 | /// </summary> | ||
2714 | 314 | public void Log( string message, params object[] args ) | ||
2715 | 315 | { | ||
2716 | 316 | string prefix= string.Format( "[Info {0:00}:{1:00}:{2:00}.{3:000}] [JIRA] ", | ||
2717 | 317 | DateTime.Now.Hour, | ||
2718 | 318 | DateTime.Now.Minute, | ||
2719 | 319 | DateTime.Now.Second, | ||
2720 | 320 | DateTime.Now.Millisecond ); | ||
2721 | 321 | |||
2722 | 322 | Console.WriteLine( prefix + string.Format( message, args ) ); | ||
2723 | 323 | } | ||
2724 | 324 | } | 255 | } |
2726 | 325 | } | 256 | } |
2727 | 326 | \ No newline at end of file | 257 | \ No newline at end of file |
2728 | 327 | 258 | ||
2729 | === modified file 'Microblogging/Resources/Microblogging.addin.xml' | |||
2730 | --- Microblogging/Resources/Microblogging.addin.xml 2009-05-18 06:07:24 +0000 | |||
2731 | +++ Microblogging/Resources/Microblogging.addin.xml 2009-06-19 08:23:32 +0000 | |||
2732 | @@ -15,6 +15,7 @@ | |||
2733 | 15 | 15 | ||
2734 | 16 | <Dependencies> | 16 | <Dependencies> |
2735 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
2736 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
2737 | 18 | </Dependencies> | 19 | </Dependencies> |
2738 | 19 | 20 | ||
2739 | 20 | <Extension path="/Do/Action"> | 21 | <Extension path="/Do/Action"> |
2740 | @@ -24,4 +25,8 @@ | |||
2741 | 24 | <Extension path="/Do/ItemSource"> | 25 | <Extension path="/Do/ItemSource"> |
2742 | 25 | <ItemSource type="Microblogging.FriendSource" /> | 26 | <ItemSource type="Microblogging.FriendSource" /> |
2743 | 26 | </Extension> | 27 | </Extension> |
2744 | 28 | <Extension path= "/Do/Config"> | ||
2745 | 29 | <Config type="Microblogging.Configuration" /> | ||
2746 | 30 | <Config type="Microblogging.GenConfig" /> | ||
2747 | 31 | </Extension> | ||
2748 | 27 | </Addin> | 32 | </Addin> |
2749 | 28 | 33 | ||
2750 | === modified file 'Microblogging/src/Configuration.cs' | |||
2751 | --- Microblogging/src/Configuration.cs 2009-06-12 11:16:20 +0000 | |||
2752 | +++ Microblogging/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
2753 | @@ -25,11 +25,12 @@ | |||
2754 | 25 | 25 | ||
2755 | 26 | using Twitterizer.Framework; | 26 | using Twitterizer.Framework; |
2756 | 27 | 27 | ||
2757 | 28 | using Mono.Unix; | ||
2758 | 28 | using Do.Platform.Linux; | 29 | using Do.Platform.Linux; |
2759 | 29 | 30 | ||
2760 | 30 | namespace Microblogging | 31 | namespace Microblogging |
2761 | 31 | { | 32 | { |
2763 | 32 | public class Configuration : AbstractLoginWidget | 33 | public class Configuration : AbstractLoginWidget, IConfigurable |
2764 | 33 | { | 34 | { |
2765 | 34 | static Dictionary<Service, string> register_links; | 35 | static Dictionary<Service, string> register_links; |
2766 | 35 | public static event EventHandler ServiceChanged; | 36 | public static event EventHandler ServiceChanged; |
2767 | @@ -41,6 +42,15 @@ | |||
2768 | 41 | register_links = new Dictionary<Service, string> (); | 42 | register_links = new Dictionary<Service, string> (); |
2769 | 42 | SetupServiceLinks (); | 43 | SetupServiceLinks (); |
2770 | 43 | } | 44 | } |
2771 | 45 | |||
2772 | 46 | public string Title { | ||
2773 | 47 | get { return Catalog.GetString ("Login"); } | ||
2774 | 48 | } | ||
2775 | 49 | |||
2776 | 50 | public Gtk.Bin GetConfiguration () | ||
2777 | 51 | { | ||
2778 | 52 | return this; | ||
2779 | 53 | } | ||
2780 | 44 | 54 | ||
2781 | 45 | public Configuration () : | 55 | public Configuration () : |
2782 | 46 | base (Microblog.Preferences.MicroblogService, register_links[Microblog.Preferences.ActiveService]) | 56 | base (Microblog.Preferences.MicroblogService, register_links[Microblog.Preferences.ActiveService]) |
2783 | 47 | 57 | ||
2784 | === modified file 'Microblogging/src/FriendSource.cs' | |||
2785 | --- Microblogging/src/FriendSource.cs 2009-02-28 19:17:08 +0000 | |||
2786 | +++ Microblogging/src/FriendSource.cs 2009-06-20 02:49:57 +0000 | |||
2787 | @@ -35,7 +35,7 @@ | |||
2788 | 35 | /// This is a dummy class, all it does is set up the Miroblog class on Do load | 35 | /// This is a dummy class, all it does is set up the Miroblog class on Do load |
2789 | 36 | /// and return a configuration page. | 36 | /// and return a configuration page. |
2790 | 37 | /// </summary> | 37 | /// </summary> |
2792 | 38 | public sealed class FriendSource : ItemSource, IConfigurable | 38 | public sealed class FriendSource : ItemSource |
2793 | 39 | { | 39 | { |
2794 | 40 | public FriendSource() | 40 | public FriendSource() |
2795 | 41 | { | 41 | { |
2796 | @@ -45,7 +45,7 @@ | |||
2797 | 45 | public override string Name { | 45 | public override string Name { |
2798 | 46 | get { return Catalog.GetString ("Microblog friends"); } | 46 | get { return Catalog.GetString ("Microblog friends"); } |
2799 | 47 | } | 47 | } |
2801 | 48 | 48 | ||
2802 | 49 | public override string Description { | 49 | public override string Description { |
2803 | 50 | get { return Catalog.GetString ("Indexes your microblog friends"); } | 50 | get { return Catalog.GetString ("Indexes your microblog friends"); } |
2804 | 51 | } | 51 | } |
2805 | @@ -66,10 +66,5 @@ | |||
2806 | 66 | { | 66 | { |
2807 | 67 | return (item as FriendItem).Statuses.Where (status => status.Id > 0).OfType<Item> (); | 67 | return (item as FriendItem).Statuses.Where (status => status.Id > 0).OfType<Item> (); |
2808 | 68 | } | 68 | } |
2809 | 69 | |||
2810 | 70 | public Gtk.Bin GetConfiguration () | ||
2811 | 71 | { | ||
2812 | 72 | return new Configuration (); | ||
2813 | 73 | } | ||
2814 | 74 | } | 69 | } |
2815 | 75 | } | 70 | } |
2816 | 76 | 71 | ||
2817 | === modified file 'Microblogging/src/GenConfig.cs' | |||
2818 | --- Microblogging/src/GenConfig.cs 2009-02-28 02:17:00 +0000 | |||
2819 | +++ Microblogging/src/GenConfig.cs 2009-06-19 08:23:32 +0000 | |||
2820 | @@ -23,9 +23,12 @@ | |||
2821 | 23 | 23 | ||
2822 | 24 | using Gtk; | 24 | using Gtk; |
2823 | 25 | 25 | ||
2824 | 26 | using Mono.Unix; | ||
2825 | 27 | using Do.Platform.Linux; | ||
2826 | 28 | |||
2827 | 26 | namespace Microblogging | 29 | namespace Microblogging |
2828 | 27 | { | 30 | { |
2830 | 28 | public partial class GenConfig : Gtk.Bin | 31 | public partial class GenConfig : Gtk.Bin, IConfigurable |
2831 | 29 | { | 32 | { |
2832 | 30 | 33 | ||
2833 | 31 | public GenConfig () | 34 | public GenConfig () |
2834 | @@ -34,6 +37,15 @@ | |||
2835 | 34 | show_updates_chk.Active = Microblog.Preferences.ShowNotifications; | 37 | show_updates_chk.Active = Microblog.Preferences.ShowNotifications; |
2836 | 35 | show_dms_chk.Active = Microblog.Preferences.ShowDirectMessages; | 38 | show_dms_chk.Active = Microblog.Preferences.ShowDirectMessages; |
2837 | 36 | } | 39 | } |
2838 | 40 | |||
2839 | 41 | public string Title { | ||
2840 | 42 | get { return Catalog.GetString ("Updates"); } | ||
2841 | 43 | } | ||
2842 | 44 | |||
2843 | 45 | public Gtk.Bin GetConfiguration () | ||
2844 | 46 | { | ||
2845 | 47 | return this; | ||
2846 | 48 | } | ||
2847 | 37 | 49 | ||
2848 | 38 | protected virtual void OnShowUpdatesChkClicked (object sender, EventArgs e) | 50 | protected virtual void OnShowUpdatesChkClicked (object sender, EventArgs e) |
2849 | 39 | { | 51 | { |
2850 | 40 | 52 | ||
2851 | === modified file 'Microblogging/src/PostAction.cs' | |||
2852 | --- Microblogging/src/PostAction.cs 2009-02-28 19:17:08 +0000 | |||
2853 | +++ Microblogging/src/PostAction.cs 2009-06-19 08:23:32 +0000 | |||
2854 | @@ -32,7 +32,7 @@ | |||
2855 | 32 | 32 | ||
2856 | 33 | namespace Microblogging | 33 | namespace Microblogging |
2857 | 34 | { | 34 | { |
2859 | 35 | public sealed class PostAction : Act, IConfigurable | 35 | public sealed class PostAction : Act |
2860 | 36 | { | 36 | { |
2861 | 37 | const int MaxMessageLength = 140; | 37 | const int MaxMessageLength = 140; |
2862 | 38 | 38 | ||
2863 | @@ -112,11 +112,6 @@ | |||
2864 | 112 | 112 | ||
2865 | 113 | return null; | 113 | return null; |
2866 | 114 | } | 114 | } |
2867 | 115 | |||
2868 | 116 | public Gtk.Bin GetConfiguration () | ||
2869 | 117 | { | ||
2870 | 118 | return new GenConfig (); | ||
2871 | 119 | } | ||
2872 | 120 | 115 | ||
2873 | 121 | string BuildTweet(string status, IEnumerable<Item> modItems) | 116 | string BuildTweet(string status, IEnumerable<Item> modItems) |
2874 | 122 | { | 117 | { |
2875 | 123 | 118 | ||
2876 | === modified file 'Pastebin/Resources/Pastebin.addin.xml' | |||
2877 | --- Pastebin/Resources/Pastebin.addin.xml 2009-03-31 23:19:25 +0000 | |||
2878 | +++ Pastebin/Resources/Pastebin.addin.xml 2009-06-19 08:23:32 +0000 | |||
2879 | @@ -15,6 +15,7 @@ | |||
2880 | 15 | 15 | ||
2881 | 16 | <Dependencies> | 16 | <Dependencies> |
2882 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
2883 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
2884 | 18 | </Dependencies> | 19 | </Dependencies> |
2885 | 19 | 20 | ||
2886 | 20 | <!-- Extensions included in this assembly --> | 21 | <!-- Extensions included in this assembly --> |
2887 | @@ -22,4 +23,7 @@ | |||
2888 | 22 | <Extension path= "/Do/Action"> | 23 | <Extension path= "/Do/Action"> |
2889 | 23 | <Action type="Pastebin.PastebinAction" /> | 24 | <Action type="Pastebin.PastebinAction" /> |
2890 | 24 | </Extension> | 25 | </Extension> |
2891 | 26 | <Extension path= "/Do/Config"> | ||
2892 | 27 | <Config type="Pastebin.PastebinConfig" /> | ||
2893 | 28 | </Extension> | ||
2894 | 25 | </Addin> | 29 | </Addin> |
2895 | 26 | 30 | ||
2896 | === modified file 'Pastebin/gtk-gui/gui.stetic' | |||
2897 | --- Pastebin/gtk-gui/gui.stetic 2009-01-22 04:43:21 +0000 | |||
2898 | +++ Pastebin/gtk-gui/gui.stetic 2009-06-19 08:23:32 +0000 | |||
2899 | @@ -2,8 +2,11 @@ | |||
2900 | 2 | <stetic-interface> | 2 | <stetic-interface> |
2901 | 3 | <configuration> | 3 | <configuration> |
2902 | 4 | <images-root-path>..</images-root-path> | 4 | <images-root-path>..</images-root-path> |
2904 | 5 | <target-gtk-version>2.12.1</target-gtk-version> | 5 | <target-gtk-version>2.12</target-gtk-version> |
2905 | 6 | </configuration> | 6 | </configuration> |
2906 | 7 | <import> | ||
2907 | 8 | <widget-library name="../bin/Debug/Pastebin.dll" internal="true" /> | ||
2908 | 9 | </import> | ||
2909 | 7 | <widget class="Gtk.Bin" id="Pastebin.PastebinConfig" design-size="300 300"> | 10 | <widget class="Gtk.Bin" id="Pastebin.PastebinConfig" design-size="300 300"> |
2910 | 8 | <property name="MemberName" /> | 11 | <property name="MemberName" /> |
2911 | 9 | <child> | 12 | <child> |
2912 | 10 | 13 | ||
2913 | === modified file 'Pastebin/src/Config/PastebinConfig.cs' | |||
2914 | --- Pastebin/src/Config/PastebinConfig.cs 2009-01-22 04:43:21 +0000 | |||
2915 | +++ Pastebin/src/Config/PastebinConfig.cs 2009-06-19 08:23:32 +0000 | |||
2916 | @@ -22,10 +22,12 @@ | |||
2917 | 22 | using System.Linq; | 22 | using System.Linq; |
2918 | 23 | using System.Reflection; | 23 | using System.Reflection; |
2919 | 24 | using Do.Platform; | 24 | using Do.Platform; |
2920 | 25 | using Do.Platform.Linux; | ||
2921 | 26 | using Mono.Unix; | ||
2922 | 25 | 27 | ||
2923 | 26 | namespace Pastebin | 28 | namespace Pastebin |
2924 | 27 | { | 29 | { |
2926 | 28 | public partial class PastebinConfig : Gtk.Bin | 30 | public partial class PastebinConfig : Gtk.Bin, IConfigurable |
2927 | 29 | { | 31 | { |
2928 | 30 | static IPreferences prefs; | 32 | static IPreferences prefs; |
2929 | 31 | 33 | ||
2930 | @@ -34,7 +36,16 @@ | |||
2931 | 34 | this.Build(); | 36 | this.Build(); |
2932 | 35 | SetupColumns(); | 37 | SetupColumns(); |
2933 | 36 | FillProviders(); | 38 | FillProviders(); |
2935 | 37 | } | 39 | } |
2936 | 40 | |||
2937 | 41 | public string Title { | ||
2938 | 42 | get { return Catalog.GetString ("Pastebin"); } | ||
2939 | 43 | } | ||
2940 | 44 | |||
2941 | 45 | public Gtk.Bin GetConfiguration () | ||
2942 | 46 | { | ||
2943 | 47 | return this; | ||
2944 | 48 | } | ||
2945 | 38 | 49 | ||
2946 | 39 | private void SetupColumns() | 50 | private void SetupColumns() |
2947 | 40 | { | 51 | { |
2948 | 41 | 52 | ||
2949 | === modified file 'Pastebin/src/PastebinAction.cs' | |||
2950 | --- Pastebin/src/PastebinAction.cs 2009-04-11 21:18:05 +0000 | |||
2951 | +++ Pastebin/src/PastebinAction.cs 2009-06-19 08:23:32 +0000 | |||
2952 | @@ -34,7 +34,7 @@ | |||
2953 | 34 | 34 | ||
2954 | 35 | namespace Pastebin | 35 | namespace Pastebin |
2955 | 36 | { | 36 | { |
2957 | 37 | public class PastebinAction : Act, IConfigurable | 37 | public class PastebinAction : Act |
2958 | 38 | { | 38 | { |
2959 | 39 | public override string Name { | 39 | public override string Name { |
2960 | 40 | get { return Catalog.GetString ("Send to Pastebin"); } | 40 | get { return Catalog.GetString ("Send to Pastebin"); } |
2961 | @@ -115,13 +115,6 @@ | |||
2962 | 115 | 115 | ||
2963 | 116 | if (!string.IsNullOrEmpty (url)) | 116 | if (!string.IsNullOrEmpty (url)) |
2964 | 117 | yield return new TextItem (url); | 117 | yield return new TextItem (url); |
2971 | 118 | } | 118 | } |
2966 | 119 | |||
2967 | 120 | public Gtk.Bin GetConfiguration () | ||
2968 | 121 | { | ||
2969 | 122 | return new PastebinConfig(); | ||
2970 | 123 | } | ||
2972 | 124 | } | 119 | } |
2973 | 125 | } | 120 | } |
2974 | 126 | |||
2975 | 127 | |||
2976 | 128 | 121 | ||
2977 | === modified file 'PingFM/Resources/PingFM.addin.xml' | |||
2978 | --- PingFM/Resources/PingFM.addin.xml 2009-03-31 23:19:25 +0000 | |||
2979 | +++ PingFM/Resources/PingFM.addin.xml 2009-06-19 08:23:32 +0000 | |||
2980 | @@ -15,6 +15,7 @@ | |||
2981 | 15 | 15 | ||
2982 | 16 | <Dependencies> | 16 | <Dependencies> |
2983 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
2984 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
2985 | 18 | </Dependencies> | 19 | </Dependencies> |
2986 | 19 | 20 | ||
2987 | 20 | <Extension path="/Do/ItemSource"> | 21 | <Extension path="/Do/ItemSource"> |
2988 | @@ -24,4 +25,7 @@ | |||
2989 | 24 | <Extension path="/Do/Action"> | 25 | <Extension path="/Do/Action"> |
2990 | 25 | <Action type="PingFM.PingFMPost" /> | 26 | <Action type="PingFM.PingFMPost" /> |
2991 | 26 | </Extension> | 27 | </Extension> |
2992 | 28 | <Extension path= "/Do/Config"> | ||
2993 | 29 | <Config type="PingFM.Configuration" /> | ||
2994 | 30 | </Extension> | ||
2995 | 27 | </Addin> | 31 | </Addin> |
2996 | 28 | 32 | ||
2997 | === modified file 'PingFM/src/Configuration.cs' | |||
2998 | --- PingFM/src/Configuration.cs 2009-01-12 04:00:07 +0000 | |||
2999 | +++ PingFM/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
3000 | @@ -25,9 +25,12 @@ | |||
3001 | 25 | using Gtk; | 25 | using Gtk; |
3002 | 26 | using Gdk; | 26 | using Gdk; |
3003 | 27 | 27 | ||
3004 | 28 | using Do.Platform.Linux; | ||
3005 | 29 | using Mono.Unix; | ||
3006 | 30 | |||
3007 | 28 | namespace PingFM | 31 | namespace PingFM |
3008 | 29 | { | 32 | { |
3010 | 30 | public partial class Configuration : Gtk.Bin | 33 | public partial class Configuration : Gtk.Bin, IConfigurable |
3011 | 31 | { | 34 | { |
3012 | 32 | 35 | ||
3013 | 33 | public Configuration() | 36 | public Configuration() |
3014 | @@ -36,6 +39,15 @@ | |||
3015 | 36 | appkey_entry.Text = PingFM.Preferences.AppKey; | 39 | appkey_entry.Text = PingFM.Preferences.AppKey; |
3016 | 37 | } | 40 | } |
3017 | 38 | 41 | ||
3018 | 42 | public string Title { | ||
3019 | 43 | get { return Catalog.GetString ("Ping.FM"); } | ||
3020 | 44 | } | ||
3021 | 45 | |||
3022 | 46 | public Gtk.Bin GetConfiguration () | ||
3023 | 47 | { | ||
3024 | 48 | return this; | ||
3025 | 49 | } | ||
3026 | 50 | |||
3027 | 39 | protected virtual void OnApplyBtnClicked (object sender, System.EventArgs e) | 51 | protected virtual void OnApplyBtnClicked (object sender, System.EventArgs e) |
3028 | 40 | { | 52 | { |
3029 | 41 | validate_lbl.Markup = "<i>Validating...</i>"; | 53 | validate_lbl.Markup = "<i>Validating...</i>"; |
3030 | 42 | 54 | ||
3031 | === modified file 'PingFM/src/PingFMServiceItemSource.cs' | |||
3032 | --- PingFM/src/PingFMServiceItemSource.cs 2009-01-02 21:57:13 +0000 | |||
3033 | +++ PingFM/src/PingFMServiceItemSource.cs 2009-06-19 08:23:32 +0000 | |||
3034 | @@ -29,7 +29,7 @@ | |||
3035 | 29 | namespace PingFM | 29 | namespace PingFM |
3036 | 30 | { | 30 | { |
3037 | 31 | 31 | ||
3039 | 32 | public sealed class PingFMServiceItemSource : ItemSource, IConfigurable | 32 | public sealed class PingFMServiceItemSource : ItemSource |
3040 | 33 | { | 33 | { |
3041 | 34 | public override string Name { | 34 | public override string Name { |
3042 | 35 | get { return Catalog.GetString ("Ping.FM Services");} | 35 | get { return Catalog.GetString ("Ping.FM Services");} |
3043 | @@ -61,10 +61,5 @@ | |||
3044 | 61 | updateServices.IsBackground = true; | 61 | updateServices.IsBackground = true; |
3045 | 62 | updateServices.Start (); | 62 | updateServices.Start (); |
3046 | 63 | } | 63 | } |
3047 | 64 | |||
3048 | 65 | public Gtk.Bin GetConfiguration () | ||
3049 | 66 | { | ||
3050 | 67 | return new Configuration (); | ||
3051 | 68 | } | ||
3052 | 69 | } | 64 | } |
3053 | 70 | } | ||
3054 | 71 | \ No newline at end of file | 65 | \ No newline at end of file |
3055 | 66 | } | ||
3056 | 72 | 67 | ||
3057 | === modified file 'RSS/Resources/RSS.addin.xml' | |||
3058 | --- RSS/Resources/RSS.addin.xml 2009-03-31 23:19:25 +0000 | |||
3059 | +++ RSS/Resources/RSS.addin.xml 2009-06-19 08:23:32 +0000 | |||
3060 | @@ -15,6 +15,7 @@ | |||
3061 | 15 | 15 | ||
3062 | 16 | <Dependencies> | 16 | <Dependencies> |
3063 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3064 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3065 | 18 | </Dependencies> | 19 | </Dependencies> |
3066 | 19 | 20 | ||
3067 | 20 | <Extension path = "/Do/ItemSource"> | 21 | <Extension path = "/Do/ItemSource"> |
3068 | @@ -24,4 +25,7 @@ | |||
3069 | 24 | <Extension path= "/Do/Action"> | 25 | <Extension path= "/Do/Action"> |
3070 | 25 | <Action type="Do.Plugins.Rss.RssFeedAction" /> | 26 | <Action type="Do.Plugins.Rss.RssFeedAction" /> |
3071 | 26 | </Extension> | 27 | </Extension> |
3072 | 28 | <Extension path= "/Do/Config"> | ||
3073 | 29 | <Config type="Do.Plugins.Rss.Configuration" /> | ||
3074 | 30 | </Extension> | ||
3075 | 27 | </Addin> | 31 | </Addin> |
3076 | 28 | 32 | ||
3077 | === modified file 'RSS/src/Configuration.cs' | |||
3078 | --- RSS/src/Configuration.cs 2009-01-22 03:46:13 +0000 | |||
3079 | +++ RSS/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
3080 | @@ -22,10 +22,12 @@ | |||
3081 | 22 | using System; | 22 | using System; |
3082 | 23 | using System.IO; | 23 | using System.IO; |
3083 | 24 | using System.Reflection; | 24 | using System.Reflection; |
3084 | 25 | using Do.Platform.Linux; | ||
3085 | 26 | using Mono.Unix; | ||
3086 | 25 | 27 | ||
3087 | 26 | namespace Do.Plugins.Rss | 28 | namespace Do.Plugins.Rss |
3088 | 27 | { | 29 | { |
3090 | 28 | public partial class Configuration : Gtk.Bin | 30 | public partial class Configuration : Gtk.Bin, IConfigurable |
3091 | 29 | { | 31 | { |
3092 | 30 | public Configuration () | 32 | public Configuration () |
3093 | 31 | { | 33 | { |
3094 | @@ -35,6 +37,15 @@ | |||
3095 | 35 | OpmlChooser.SetUri (RssItemSource.OpmlFile); | 37 | OpmlChooser.SetUri (RssItemSource.OpmlFile); |
3096 | 36 | } | 38 | } |
3097 | 37 | 39 | ||
3098 | 40 | public string Title { | ||
3099 | 41 | get { return Catalog.GetString ("RSS"); } | ||
3100 | 42 | } | ||
3101 | 43 | |||
3102 | 44 | public Gtk.Bin GetConfiguration () | ||
3103 | 45 | { | ||
3104 | 46 | return this; | ||
3105 | 47 | } | ||
3106 | 48 | |||
3107 | 38 | protected virtual void OnTimeoutValueChanged (object o, EventArgs e) | 49 | protected virtual void OnTimeoutValueChanged (object o, EventArgs e) |
3108 | 39 | { | 50 | { |
3109 | 40 | RssItemSource.Timeout = Timeout.ValueAsInt; | 51 | RssItemSource.Timeout = Timeout.ValueAsInt; |
3110 | 41 | 52 | ||
3111 | === modified file 'RSS/src/RssItemSource.cs' | |||
3112 | --- RSS/src/RssItemSource.cs 2009-01-22 03:46:13 +0000 | |||
3113 | +++ RSS/src/RssItemSource.cs 2009-06-19 08:23:32 +0000 | |||
3114 | @@ -28,7 +28,7 @@ | |||
3115 | 28 | 28 | ||
3116 | 29 | namespace Do.Plugins.Rss | 29 | namespace Do.Plugins.Rss |
3117 | 30 | { | 30 | { |
3119 | 31 | public class RssItemSource : ItemSource, IConfigurable | 31 | public class RssItemSource : ItemSource |
3120 | 32 | { | 32 | { |
3121 | 33 | private static List<Item> items; | 33 | private static List<Item> items; |
3122 | 34 | private static IPreferences prefs; | 34 | private static IPreferences prefs; |
3123 | @@ -131,9 +131,5 @@ | |||
3124 | 131 | Log.Error("Could not read OPML file {0}: {1}", opmlFile, e.Message); | 131 | Log.Error("Could not read OPML file {0}: {1}", opmlFile, e.Message); |
3125 | 132 | } | 132 | } |
3126 | 133 | } | 133 | } |
3127 | 134 | |||
3128 | 135 | public Gtk.Bin GetConfiguration () { | ||
3129 | 136 | return new Configuration (); | ||
3130 | 137 | } | ||
3131 | 138 | } | 134 | } |
3132 | 139 | } | 135 | } |
3133 | 140 | 136 | ||
3134 | === modified file 'RememberTheMilk/Resources/RTM.addin.xml' | |||
3135 | --- RememberTheMilk/Resources/RTM.addin.xml 2009-04-22 03:29:31 +0000 | |||
3136 | +++ RememberTheMilk/Resources/RTM.addin.xml 2009-06-19 08:23:32 +0000 | |||
3137 | @@ -15,6 +15,7 @@ | |||
3138 | 15 | 15 | ||
3139 | 16 | <Dependencies> | 16 | <Dependencies> |
3140 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3141 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3142 | 18 | </Dependencies> | 19 | </Dependencies> |
3143 | 19 | 20 | ||
3144 | 20 | <!-- Extensions included in this assembly --> | 21 | <!-- Extensions included in this assembly --> |
3145 | @@ -35,4 +36,7 @@ | |||
3146 | 35 | <Action type="RememberTheMilk.RTMSetRecurrence" /> | 36 | <Action type="RememberTheMilk.RTMSetRecurrence" /> |
3147 | 36 | <Action type="RememberTheMilk.RTMUncompleteTask" /> | 37 | <Action type="RememberTheMilk.RTMUncompleteTask" /> |
3148 | 37 | </Extension> | 38 | </Extension> |
3149 | 39 | <Extension path= "/Do/Config"> | ||
3150 | 40 | <Config type="RememberTheMilk.Configuration" /> | ||
3151 | 41 | </Extension> | ||
3152 | 38 | </Addin> | 42 | </Addin> |
3153 | 39 | 43 | ||
3154 | === modified file 'RememberTheMilk/src/Configuration.cs' | |||
3155 | --- RememberTheMilk/src/Configuration.cs 2009-01-29 16:58:01 +0000 | |||
3156 | +++ RememberTheMilk/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
3157 | @@ -21,13 +21,14 @@ | |||
3158 | 21 | using Mono.Unix; | 21 | using Mono.Unix; |
3159 | 22 | using RtmNet; | 22 | using RtmNet; |
3160 | 23 | using Do.Platform; | 23 | using Do.Platform; |
3161 | 24 | using Do.Platform.Linux; | ||
3162 | 24 | 25 | ||
3163 | 25 | using Gtk; | 26 | using Gtk; |
3164 | 26 | 27 | ||
3165 | 27 | 28 | ||
3166 | 28 | namespace RememberTheMilk | 29 | namespace RememberTheMilk |
3167 | 29 | { | 30 | { |
3169 | 30 | public partial class Configuration : Gtk.Bin | 31 | public partial class Configuration : Gtk.Bin, IConfigurable |
3170 | 31 | { | 32 | { |
3171 | 32 | //private static IPreferences prefs; | 33 | //private static IPreferences prefs; |
3172 | 33 | private LinkButton rtm_ref_btn; | 34 | private LinkButton rtm_ref_btn; |
3173 | @@ -52,6 +53,15 @@ | |||
3174 | 52 | { | 53 | { |
3175 | 53 | } | 54 | } |
3176 | 54 | 55 | ||
3177 | 56 | public string Title { | ||
3178 | 57 | get { return Catalog.GetString ("Remember The Milk"); } | ||
3179 | 58 | } | ||
3180 | 59 | |||
3181 | 60 | public Gtk.Bin GetConfiguration () | ||
3182 | 61 | { | ||
3183 | 62 | return this; | ||
3184 | 63 | } | ||
3185 | 64 | |||
3186 | 55 | protected virtual void OnConfirmChkbtnClicked (object sender, System.EventArgs e) | 65 | protected virtual void OnConfirmChkbtnClicked (object sender, System.EventArgs e) |
3187 | 56 | { | 66 | { |
3188 | 57 | RTM.Preferences.ActionNotification = confirm_chkbtn.Active; | 67 | RTM.Preferences.ActionNotification = confirm_chkbtn.Active; |
3189 | 58 | 68 | ||
3190 | === modified file 'RememberTheMilk/src/RTMListItemSource.cs' | |||
3191 | --- RememberTheMilk/src/RTMListItemSource.cs 2009-01-08 03:33:27 +0000 | |||
3192 | +++ RememberTheMilk/src/RTMListItemSource.cs 2009-06-19 08:23:32 +0000 | |||
3193 | @@ -26,7 +26,7 @@ | |||
3194 | 26 | 26 | ||
3195 | 27 | namespace RememberTheMilk | 27 | namespace RememberTheMilk |
3196 | 28 | { | 28 | { |
3198 | 29 | public class RTMListItemSource : ItemSource, IConfigurable | 29 | public class RTMListItemSource : ItemSource |
3199 | 30 | { | 30 | { |
3200 | 31 | public override string Name { | 31 | public override string Name { |
3201 | 32 | get { return "Remember The Milk Task Lists"; } | 32 | get { return "Remember The Milk Task Lists"; } |
3202 | @@ -69,10 +69,5 @@ | |||
3203 | 69 | updateTasks.IsBackground = true; | 69 | updateTasks.IsBackground = true; |
3204 | 70 | updateTasks.Start (); | 70 | updateTasks.Start (); |
3205 | 71 | } | 71 | } |
3206 | 72 | |||
3207 | 73 | public Gtk.Bin GetConfiguration () | ||
3208 | 74 | { | ||
3209 | 75 | return new Configuration (); | ||
3210 | 76 | } | ||
3211 | 77 | } | 72 | } |
3212 | 78 | } | 73 | } |
3213 | 79 | 74 | ||
3214 | === modified file 'RequestTracker/Resources/RequestTracker.addin.xml' | |||
3215 | --- RequestTracker/Resources/RequestTracker.addin.xml 2009-03-31 23:19:25 +0000 | |||
3216 | +++ RequestTracker/Resources/RequestTracker.addin.xml 2009-06-19 08:23:32 +0000 | |||
3217 | @@ -15,11 +15,14 @@ | |||
3218 | 15 | 15 | ||
3219 | 16 | <Dependencies> | 16 | <Dependencies> |
3220 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3221 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3222 | 18 | </Dependencies> | 19 | </Dependencies> |
3223 | 19 | 20 | ||
3224 | 20 | <!-- Extensions included in this assembly --> | 21 | <!-- Extensions included in this assembly --> |
3225 | 21 | <Extension path="/Do/Action"> | 22 | <Extension path="/Do/Action"> |
3226 | 22 | <Action type="RequestTracker.RTAction" /> | 23 | <Action type="RequestTracker.RTAction" /> |
3227 | 23 | </Extension> | 24 | </Extension> |
3229 | 24 | 25 | <Extension path= "/Do/Config"> | |
3230 | 26 | <Config type="RequestTracker.RTPrefs" /> | ||
3231 | 27 | </Extension> | ||
3232 | 25 | </Addin> | 28 | </Addin> |
3233 | 26 | 29 | ||
3234 | === modified file 'RequestTracker/src/Configuration.cs' | |||
3235 | --- RequestTracker/src/Configuration.cs 2009-03-09 10:31:13 +0000 | |||
3236 | +++ RequestTracker/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
3237 | @@ -11,11 +11,20 @@ | |||
3238 | 11 | { | 11 | { |
3239 | 12 | 12 | ||
3240 | 13 | [System.ComponentModel.ToolboxItem(true)] | 13 | [System.ComponentModel.ToolboxItem(true)] |
3242 | 14 | public partial class RTPrefs : Gtk.Bin | 14 | public partial class RTPrefs : Gtk.Bin, IConfigurable |
3243 | 15 | { | 15 | { |
3244 | 16 | Gtk.ListStore rtListStore; | 16 | Gtk.ListStore rtListStore; |
3245 | 17 | Gtk.TreeViewColumn nameColumn; | 17 | Gtk.TreeViewColumn nameColumn; |
3246 | 18 | Gtk.TreeViewColumn urlColumn; | 18 | Gtk.TreeViewColumn urlColumn; |
3247 | 19 | |||
3248 | 20 | public string Title { | ||
3249 | 21 | get { return Catalog.GetString ("Request Tracker"); } | ||
3250 | 22 | } | ||
3251 | 23 | |||
3252 | 24 | public Gtk.Bin GetConfiguration () | ||
3253 | 25 | { | ||
3254 | 26 | return this; | ||
3255 | 27 | } | ||
3256 | 19 | 28 | ||
3257 | 20 | protected virtual void OnRemoveBtnClicked (object sender, System.EventArgs e) | 29 | protected virtual void OnRemoveBtnClicked (object sender, System.EventArgs e) |
3258 | 21 | { | 30 | { |
3259 | 22 | 31 | ||
3260 | === modified file 'RequestTracker/src/RequestTrackerAction.cs' | |||
3261 | --- RequestTracker/src/RequestTrackerAction.cs 2009-03-11 10:52:55 +0000 | |||
3262 | +++ RequestTracker/src/RequestTrackerAction.cs 2009-06-19 08:23:32 +0000 | |||
3263 | @@ -39,7 +39,7 @@ | |||
3264 | 39 | /// Given an ITextItem, RequestTrackerAction will construct a URL | 39 | /// Given an ITextItem, RequestTrackerAction will construct a URL |
3265 | 40 | /// and feed it to a web browser | 40 | /// and feed it to a web browser |
3266 | 41 | /// </summary> | 41 | /// </summary> |
3268 | 42 | class RTAction : Act, IConfigurable | 42 | class RTAction : Act |
3269 | 43 | { | 43 | { |
3270 | 44 | 44 | ||
3271 | 45 | public override string Name { | 45 | public override string Name { |
3272 | @@ -109,12 +109,5 @@ | |||
3273 | 109 | { | 109 | { |
3274 | 110 | return string.Format (url, ticket); | 110 | return string.Format (url, ticket); |
3275 | 111 | } | 111 | } |
3276 | 112 | |||
3277 | 113 | public Gtk.Bin GetConfiguration () | ||
3278 | 114 | { | ||
3279 | 115 | return new RTPrefs (); | ||
3280 | 116 | } | ||
3281 | 117 | |||
3282 | 118 | } | 112 | } |
3283 | 119 | |||
3284 | 120 | } | 113 | } |
3285 | 121 | 114 | ||
3286 | === modified file 'SqueezeCenter/Resources/SqueezeCenter.addin.xml' | |||
3287 | --- SqueezeCenter/Resources/SqueezeCenter.addin.xml 2009-03-31 23:19:25 +0000 | |||
3288 | +++ SqueezeCenter/Resources/SqueezeCenter.addin.xml 2009-06-19 08:23:32 +0000 | |||
3289 | @@ -15,6 +15,7 @@ | |||
3290 | 15 | 15 | ||
3291 | 16 | <Dependencies> | 16 | <Dependencies> |
3292 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3293 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3294 | 18 | </Dependencies> | 19 | </Dependencies> |
3295 | 19 | 20 | ||
3296 | 20 | <!-- Extensions included in this assembly --> | 21 | <!-- Extensions included in this assembly --> |
3297 | @@ -33,5 +34,8 @@ | |||
3298 | 33 | <Extension path="/Do/ItemSource"> | 34 | <Extension path="/Do/ItemSource"> |
3299 | 34 | <ItemSource type="SqueezeCenter.ItemSource" /> | 35 | <ItemSource type="SqueezeCenter.ItemSource" /> |
3300 | 35 | </Extension> | 36 | </Extension> |
3301 | 37 | <Extension path= "/Do/Config"> | ||
3302 | 38 | <Config type="SqueezeCenter.Configuration" /> | ||
3303 | 39 | </Extension> | ||
3304 | 36 | 40 | ||
3305 | 37 | </Addin> | 41 | </Addin> |
3306 | 38 | 42 | ||
3307 | === modified file 'SqueezeCenter/src/Configuration.cs' | |||
3308 | --- SqueezeCenter/src/Configuration.cs 2008-12-24 04:37:17 +0000 | |||
3309 | +++ SqueezeCenter/src/Configuration.cs 2009-06-19 08:23:32 +0000 | |||
3310 | @@ -12,11 +12,13 @@ | |||
3311 | 12 | //// along with this program. If not, see <http://www.gnu.org/licenses/>. | 12 | //// along with this program. If not, see <http://www.gnu.org/licenses/>. |
3312 | 13 | 13 | ||
3313 | 14 | using System; | 14 | using System; |
3314 | 15 | using Do.Platform.Linux; | ||
3315 | 16 | using Mono.Unix; | ||
3316 | 15 | 17 | ||
3317 | 16 | namespace SqueezeCenter | 18 | namespace SqueezeCenter |
3318 | 17 | { | 19 | { |
3319 | 18 | 20 | ||
3321 | 19 | public partial class Configuration : Gtk.Bin | 21 | public partial class Configuration : Gtk.Bin, IConfigurable |
3322 | 20 | { | 22 | { |
3323 | 21 | 23 | ||
3324 | 22 | public Configuration() | 24 | public Configuration() |
3325 | @@ -24,6 +26,15 @@ | |||
3326 | 24 | this.Build(); | 26 | this.Build(); |
3327 | 25 | this.LoadSettingsFromFile (); | 27 | this.LoadSettingsFromFile (); |
3328 | 26 | } | 28 | } |
3329 | 29 | |||
3330 | 30 | public string Title { | ||
3331 | 31 | get { return Catalog.GetString ("Squeezecenter"); } | ||
3332 | 32 | } | ||
3333 | 33 | |||
3334 | 34 | public Gtk.Bin GetConfiguration () | ||
3335 | 35 | { | ||
3336 | 36 | return this; | ||
3337 | 37 | } | ||
3338 | 27 | 38 | ||
3339 | 28 | void LoadSettingsFromFile () | 39 | void LoadSettingsFromFile () |
3340 | 29 | { | 40 | { |
3341 | 30 | 41 | ||
3342 | === modified file 'SqueezeCenter/src/ItemSource.cs' | |||
3343 | --- SqueezeCenter/src/ItemSource.cs 2009-01-15 06:17:08 +0000 | |||
3344 | +++ SqueezeCenter/src/ItemSource.cs 2009-06-19 08:23:32 +0000 | |||
3345 | @@ -16,14 +16,13 @@ | |||
3346 | 16 | using System.Collections.Generic; | 16 | using System.Collections.Generic; |
3347 | 17 | using System.Threading; | 17 | using System.Threading; |
3348 | 18 | 18 | ||
3349 | 19 | |||
3350 | 20 | using Do.Universe; | 19 | using Do.Universe; |
3351 | 21 | using Do.Platform.Linux; | 20 | using Do.Platform.Linux; |
3352 | 22 | 21 | ||
3353 | 23 | namespace SqueezeCenter | 22 | namespace SqueezeCenter |
3354 | 24 | { | 23 | { |
3355 | 25 | 24 | ||
3357 | 26 | public class ItemSource : Do.Universe.ItemSource, IConfigurable | 25 | public class ItemSource : Do.Universe.ItemSource |
3358 | 27 | { | 26 | { |
3359 | 28 | List<Item> items; | 27 | List<Item> items; |
3360 | 29 | List<AlbumMusicItem> albums; | 28 | List<AlbumMusicItem> albums; |
3361 | @@ -36,11 +35,6 @@ | |||
3362 | 36 | artists = new List<ArtistMusicItem>(); | 35 | artists = new List<ArtistMusicItem>(); |
3363 | 37 | UpdateItems (); | 36 | UpdateItems (); |
3364 | 38 | } | 37 | } |
3365 | 39 | |||
3366 | 40 | public Gtk.Bin GetConfiguration () | ||
3367 | 41 | { | ||
3368 | 42 | return new Configuration (); | ||
3369 | 43 | } | ||
3370 | 44 | 38 | ||
3371 | 45 | public override string Name { get { return "SqueezeCenter"; } } | 39 | public override string Name { get { return "SqueezeCenter"; } } |
3372 | 46 | public override string Description { get { return "Artists, albums and radio."; } } | 40 | public override string Description { get { return "Artists, albums and radio."; } } |
3373 | 47 | 41 | ||
3374 | === modified file 'SystemServices/Resources/SystemServices.addin.xml' | |||
3375 | --- SystemServices/Resources/SystemServices.addin.xml 2009-03-31 23:19:25 +0000 | |||
3376 | +++ SystemServices/Resources/SystemServices.addin.xml 2009-06-19 08:23:32 +0000 | |||
3377 | @@ -15,6 +15,7 @@ | |||
3378 | 15 | 15 | ||
3379 | 16 | <Dependencies> | 16 | <Dependencies> |
3380 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3381 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3382 | 18 | </Dependencies> | 19 | </Dependencies> |
3383 | 19 | 20 | ||
3384 | 20 | <Extension path = "/Do/ItemSource"> | 21 | <Extension path = "/Do/ItemSource"> |
3385 | @@ -25,4 +26,8 @@ | |||
3386 | 25 | <Action type="SystemServices.ServiceStopAction" /> | 26 | <Action type="SystemServices.ServiceStopAction" /> |
3387 | 26 | <Action type="SystemServices.ServiceStartAction" /> | 27 | <Action type="SystemServices.ServiceStartAction" /> |
3388 | 27 | </Extension> | 28 | </Extension> |
3389 | 29 | <Extension path= "/Do/Config"> | ||
3390 | 30 | <Config type="SystemServices.SystemServicesConfig" /> | ||
3391 | 31 | </Extension> | ||
3392 | 32 | |||
3393 | 28 | </Addin> | 33 | </Addin> |
3394 | 29 | 34 | ||
3395 | === modified file 'SystemServices/src/ServiceItemSource.cs' | |||
3396 | --- SystemServices/src/ServiceItemSource.cs 2008-12-31 20:57:41 +0000 | |||
3397 | +++ SystemServices/src/ServiceItemSource.cs 2009-06-20 02:49:57 +0000 | |||
3398 | @@ -31,7 +31,7 @@ | |||
3399 | 31 | /// <summary> | 31 | /// <summary> |
3400 | 32 | /// Source for services. | 32 | /// Source for services. |
3401 | 33 | /// </summary> | 33 | /// </summary> |
3403 | 34 | public class ServiceItemSource: ItemSource, IConfigurable { | 34 | public class ServiceItemSource: ItemSource { |
3404 | 35 | 35 | ||
3405 | 36 | List<Item> items; | 36 | List<Item> items; |
3406 | 37 | 37 | ||
3407 | @@ -63,11 +63,6 @@ | |||
3408 | 63 | public override void UpdateItems () | 63 | public override void UpdateItems () |
3409 | 64 | { | 64 | { |
3410 | 65 | items = SystemServices.LoadServices (); | 65 | items = SystemServices.LoadServices (); |
3411 | 66 | } | ||
3412 | 67 | |||
3413 | 68 | public Gtk.Bin GetConfiguration () | ||
3414 | 69 | { | ||
3415 | 70 | return new SystemServicesConfig (); | ||
3416 | 71 | } | 66 | } |
3417 | 72 | } | 67 | } |
3418 | 73 | } | 68 | } |
3419 | 74 | 69 | ||
3420 | === modified file 'SystemServices/src/SystemServicesConfig.cs' | |||
3421 | --- SystemServices/src/SystemServicesConfig.cs 2008-12-31 20:57:41 +0000 | |||
3422 | +++ SystemServices/src/SystemServicesConfig.cs 2009-06-19 08:23:32 +0000 | |||
3423 | @@ -20,12 +20,13 @@ | |||
3424 | 20 | using System.Collections.Generic; | 20 | using System.Collections.Generic; |
3425 | 21 | using Gtk; | 21 | using Gtk; |
3426 | 22 | using Mono.Unix; | 22 | using Mono.Unix; |
3427 | 23 | using Do.Platform.Linux; | ||
3428 | 23 | 24 | ||
3429 | 24 | namespace SystemServices { | 25 | namespace SystemServices { |
3430 | 25 | 26 | ||
3431 | 26 | [System.ComponentModel.Category("SystemServices")] | 27 | [System.ComponentModel.Category("SystemServices")] |
3432 | 27 | [System.ComponentModel.ToolboxItem(true)] | 28 | [System.ComponentModel.ToolboxItem(true)] |
3434 | 28 | public partial class SystemServicesConfig : Gtk.Bin | 29 | public partial class SystemServicesConfig : Gtk.Bin, IConfigurable |
3435 | 29 | { | 30 | { |
3436 | 30 | public SystemServicesConfig () { | 31 | public SystemServicesConfig () { |
3437 | 31 | this.Build (); | 32 | this.Build (); |
3438 | @@ -43,6 +44,15 @@ | |||
3439 | 43 | this.eCommand.Text = SystemServices.SudoCommand; | 44 | this.eCommand.Text = SystemServices.SudoCommand; |
3440 | 44 | } | 45 | } |
3441 | 45 | 46 | ||
3442 | 47 | public string Title { | ||
3443 | 48 | get { return Catalog.GetString ("System Services"); } | ||
3444 | 49 | } | ||
3445 | 50 | |||
3446 | 51 | public Gtk.Bin GetConfiguration () | ||
3447 | 52 | { | ||
3448 | 53 | return this; | ||
3449 | 54 | } | ||
3450 | 55 | |||
3451 | 46 | /// <summary> | 56 | /// <summary> |
3452 | 47 | /// On update eCommand textbox save this text to preferences. | 57 | /// On update eCommand textbox save this text to preferences. |
3453 | 48 | /// </summary> | 58 | /// </summary> |
3454 | 49 | 59 | ||
3455 | === modified file 'Tomboy/Resources/Tomboy.addin.xml' | |||
3456 | --- Tomboy/Resources/Tomboy.addin.xml 2009-06-11 07:36:57 +0000 | |||
3457 | +++ Tomboy/Resources/Tomboy.addin.xml 2009-06-19 08:23:32 +0000 | |||
3458 | @@ -15,6 +15,7 @@ | |||
3459 | 15 | 15 | ||
3460 | 16 | <Dependencies> | 16 | <Dependencies> |
3461 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3462 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3463 | 18 | </Dependencies> | 19 | </Dependencies> |
3464 | 19 | 20 | ||
3465 | 20 | <Extension path="/Do/ItemSource"> | 21 | <Extension path="/Do/ItemSource"> |
3466 | @@ -24,4 +25,7 @@ | |||
3467 | 24 | <Action type="Tomboy.NewNoteAction" /> | 25 | <Action type="Tomboy.NewNoteAction" /> |
3468 | 25 | <Action type="Tomboy.SearchNotesAction" /> | 26 | <Action type="Tomboy.SearchNotesAction" /> |
3469 | 26 | </Extension> | 27 | </Extension> |
3470 | 28 | <Extension path= "/Do/Config"> | ||
3471 | 29 | <Config type="Tomboy.TomboyConfiguration" /> | ||
3472 | 30 | </Extension> | ||
3473 | 27 | </Addin> | 31 | </Addin> |
3474 | 28 | 32 | ||
3475 | === modified file 'Tomboy/src/NewNoteAction.cs' | |||
3476 | --- Tomboy/src/NewNoteAction.cs 2009-01-21 19:21:55 +0000 | |||
3477 | +++ Tomboy/src/NewNoteAction.cs 2009-06-20 02:49:57 +0000 | |||
3478 | @@ -30,7 +30,7 @@ | |||
3479 | 30 | namespace Tomboy | 30 | namespace Tomboy |
3480 | 31 | { | 31 | { |
3481 | 32 | 32 | ||
3483 | 33 | public class NewNoteAction : Act, IConfigurable | 33 | public class NewNoteAction : Act |
3484 | 34 | { | 34 | { |
3485 | 35 | 35 | ||
3486 | 36 | public override string Name { | 36 | public override string Name { |
3487 | @@ -86,10 +86,5 @@ | |||
3488 | 86 | 86 | ||
3489 | 87 | yield break; | 87 | yield break; |
3490 | 88 | } | 88 | } |
3491 | 89 | |||
3492 | 90 | public Gtk.Bin GetConfiguration () | ||
3493 | 91 | { | ||
3494 | 92 | return new TomboyConfiguration (); | ||
3495 | 93 | } | ||
3496 | 94 | } | 89 | } |
3497 | 95 | } | 90 | } |
3498 | 96 | 91 | ||
3499 | === modified file 'Tomboy/src/TomboyConfiguration.cs' | |||
3500 | --- Tomboy/src/TomboyConfiguration.cs 2009-01-21 19:21:55 +0000 | |||
3501 | +++ Tomboy/src/TomboyConfiguration.cs 2009-06-19 08:23:32 +0000 | |||
3502 | @@ -26,7 +26,10 @@ | |||
3503 | 26 | 26 | ||
3504 | 27 | using System; | 27 | using System; |
3505 | 28 | 28 | ||
3506 | 29 | using Mono.Unix; | ||
3507 | 30 | |||
3508 | 29 | using Do.Platform; | 31 | using Do.Platform; |
3509 | 32 | using Do.Platform.Linux; | ||
3510 | 30 | 33 | ||
3511 | 31 | namespace Tomboy | 34 | namespace Tomboy |
3512 | 32 | { | 35 | { |
3513 | @@ -34,7 +37,7 @@ | |||
3514 | 34 | 37 | ||
3515 | 35 | [System.ComponentModel.Category("Tomboy")] | 38 | [System.ComponentModel.Category("Tomboy")] |
3516 | 36 | [System.ComponentModel.ToolboxItem(true)] | 39 | [System.ComponentModel.ToolboxItem(true)] |
3518 | 37 | public partial class TomboyConfiguration : Gtk.Bin | 40 | public partial class TomboyConfiguration : Gtk.Bin, IConfigurable |
3519 | 38 | { | 41 | { |
3520 | 39 | private const string DeriveTitlePrefKey = "deriveTitle"; | 42 | private const string DeriveTitlePrefKey = "deriveTitle"; |
3521 | 40 | private const string TitleFirstPrefKey = "titleFirst"; | 43 | private const string TitleFirstPrefKey = "titleFirst"; |
3522 | @@ -45,6 +48,15 @@ | |||
3523 | 45 | { | 48 | { |
3524 | 46 | prefs = Services.Preferences.Get<TomboyConfiguration> (); | 49 | prefs = Services.Preferences.Get<TomboyConfiguration> (); |
3525 | 47 | } | 50 | } |
3526 | 51 | |||
3527 | 52 | public string Title { | ||
3528 | 53 | get { return Catalog.GetString ("Tomboy"); } | ||
3529 | 54 | } | ||
3530 | 55 | |||
3531 | 56 | public Gtk.Bin GetConfiguration () | ||
3532 | 57 | { | ||
3533 | 58 | return this; | ||
3534 | 59 | } | ||
3535 | 48 | 60 | ||
3536 | 49 | public static bool DeriveTitle | 61 | public static bool DeriveTitle |
3537 | 50 | { | 62 | { |
3538 | 51 | 63 | ||
3539 | === modified file 'Translate/Resources/Translate.addin.xml' | |||
3540 | --- Translate/Resources/Translate.addin.xml 2009-04-21 03:02:19 +0000 | |||
3541 | +++ Translate/Resources/Translate.addin.xml 2009-06-19 08:23:32 +0000 | |||
3542 | @@ -15,9 +15,13 @@ | |||
3543 | 15 | 15 | ||
3544 | 16 | <Dependencies> | 16 | <Dependencies> |
3545 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3546 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3547 | 18 | </Dependencies> | 19 | </Dependencies> |
3548 | 19 | 20 | ||
3549 | 20 | <Extension path="/Do/Action"> | 21 | <Extension path="/Do/Action"> |
3550 | 21 | <Action type="Translate.TranslateAction"/> | 22 | <Action type="Translate.TranslateAction"/> |
3551 | 22 | </Extension> | 23 | </Extension> |
3552 | 24 | <Extension path= "/Do/Config"> | ||
3553 | 25 | <Config type="Translate.ConfigUI" /> | ||
3554 | 26 | </Extension> | ||
3555 | 23 | </Addin> | 27 | </Addin> |
3556 | 24 | 28 | ||
3557 | === modified file 'Translate/src/TranslateAction.cs' | |||
3558 | --- Translate/src/TranslateAction.cs 2009-04-08 15:19:19 +0000 | |||
3559 | +++ Translate/src/TranslateAction.cs 2009-06-20 02:49:57 +0000 | |||
3560 | @@ -33,7 +33,7 @@ | |||
3561 | 33 | namespace Translate | 33 | namespace Translate |
3562 | 34 | { | 34 | { |
3563 | 35 | 35 | ||
3565 | 36 | public class TranslateAction : Act, IConfigurable | 36 | public class TranslateAction : Act |
3566 | 37 | { | 37 | { |
3567 | 38 | 38 | ||
3568 | 39 | const string UrlPattern = "^(https?://)" | 39 | const string UrlPattern = "^(https?://)" |
3569 | @@ -126,11 +126,6 @@ | |||
3570 | 126 | Services.Environment.OpenUrl (url); | 126 | Services.Environment.OpenUrl (url); |
3571 | 127 | } | 127 | } |
3572 | 128 | yield break; | 128 | yield break; |
3573 | 129 | } | ||
3574 | 130 | |||
3575 | 131 | public Gtk.Bin GetConfiguration () | ||
3576 | 132 | { | ||
3577 | 133 | return new ConfigUI (); | ||
3578 | 134 | } | 129 | } |
3579 | 135 | } | 130 | } |
3580 | 136 | } | ||
3581 | 137 | \ No newline at end of file | 131 | \ No newline at end of file |
3582 | 132 | } | ||
3583 | 138 | 133 | ||
3584 | === modified file 'Translate/src/UI/ConfigUI.cs' | |||
3585 | --- Translate/src/UI/ConfigUI.cs 2009-04-08 07:03:00 +0000 | |||
3586 | +++ Translate/src/UI/ConfigUI.cs 2009-06-20 02:26:06 +0000 | |||
3587 | @@ -22,13 +22,14 @@ | |||
3588 | 22 | using System.Collections.Generic; | 22 | using System.Collections.Generic; |
3589 | 23 | using System.Threading; | 23 | using System.Threading; |
3590 | 24 | using Do.Platform; | 24 | using Do.Platform; |
3591 | 25 | using Do.Platform.Linux; | ||
3592 | 25 | 26 | ||
3593 | 26 | using Mono.Unix; | 27 | using Mono.Unix; |
3594 | 27 | 28 | ||
3595 | 28 | namespace Translate | 29 | namespace Translate |
3596 | 29 | { | 30 | { |
3597 | 30 | 31 | ||
3599 | 31 | public partial class ConfigUI : Gtk.Bin | 32 | public partial class ConfigUI : Gtk.Bin, IConfigurable |
3600 | 32 | { | 33 | { |
3601 | 33 | static IPreferences TranslatePluginPrefs; | 34 | static IPreferences TranslatePluginPrefs; |
3602 | 34 | 35 | ||
3603 | @@ -42,7 +43,16 @@ | |||
3604 | 42 | { | 43 | { |
3605 | 43 | TranslatePluginPrefs = Services.Preferences.Get<Translate.ConfigUI> (); | 44 | TranslatePluginPrefs = Services.Preferences.Get<Translate.ConfigUI> (); |
3606 | 44 | } | 45 | } |
3608 | 45 | 46 | ||
3609 | 47 | public string Title { | ||
3610 | 48 | get { return Catalog.GetString ("Translate"); } | ||
3611 | 49 | } | ||
3612 | 50 | |||
3613 | 51 | public Gtk.Bin GetConfiguration () | ||
3614 | 52 | { | ||
3615 | 53 | return this; | ||
3616 | 54 | } | ||
3617 | 55 | |||
3618 | 46 | public void SetupColumns () | 56 | public void SetupColumns () |
3619 | 47 | { | 57 | { |
3620 | 48 | //setup columns | 58 | //setup columns |
3621 | 49 | 59 | ||
3622 | === modified file 'YouTube/Resources/Youtube.addin.xml' | |||
3623 | --- YouTube/Resources/Youtube.addin.xml 2009-05-07 19:49:44 +0000 | |||
3624 | +++ YouTube/Resources/Youtube.addin.xml 2009-06-19 08:23:32 +0000 | |||
3625 | @@ -15,6 +15,7 @@ | |||
3626 | 15 | 15 | ||
3627 | 16 | <Dependencies> | 16 | <Dependencies> |
3628 | 17 | <Addin id="Universe" version="1.0" /> | 17 | <Addin id="Universe" version="1.0" /> |
3629 | 18 | <Addin id="Platform.Linux" version="1.0" /> | ||
3630 | 18 | </Dependencies> | 19 | </Dependencies> |
3631 | 19 | 20 | ||
3632 | 20 | <!-- Extensions included in this assembly --> | 21 | <!-- Extensions included in this assembly --> |
3633 | @@ -27,4 +28,7 @@ | |||
3634 | 27 | <Extension path = "/Do/Action"> | 28 | <Extension path = "/Do/Action"> |
3635 | 28 | <Action type="Do.Universe.YouTubeSearchAction" /> | 29 | <Action type="Do.Universe.YouTubeSearchAction" /> |
3636 | 29 | </Extension> | 30 | </Extension> |
3637 | 31 | <Extension path= "/Do/Config"> | ||
3638 | 32 | <Config type="Do.Universe.YouTubeConfig" /> | ||
3639 | 33 | </Extension> | ||
3640 | 30 | </Addin> | 34 | </Addin> |
3641 | 31 | 35 | ||
3642 | === modified file 'YouTube/src/YouTubeFavoriteItemSource.cs' | |||
3643 | --- YouTube/src/YouTubeFavoriteItemSource.cs 2009-02-06 19:23:56 +0000 | |||
3644 | +++ YouTube/src/YouTubeFavoriteItemSource.cs 2009-06-19 08:23:32 +0000 | |||
3645 | @@ -8,7 +8,7 @@ | |||
3646 | 8 | 8 | ||
3647 | 9 | namespace Do.Universe | 9 | namespace Do.Universe |
3648 | 10 | { | 10 | { |
3650 | 11 | public class YouTubeFavoriteItemSource : ItemSource, IConfigurable | 11 | public class YouTubeFavoriteItemSource : ItemSource |
3651 | 12 | { | 12 | { |
3652 | 13 | public YouTubeFavoriteItemSource() | 13 | public YouTubeFavoriteItemSource() |
3653 | 14 | { | 14 | { |
3654 | @@ -34,11 +34,5 @@ | |||
3655 | 34 | t.IsBackground = true; | 34 | t.IsBackground = true; |
3656 | 35 | t.Start(); | 35 | t.Start(); |
3657 | 36 | } | 36 | } |
3658 | 37 | |||
3659 | 38 | public Gtk.Bin GetConfiguration () | ||
3660 | 39 | { | ||
3661 | 40 | return new YouTubeConfig (); | ||
3662 | 41 | } | ||
3663 | 42 | |||
3664 | 43 | } | 37 | } |
3665 | 44 | } | 38 | } |
3666 | 45 | 39 | ||
3667 | === modified file 'YouTube/src/YoutubeConfig.cs' | |||
3668 | --- YouTube/src/YoutubeConfig.cs 2009-02-01 20:19:36 +0000 | |||
3669 | +++ YouTube/src/YoutubeConfig.cs 2009-06-19 08:23:32 +0000 | |||
3670 | @@ -2,11 +2,12 @@ | |||
3671 | 2 | using Gtk; | 2 | using Gtk; |
3672 | 3 | using Do.Platform; | 3 | using Do.Platform; |
3673 | 4 | using Do.Platform.Linux; | 4 | using Do.Platform.Linux; |
3674 | 5 | using Mono.Unix; | ||
3675 | 5 | 6 | ||
3676 | 6 | namespace Do.Universe | 7 | namespace Do.Universe |
3677 | 7 | { | 8 | { |
3678 | 8 | 9 | ||
3680 | 9 | public class YouTubeConfig : AbstractLoginWidget | 10 | public class YouTubeConfig : AbstractLoginWidget, IConfigurable |
3681 | 10 | { | 11 | { |
3682 | 11 | const string Uri = "http://www.youtube.com/signup?next_url=/index&"; | 12 | const string Uri = "http://www.youtube.com/signup?next_url=/index&"; |
3683 | 12 | 13 | ||
3684 | @@ -15,8 +16,16 @@ | |||
3685 | 15 | Username = Youtube.Preferences.Username; | 16 | Username = Youtube.Preferences.Username; |
3686 | 16 | Password = Youtube.Preferences.Password; | 17 | Password = Youtube.Preferences.Password; |
3687 | 17 | } | 18 | } |
3690 | 18 | 19 | ||
3691 | 19 | 20 | public string Title { | |
3692 | 21 | get { return Catalog.GetString ("Youtube"); } | ||
3693 | 22 | } | ||
3694 | 23 | |||
3695 | 24 | public Gtk.Bin GetConfiguration () | ||
3696 | 25 | { | ||
3697 | 26 | return this; | ||
3698 | 27 | } | ||
3699 | 28 | |||
3700 | 20 | protected override void SaveAccountData(string username, string password) | 29 | protected override void SaveAccountData(string username, string password) |
3701 | 21 | { | 30 | { |
3702 | 22 | Youtube.Preferences.Username = username; | 31 | Youtube.Preferences.Username = username; |