Merge lp:~cszikszoy/do-plugins/MA-Config-Extension into lp:do-plugins

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
Reviewer Review Type Date Requested Status
Do Plugins Team Pending
Review via email: mp+7701@code.launchpad.net
To post a comment you must log in.
635. By Chris S.

change extension name to Configuration

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

Subscribers

People subscribed via source and target branches