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
=== modified file 'Bibtex/Bibtex.mdp'
--- Bibtex/Bibtex.mdp 2009-02-28 16:16:48 +0000
+++ Bibtex/Bibtex.mdp 2009-06-20 02:11:31 +0000
@@ -35,5 +35,6 @@
35 <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />35 <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
36 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />36 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
37 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />37 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
38 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
38 </References>39 </References>
39</Project>40</Project>
40\ No newline at end of file41\ No newline at end of file
4142
=== modified file 'Bibtex/Resources/Bibtex.addin.xml'
--- Bibtex/Resources/Bibtex.addin.xml 2009-03-31 23:19:25 +0000
+++ Bibtex/Resources/Bibtex.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path = "/Do/Action">21 <Extension path = "/Do/Action">
@@ -23,4 +24,7 @@
23 <Extension path = "/Do/ItemSource">24 <Extension path = "/Do/ItemSource">
24 <ItemSource type="Bibtex.BibtexItemSource" />25 <ItemSource type="Bibtex.BibtexItemSource" />
25 </Extension>26 </Extension>
27 <Extension path= "/Do/Config">
28 <Config type="Bibtex.Configuration" />
29 </Extension>
26</Addin>30</Addin>
2731
=== modified file 'Bibtex/gtk-gui/gui.stetic'
--- Bibtex/gtk-gui/gui.stetic 2009-01-22 12:54:17 +0000
+++ Bibtex/gtk-gui/gui.stetic 2009-06-20 02:11:31 +0000
@@ -2,8 +2,11 @@
2<stetic-interface>2<stetic-interface>
3 <configuration>3 <configuration>
4 <images-root-path>..</images-root-path>4 <images-root-path>..</images-root-path>
5 <target-gtk-version>2.12.1</target-gtk-version>5 <target-gtk-version>2.12</target-gtk-version>
6 </configuration>6 </configuration>
7 <import>
8 <widget-library name="../bin/Debug/Bibtex.dll" internal="true" />
9 </import>
7 <widget class="Gtk.Bin" id="Bibtex.Configuration" design-size="375 300">10 <widget class="Gtk.Bin" id="Bibtex.Configuration" design-size="375 300">
8 <property name="MemberName" />11 <property name="MemberName" />
9 <child>12 <child>
@@ -97,4 +100,4 @@
97 </widget>100 </widget>
98 </child>101 </child>
99 </widget>102 </widget>
100</stetic-interface>103</stetic-interface>
101\ No newline at end of file104\ No newline at end of file
102105
=== modified file 'Bibtex/gtk-gui/objects.xml'
--- Bibtex/gtk-gui/objects.xml 2008-12-29 18:23:07 +0000
+++ Bibtex/gtk-gui/objects.xml 2009-06-20 02:30:06 +0000
@@ -1,5 +1,5 @@
1<objects attr-sync="on">1<objects attr-sync="on">
2 <object type="Do.Addins.Bibtex.Configuration" palette-category="Bibtex" allow-children="false" base-type="Gtk.Bin">2 <object type="Bibtex.Configuration" palette-category="Bibtex" allow-children="false" base-type="Gtk.Bin">
3 <itemgroups>3 <itemgroups>
4 <itemgroup label="Configuration Properties">4 <itemgroup label="Configuration Properties">
5 <property name="BibtexFilePath" />5 <property name="BibtexFilePath" />
66
=== modified file 'Bibtex/src/BibtexItemSource.cs'
--- Bibtex/src/BibtexItemSource.cs 2009-05-29 09:39:41 +0000
+++ Bibtex/src/BibtexItemSource.cs 2009-06-19 19:14:09 +0000
@@ -25,9 +25,11 @@
25using Do.Platform.Linux;25using Do.Platform.Linux;
2626
2727
28namespace Bibtex {28namespace Bibtex
29{
2930
30 public class BibtexItemSource : ItemSource, IConfigurable {31 public class BibtexItemSource : ItemSource
32 {
31 33
32 Regex fileRegex = new Regex (@"file\s=\s\{(.*?)\}",34 Regex fileRegex = new Regex (@"file\s=\s\{(.*?)\}",
33 RegexOptions.IgnoreCase35 RegexOptions.IgnoreCase
3436
=== modified file 'Bibtex/src/Configuration.cs'
--- Bibtex/src/Configuration.cs 2009-01-22 12:54:17 +0000
+++ Bibtex/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -19,13 +19,15 @@
19 */19 */
20using System;20using System;
21using Do.Platform;21using Do.Platform;
22using Do.Platform.Linux;
23using Mono.Unix;
2224
23namespace Bibtex25namespace Bibtex
24{26{
2527
26 [System.ComponentModel.Category("Bibtex")]28 [System.ComponentModel.Category("Bibtex")]
27 [System.ComponentModel.ToolboxItem(true)]29 [System.ComponentModel.ToolboxItem(true)]
28 public partial class Configuration : Gtk.Bin30 public partial class Configuration : Gtk.Bin, IConfigurable
29 {31 {
30 private static IPreferences prefs;32 private static IPreferences prefs;
31 33
@@ -41,6 +43,15 @@
41 prefs = Do.Platform.Services.Preferences.Get<Bibtex.Configuration>();43 prefs = Do.Platform.Services.Preferences.Get<Bibtex.Configuration>();
42 }44 }
4345
46 public string Title {
47 get { return Catalog.GetString ("Bibtex"); }
48 }
49
50 public Gtk.Bin GetConfiguration ()
51 {
52 return this;
53 }
54
44 public static string BibtexFilePath {55 public static string BibtexFilePath {
45 get { return prefs.Get<string>("bibtexfilepath", System.IO.Path.Combine (System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "bibtex.bib")); }56 get { return prefs.Get<string>("bibtexfilepath", System.IO.Path.Combine (System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "bibtex.bib")); }
46 set { prefs.Set <string> ("bibtexfilepath", value); }57 set { prefs.Set <string> ("bibtexfilepath", value); }
4758
=== modified file 'Confluence/Confluence.mdp'
--- Confluence/Confluence.mdp 2009-02-28 16:16:48 +0000
+++ Confluence/Confluence.mdp 2009-06-20 02:16:49 +0000
@@ -1,9 +1,10 @@
1<Project name="Confluence" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="2.0" ctype="DotNetProject">1<Project name="Confluence" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
2 <Configurations active="Debug">2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
4 <Output directory="bin/Debug" assembly="Confluence" />4 <Output directory="bin/Debug" assembly="Confluence" />
5 <Build debugmode="True" target="Library" />5 <Build debugmode="True" target="Library" />
6 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />6 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
7 <EnvironmentVariables />
7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />8 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
8 </Configuration>9 </Configuration>
9 <Configuration name="Release" ctype="DotNetProjectConfiguration">10 <Configuration name="Release" ctype="DotNetProjectConfiguration">
@@ -22,7 +23,6 @@
22 <File name="gtk-gui/Confluence.ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" />23 <File name="gtk-gui/Confluence.ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" />
23 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />24 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />
24 <File name="src/ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" />25 <File name="src/ConfluenceConfigWidget.cs" subtype="Code" buildaction="Compile" />
25 <File name="src/ConfluenceConfiguration.cs" subtype="Code" buildaction="Compile" />
26 <File name="Resources/Confluence.addin.xml" subtype="Code" buildaction="EmbedAsResource" />26 <File name="Resources/Confluence.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
27 <File name="Resources/icons/confluence.png" subtype="Code" buildaction="Nothing" />27 <File name="Resources/icons/confluence.png" subtype="Code" buildaction="Nothing" />
28 </Contents>28 </Contents>
@@ -31,7 +31,6 @@
31 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />31 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
32 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />32 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
33 <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />33 <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
34 <ProjectReference type="Gac" localcopy="True" refto="gconf-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
35 <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />34 <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
36 <ProjectReference type="Gac" localcopy="True" refto="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />35 <ProjectReference type="Gac" localcopy="True" refto="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
37 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />36 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
3837
=== modified file 'Confluence/Makefile.am'
--- Confluence/Makefile.am 2009-01-09 07:45:01 +0000
+++ Confluence/Makefile.am 2009-06-20 02:11:31 +0000
@@ -5,7 +5,6 @@
5FILES = \5FILES = \
6 gtk-gui/Confluence.ConfluenceConfigWidget.cs \6 gtk-gui/Confluence.ConfluenceConfigWidget.cs \
7 gtk-gui/generated.cs \7 gtk-gui/generated.cs \
8 src/ConfluenceConfiguration.cs \
9 src/ConfluenceConfigWidget.cs \8 src/ConfluenceConfigWidget.cs \
10 src/ConfluenceSearchAction.cs \9 src/ConfluenceSearchAction.cs \
11 src/Remote/ConfluenceSoapServiceService.cs10 src/Remote/ConfluenceSoapServiceService.cs
@@ -24,5 +23,4 @@
24 System.Web.Services \23 System.Web.Services \
25 System.Xml \24 System.Xml \
26 $(GTK_SHARP_20_LIBS) \25 $(GTK_SHARP_20_LIBS) \
27 $(GCONF_SHARP_20_LIBS) \
28 $(DO_PLATFORM_LINUX_LIBS)26 $(DO_PLATFORM_LINUX_LIBS)
2927
=== modified file 'Confluence/Resources/Confluence.addin.xml'
--- Confluence/Resources/Confluence.addin.xml 2009-03-31 23:19:25 +0000
+++ Confluence/Resources/Confluence.addin.xml 2009-06-20 02:39:35 +0000
@@ -15,10 +15,13 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path = "/Do/Action">21 <Extension path = "/Do/Action">
21 <Action type="Confluence.ConfluenceSearchAction" />22 <Action type="Confluence.ConfluenceSearchAction" />
22 </Extension>23 </Extension>
2324 <Extension path= "/Do/Config">
25 <Config type="Confluence.ConfluenceConfigWidget" />
26 </Extension>
24</Addin>27</Addin>
2528
=== modified file 'Confluence/gtk-gui/objects.xml'
--- Confluence/gtk-gui/objects.xml 2008-12-29 18:23:07 +0000
+++ Confluence/gtk-gui/objects.xml 2009-06-20 02:11:31 +0000
@@ -1,6 +1,13 @@
1<objects attr-sync="on">1<objects attr-sync="on">
2 <object type="Confluence.ConfluenceConfigWidget" palette-category="Confluence" allow-children="false" base-type="Gtk.Bin">2 <object type="Confluence.ConfluenceConfigWidget" palette-category="Confluence" allow-children="false" base-type="Gtk.Bin">
3 <itemgroups />3 <itemgroups>
4 <itemgroup label="ConfluenceConfigWidget Properties">
5 <property name="BaseURL" />
6 <property name="UserName" />
7 <property name="Password" />
8 <property name="MaxResults" />
9 </itemgroup>
10 </itemgroups>
4 <signals />11 <signals />
5 </object>12 </object>
6</objects>13</objects>
7\ No newline at end of file14\ No newline at end of file
815
=== modified file 'Confluence/src/ConfluenceConfigWidget.cs'
--- Confluence/src/ConfluenceConfigWidget.cs 2008-12-24 04:37:17 +0000
+++ Confluence/src/ConfluenceConfigWidget.cs 2009-06-20 02:39:35 +0000
@@ -16,59 +16,101 @@
1616
17using System;17using System;
1818
19using Do.Platform;
20using Do.Platform.Linux;
21using Mono.Unix;
22
19namespace Confluence23namespace Confluence
20{24{
21 [System.ComponentModel.Category("Confluence")]25 [System.ComponentModel.Category("Confluence")]
22 [System.ComponentModel.ToolboxItem(true)]26 [System.ComponentModel.ToolboxItem(true)]
23 public partial class ConfluenceConfigWidget : Gtk.Bin27 public partial class ConfluenceConfigWidget : Gtk.Bin, IConfigurable
24 {28 {
25 private ConfluenceSearchAction _confluenceSearch;29 private readonly int DefaultMaxResults = 20;
26 30 static IPreferences Prefs;
27 public ConfluenceConfigWidget(ConfluenceSearchAction confluenceSearch)31
28 {32 public ConfluenceConfigWidget ()
29 this.Build();33 {
30 _confluenceSearch = confluenceSearch;34 this.Build ();
31 SetFieldsFromConfig( _confluenceSearch.Config );35 SetFieldsFromConfig ();
36 }
37
38 static ConfluenceConfigWidget ()
39 {
40 Prefs = Services.Preferences.Get<Confluence.ConfluenceConfigWidget> ();
41 }
42
43 public string Title {
44 get { return Catalog.GetString ("Confluence"); }
45 }
46
47 public Gtk.Bin GetConfiguration ()
48 {
49 return this;
32 }50 }
33 51
34 protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e)52 protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e)
35 {53 {
36 _confluenceSearch.Log( "Re-init Confluence Plugin with new settings..." );54 GetConfigFromFields ();
37
38 _confluenceSearch.Config = GetConfigFromFields();
39 55
40 // Write the config back out to the fields to reflect how we saved it56 // Write the config back out to the fields to reflect how we saved it
41 SetFieldsFromConfig( _confluenceSearch.Config );57 SetFieldsFromConfig ();
42 }58 }
4359
44 // Bindings...60 // Bindings...
45 61
46 private void SetFieldsFromConfig( IConfluenceConfiguration config )62 private void SetFieldsFromConfig ()
47 {63 {
48 _entryBaseUrl.Text = config.BaseUrl;64 _entryBaseUrl.Text = BaseURL;
49 _entryUsername.Text = config.Username;65 _entryUsername.Text = UserName;
50 _entryPassword.Text = config.Password;66 _entryPassword.Text = Password;
51 _entryMaxSearchResults.Text = Convert.ToString(config.MaxSearchResults);67 _entryMaxSearchResults.Text = MaxResults.ToString ();
52 }68 }
53 69
54 private IConfluenceConfiguration GetConfigFromFields()70 private void GetConfigFromFields ()
55 {71 {
56 ConfluenceConfiguration config = new ConfluenceConfiguration();72 BaseURL = _entryBaseUrl.Text;
57 config.BaseUrl = _entryBaseUrl.Text;73 UserName = _entryUsername.Text;
58 config.Username = _entryUsername.Text;74 Password = _entryPassword.Text;
59 config.Password = _entryPassword.Text;75
60 76 try {
61 try 77 MaxResults = Convert.ToInt32(_entryMaxSearchResults.Text);
62 {78 } catch (FormatException) {
63 config.MaxSearchResults = Convert.ToInt32(_entryMaxSearchResults.Text);79 Log<ConfluenceConfigWidget>.Debug ("Invalid max search results specified. Setting to default value.");
64 } 80 MaxResults = DefaultMaxResults;
65 catch (FormatException) 81 }
66 {82 }
67 _confluenceSearch.Log( "Invalid max search results specified. Setting to default value." );83
68 config.MaxSearchResults = config.DefaultMaxSearchResults;84 public static string BaseURL
69 }85 {
70 86 get {
71 return config;87 return Prefs.Get<string> ("BaseURL", "");
72 }88 }
89 set { Prefs.Set<string> ("BaseURL", value); }
90 }
91
92 public static string UserName
93 {
94 get {
95 return Prefs.Get<string> ("UserName", "");
96 }
97 set { Prefs.Set<string> ("UserName", value); }
98 }
99
100 public static string Password
101 {
102 get {
103 return Prefs.GetSecure<string> ("Password", "");
104 }
105 set { Prefs.SetSecure<string> ("Password", value); }
106 }
107
108 public static int MaxResults
109 {
110 get {
111 return Prefs.Get<int> ("MaxResults", 20);
112 }
113 set { Prefs.Set<int> ("MaxResults", value); }
114 }
73 }115 }
74}116}
75117
=== removed file 'Confluence/src/ConfluenceConfiguration.cs'
--- Confluence/src/ConfluenceConfiguration.cs 2008-12-24 04:37:17 +0000
+++ Confluence/src/ConfluenceConfiguration.cs 1970-01-01 00:00:00 +0000
@@ -1,149 +0,0 @@
1//
2// This program is free software; you can redistribute it and/or modify
3// it under the terms of the GNU General Public License as published by
4// the Free Software Foundation; either version 3 of the License, or
5// (at your option) any later version.
6//
7// This program is distributed in the hope that it will be useful,
8// but WITHOUT ANY WARRANTY; without even the implied warranty of
9// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10// GNU General Public License for more details.
11//
12// You should have received a copy of the GNU General Public License
13// along with this program; if not, write to the Free Software
14// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15//
16
17using System;
18
19
20namespace Confluence
21{
22 public interface IConfluenceConfiguration
23 {
24 string BaseUrl
25 {
26 get;
27 }
28
29 string Username
30 {
31 get;
32 }
33
34 string Password
35 {
36 get;
37 }
38
39 int MaxSearchResults
40 {
41 get;
42 }
43
44 /// <value>
45 /// To be valid, all required fields must be filled out
46 /// </value>
47 bool IsValid();
48 }
49
50 /// <summary>
51 /// Configuration that uses gconf to do the magic
52 /// </summary>
53 public class ConfluenceConfiguration : IConfluenceConfiguration
54 {
55 /// <summary>
56 /// The gnome conf key that contains the base url for our Confluence installation.
57 /// ie. http://opensource.atlassian.com/confluence/spring
58 /// </summary>
59 private const string _sGCONF_KEY= "/apps/gnome-do/plugins/Confluence";
60
61 private GConf.Client _gconf;
62
63 public ConfluenceConfiguration()
64 {
65 _gconf= new GConf.Client();
66
67 // Set defaults
68 MaxSearchResults = DefaultMaxSearchResults;
69 }
70
71 private void SetConfValue( string key, string val )
72 {
73 _gconf.Set( _sGCONF_KEY + "/" + key, val );
74 }
75
76 private string GetConfValue( string key, string fallback )
77 {
78 try
79 {
80 return _gconf.Get( _sGCONF_KEY + "/" + key ) as String;
81 }
82 catch( GConf.NoSuchKeyException )
83 {
84 return fallback;
85 }
86 }
87
88 public string BaseUrl
89 {
90 get { return GetConfValue( "baseUrl", "" ); }
91 set
92 {
93 value = value.Trim();
94 if (value.EndsWith("/"))
95 {
96 char[] trimChars = { '/' };
97 value = value.TrimEnd(trimChars);
98 }
99
100 SetConfValue( "baseUrl", value );
101 }
102 }
103
104 public string Username
105 {
106 get { return GetConfValue( "username", "" ); }
107 set { SetConfValue( "username", value ); }
108 }
109
110 public string Password
111 {
112 get { return GetConfValue( "password", "" ); }
113 set { SetConfValue( "password", value ); }
114 }
115
116 public int MaxSearchResults
117 {
118 get
119 {
120 try
121 {
122 return Convert.ToInt32(GetConfValue( "maxSearchResults", "" ));
123 }
124 catch (FormatException)
125 {
126 return DefaultMaxSearchResults;
127 }
128 }
129
130 set { SetConfValue( "maxSearchResults", Convert.ToString( value )); }
131 }
132
133 public int DefaultMaxSearchResults
134 {
135 get
136 {
137 return 20;
138 }
139 }
140
141 /// <value>
142 /// To be valid, all required fields must be filled out
143 /// </value>
144 public bool IsValid()
145 {
146 return BaseUrl.Length>0;
147 }
148 }
149}
1500
=== modified file 'Confluence/src/ConfluenceSearchAction.cs'
--- Confluence/src/ConfluenceSearchAction.cs 2008-12-24 04:37:17 +0000
+++ Confluence/src/ConfluenceSearchAction.cs 2009-06-20 02:39:35 +0000
@@ -20,123 +20,56 @@
20using System.Linq;20using System.Linq;
21using System.Collections.Generic;21using System.Collections.Generic;
22using Do.Universe;22using Do.Universe;
23using Do.Universe.Common;
24using Do.Platform;
23using Do.Platform.Linux;25using Do.Platform.Linux;
24using Mono.Unix;26using Mono.Unix;
2527
26
27/// <summary>28/// <summary>
28/// Do plug-in that returns search results from a Confluence wiki back to 29/// Do plug-in that returns search results from a Confluence wiki back to
29/// gnome-do for display and selection by the user30/// gnome-do for display and selection by the user
30/// </summary>31/// </summary>
31namespace Confluence32namespace Confluence
32{ 33{
33 34 public class ConfluenceSearchAction : Act
34 // No longer in Do, have to subclass
35 public class BookmarkItem : Item, IBookmarkItem
36 {35 {
37 protected string name, url;
38 public BookmarkItem (string name, string url)
39 {
40 this.name = name;
41 this.url = url;
42 }
43
44 public override string Name
45 {
46 get { return name; }
47 }
48
49 public override string Description
50 {
51 get { return url; }
52 }
53
54 public override string Icon
55 {
56 get { return "www"; }
57 }
58
59 public string Url
60 {
61 get { return url; }
62 }
63 }
64
65 public class ConfluenceSearchAction : Act, IConfigurable
66 {
67 /// <summary>
68 /// Our configuration for Confluence properties
69 /// </summary>
70 private IConfluenceConfiguration _config;
71
72 /// <summary>
73 /// Initializes ConfluenceSearchAction
74 /// </summary>
75 public ConfluenceSearchAction()
76 {
77 _config = new ConfluenceConfiguration();
78 }
79
80 /// <value>36 /// <value>
81 /// The name of the plugin37 /// The name of the plugin
82 /// </value>38 /// </value>
83 public override string Name 39 public override string Name {
84 {
85 get { return Catalog.GetString ("Search Confluence"); }40 get { return Catalog.GetString ("Search Confluence"); }
86 }41 }
87 42
88 /// <value>43 /// <value>
89 /// A description of the plugin44 /// A description of the plugin
90 /// </value>45 /// </value>
91 public override string Description 46 public override string Description {
92 {
93 get { return Catalog.GetString ("Searches Confluence and returns results to Do"); }47 get { return Catalog.GetString ("Searches Confluence and returns results to Do"); }
94 }48 }
95 49
96 /// <value>50 /// <value>
97 /// Confluence icon51 /// Confluence icon
98 /// </value>52 /// </value>
99 public override string Icon 53 public override string Icon {
100 {54 get { return "confluence.png@"+GetType ().Assembly.FullName; }
101 get { return "confluence.png@"+GetType().Assembly.FullName; }
102 }55 }
103 56
104 /// <value>57 /// <value>
105 /// ITextItem58 /// ITextItem
106 /// </value>59 /// </value>
107 public override IEnumerable<Type> SupportedItemTypes 60 public override IEnumerable<Type> SupportedItemTypes {
108 {61 get {
109 get 62 yield return typeof (ITextItem);
110 {
111 return new Type[] { typeof (ITextItem) };
112 }63 }
113 }64 }
114 65
115 /// <value>66 /// <value>
116 /// false67 /// false
117 /// </value>68 /// </value>
118 public override bool ModifierItemsOptional 69 public override bool ModifierItemsOptional {
119 {
120 get { return false; }70 get { return false; }
121 }71 }
122 72
123 /// <value>
124 /// The config class
125 /// </value>
126 public IConfluenceConfiguration Config
127 {
128 get { return _config; }
129 set { _config= value; }
130 }
131
132 /// <summary>
133 /// Create the configuration dialog
134 /// </summary>
135 public Gtk.Bin GetConfiguration()
136 {
137 return new ConfluenceConfigWidget( this );
138 }
139
140 /// <summary>73 /// <summary>
141 /// Actual code performed when action is executed in Do74 /// Actual code performed when action is executed in Do
142 /// </summary>75 /// </summary>
@@ -149,51 +82,34 @@
149 /// <returns>82 /// <returns>
150 /// Array of Bookmark Items. URLs to search results <see cref="IItem"/>83 /// Array of Bookmark Items. URLs to search results <see cref="IItem"/>
151 /// </returns>84 /// </returns>
152 public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems) {85 public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
153 86 {
154 try 87 List<BookmarkItem> results = new List<BookmarkItem> ();
155 {88 try {
156 ConfluenceSoapServiceService soapService = new ConfluenceSoapServiceService(_config.BaseUrl);89 ConfluenceSoapServiceService soapService = new ConfluenceSoapServiceService (ConfluenceConfigWidget.BaseURL);
157 90
158 // Only login if username AND password were provided in the config.91 // Only login if username AND password were provided in the config.
159 // Otherwise, use anonymous access with a null token.92 // Otherwise, use anonymous access with a null token.
160 String token = null;93 String token = null;
161 if (_config.Username != null && _config.Username.Trim().Length != 0 && 94 if (!string.IsNullOrEmpty (ConfluenceConfigWidget.UserName) &&
162 _config.Password != null && _config.Password.Trim().Length != 0) 95 !string.IsNullOrEmpty (ConfluenceConfigWidget.Password)) {
163 {96 token = soapService.login (ConfluenceConfigWidget.UserName, ConfluenceConfigWidget.Password);
164 token = soapService.login(_config.Username, _config.Password);
165 }97 }
166 98
167 string query = (items.First () as ITextItem).Text;99 string query = (items.First () as ITextItem).Text;
168 RemoteSearchResult[] results = soapService.search(token, query, _config.MaxSearchResults);
169 100
170 List<Item> retItems = new List<Item> ();101 foreach (RemoteSearchResult result in soapService.search (token, query, ConfluenceConfigWidget.MaxResults)) {
171 foreach (RemoteSearchResult result in results) 102 results.Add (new BookmarkItem (result.title, result.url));
172 {
173 retItems.Add(new BookmarkItem(result.title, result.url));
174 }103 }
175 104 } catch (Exception e) {
176 return retItems.ToArray();105 Log<ConfluenceSearchAction>.Error ("Unable to search Confluence: {0}", e.Message);
177 }106 Log<ConfluenceSearchAction>.Debug (e.StackTrace);
178 catch( Exception e ) 107 }
179 {108
180 Log( "Unable to search Confluence: {0}", e );109 foreach (BookmarkItem result in results)
181 return null;110 yield return result;
182 }111
183 }112 yield break;
184
185 /// <summary>
186 /// Temporary logging method until it's provided to plugins
187 /// </summary>
188 public void Log( string message, params object[] args )
189 {
190 string prefix= string.Format( "[Info {0:00}:{1:00}:{2:00}.{3:000}] [Confluence] ",
191 DateTime.Now.Hour,
192 DateTime.Now.Minute,
193 DateTime.Now.Second,
194 DateTime.Now.Millisecond );
195
196 Console.WriteLine( prefix + string.Format( message, args ) );
197 }113 }
198 }114 }
199}115}
200116
=== modified file 'Del.icio.us/Resources/delicious.addin.xml'
--- Del.icio.us/Resources/delicious.addin.xml 2009-03-31 23:19:25 +0000
+++ Del.icio.us/Resources/delicious.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
15 15
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
19 20
20 <!-- Extensions included in this assembly -->21 <!-- Extensions included in this assembly -->
@@ -26,4 +27,7 @@
26 <ItemSource type="Delicious.BookmarksItemSource" />27 <ItemSource type="Delicious.BookmarksItemSource" />
27 <ItemSource type="Delicious.TagsItemSource" />28 <ItemSource type="Delicious.TagsItemSource" />
28 </Extension>29 </Extension>
30 <Extension path= "/Do/Config">
31 <Config type="Delicious.Configuration" />
32 </Extension>
29</Addin>33</Addin>
3034
=== modified file 'Del.icio.us/src/BookmarksItemSource.cs'
--- Del.icio.us/src/BookmarksItemSource.cs 2009-05-29 09:39:41 +0000
+++ Del.icio.us/src/BookmarksItemSource.cs 2009-06-19 08:23:32 +0000
@@ -31,7 +31,7 @@
3131
32namespace Delicious32namespace Delicious
33{ 33{
34 public class BookmarksItemSource : ItemSource, IConfigurable34 public class BookmarksItemSource : ItemSource
35 {35 {
36 public override string Name {36 public override string Name {
37 get { return Catalog.GetString ("Del.icio.us bookmarks"); }37 get { return Catalog.GetString ("Del.icio.us bookmarks"); }
@@ -68,10 +68,5 @@
68 updateBookmarks.IsBackground = true;68 updateBookmarks.IsBackground = true;
69 updateBookmarks.Start ();69 updateBookmarks.Start ();
70 }70 }
71
72 public Gtk.Bin GetConfiguration ()
73 {
74 return new Configuration ();
75 }
76 }71 }
77}72}
7873
=== modified file 'Del.icio.us/src/Configuration.cs'
--- Del.icio.us/src/Configuration.cs 2009-01-16 01:25:56 +0000
+++ Del.icio.us/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -21,10 +21,11 @@
2121
22using System;22using System;
23using Do.Platform.Linux;23using Do.Platform.Linux;
24using Mono.Unix;
2425
25namespace Delicious26namespace Delicious
26{ 27{
27 public class Configuration : AbstractLoginWidget28 public class Configuration : AbstractLoginWidget, IConfigurable
28 {29 {
29 public Configuration () : base ("del.icio.us", "https://secure.delicious.com/register")30 public Configuration () : base ("del.icio.us", "https://secure.delicious.com/register")
30 {31 {
@@ -32,6 +33,15 @@
32 Password = Delicious.Preferences.Password;33 Password = Delicious.Preferences.Password;
33 }34 }
3435
36 public string Title {
37 get { return Catalog.GetString ("del.icio.us"); }
38 }
39
40 public Gtk.Bin GetConfiguration ()
41 {
42 return this;
43 }
44
35 protected override void SaveAccountData(string username, string password)45 protected override void SaveAccountData(string username, string password)
36 {46 {
37 Delicious.Preferences.Username = username;47 Delicious.Preferences.Username = username;
3848
=== modified file 'Dropbox/Resources/Dropbox.addin.xml'
--- Dropbox/Resources/Dropbox.addin.xml 2009-05-10 17:04:26 +0000
+++ Dropbox/Resources/Dropbox.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
19 20
20 <Extension path="/Do/Action">21 <Extension path="/Do/Action">
@@ -27,5 +28,7 @@
27 <Action type="Dropbox.DropboxRevisionsAction" />28 <Action type="Dropbox.DropboxRevisionsAction" />
28 <Action type="Dropbox.DropboxWebInterfaceAction" /> 29 <Action type="Dropbox.DropboxWebInterfaceAction" />
29 </Extension>30 </Extension>
3031 <Extension path= "/Do/Config">
32 <Config type="Dropbox.DropboxConfig" />
33 </Extension>
31</Addin>34</Addin>
3235
=== modified file 'Dropbox/src/Config/DropboxConfig.cs'
--- Dropbox/src/Config/DropboxConfig.cs 2009-06-06 16:40:38 +0000
+++ Dropbox/src/Config/DropboxConfig.cs 2009-06-19 08:23:32 +0000
@@ -27,13 +27,14 @@
27using Gtk;27using Gtk;
2828
29using Do.Platform;29using Do.Platform;
30using Do.Platform.Linux;
3031
31namespace Dropbox32namespace Dropbox
32{33{
33 34
34 [System.ComponentModel.Category("File")]35 [System.ComponentModel.Category("File")]
35 [System.ComponentModel.ToolboxItem(true)]36 [System.ComponentModel.ToolboxItem(true)]
36 public partial class DropboxConfig : Gtk.Bin37 public partial class DropboxConfig : Gtk.Bin, IConfigurable
37 {38 {
38 private static string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal); 39 private static string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
39 private static string base_path = System.IO.Path.Combine (home_path, "Dropbox");40 private static string base_path = System.IO.Path.Combine (home_path, "Dropbox");
@@ -45,6 +46,15 @@
45 Build ();46 Build ();
46 RefreshView ();47 RefreshView ();
47 }48 }
49
50 public string Title {
51 get { return Catalog.GetString ("Dropbox"); }
52 }
53
54 public Gtk.Bin GetConfiguration ()
55 {
56 return this;
57 }
48 58
49 private void RefreshView ()59 private void RefreshView ()
50 {60 {
5161
=== modified file 'Dropbox/src/DropboxStartAction.cs'
--- Dropbox/src/DropboxStartAction.cs 2009-06-14 15:24:47 +0000
+++ Dropbox/src/DropboxStartAction.cs 2009-06-19 08:23:32 +0000
@@ -34,7 +34,7 @@
34{34{
35 35
36 36
37 public class DropboxStartAction : Act, IConfigurable37 public class DropboxStartAction : Act
38 {38 {
39 39
40 public override string Name {40 public override string Name {
@@ -64,11 +64,5 @@
64 64
65 yield break;65 yield break;
66 }66 }
67
68 public Gtk.Bin GetConfiguration ()
69 {
70 return new DropboxConfig();
71 }
72
73 }67 }
74}68}
7569
=== modified file 'File/Resources/File.addin.xml'
--- File/Resources/File.addin.xml 2009-03-31 23:19:25 +0000
+++ File/Resources/File.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path="/Do/ItemSource">21 <Extension path="/Do/ItemSource">
@@ -30,4 +31,7 @@
30 <Action type="Do.FilesAndFolders.RenameAction" />31 <Action type="Do.FilesAndFolders.RenameAction" />
31 <Action type="Do.FilesAndFolders.MoveToTrashAction" />32 <Action type="Do.FilesAndFolders.MoveToTrashAction" />
32 </Extension>33 </Extension>
34 <Extension path= "/Do/Config">
35 <Config type="Do.FilesAndFolders.Configuration" />
36 </Extension>
33</Addin>37</Addin>
3438
=== modified file 'File/src/Do/Do.FilesAndFolders/Configuration.cs'
--- File/src/Do/Do.FilesAndFolders/Configuration.cs 2009-03-05 01:12:21 +0000
+++ File/src/Do/Do.FilesAndFolders/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -24,11 +24,13 @@
24using Gtk;24using Gtk;
25using Mono.Unix;25using Mono.Unix;
2626
27using Do.Platform.Linux;
28
27namespace Do.FilesAndFolders29namespace Do.FilesAndFolders
28{ 30{
29 [System.ComponentModel.Category("File")]31 [System.ComponentModel.Category("File")]
30 [System.ComponentModel.ToolboxItem(true)]32 [System.ComponentModel.ToolboxItem(true)]
31 public partial class Configuration : Gtk.Bin33 public partial class Configuration : Gtk.Bin, IConfigurable
32 {34 {
33 PathNodeView[] nodeViews = new PathNodeView[2];35 PathNodeView[] nodeViews = new PathNodeView[2];
34 36
@@ -56,6 +58,15 @@
56 notebook1.Page = 0;58 notebook1.Page = 0;
57 59
58 }60 }
61
62 public string Title {
63 get { return Catalog.GetString ("Files and Folders"); }
64 }
65
66 public Gtk.Bin GetConfiguration ()
67 {
68 return this;
69 }
59 70
60 private PathNodeView GetCurrentView ()71 private PathNodeView GetCurrentView ()
61 {72 {
6273
=== modified file 'File/src/Do/Do.FilesAndFolders/FileItemSource.cs'
--- File/src/Do/Do.FilesAndFolders/FileItemSource.cs 2009-06-17 01:07:23 +0000
+++ File/src/Do/Do.FilesAndFolders/FileItemSource.cs 2009-06-19 19:14:09 +0000
@@ -33,7 +33,7 @@
33 /// <summary>33 /// <summary>
34 /// Indexes files recursively starting in a specific directory.34 /// Indexes files recursively starting in a specific directory.
35 /// </summary>35 /// </summary>
36 public class FileItemSource : ItemSource, IConfigurable {36 public class FileItemSource : ItemSource {
3737
38 IEnumerable<Item> items;38 IEnumerable<Item> items;
39 bool maximum_files_warned;39 bool maximum_files_warned;
@@ -60,11 +60,6 @@
60 public override IEnumerable<Item> Items {60 public override IEnumerable<Item> Items {
61 get { return items; }61 get { return items; }
62 }62 }
63
64 public Gtk.Bin GetConfiguration ()
65 {
66 return new Configuration ();
67 }
6863
69 public override IEnumerable<Type> SupportedItemTypes {64 public override IEnumerable<Type> SupportedItemTypes {
70 get {65 get {
7166
=== modified file 'Flickr/Flickr.mdp'
--- Flickr/Flickr.mdp 2009-04-30 01:03:44 +0000
+++ Flickr/Flickr.mdp 2009-06-19 08:23:32 +0000
@@ -21,7 +21,6 @@
21 <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />21 <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
22 <File name="src/AccountConfig.cs" subtype="Code" buildaction="Compile" />22 <File name="src/AccountConfig.cs" subtype="Code" buildaction="Compile" />
23 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />23 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />
24 <File name="src/FlickrItemSource.cs" subtype="Code" buildaction="Compile" />
25 <File name="gtk-gui/Flickr.UploadConfig.cs" subtype="Code" buildaction="Compile" />24 <File name="gtk-gui/Flickr.UploadConfig.cs" subtype="Code" buildaction="Compile" />
26 <File name="src/UploadConfig.cs" subtype="Code" buildaction="Compile" />25 <File name="src/UploadConfig.cs" subtype="Code" buildaction="Compile" />
27 <File name="gtk-gui/Flickr.AccountConfig.cs" subtype="Code" buildaction="Compile" />26 <File name="gtk-gui/Flickr.AccountConfig.cs" subtype="Code" buildaction="Compile" />
2827
=== modified file 'Flickr/Makefile.am'
--- Flickr/Makefile.am 2009-05-07 16:03:28 +0000
+++ Flickr/Makefile.am 2009-06-19 08:23:32 +0000
@@ -10,7 +10,6 @@
10 gtk-gui/Flickr.UploadDialog.cs \10 gtk-gui/Flickr.UploadDialog.cs \
11 gtk-gui/generated.cs \11 gtk-gui/generated.cs \
12 src/AccountConfig.cs \12 src/AccountConfig.cs \
13 src/FlickrItemSource.cs \
14 src/UploadAction.cs \13 src/UploadAction.cs \
15 src/UploadPool.cs \14 src/UploadPool.cs \
16 src/UploadDialog.cs \15 src/UploadDialog.cs \
1716
=== modified file 'Flickr/Resources/Flickr.addin.xml'
--- Flickr/Resources/Flickr.addin.xml 2009-03-31 23:19:25 +0000
+++ Flickr/Resources/Flickr.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,12 +15,14 @@
15 15
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
19 20
20 <Extension path= "/Do/Action">21 <Extension path= "/Do/Action">
21 <Action type="Flickr.UploadAction"/>22 <Action type="Flickr.UploadAction"/>
22 </Extension>23 </Extension>
23 <Extension path = "/Do/ItemSource">24 <Extension path= "/Do/Config">
24 <ItemSource type="Flickr.FlickrItemSource" />25 <Config type="Flickr.AccountConfig" />
26 <Config type="Flickr.UploadConfig" />
25 </Extension>27 </Extension>
26</Addin>28</Addin>
2729
=== modified file 'Flickr/src/AccountConfig.cs'
--- Flickr/src/AccountConfig.cs 2008-12-24 03:48:49 +0000
+++ Flickr/src/AccountConfig.cs 2009-06-19 08:23:32 +0000
@@ -25,10 +25,11 @@
25using FlickrNet;25using FlickrNet;
2626
27using Do.Platform;27using Do.Platform;
28using Do.Platform.Linux;
2829
29namespace Flickr30namespace Flickr
30{ 31{
31 public partial class AccountConfig : Gtk.Bin32 public partial class AccountConfig : Gtk.Bin, IConfigurable
32 { 33 {
33 private FlickrNet.Flickr flickr;34 private FlickrNet.Flickr flickr;
34 private static IPreferences prefs;35 private static IPreferences prefs;
@@ -46,6 +47,15 @@
46 } else47 } else
47 flickr = new FlickrNet.Flickr (ApiKey, ApiSecret);48 flickr = new FlickrNet.Flickr (ApiKey, ApiSecret);
48 }49 }
50
51 public string Title {
52 get { return Catalog.GetString ("Account"); }
53 }
54
55 public Gtk.Bin GetConfiguration ()
56 {
57 return this;
58 }
49 59
50 static AccountConfig ()60 static AccountConfig ()
51 {61 {
@@ -115,10 +125,5 @@
115 auth_btn.Clicked -= new EventHandler (OnCompleteBtnClicked);125 auth_btn.Clicked -= new EventHandler (OnCompleteBtnClicked);
116 auth_btn.Clicked += new EventHandler (OnAuthBtnClicked);126 auth_btn.Clicked += new EventHandler (OnAuthBtnClicked);
117 }127 }
118
119 public Gtk.Bin GetConfiguration ()
120 {
121 return this;
122 }
123 }128 }
124}
125\ No newline at end of file129\ No newline at end of file
130}
126131
=== removed file 'Flickr/src/FlickrItemSource.cs'
--- Flickr/src/FlickrItemSource.cs 2008-12-24 03:48:49 +0000
+++ Flickr/src/FlickrItemSource.cs 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
1/* FlickrItemSource.cs
2 *
3 * GNOME Do is the legal property of its developers. Please refer to the
4 * COPYRIGHT file distributed with this
5 * source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21
22using System;
23using System.Collections.Generic;
24using Mono.Unix;
25
26using Do.Universe;
27using Do.Platform.Linux;
28
29namespace Flickr
30{
31 public class FlickrItemSource : ItemSource, IConfigurable
32 {
33 public override string Name {
34 get { return Catalog.GetString ("Account"); }
35 }
36
37 public override string Description {
38 get { return ""; }
39 }
40
41 public override string Icon {
42 get { return "flickr.png@" + GetType ().Assembly.FullName; }
43 }
44
45 public override IEnumerable<Type> SupportedItemTypes {
46 get { yield break; }
47 }
48
49 public Gtk.Bin GetConfiguration ()
50 {
51 return new AccountConfig ();
52 }
53 }
54}
550
=== modified file 'Flickr/src/UploadAction.cs'
--- Flickr/src/UploadAction.cs 2009-04-19 02:03:26 +0000
+++ Flickr/src/UploadAction.cs 2009-06-19 08:23:32 +0000
@@ -32,7 +32,7 @@
3232
33namespace Flickr33namespace Flickr
34{ 34{
35 public class UploadAction : Act, IConfigurable35 public class UploadAction : Act
36 { 36 {
37 const string ImageExtensions = ".jpg .jpeg .gif .png .tiff";37 const string ImageExtensions = ".jpg .jpeg .gif .png .tiff";
38 38
@@ -120,11 +120,6 @@
120 yield break;120 yield break;
121 }121 }
122 122
123 public Gtk.Bin GetConfiguration ()
124 {
125 return new UploadConfig ();
126 }
127
128 bool FileIsPicture (IFileItem item)123 bool FileIsPicture (IFileItem item)
129 {124 {
130 return FileIsPicture (item.Path);125 return FileIsPicture (item.Path);
131126
=== modified file 'Flickr/src/UploadConfig.cs'
--- Flickr/src/UploadConfig.cs 2008-10-31 17:53:44 +0000
+++ Flickr/src/UploadConfig.cs 2009-06-19 08:23:32 +0000
@@ -21,12 +21,14 @@
2121
22using System;22using System;
23using Gtk;23using Gtk;
24using Mono.Unix;
25using Do.Platform.Linux;
2426
25namespace Flickr27namespace Flickr
26{28{
27 [System.ComponentModel.Category("Flickr")]29 [System.ComponentModel.Category("Flickr")]
28 [System.ComponentModel.ToolboxItem(true)]30 [System.ComponentModel.ToolboxItem(true)]
29 public partial class UploadConfig : Gtk.Bin31 public partial class UploadConfig : Gtk.Bin, IConfigurable
30 { 32 {
31 public UploadConfig()33 public UploadConfig()
32 {34 {
@@ -41,6 +43,16 @@
41 friends_chk.Active = AccountConfig.FriendsAllowed;43 friends_chk.Active = AccountConfig.FriendsAllowed;
42 family_chk.Active = AccountConfig.FamilyAllowed;44 family_chk.Active = AccountConfig.FamilyAllowed;
43 }45 }
46
47 public string Title {
48 get { return Catalog.GetString ("Uploading"); }
49 }
50
51 public Gtk.Bin GetConfiguration ()
52 {
53 return this;
54 }
55
44 protected void OnTagsEdited (object sender, EventArgs args)56 protected void OnTagsEdited (object sender, EventArgs args)
45 {57 {
46 AccountConfig.Tags = tags_text.Buffer.Text;58 AccountConfig.Tags = tags_text.Buffer.Text;
@@ -70,4 +82,4 @@
70 AccountConfig.FamilyAllowed = family_chk.Active;82 AccountConfig.FamilyAllowed = family_chk.Active;
71 }83 }
72 }84 }
73}
74\ No newline at end of file85\ No newline at end of file
86}
7587
=== modified file 'GoogleCalendar/Resources/GoogleCalendar.addin.xml'
--- GoogleCalendar/Resources/GoogleCalendar.addin.xml 2009-05-07 19:49:44 +0000
+++ GoogleCalendar/Resources/GoogleCalendar.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path="/Do/ItemSource">21 <Extension path="/Do/ItemSource">
@@ -27,4 +28,7 @@
27 <Action type="GCalendar.ViewCalendarAction" />28 <Action type="GCalendar.ViewCalendarAction" />
28 <Action type="GCalendar.ViewEventAction" />29 <Action type="GCalendar.ViewEventAction" />
29 </Extension>30 </Extension>
31 <Extension path= "/Do/Config">
32 <Config type="GCalendar.Configuration" />
33 </Extension>
30</Addin>34</Addin>
3135
=== modified file 'GoogleCalendar/src/Configuration.cs'
--- GoogleCalendar/src/Configuration.cs 2009-01-01 01:25:16 +0000
+++ GoogleCalendar/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -29,7 +29,7 @@
2929
30namespace GCalendar30namespace GCalendar
31{31{
32 public class Configuration : AbstractLoginWidget32 public class Configuration : AbstractLoginWidget, IConfigurable
33 {33 {
34 const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\."34 const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\."
35 + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*"35 + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*"
@@ -43,6 +43,15 @@
43 Username = GCal.Preferences.Username;43 Username = GCal.Preferences.Username;
44 Password = GCal.Preferences.Password;44 Password = GCal.Preferences.Password;
45 }45 }
46
47 public string Title {
48 get { return Catalog.GetString ("Google Calendar"); }
49 }
50
51 public Gtk.Bin GetConfiguration ()
52 {
53 return this;
54 }
46 55
47 protected override bool Validate (string username, string password)56 protected override bool Validate (string username, string password)
48 {57 {
@@ -63,4 +72,4 @@
63 return new Regex (EmailPattern, RegexOptions.Compiled).IsMatch (username);72 return new Regex (EmailPattern, RegexOptions.Compiled).IsMatch (username);
64 }73 }
65 }74 }
66}
67\ No newline at end of file75\ No newline at end of file
76}
6877
=== modified file 'GoogleCalendar/src/GCalendarItemSource.cs'
--- GoogleCalendar/src/GCalendarItemSource.cs 2008-12-31 21:16:30 +0000
+++ GoogleCalendar/src/GCalendarItemSource.cs 2009-06-19 19:14:09 +0000
@@ -30,7 +30,7 @@
3030
31namespace GCalendar31namespace GCalendar
32{ 32{
33 public sealed class GCalendarItemSource : ItemSource, IConfigurable33 public sealed class GCalendarItemSource : ItemSource
34 {34 {
35 public GCalendarItemSource ()35 public GCalendarItemSource ()
36 {36 {
@@ -69,10 +69,5 @@
69 thread.IsBackground = true;69 thread.IsBackground = true;
70 thread.Start ();70 thread.Start ();
71 }71 }
72
73 public Gtk.Bin GetConfiguration ()
74 {
75 return new Configuration ();
76 }
77 }72 }
78}73}
7974
=== modified file 'GoogleContacts/Resources/GoogleContacts.addin.xml'
--- GoogleContacts/Resources/GoogleContacts.addin.xml 2009-05-17 08:43:00 +0000
+++ GoogleContacts/Resources/GoogleContacts.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path = "/Do/ItemSource">21 <Extension path = "/Do/ItemSource">
@@ -23,4 +24,7 @@
23 <Extension path= "/Do/Action">24 <Extension path= "/Do/Action">
24 <Action type="GMail.RecentConversationsActions" />25 <Action type="GMail.RecentConversationsActions" />
25 </Extension>26 </Extension>
27 <Extension path= "/Do/Config">
28 <Config type="GMail.GMailConfig" />
29 </Extension>
26</Addin>30</Addin>
2731
=== modified file 'GoogleContacts/src/GMailConfig.cs'
--- GoogleContacts/src/GMailConfig.cs 2008-12-24 05:37:47 +0000
+++ GoogleContacts/src/GMailConfig.cs 2009-06-19 08:23:32 +0000
@@ -25,10 +25,11 @@
25using Gtk;25using Gtk;
2626
27using Do.Platform.Linux;27using Do.Platform.Linux;
28using Mono.Unix;
2829
29namespace GMail30namespace GMail
30{ 31{
31 public class GMailConfig : AbstractLoginWidget 32 public class GMailConfig : AbstractLoginWidget, IConfigurable
32 {33 {
33 const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\."34 const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\."
34 + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*"35 + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*"
@@ -42,6 +43,15 @@
42 Password = GMail.Preferences.Password;43 Password = GMail.Preferences.Password;
43 }44 }
4445
46 public string Title {
47 get { return Catalog.GetString ("GMail"); }
48 }
49
50 public Gtk.Bin GetConfiguration ()
51 {
52 return this;
53 }
54
45 protected override void SaveAccountData(string username, string password)55 protected override void SaveAccountData(string username, string password)
46 {56 {
47 GMail.Preferences.Username = username;57 GMail.Preferences.Username = username;
4858
=== modified file 'GoogleContacts/src/GMailContactItemSource.cs'
--- GoogleContacts/src/GMailContactItemSource.cs 2008-12-24 04:42:14 +0000
+++ GoogleContacts/src/GMailContactItemSource.cs 2009-06-19 08:23:32 +0000
@@ -29,7 +29,7 @@
2929
30namespace GMail30namespace GMail
31{ 31{
32 public sealed class GMailItemSource : ItemSource, IConfigurable32 public sealed class GMailItemSource : ItemSource
33 {33 {
34 public GMailItemSource() 34 public GMailItemSource()
35 {35 {
@@ -70,10 +70,5 @@
70 thread.IsBackground = true;70 thread.IsBackground = true;
71 thread.Start ();71 thread.Start ();
72 }72 }
73
74 public Gtk.Bin GetConfiguration ()
75 {
76 return new GMailConfig ();
77 }
78 }73 }
79}74}
8075
=== modified file 'GoogleDocs/Resources/GoogleDocs.addin.xml'
--- GoogleDocs/Resources/GoogleDocs.addin.xml 2009-06-17 20:40:03 +0000
+++ GoogleDocs/Resources/GoogleDocs.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path="/Do/ItemSource">21 <Extension path="/Do/ItemSource">
@@ -25,4 +26,7 @@
25 <Action type="GDocs.GDocsUploadDocument" />26 <Action type="GDocs.GDocsUploadDocument" />
26 <Action type="GDocs.GDocsTrashDocument" />27 <Action type="GDocs.GDocsTrashDocument" />
27 </Extension>28 </Extension>
29 <Extension path= "/Do/Config">
30 <Config type="GDocs.Configuration" />
31 </Extension>
28</Addin>32</Addin>
2933
=== modified file 'GoogleDocs/src/Configuration.cs'
--- GoogleDocs/src/Configuration.cs 2009-06-09 22:50:11 +0000
+++ GoogleDocs/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -26,7 +26,7 @@
2626
27namespace GDocs27namespace GDocs
28{28{
29 public class Configuration : AbstractLoginWidget29 public class Configuration : AbstractLoginWidget, IConfigurable
30 {30 {
31 const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\."31 const string EmailPattern = @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\."
32 + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*"32 + @"[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*"
@@ -40,6 +40,15 @@
40 Password = GDocs.Preferences.Password;40 Password = GDocs.Preferences.Password;
41 }41 }
4242
43 public string Title {
44 get { return Catalog.GetString ("Google Docs"); }
45 }
46
47 public Gtk.Bin GetConfiguration ()
48 {
49 return this;
50 }
51
43 protected override bool Validate (string username, string password)52 protected override bool Validate (string username, string password)
44 {53 {
45 return ValidateUsername (username) &&54 return ValidateUsername (username) &&
4655
=== modified file 'GoogleDocs/src/GDocsItemSource.cs'
--- GoogleDocs/src/GDocsItemSource.cs 2009-06-09 22:50:11 +0000
+++ GoogleDocs/src/GDocsItemSource.cs 2009-06-19 08:23:32 +0000
@@ -27,7 +27,7 @@
2727
28namespace GDocs28namespace GDocs
29{29{
30 public sealed class GDocsItemSource : ItemSource, IConfigurable30 public sealed class GDocsItemSource : ItemSource
31 {31 {
32 public override string Name {32 public override string Name {
33 get { return Catalog.GetString ("Google Docs"); }33 get { return Catalog.GetString ("Google Docs"); }
@@ -60,10 +60,5 @@
60 updateDocs.IsBackground = true;60 updateDocs.IsBackground = true;
61 updateDocs.Start ();61 updateDocs.Start ();
62 }62 }
63
64 public Gtk.Bin GetConfiguration ()
65 {
66 return new Configuration ();
67 }
68 }63 }
69}64}
7065
=== modified file 'GoogleSearch/Resources/GoogleSearch.addin.xml'
--- GoogleSearch/Resources/GoogleSearch.addin.xml 2009-03-31 23:19:25 +0000
+++ GoogleSearch/Resources/GoogleSearch.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
15 15
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
19 20
20 <!-- Extensions included in this assembly -->21 <!-- Extensions included in this assembly -->
@@ -23,4 +24,7 @@
23 <Action type="InlineGoogleSearch.InlineGoogleSearch" />24 <Action type="InlineGoogleSearch.InlineGoogleSearch" />
24 <Action type="InlineGoogleSearch.ImFeelingLucky" />25 <Action type="InlineGoogleSearch.ImFeelingLucky" />
25 </Extension>26 </Extension>
27 <Extension path= "/Do/Config">
28 <Config type="InlineGoogleSearch.InlineGoogleSearchConfig" />
29 </Extension>
26</Addin>30</Addin>
2731
=== modified file 'GoogleSearch/src/InlineGoogleSearch.cs'
--- GoogleSearch/src/InlineGoogleSearch.cs 2009-02-11 19:17:18 +0000
+++ GoogleSearch/src/InlineGoogleSearch.cs 2009-06-19 08:23:32 +0000
@@ -71,7 +71,7 @@
71 /// <summary>71 /// <summary>
72 /// Class Definition72 /// Class Definition
73 /// </summary>73 /// </summary>
74 public class InlineGoogleSearch : Act, IConfigurable { 74 public class InlineGoogleSearch : Act {
75 75
76 /// <value>76 /// <value>
77 /// Search Google77 /// Search Google
@@ -81,7 +81,7 @@
81 return Catalog.GetString ("Search Google"); 81 return Catalog.GetString ("Search Google");
82 }82 }
83 }83 }
84 84
85 /// <value>85 /// <value>
86 /// Searches google and returns results to Do86 /// Searches google and returns results to Do
87 /// </value>87 /// </value>
@@ -162,16 +162,5 @@
162 public InlineGoogleSearch () 162 public InlineGoogleSearch ()
163 {163 {
164 }164 }
165
166 /// <summary>
167 /// Calls config dialog
168 /// </summary>
169 /// <returns>
170 /// InlineGoogleSearchConfig Widget <see cref="Gtk.Bin"/>
171 /// </returns>
172 public Gtk.Bin GetConfiguration ()
173 {
174 return new InlineGoogleSearchConfig ();
175 }
176 }165 }
177}166}
178167
=== modified file 'GoogleSearch/src/InlineGoogleSearchConfig.cs'
--- GoogleSearch/src/InlineGoogleSearchConfig.cs 2009-01-10 23:05:04 +0000
+++ GoogleSearch/src/InlineGoogleSearchConfig.cs 2009-06-19 08:23:32 +0000
@@ -20,6 +20,9 @@
20using System;20using System;
2121
22using Do.Platform;22using Do.Platform;
23using Do.Platform.Linux;
24
25using Mono.Unix;
2326
24/// <summary>27/// <summary>
25/// Do plug-in that returns search results from google back to gnome-do for 28/// Do plug-in that returns search results from google back to gnome-do for
@@ -30,7 +33,7 @@
30 /// <summary>33 /// <summary>
31 /// Config Dialog for InlineGoogleSearch34 /// Config Dialog for InlineGoogleSearch
32 /// </summary>35 /// </summary>
33 public partial class InlineGoogleSearchConfig : Gtk.Bin {36 public partial class InlineGoogleSearchConfig : Gtk.Bin, IConfigurable {
34 /// <summary>37 /// <summary>
35 /// Do.Addins.Util Preferences38 /// Do.Addins.Util Preferences
36 /// </summary>39 /// </summary>
@@ -72,6 +75,15 @@
72 {75 {
73 prefs = Services.Preferences.Get<InlineGoogleSearchConfig>();76 prefs = Services.Preferences.Get<InlineGoogleSearchConfig>();
74 }77 }
78
79 public string Title {
80 get { return Catalog.GetString ("Google Search"); }
81 }
82
83 public Gtk.Bin GetConfiguration ()
84 {
85 return this;
86 }
75 87
76 /// <value>88 /// <value>
77 /// Default Value: "moderate"89 /// Default Value: "moderate"
7890
=== modified file 'ImageShack/Resources/ImageShack.addin.xml'
--- ImageShack/Resources/ImageShack.addin.xml 2009-03-31 23:19:25 +0000
+++ ImageShack/Resources/ImageShack.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,9 +15,13 @@
15 15
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
19 20
20 <Extension path= "/Do/Action">21 <Extension path= "/Do/Action">
21 <Action type="ImageShack.ImageShackAction" />22 <Action type="ImageShack.ImageShackAction" />
22 </Extension>23 </Extension>
24 <Extension path= "/Do/Config">
25 <Config type="ImageShack.ImageShackConfig" />
26 </Extension>
23</Addin>27</Addin>
2428
=== modified file 'ImageShack/src/ImageShackAction.cs'
--- ImageShack/src/ImageShackAction.cs 2009-03-04 05:10:41 +0000
+++ ImageShack/src/ImageShackAction.cs 2009-06-19 08:23:32 +0000
@@ -36,7 +36,7 @@
3636
37namespace ImageShack37namespace ImageShack
38{38{
39 public class ImageShackAction : Act, IConfigurable39 public class ImageShackAction : Act
40 {40 {
41 static readonly Dictionary<string, string> image_mime_type_mapping = new Dictionary<string,string>41 static readonly Dictionary<string, string> image_mime_type_mapping = new Dictionary<string,string>
42 {42 {
@@ -195,4 +195,4 @@
195 return image_mime_type_mapping.ContainsKey (Path.GetExtension (file.Path));195 return image_mime_type_mapping.ContainsKey (Path.GetExtension (file.Path));
196 }196 }
197 }197 }
198}
199\ No newline at end of file198\ No newline at end of file
199}
200200
=== modified file 'ImageShack/src/ImageShackConfig.cs'
--- ImageShack/src/ImageShackConfig.cs 2008-12-24 04:44:00 +0000
+++ ImageShack/src/ImageShackConfig.cs 2009-06-19 08:23:32 +0000
@@ -21,10 +21,12 @@
21using System.Text.RegularExpressions;21using System.Text.RegularExpressions;
2222
23using Do.Platform;23using Do.Platform;
24using Do.Platform.Linux;
25using Mono.Unix;
2426
25namespace ImageShack27namespace ImageShack
26{28{
27 public partial class ImageShackConfig : Gtk.Bin29 public partial class ImageShackConfig : Gtk.Bin, IConfigurable
28 {30 {
29 private static IPreferences prefs;31 private static IPreferences prefs;
30 private readonly static string RegistrationUrl = "http://profile.imageshack.us/registration/";32 private readonly static string RegistrationUrl = "http://profile.imageshack.us/registration/";
@@ -41,6 +43,15 @@
41 {43 {
42 prefs = Services.Preferences.Get<ImageShackConfig> ();44 prefs = Services.Preferences.Get<ImageShackConfig> ();
43 }45 }
46
47 public string Title {
48 get { return Catalog.GetString ("Imageshack"); }
49 }
50
51 public Gtk.Bin GetConfiguration ()
52 {
53 return this;
54 }
44 55
45 public static string RegistrationCode {56 public static string RegistrationCode {
46 get { return prefs.Get<string> ("RegistrationCode",""); }57 get { return prefs.Get<string> ("RegistrationCode",""); }
4758
=== modified file 'JIRA/JIRA.mdp'
--- JIRA/JIRA.mdp 2009-01-09 08:10:40 +0000
+++ JIRA/JIRA.mdp 2009-06-20 02:30:06 +0000
@@ -17,10 +17,8 @@
17 <File name="src/JIRAIssueSource.cs" subtype="Code" buildaction="Compile" />17 <File name="src/JIRAIssueSource.cs" subtype="Code" buildaction="Compile" />
18 <File name="src/JIRAIssueItem.cs" subtype="Code" buildaction="Compile" />18 <File name="src/JIRAIssueItem.cs" subtype="Code" buildaction="Compile" />
19 <File name="src/JIRAIssueAction.cs" subtype="Code" buildaction="Compile" />19 <File name="src/JIRAIssueAction.cs" subtype="Code" buildaction="Compile" />
20 <File name="src/JIRAConfiguration.cs" subtype="Code" buildaction="Compile" />
21 <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />20 <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />
22 <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />21 <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
23 <File name="gtk-gui/JIRA.ConfigWidget.cs" subtype="Code" buildaction="Compile" />
24 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />22 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />
25 <File name="src/ConfigWidget.cs" subtype="Code" buildaction="Compile" />23 <File name="src/ConfigWidget.cs" subtype="Code" buildaction="Compile" />
26 <File name="src/Remote" subtype="Directory" buildaction="Compile" />24 <File name="src/Remote" subtype="Directory" buildaction="Compile" />
@@ -30,6 +28,7 @@
30 <File name="src/Remote/JIRAServerFacade.cs" subtype="Code" buildaction="Compile" />28 <File name="src/Remote/JIRAServerFacade.cs" subtype="Code" buildaction="Compile" />
31 <File name="Resources/JIRA.addin.xml" subtype="Code" buildaction="EmbedAsResource" />29 <File name="Resources/JIRA.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
32 <File name="Resources/icons/jira.png" subtype="Code" buildaction="EmbedAsResource" />30 <File name="Resources/icons/jira.png" subtype="Code" buildaction="EmbedAsResource" />
31 <File name="gtk-gui/JIRA.ConfigWidget.cs" subtype="Code" buildaction="Compile" />
33 </Contents>32 </Contents>
34 <References>33 <References>
35 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />34 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -38,7 +37,6 @@
38 <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />37 <ProjectReference type="Gac" localcopy="True" refto="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
39 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />38 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
40 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />39 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
41 <ProjectReference type="Gac" localcopy="True" refto="gconf-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
42 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />40 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
43 <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />41 <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
44 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />42 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.8.0.0, Culture=neutral, PublicKeyToken=null" />
4543
=== modified file 'JIRA/Makefile.am'
--- JIRA/Makefile.am 2009-01-09 07:45:01 +0000
+++ JIRA/Makefile.am 2009-06-19 19:14:09 +0000
@@ -12,7 +12,6 @@
12 src/Remote/JIRARssClient.cs \12 src/Remote/JIRARssClient.cs \
13 src/Remote/JIRAServerFacade.cs \13 src/Remote/JIRAServerFacade.cs \
14 src/Remote/AtlassianJiraSoapService.cs \14 src/Remote/AtlassianJiraSoapService.cs \
15 src/JIRAConfiguration.cs \
16 src/JIRAIssueSource.cs15 src/JIRAIssueSource.cs
1716
18RESOURCES = \17RESOURCES = \
@@ -28,5 +27,4 @@
28 $(DO_PLATFORM_LIBS) \27 $(DO_PLATFORM_LIBS) \
29 $(DO_PLATFORM_LINUX_LIBS) \28 $(DO_PLATFORM_LINUX_LIBS) \
30 $(DO_UNIVERSE_LIBS) \29 $(DO_UNIVERSE_LIBS) \
31 $(GTK_SHARP_20_LIBS) \30 $(GTK_SHARP_20_LIBS)
32 $(GCONF_SHARP_20_LIBS)
3331
=== modified file 'JIRA/Resources/JIRA.addin.xml'
--- JIRA/Resources/JIRA.addin.xml 2009-03-31 23:19:25 +0000
+++ JIRA/Resources/JIRA.addin.xml 2009-06-19 19:14:09 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path="/Do/Action">21 <Extension path="/Do/Action">
@@ -23,6 +24,7 @@
23 <Extension path = "/Do/ItemSource">24 <Extension path = "/Do/ItemSource">
24 <ItemSource type="JIRA.JIRAIssueSource" />25 <ItemSource type="JIRA.JIRAIssueSource" />
25 </Extension>26 </Extension>
2627 <Extension path= "/Do/Config">
2728 <Config type="JIRA.ConfigWidget" />
29 </Extension>
28</Addin>30</Addin>
2931
=== modified file 'JIRA/gtk-gui/gui.stetic'
--- JIRA/gtk-gui/gui.stetic 2009-01-09 07:25:58 +0000
+++ JIRA/gtk-gui/gui.stetic 2009-06-20 02:39:35 +0000
@@ -217,4 +217,214 @@
217 </widget>217 </widget>
218 </child>218 </child>
219 </widget>219 </widget>
220 <widget class="Gtk.Bin" id="JIRA.ConfigWidget" design-size="300 161">
221 <property name="MemberName" />
222 <child>
223 <widget class="Gtk.Table" id="table2">
224 <property name="MemberName" />
225 <property name="NRows">5</property>
226 <property name="NColumns">2</property>
227 <property name="RowSpacing">6</property>
228 <property name="ColumnSpacing">6</property>
229 <child>
230 <placeholder />
231 </child>
232 <child>
233 <widget class="Gtk.Entry" id="_entryBaseUrl">
234 <property name="MemberName" />
235 <property name="Tooltip" translatable="yes">The base url location to your JIRA install. ie. http://issues.apache.org/jira</property>
236 <property name="CanFocus">True</property>
237 <property name="Text" translatable="yes">http://issues.apache.org/issues</property>
238 <property name="IsEditable">True</property>
239 <property name="InvisibleChar">●</property>
240 </widget>
241 <packing>
242 <property name="LeftAttach">1</property>
243 <property name="RightAttach">2</property>
244 <property name="AutoSize">False</property>
245 <property name="YOptions">Fill</property>
246 <property name="XExpand">True</property>
247 <property name="XFill">True</property>
248 <property name="XShrink">False</property>
249 <property name="YExpand">False</property>
250 <property name="YFill">True</property>
251 <property name="YShrink">False</property>
252 </packing>
253 </child>
254 <child>
255 <widget class="Gtk.Entry" id="_entryPassword">
256 <property name="MemberName" />
257 <property name="CanFocus">True</property>
258 <property name="IsEditable">True</property>
259 <property name="Visibility">False</property>
260 <property name="InvisibleChar">●</property>
261 </widget>
262 <packing>
263 <property name="TopAttach">2</property>
264 <property name="BottomAttach">3</property>
265 <property name="LeftAttach">1</property>
266 <property name="RightAttach">2</property>
267 <property name="AutoSize">True</property>
268 <property name="XOptions">Fill</property>
269 <property name="YOptions">Fill</property>
270 <property name="XExpand">False</property>
271 <property name="XFill">True</property>
272 <property name="XShrink">False</property>
273 <property name="YExpand">False</property>
274 <property name="YFill">True</property>
275 <property name="YShrink">False</property>
276 </packing>
277 </child>
278 <child>
279 <widget class="Gtk.Entry" id="_entryProjects">
280 <property name="MemberName" />
281 <property name="Tooltip" translatable="yes">Comma separated list of projects</property>
282 <property name="CanFocus">True</property>
283 <property name="Text" translatable="yes">VFS,NET</property>
284 <property name="IsEditable">True</property>
285 <property name="InvisibleChar">●</property>
286 </widget>
287 <packing>
288 <property name="TopAttach">3</property>
289 <property name="BottomAttach">4</property>
290 <property name="LeftAttach">1</property>
291 <property name="RightAttach">2</property>
292 <property name="AutoSize">True</property>
293 <property name="XOptions">Fill</property>
294 <property name="YOptions">Fill</property>
295 <property name="XExpand">False</property>
296 <property name="XFill">True</property>
297 <property name="XShrink">False</property>
298 <property name="YExpand">False</property>
299 <property name="YFill">True</property>
300 <property name="YShrink">False</property>
301 </packing>
302 </child>
303 <child>
304 <widget class="Gtk.Entry" id="_entryUsername">
305 <property name="MemberName" />
306 <property name="CanFocus">True</property>
307 <property name="Text" translatable="yes">username1</property>
308 <property name="IsEditable">True</property>
309 <property name="InvisibleChar">●</property>
310 </widget>
311 <packing>
312 <property name="TopAttach">1</property>
313 <property name="BottomAttach">2</property>
314 <property name="LeftAttach">1</property>
315 <property name="RightAttach">2</property>
316 <property name="AutoSize">True</property>
317 <property name="XOptions">Fill</property>
318 <property name="YOptions">Fill</property>
319 <property name="XExpand">False</property>
320 <property name="XFill">True</property>
321 <property name="XShrink">False</property>
322 <property name="YExpand">False</property>
323 <property name="YFill">True</property>
324 <property name="YShrink">False</property>
325 </packing>
326 </child>
327 <child>
328 <widget class="Gtk.Label" id="_labelBaseUrl">
329 <property name="MemberName" />
330 <property name="LabelProp">Base Url</property>
331 </widget>
332 <packing>
333 <property name="AutoSize">False</property>
334 <property name="XOptions">Fill</property>
335 <property name="YOptions">Fill</property>
336 <property name="XExpand">False</property>
337 <property name="XFill">True</property>
338 <property name="XShrink">False</property>
339 <property name="YExpand">False</property>
340 <property name="YFill">True</property>
341 <property name="YShrink">False</property>
342 </packing>
343 </child>
344 <child>
345 <widget class="Gtk.Label" id="_labelPassword">
346 <property name="MemberName" />
347 <property name="LabelProp">Password</property>
348 </widget>
349 <packing>
350 <property name="TopAttach">2</property>
351 <property name="BottomAttach">3</property>
352 <property name="AutoSize">True</property>
353 <property name="XOptions">Fill</property>
354 <property name="YOptions">Fill</property>
355 <property name="XExpand">False</property>
356 <property name="XFill">True</property>
357 <property name="XShrink">False</property>
358 <property name="YExpand">False</property>
359 <property name="YFill">True</property>
360 <property name="YShrink">False</property>
361 </packing>
362 </child>
363 <child>
364 <widget class="Gtk.Label" id="_labelProjects">
365 <property name="MemberName" />
366 <property name="LabelProp">Projects</property>
367 </widget>
368 <packing>
369 <property name="TopAttach">3</property>
370 <property name="BottomAttach">4</property>
371 <property name="AutoSize">True</property>
372 <property name="XOptions">Fill</property>
373 <property name="YOptions">Fill</property>
374 <property name="XExpand">False</property>
375 <property name="XFill">True</property>
376 <property name="XShrink">False</property>
377 <property name="YExpand">False</property>
378 <property name="YFill">True</property>
379 <property name="YShrink">False</property>
380 </packing>
381 </child>
382 <child>
383 <widget class="Gtk.Label" id="_labelUsername">
384 <property name="MemberName" />
385 <property name="LabelProp">Username</property>
386 </widget>
387 <packing>
388 <property name="TopAttach">1</property>
389 <property name="BottomAttach">2</property>
390 <property name="AutoSize">True</property>
391 <property name="XOptions">Fill</property>
392 <property name="YOptions">Fill</property>
393 <property name="XExpand">False</property>
394 <property name="XFill">True</property>
395 <property name="XShrink">False</property>
396 <property name="YExpand">False</property>
397 <property name="YFill">True</property>
398 <property name="YShrink">False</property>
399 </packing>
400 </child>
401 <child>
402 <widget class="Gtk.Button" id="_saveButton">
403 <property name="MemberName" />
404 <property name="CanFocus">True</property>
405 <property name="Type">TextOnly</property>
406 <property name="Label">Save</property>
407 <property name="UseUnderline">True</property>
408 <property name="Xalign">0</property>
409 <signal name="Released" handler="OnSaveButtonReleased" />
410 </widget>
411 <packing>
412 <property name="TopAttach">4</property>
413 <property name="BottomAttach">5</property>
414 <property name="LeftAttach">1</property>
415 <property name="RightAttach">2</property>
416 <property name="AutoSize">False</property>
417 <property name="XOptions">0</property>
418 <property name="YOptions">Fill</property>
419 <property name="XExpand">False</property>
420 <property name="XFill">False</property>
421 <property name="XShrink">False</property>
422 <property name="YExpand">False</property>
423 <property name="YFill">True</property>
424 <property name="YShrink">False</property>
425 </packing>
426 </child>
427 </widget>
428 </child>
429 </widget>
220</stetic-interface>430</stetic-interface>
221\ No newline at end of file431\ No newline at end of file
222432
=== modified file 'JIRA/gtk-gui/objects.xml'
--- JIRA/gtk-gui/objects.xml 2008-12-24 04:37:17 +0000
+++ JIRA/gtk-gui/objects.xml 2009-06-19 19:14:09 +0000
@@ -1,6 +1,13 @@
1<objects attr-sync="on">1<objects attr-sync="on">
2 <object type="JIRA.ConfigWidget" palette-category="JIRA" allow-children="false" base-type="Gtk.Bin">2 <object type="JIRA.ConfigWidget" palette-category="JIRA" allow-children="false" base-type="Gtk.Bin">
3 <itemgroups />3 <itemgroups>
4 <itemgroup label="ConfigWidget Properties">
5 <property name="ProjectsString" />
6 <property name="BaseURL" />
7 <property name="UserName" />
8 <property name="Password" />
9 </itemgroup>
10 </itemgroups>
4 <signals />11 <signals />
5 </object>12 </object>
6</objects>13</objects>
7\ No newline at end of file14\ No newline at end of file
815
=== modified file 'JIRA/src/ConfigWidget.cs'
--- JIRA/src/ConfigWidget.cs 2008-12-24 04:37:17 +0000
+++ JIRA/src/ConfigWidget.cs 2009-06-20 02:26:06 +0000
@@ -16,67 +16,113 @@
16using System;16using System;
17using System.Collections.Generic;17using System.Collections.Generic;
1818
19using Do.Platform;
20using Do.Platform.Linux;
21
22using Mono.Unix;
23
19namespace JIRA24namespace JIRA
20{25{
21 [System.ComponentModel.Category("JIRA")]26 [System.ComponentModel.Category("JIRA")]
22 [System.ComponentModel.ToolboxItem(true)]27 [System.ComponentModel.ToolboxItem(true)]
23 public partial class ConfigWidget : Gtk.Bin28 public partial class ConfigWidget : Gtk.Bin, IConfigurable
24 { 29 {
25 private JIRAIssueSource _issueSource;30 static private IPreferences prefs;
26 31
27 public ConfigWidget( JIRAIssueSource issueSource )32 public ConfigWidget ()
28 { 33 {
29 this.Build();34 this.Build ();
30
31 _issueSource= issueSource;
32 35
33 SetFieldsFromConfig( _issueSource.Config );36 SetFieldsFromConfig ();
37 }
38
39 static ConfigWidget ()
40 {
41 prefs = Do.Platform.Services.Preferences.Get<JIRA.ConfigWidget> ();
42 }
43
44 public string Title {
45 get { return Catalog.GetString ("JIRA"); }
46 }
47
48 public Gtk.Bin GetConfiguration ()
49 {
50 return this;
34 }51 }
35 52
36 protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e)53 protected virtual void OnSaveButtonReleased (object sender, System.EventArgs e)
37 {54 {
38 _issueSource.Log( "Re-init JIRA Plugin with new settings..." ); 55 GetConfigFromFields ();
39
40 _issueSource.Config= GetConfigFromFields();
41 _issueSource.Config.Persist();
42
43 // Write the config back out to the fields to reflect how we saved it56 // Write the config back out to the fields to reflect how we saved it
44 SetFieldsFromConfig( _issueSource.Config );57 SetFieldsFromConfig ();
45 }58 }
4659
47 // Bindings...60 // Bindings...
48 61
49 private void SetFieldsFromConfig( IJIRAConfiguration config )62 private void SetFieldsFromConfig ()
50 {63 {
51 config.Load();64 _entryBaseUrl.Text = BaseURL;
52 65 _entryUsername.Text = UserName;
53 _entryBaseUrl.Text= config.BaseUrl;66 _entryPassword.Text = Password;
54 _entryUsername.Text= config.Username;67 _entryProjects.Text = ProjectsString;
55 _entryPassword.Text= config.Password;68 }
56 _entryProjects.Text= string.Join( ",", config.Projects );69
57 }70 private void GetConfigFromFields ()
58 71 {
59 private IJIRAConfiguration GetConfigFromFields()72 BaseURL = _entryBaseUrl.Text;
60 {73 UserName = _entryUsername.Text;
61 JIRAConfiguration config= new JIRAConfiguration();74 Password = _entryPassword.Text;
62 config.BaseUrl= _entryBaseUrl.Text;75 ProjectsString = _entryProjects.Text;
63 config.Username= _entryUsername.Text;76 }
64 config.Password= _entryPassword.Text;77
65 78 public static List<string> Projects {
66 // Split up the projects, and make sure they're correct79 get {
67 List<string> projects= new List<string>();80 List<string> projects = new List<string> ();
68 foreach( string str in _entryProjects.Text.Split( new char[] { ',', ';', ':', ' ' } ) )81 foreach (string str in ProjectsString.Split (new char[] { ',', ';', ':', ' ' })) {
69 {82 string project = str.Trim ();
70 string project= str.Trim();83
71 84 if (project.Length > 0) {
72 if( project.Length> 0 )85 projects.Add (project);
73 {86 }
74 projects.Add( project );
75 }87 }
76 }88 return projects;
77 89 }
78 config.Projects= projects.ToArray();90 }
79 return config;91
92 public static string ProjectsString {
93 get {
94 return prefs.Get<string> ("Projects", "");
95 }
96 set {
97 prefs.Set<string> ("Projects", value);
98 }
99 }
100
101 public static string BaseURL {
102 get {
103 return prefs.Get<string> ("BaseURL", "");
104 }
105 set {
106 prefs.Set<string> ("BaseURL", value);
107 }
108 }
109
110 public static string UserName {
111 get {
112 return prefs.Get<string> ("UserName", "");
113 }
114 set {
115 prefs.Set<string> ("UserName", value);
116 }
117 }
118
119 public static string Password {
120 get {
121 return prefs.GetSecure<string> ("Password", "");
122 }
123 set {
124 prefs.SetSecure<string> ("Password", value);
125 }
80 }126 }
81 }127 }
82}128}
83129
=== removed file 'JIRA/src/JIRAConfiguration.cs'
--- JIRA/src/JIRAConfiguration.cs 2008-12-24 04:37:17 +0000
+++ JIRA/src/JIRAConfiguration.cs 1970-01-01 00:00:00 +0000
@@ -1,189 +0,0 @@
1//
2// This program is free software; you can redistribute it and/or modify
3// it under the terms of the GNU General Public License as published by
4// the Free Software Foundation; either version 3 of the License, or
5// (at your option) any later version.
6//
7// This program is distributed in the hope that it will be useful,
8// but WITHOUT ANY WARRANTY; without even the implied warranty of
9// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10// GNU General Public License for more details.
11//
12// You should have received a copy of the GNU General Public License
13// along with this program; if not, write to the Free Software
14// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15//
16using System;
17using Do.Platform;
18using Do.Universe;
19
20
21
22namespace JIRA
23{
24
25
26
27 public interface IJIRAConfiguration
28 {
29 string BaseUrl
30 {
31 get;
32 }
33
34 string Username
35 {
36 get;
37 }
38
39 string Password
40 {
41 get;
42 }
43
44 string[] Projects
45 {
46 get;
47 }
48
49 /// <value>
50 /// To be valid, all fields must be filled out
51 /// </value>
52 bool IsValid();
53
54 /// <summary>
55 /// Persist the properties of this configuration bean to an underlying store
56 /// </summary>
57 void Persist();
58
59 /// <summary>
60 /// Pre-fill the properties of this bean from the underlying store
61 /// </summary>
62 void Load();
63 }
64
65 /// <summary>
66 /// Configuration that uses gconf to do the magic
67 /// </summary>
68 public class JIRAConfiguration : IJIRAConfiguration
69 {
70 private string _baseUrl;
71 private string _username;
72 private string _password;
73 private string[] _projects;
74
75 static private IPreferences prefs;
76
77 /// <summary>
78 /// The gnome conf key that contains the base url for our JIRA installation.
79 /// ie. http://issues.apache.org/jira
80 /// </summary>
81 private const string _sGCONF_KEY= "/apps/gnome-do/plugins/JIRA";
82
83 private GConf.Client _gconf;
84
85 public JIRAConfiguration()
86 {
87 _gconf= new GConf.Client();
88 }
89
90 static JIRAConfiguration()
91 {
92 prefs = Do.Platform.Services.Preferences.Get<JIRA.JIRAConfiguration>();
93 }
94
95 private void SetConfValue( string key, string val )
96 {
97 _gconf.Set( _sGCONF_KEY +"/"+key, val );
98 }
99
100 private string GetConfValue( string key, string fallback )
101 {
102 try
103 {
104 return _gconf.Get( _sGCONF_KEY+"/"+key ) as String;
105 }
106 catch( GConf.NoSuchKeyException )
107 {
108 return fallback;
109 }
110 }
111
112 public string BaseUrl
113 {
114 get { return _baseUrl ?? ""; }
115 set { _baseUrl= value; }
116 }
117 public string Username
118 {
119 get { return _username ?? ""; }
120 set { _username= value; }
121 }
122
123 public string Password
124 {
125 get { return _password ?? ""; }
126 set { _password= value; }
127 }
128 public string[] Projects
129 {
130 get { return _projects ?? new string[ 0 ]; }
131 set { _projects= value; }
132 }
133
134 /// <value>
135 /// To be valid, all fields must be filled out
136 /// </value>
137 public bool IsValid()
138 {
139 return _baseUrl!=null
140 && _username!=null
141 && _password!=null
142 && _projects!=null;
143 }
144
145 public void Load()
146 {
147 _baseUrl= GetConfValue( "baseUrl", null );
148
149 string projStr= GetConfValue( "projects", "" );
150 _projects= projStr.Length>0 ? projStr.Split( ',' ) : null;
151
152 // Use the gnome-do framework for retrieving from the keychain
153 _username = prefs.GetSecure("username", "");
154 _password = prefs.GetSecure("password", "");
155 }
156
157 public void Persist()
158 {
159 prefs.Set("baseUrl", _baseUrl );
160 prefs.Set("projects", string.Join(",", _projects));
161 prefs.SetSecure("username", _username );
162 prefs.GetSecure("password", _password );
163 }
164
165
166 /// <summary>
167 /// Do a migration to the gnome keyring and return true if we do a migrate, false if
168 /// we've done it previously
169 /// </summary>
170 /// <returns>
171 /// A <see cref="System.Boolean"/>
172 /// </returns>
173 public bool DoMigrate()
174 {
175 // Because we used to write the username/password to gconf, provide a migration
176 // strategy that will haul the values into the keyring and clear them out of
177 // gconf
178 if( "".Equals( GetConfValue( "password", "" ) ) ) return false;
179
180 prefs.SetSecure("username", GetConfValue("username", null));
181 prefs.SetSecure("password", GetConfValue("password", null));
182
183 SetConfValue( "username", "" );
184 SetConfValue( "password", "" );
185
186 return true;
187 }
188 }
189}
1900
=== modified file 'JIRA/src/JIRAIssueAction.cs'
--- JIRA/src/JIRAIssueAction.cs 2008-12-24 04:37:17 +0000
+++ JIRA/src/JIRAIssueAction.cs 2009-06-20 02:26:06 +0000
@@ -18,7 +18,7 @@
18using System.Text.RegularExpressions;18using System.Text.RegularExpressions;
19using Do.Universe.Common;19using Do.Universe.Common;
20using Do.Universe;20using Do.Universe;
21using GConf;21using Mono.Unix;
2222
23namespace JIRA23namespace JIRA
24{ 24{
@@ -26,12 +26,12 @@
26 {26 {
27 public override string Name 27 public override string Name
28 {28 {
29 get { return "View JIRA Issue"; }29 get { return Catalog.GetString ("View JIRA Issue"); }
30 }30 }
3131
32 public override string Description 32 public override string Description
33 {33 {
34 get { return "Views the specified JIRA Issue"; }34 get { return Catalog.GetString ("Views the specified JIRA Issue"); }
35 }35 }
3636
37 public override string Icon 37 public override string Icon
@@ -44,24 +44,25 @@
44 /// </value>44 /// </value>
45 public override IEnumerable<Type> SupportedItemTypes45 public override IEnumerable<Type> SupportedItemTypes
46 {46 {
47 get { return new Type[] { typeof (JIRAIssueItem) }; }47 get {
48 yield return typeof (JIRAIssueItem);
49 }
48 }50 }
4951
50 52
51 /// <summary>53 /// <summary>
52 /// Which the matching code, return JIRA link54 /// Which the matching code, return JIRA link
53 /// </returns>55 /// </returns>
54 public override IEnumerable<Item> Perform( IEnumerable<Item> items, IEnumerable<Item> modItems )56 public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
55 {57 {
56 List<Item> urls= new List<Item>();58 List<Item> urls= new List<Item> ();
57 59
58 // Build up full urls from the issue codes60 // Build up full urls from the issue codes
59 foreach( Item item in items )61 foreach (Item item in items) {
60 {62 urls.Add (new TextItem ((item as JIRAIssueItem).Url));
61 urls.Add( new TextItem( ( item as JIRAIssueItem ).Url ) );
62 } 63 }
63 64
64 return base.Perform( urls.ToArray(), modItems );65 return base.Perform (urls.ToArray(), modItems);
65 }66 }
66 }67 }
67}68}
68\ No newline at end of file69\ No newline at end of file
6970
=== modified file 'JIRA/src/JIRAIssueSource.cs'
--- JIRA/src/JIRAIssueSource.cs 2009-05-29 09:39:41 +0000
+++ JIRA/src/JIRAIssueSource.cs 2009-06-19 19:14:09 +0000
@@ -16,26 +16,25 @@
16using System;16using System;
17using System.Text;17using System.Text;
18using System.Threading;18using System.Threading;
19using System.Collections;
19using System.Collections.Generic;20using System.Collections.Generic;
20using System.Collections;21
21using Do.Universe;22using Do.Universe;
23using Do.Platform;
22using Do.Platform.Linux;24using Do.Platform.Linux;
23using Atlassian;25using Atlassian;
24using JIRA.Remote;26using JIRA.Remote;
2527
28using Mono.Unix;
29
2630
27namespace JIRA31namespace JIRA
28{32{
29 /// <summary>33 /// <summary>
30 /// Provider of issues that meet our requirements (ie. certain projects, open criteria)34 /// Provider of issues that meet our requirements (ie. certain projects, open criteria)
31 /// </summary>35 /// </summary>
32 public class JIRAIssueSource : ItemSource, IConfigurable36 public class JIRAIssueSource : ItemSource
33 {37 {
34 /// <summary>
35 /// Our configuration for JIRA properties
36 /// </summary>
37 private IJIRAConfiguration _config;
38
39 /// <summary>38 /// <summary>
40 /// Server facade for handling issue download39 /// Server facade for handling issue download
41 /// </summary>40 /// </summary>
@@ -44,164 +43,131 @@
44 /// <summary>43 /// <summary>
45 /// True when the plugin has init and updates of items should occur44 /// True when the plugin has init and updates of items should occur
46 /// </summary>45 /// </summary>
47 private bool _hasInit= false;46 private bool _hasInit = false;
48 47
49 /// <summary>48 /// <summary>
50 /// Current list of outstanding issues49 /// Current list of outstanding issues
51 /// </summary>50 /// </summary>
52 private readonly List<Item> _items= new List<Item>();51 private readonly List<Item> _items = new List<Item> ();
53 52
54 /// <summary>53 /// <summary>
55 /// ProjectIds we're watching54 /// ProjectIds we're watching
56 /// </summary>55 /// </summary>
57 private readonly List<long> _projectIds= new List<long>();56 private readonly List<long> _projectIds = new List<long> ();
58 57
59 /// <summary>58 /// <summary>
60 /// Statuses that are available within this JIRA installation59 /// Statuses that are available within this JIRA installation
61 /// </summary>60 /// </summary>
62 private readonly List<int> _projectStatuses= new List<int>();61 private readonly List<int> _projectStatuses = new List<int> ();
63 62
64 /// <summary>63 /// <summary>
65 /// Lock object for query thread safety, locks should always be taken in the order 64 /// Lock object for query thread safety, locks should always be taken in the order
66 /// of query lock, then item lock65 /// of query lock, then item lock
67 /// </summary> 66 /// </summary>
68 private readonly object _lock= new object();67 private readonly object _lock = new object ();
69 68
70 69
71 /// <summary>70 /// <summary>
72 /// Constructor (preloads config)71 /// Constructor (preloads config)
73 /// </summary>72 /// </summary>
74 public JIRAIssueSource()73 public JIRAIssueSource ()
75 { 74 {
76 _config= new JIRAConfiguration();
77
78 // Do the migration if need be
79 if( ( (JIRAConfiguration) _config ).DoMigrate() )
80 {
81 Log( "Migrated credentials to gnome keyring" );
82 }
83
84 // Run the initial query 75 // Run the initial query
85 UpdateItems();76 UpdateItems ();
86 }77 }
87 78
88 public override string Name { get { return "JIRA Issues"; } }79 public override string Name {
89 public override string Description { get { return "Indexes JIRA Issues from a given repository"; } }80 get {
90 public override string Icon { get { return "jira.png@"+GetType().Assembly.FullName; } }81 return Catalog.GetString ("JIRA Issues");
91 82 }
92 public IJIRAConfiguration Config83 }
93 {84
94 get { return _config; }85 public override string Description {
95 set86 get {
96 {87 return Catalog.GetString ("Indexes JIRA Issues from a given repository");
97 _config= value;88 }
98 _hasInit= false;89 }
99 }90
100 }91 public override string Icon {
101 92 get {
102 /// <summary>93 return "jira.png@"+GetType ().Assembly.FullName;
103 /// Create the configuration dialog94 }
104 /// </summary>
105 public Gtk.Bin GetConfiguration()
106 {
107 return new ConfigWidget( this );
108 }95 }
109 96
110 public override IEnumerable<Type> SupportedItemTypes97 public override IEnumerable<Type> SupportedItemTypes
111 {98 {
112 get99 get {
113 {100 yield return typeof (JIRAIssueItem);
114 return new Type[] { typeof( JIRAIssueItem ) };
115 }101 }
116 }102 }
117 103
118 public override IEnumerable<Item> Items104 public override IEnumerable<Item> Items
119 {105 {
120 get 106 get {
121 {107 lock (_items) {
122 lock( _items )
123 {
124 return _items;108 return _items;
125 }109 }
126 }110 }
127 }111 }
128
129 /// <summary>
130 /// Not Supported
131 /// </summary>
132 public override IEnumerable<Item> ChildrenOfItem( Item parent )
133 {
134 yield break;
135 }
136 112
137 /// <summary>113 /// <summary>
138 /// Called semi-regularly such that we can poll the JIRA web service to see114 /// Called semi-regularly such that we can poll the JIRA web service to see
139 /// if there are any new issues matching our projects request list. This is called115 /// if there are any new issues matching our projects request list. This is called
140 /// by gnome-do, and we don't want to block too long!116 /// by gnome-do, and we don't want to block too long!
141 /// </summary>117 /// </summary>
142 public override void UpdateItems()118 public override void UpdateItems ()
143 { 119 {
144 // We do all our updates on another thread...120 // We do all our updates on another thread...
145 new Thread( DoUpdateItems ).Start();121 Services.Application.RunOnThread (() => { DoUpdateItems (); });
146 }122 }
147123
148 124
149 private void DoUpdateItems()125 private void DoUpdateItems ()
150 {126 {
151 // If we didn't aquire the lock, we won't call update items now 127 // If we didn't aquire the lock, we won't call update items now
152 if( !Monitor.TryEnter( _lock ) ) return;128 if (!Monitor.TryEnter(_lock)) return;
153 129
154 try130 try {
155 {
156 // We aquired the lock, but make sure we inited correctly131 // We aquired the lock, but make sure we inited correctly
157 if( !_hasInit )132 if (!_hasInit) {
158 {
159 // Do the init role133 // Do the init role
160 DoInit();134 DoInit ();
161 return;135 return;
162 } 136 }
163 137
164 // We've previous init, so we're just looking for deltas138 // We've previous init, so we're just looking for deltas
165 List<JIRAIssueItem> changedIssues= ConvertFromRemoteIssues( _service.GetRecentlyUpdatedIssues( _projectIds ) );139 List<JIRAIssueItem> changedIssues = ConvertFromRemoteIssues (_service.GetRecentlyUpdatedIssues (_projectIds));
166 140
167 // Find Issues that have become closed... and purge them141 // Find Issues that have become closed... and purge them
168 List<string> closedIssues= changedIssues142 List<string> closedIssues = changedIssues
169 .FindAll( delegate( JIRAIssueItem item ) { return item.IsClosed; } )143 .FindAll( delegate (JIRAIssueItem item) { return item.IsClosed; } )
170 .ConvertAll<string>( delegate( JIRAIssueItem item ) { return item.Name; } );144 .ConvertAll<string> (delegate( JIRAIssueItem item) { return item.Name; } );
171145
172 // Do a quick lock while we remove the items that are now closed146 // Do a quick lock while we remove the items that are now closed
173 lock( _items )147 lock (_items) {
174 {148 int removedItems = _items.RemoveAll (delegate (Item item) { return closedIssues.Contains (item.Name ); } );
175 int removedItems= _items.RemoveAll( delegate( Item item ) { return closedIssues.Contains( item.Name ); } );
176 149
177 if( removedItems>0 )150 if (removedItems > 0) {
178 {151 Log.Debug ("Removed: {0} resolved/closed issues", removedItems);
179 Log( "Removed: {0} resolved/closed issues", removedItems );
180 }152 }
181 }153 }
182 154
183 // Find and add the issues that aren't closed, but are new!155 // Find and add the issues that aren't closed, but are new!
184 List<string> currentIssues= _items.ConvertAll<string>( delegate( Item item ) { return item.Name; } );156 List<string> currentIssues = _items.ConvertAll<string>( delegate (Item item) { return item.Name; } );
185 List<JIRAIssueItem> newIssues= changedIssues.FindAll( delegate( JIRAIssueItem item ) { return !item.IsClosed && !currentIssues.Contains( item.Name ); } );157 List<JIRAIssueItem> newIssues = changedIssues.FindAll( delegate (JIRAIssueItem item) { return !item.IsClosed && !currentIssues.Contains (item.Name); } );
186 158
187 lock( _items )159 lock (_items) {
188 {160 _items.AddRange (newIssues.ToArray());
189 _items.AddRange( newIssues.ToArray() );
190 }161 }
191 162
192 // Notify what's changed163 // Notify what's changed
193 if( newIssues.Count>0 )164 if (newIssues.Count > 0) {
194 {165 Log.Debug ("Added: {0} new issues", newIssues.Count);
195 Log( "Added: {0} new issues", newIssues.Count );
196 }166 }
197 }167 } catch (Exception e) {
198 catch( Exception e ) 168 Log.Error ("Unable to update JIRA items: {0}", e);
199 {169 } finally {
200 Log( "Unable to update JIRA items: {0}", e );170 Monitor.Exit (_lock);
201 }
202 finally
203 {
204 Monitor.Exit( _lock );
205 }171 }
206 }172 }
207 173
@@ -209,117 +175,82 @@
209 /// Determine the project ids of the given project codes by contacting the JIRA soap service.175 /// Determine the project ids of the given project codes by contacting the JIRA soap service.
210 /// Then do an initial query for issues with these given ids176 /// Then do an initial query for issues with these given ids
211 /// </summary>177 /// </summary>
212 private void DoInit()178 private void DoInit ()
213 {179 {
214 try180 try {
215 {181 Monitor.Enter (_lock);
216 Monitor.Enter( _lock );
217 182
218 // Pre cleaning...183 // Pre cleaning...
219 _hasInit= true; // by the time this is done, we will have init...184 _hasInit= true; // by the time this is done, we will have init...
220 _projectStatuses.Clear();185 _projectStatuses.Clear ();
221 _projectIds.Clear();186 _projectIds.Clear ();
222 187
223 lock( _items )188 lock (_items) {
224 {189 _items.Clear ();
225 _items.Clear();190 }
226 }191
227 192 Log.Debug ("Initializing repository: " + ConfigWidget.BaseURL);
228 // Check to make sure the config is valid...
229 _config.Load();
230
231 if( !_config.IsValid() )
232 {
233 Log( "Configuration for JIRA is not valid, see the plugin settings page" );
234
235 // we failed to init
236 _hasInit= false;
237 return;
238 }
239
240 Log( "Initializing repository: "+_config.BaseUrl );
241 193
242 // init the service connection194 // init the service connection
243 _service= new JIRAServerFacade( _config.BaseUrl, _config.Username, _config.Password );195 _service= new JIRAServerFacade (ConfigWidget.BaseURL, ConfigWidget.UserName, ConfigWidget.Password);
244 196
245 // Identify the available resolutions for an issue197 // Identify the available resolutions for an issue
246 foreach( RemoteStatus status in _service.getStatuses() )198 foreach (RemoteStatus status in _service.getStatuses()) {
247 {
248 _projectStatuses.Add( int.Parse( status.id ) );199 _projectStatuses.Add( int.Parse( status.id ) );
249200
250 Log( "Init Status: {0} => {1}", status.name, status.id );201 Log.Debug ("Init Status: {0} => {1}", status.name, status.id);
251 }202 }
252 203
253 // We want all issues that have a status that isn't 5 or 6 (resolved/closed)204 // We want all issues that have a status that isn't 5 or 6 (resolved/closed)
254 // we need to do it this way because JIRA doesn't support logical operators205 // we need to do it this way because JIRA doesn't support logical operators
255 // for exclusion: see JRA-1560206 // for exclusion: see JRA-1560
256 List<int> reqStatuses= new List<int>( _projectStatuses );207 List<int> reqStatuses = new List<int> (_projectStatuses);
257 reqStatuses.Remove( JIRAIssueItem.STATUS_RESOLVED );208 reqStatuses.Remove (JIRAIssueItem.STATUS_RESOLVED);
258 reqStatuses.Remove( JIRAIssueItem.STATUS_CLOSED );209 reqStatuses.Remove (JIRAIssueItem.STATUS_CLOSED);
259 210
260 // Identify the project id's that we're interested in211 // Identify the project id's that we're interested in
261 foreach( string projectKey in _config.Projects )212 foreach (string projectKey in ConfigWidget.Projects) {
262 {213 RemoteProject project = _service.getProjectByKey (projectKey);
263 RemoteProject project= _service.getProjectByKey( projectKey );214 long projectId = long.Parse (project.id);
264 long projectId= long.Parse( project.id );
265 215
266 // Use the rss client to discover the issues for this project that are open216 // Use the rss client to discover the issues for this project that are open
267 List<JIRAIssueItem> issues= ConvertFromRemoteIssues( 217 List<JIRAIssueItem> issues = ConvertFromRemoteIssues (
268 _service.GetAllIssuesWithStatus( 218 _service.GetAllIssuesWithStatus (
269 new List<long>( new long[]{ projectId } ), 219 new List<long> (new long[] {projectId}),
270 reqStatuses ) );220 reqStatuses));
271221
272 // Store this project and it's issues222 // Store this project and it's issues
273 _projectIds.Add( projectId );223 _projectIds.Add (projectId);
274 224
275 lock( _items )225 lock (_items) {
276 {226 _items.AddRange (issues.ToArray());
277 _items.AddRange( issues.ToArray() );
278 }227 }
279 228
280 Log( "Init Project: {0} [{1}=>{2}] with: {3} issues.",229 Log.Debug ("Init Project: {0} [{1}=>{2}] with: {3} issues.",
281 project.name, project.key, project.id, issues.Count );230 project.name, project.key, project.id, issues.Count);
282 }231 }
283232
284 }233 } catch (System.Web.Services.Protocols.SoapException e) {
285 catch( System.Web.Services.Protocols.SoapException e )234 Log.Error ("Failure (re-)initializating JIRA plugin...\n{0}", e);
286 {235 Log.Debug (e.StackTrace);
287 Log( "Failure (re-)initializating JIRA plugin...\n{0}", e ); 236 } finally {
288 } 237 Monitor.Exit (_lock);
289 finally
290 {
291 Monitor.Exit( _lock );
292 }238 }
293 }239 }
294 240
295 241
296 private List<JIRAIssueItem> ConvertFromRemoteIssues( IList<RemoteIssue> issues )242 private List<JIRAIssueItem> ConvertFromRemoteIssues (IList<RemoteIssue> issues)
297 {243 {
298 List<JIRAIssueItem> result= new List<JIRAIssueItem>();244 List<JIRAIssueItem> result = new List<JIRAIssueItem> ();
299 245
300 foreach( RemoteIssue inIssue in issues )246 foreach (RemoteIssue inIssue in issues) {
301 {247 JIRAIssueItem outIssue = new JIRAIssueItem (inIssue.key, ConfigWidget.BaseURL);
302 JIRAIssueItem outIssue= new JIRAIssueItem( inIssue.key, _config.BaseUrl );248 outIssue.setDescription (inIssue.summary);
303 outIssue.setDescription(inIssue.summary);249 outIssue.Status = int.Parse (inIssue.status);
304 outIssue.Status= int.Parse( inIssue.status );
305 250
306 result.Add( outIssue );251 result.Add (outIssue);
307 }252 }
308 return result; 253 return result;
309 }254 }
310
311 /// <summary>
312 /// Temporary logging method until it's provided to plugins
313 /// </summary>
314 public void Log( string message, params object[] args )
315 {
316 string prefix= string.Format( "[Info {0:00}:{1:00}:{2:00}.{3:000}] [JIRA] ",
317 DateTime.Now.Hour,
318 DateTime.Now.Minute,
319 DateTime.Now.Second,
320 DateTime.Now.Millisecond );
321
322 Console.WriteLine( prefix + string.Format( message, args ) );
323 }
324 }255 }
325}256}
326\ No newline at end of file257\ No newline at end of file
327258
=== modified file 'Microblogging/Resources/Microblogging.addin.xml'
--- Microblogging/Resources/Microblogging.addin.xml 2009-05-18 06:07:24 +0000
+++ Microblogging/Resources/Microblogging.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path="/Do/Action">21 <Extension path="/Do/Action">
@@ -24,4 +25,8 @@
24 <Extension path="/Do/ItemSource">25 <Extension path="/Do/ItemSource">
25 <ItemSource type="Microblogging.FriendSource" />26 <ItemSource type="Microblogging.FriendSource" />
26 </Extension>27 </Extension>
28 <Extension path= "/Do/Config">
29 <Config type="Microblogging.Configuration" />
30 <Config type="Microblogging.GenConfig" />
31 </Extension>
27</Addin>32</Addin>
2833
=== modified file 'Microblogging/src/Configuration.cs'
--- Microblogging/src/Configuration.cs 2009-06-12 11:16:20 +0000
+++ Microblogging/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -25,11 +25,12 @@
2525
26using Twitterizer.Framework;26using Twitterizer.Framework;
2727
28using Mono.Unix;
28using Do.Platform.Linux;29using Do.Platform.Linux;
2930
30namespace Microblogging31namespace Microblogging
31{32{
32 public class Configuration : AbstractLoginWidget33 public class Configuration : AbstractLoginWidget, IConfigurable
33 {34 {
34 static Dictionary<Service, string> register_links;35 static Dictionary<Service, string> register_links;
35 public static event EventHandler ServiceChanged;36 public static event EventHandler ServiceChanged;
@@ -41,6 +42,15 @@
41 register_links = new Dictionary<Service, string> ();42 register_links = new Dictionary<Service, string> ();
42 SetupServiceLinks ();43 SetupServiceLinks ();
43 }44 }
45
46 public string Title {
47 get { return Catalog.GetString ("Login"); }
48 }
49
50 public Gtk.Bin GetConfiguration ()
51 {
52 return this;
53 }
44 54
45 public Configuration () : 55 public Configuration () :
46 base (Microblog.Preferences.MicroblogService, register_links[Microblog.Preferences.ActiveService])56 base (Microblog.Preferences.MicroblogService, register_links[Microblog.Preferences.ActiveService])
4757
=== modified file 'Microblogging/src/FriendSource.cs'
--- Microblogging/src/FriendSource.cs 2009-02-28 19:17:08 +0000
+++ Microblogging/src/FriendSource.cs 2009-06-20 02:49:57 +0000
@@ -35,7 +35,7 @@
35 /// This is a dummy class, all it does is set up the Miroblog class on Do load35 /// This is a dummy class, all it does is set up the Miroblog class on Do load
36 /// and return a configuration page.36 /// and return a configuration page.
37 /// </summary>37 /// </summary>
38 public sealed class FriendSource : ItemSource, IConfigurable38 public sealed class FriendSource : ItemSource
39 {39 {
40 public FriendSource()40 public FriendSource()
41 {41 {
@@ -45,7 +45,7 @@
45 public override string Name {45 public override string Name {
46 get { return Catalog.GetString ("Microblog friends"); }46 get { return Catalog.GetString ("Microblog friends"); }
47 }47 }
48 48
49 public override string Description {49 public override string Description {
50 get { return Catalog.GetString ("Indexes your microblog friends"); }50 get { return Catalog.GetString ("Indexes your microblog friends"); }
51 }51 }
@@ -66,10 +66,5 @@
66 {66 {
67 return (item as FriendItem).Statuses.Where (status => status.Id > 0).OfType<Item> ();67 return (item as FriendItem).Statuses.Where (status => status.Id > 0).OfType<Item> ();
68 }68 }
69
70 public Gtk.Bin GetConfiguration ()
71 {
72 return new Configuration ();
73 }
74 }69 }
75}70}
7671
=== modified file 'Microblogging/src/GenConfig.cs'
--- Microblogging/src/GenConfig.cs 2009-02-28 02:17:00 +0000
+++ Microblogging/src/GenConfig.cs 2009-06-19 08:23:32 +0000
@@ -23,9 +23,12 @@
2323
24using Gtk;24using Gtk;
2525
26using Mono.Unix;
27using Do.Platform.Linux;
28
26namespace Microblogging29namespace Microblogging
27{30{
28 public partial class GenConfig : Gtk.Bin31 public partial class GenConfig : Gtk.Bin, IConfigurable
29 {32 {
3033
31 public GenConfig ()34 public GenConfig ()
@@ -34,6 +37,15 @@
34 show_updates_chk.Active = Microblog.Preferences.ShowNotifications;37 show_updates_chk.Active = Microblog.Preferences.ShowNotifications;
35 show_dms_chk.Active = Microblog.Preferences.ShowDirectMessages;38 show_dms_chk.Active = Microblog.Preferences.ShowDirectMessages;
36 }39 }
40
41 public string Title {
42 get { return Catalog.GetString ("Updates"); }
43 }
44
45 public Gtk.Bin GetConfiguration ()
46 {
47 return this;
48 }
37 49
38 protected virtual void OnShowUpdatesChkClicked (object sender, EventArgs e)50 protected virtual void OnShowUpdatesChkClicked (object sender, EventArgs e)
39 {51 {
4052
=== modified file 'Microblogging/src/PostAction.cs'
--- Microblogging/src/PostAction.cs 2009-02-28 19:17:08 +0000
+++ Microblogging/src/PostAction.cs 2009-06-19 08:23:32 +0000
@@ -32,7 +32,7 @@
3232
33namespace Microblogging33namespace Microblogging
34{ 34{
35 public sealed class PostAction : Act, IConfigurable35 public sealed class PostAction : Act
36 {36 {
37 const int MaxMessageLength = 140;37 const int MaxMessageLength = 140;
38 38
@@ -112,11 +112,6 @@
112 112
113 return null;113 return null;
114 }114 }
115
116 public Gtk.Bin GetConfiguration ()
117 {
118 return new GenConfig ();
119 }
120115
121 string BuildTweet(string status, IEnumerable<Item> modItems)116 string BuildTweet(string status, IEnumerable<Item> modItems)
122 {117 {
123118
=== modified file 'Pastebin/Resources/Pastebin.addin.xml'
--- Pastebin/Resources/Pastebin.addin.xml 2009-03-31 23:19:25 +0000
+++ Pastebin/Resources/Pastebin.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
15 15
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
19 20
20 <!-- Extensions included in this assembly -->21 <!-- Extensions included in this assembly -->
@@ -22,4 +23,7 @@
22 <Extension path= "/Do/Action">23 <Extension path= "/Do/Action">
23 <Action type="Pastebin.PastebinAction" />24 <Action type="Pastebin.PastebinAction" />
24 </Extension>25 </Extension>
26 <Extension path= "/Do/Config">
27 <Config type="Pastebin.PastebinConfig" />
28 </Extension>
25</Addin>29</Addin>
2630
=== modified file 'Pastebin/gtk-gui/gui.stetic'
--- Pastebin/gtk-gui/gui.stetic 2009-01-22 04:43:21 +0000
+++ Pastebin/gtk-gui/gui.stetic 2009-06-19 08:23:32 +0000
@@ -2,8 +2,11 @@
2<stetic-interface>2<stetic-interface>
3 <configuration>3 <configuration>
4 <images-root-path>..</images-root-path>4 <images-root-path>..</images-root-path>
5 <target-gtk-version>2.12.1</target-gtk-version>5 <target-gtk-version>2.12</target-gtk-version>
6 </configuration>6 </configuration>
7 <import>
8 <widget-library name="../bin/Debug/Pastebin.dll" internal="true" />
9 </import>
7 <widget class="Gtk.Bin" id="Pastebin.PastebinConfig" design-size="300 300">10 <widget class="Gtk.Bin" id="Pastebin.PastebinConfig" design-size="300 300">
8 <property name="MemberName" />11 <property name="MemberName" />
9 <child>12 <child>
1013
=== modified file 'Pastebin/src/Config/PastebinConfig.cs'
--- Pastebin/src/Config/PastebinConfig.cs 2009-01-22 04:43:21 +0000
+++ Pastebin/src/Config/PastebinConfig.cs 2009-06-19 08:23:32 +0000
@@ -22,10 +22,12 @@
22using System.Linq;22using System.Linq;
23using System.Reflection;23using System.Reflection;
24using Do.Platform;24using Do.Platform;
25using Do.Platform.Linux;
26using Mono.Unix;
2527
26namespace Pastebin28namespace Pastebin
27{ 29{
28 public partial class PastebinConfig : Gtk.Bin30 public partial class PastebinConfig : Gtk.Bin, IConfigurable
29 { 31 {
30 static IPreferences prefs;32 static IPreferences prefs;
31 33
@@ -34,7 +36,16 @@
34 this.Build();36 this.Build();
35 SetupColumns();37 SetupColumns();
36 FillProviders();38 FillProviders();
37 } 39 }
40
41 public string Title {
42 get { return Catalog.GetString ("Pastebin"); }
43 }
44
45 public Gtk.Bin GetConfiguration ()
46 {
47 return this;
48 }
38 49
39 private void SetupColumns()50 private void SetupColumns()
40 { 51 {
4152
=== modified file 'Pastebin/src/PastebinAction.cs'
--- Pastebin/src/PastebinAction.cs 2009-04-11 21:18:05 +0000
+++ Pastebin/src/PastebinAction.cs 2009-06-19 08:23:32 +0000
@@ -34,7 +34,7 @@
3434
35namespace Pastebin35namespace Pastebin
36{36{
37 public class PastebinAction : Act, IConfigurable37 public class PastebinAction : Act
38 {38 {
39 public override string Name {39 public override string Name {
40 get { return Catalog.GetString ("Send to Pastebin"); }40 get { return Catalog.GetString ("Send to Pastebin"); }
@@ -115,13 +115,6 @@
115 115
116 if (!string.IsNullOrEmpty (url))116 if (!string.IsNullOrEmpty (url))
117 yield return new TextItem (url);117 yield return new TextItem (url);
118 }118 }
119
120 public Gtk.Bin GetConfiguration ()
121 {
122 return new PastebinConfig();
123 }
124 }119 }
125}120}
126
127
128121
=== modified file 'PingFM/Resources/PingFM.addin.xml'
--- PingFM/Resources/PingFM.addin.xml 2009-03-31 23:19:25 +0000
+++ PingFM/Resources/PingFM.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path="/Do/ItemSource">21 <Extension path="/Do/ItemSource">
@@ -24,4 +25,7 @@
24 <Extension path="/Do/Action">25 <Extension path="/Do/Action">
25 <Action type="PingFM.PingFMPost" />26 <Action type="PingFM.PingFMPost" />
26 </Extension>27 </Extension>
28 <Extension path= "/Do/Config">
29 <Config type="PingFM.Configuration" />
30 </Extension>
27</Addin>31</Addin>
2832
=== modified file 'PingFM/src/Configuration.cs'
--- PingFM/src/Configuration.cs 2009-01-12 04:00:07 +0000
+++ PingFM/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -25,9 +25,12 @@
25using Gtk;25using Gtk;
26using Gdk;26using Gdk;
2727
28using Do.Platform.Linux;
29using Mono.Unix;
30
28namespace PingFM31namespace PingFM
29{32{
30 public partial class Configuration : Gtk.Bin33 public partial class Configuration : Gtk.Bin, IConfigurable
31 {34 {
32 35
33 public Configuration()36 public Configuration()
@@ -36,6 +39,15 @@
36 appkey_entry.Text = PingFM.Preferences.AppKey;39 appkey_entry.Text = PingFM.Preferences.AppKey;
37 }40 }
3841
42 public string Title {
43 get { return Catalog.GetString ("Ping.FM"); }
44 }
45
46 public Gtk.Bin GetConfiguration ()
47 {
48 return this;
49 }
50
39 protected virtual void OnApplyBtnClicked (object sender, System.EventArgs e)51 protected virtual void OnApplyBtnClicked (object sender, System.EventArgs e)
40 {52 {
41 validate_lbl.Markup = "<i>Validating...</i>";53 validate_lbl.Markup = "<i>Validating...</i>";
4254
=== modified file 'PingFM/src/PingFMServiceItemSource.cs'
--- PingFM/src/PingFMServiceItemSource.cs 2009-01-02 21:57:13 +0000
+++ PingFM/src/PingFMServiceItemSource.cs 2009-06-19 08:23:32 +0000
@@ -29,7 +29,7 @@
29namespace PingFM29namespace PingFM
30{30{
31 31
32 public sealed class PingFMServiceItemSource : ItemSource, IConfigurable32 public sealed class PingFMServiceItemSource : ItemSource
33 {33 {
34 public override string Name {34 public override string Name {
35 get { return Catalog.GetString ("Ping.FM Services");}35 get { return Catalog.GetString ("Ping.FM Services");}
@@ -61,10 +61,5 @@
61 updateServices.IsBackground = true;61 updateServices.IsBackground = true;
62 updateServices.Start ();62 updateServices.Start ();
63 }63 }
64
65 public Gtk.Bin GetConfiguration ()
66 {
67 return new Configuration ();
68 }
69 }64 }
70}
71\ No newline at end of file65\ No newline at end of file
66}
7267
=== modified file 'RSS/Resources/RSS.addin.xml'
--- RSS/Resources/RSS.addin.xml 2009-03-31 23:19:25 +0000
+++ RSS/Resources/RSS.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path = "/Do/ItemSource">21 <Extension path = "/Do/ItemSource">
@@ -24,4 +25,7 @@
24 <Extension path= "/Do/Action">25 <Extension path= "/Do/Action">
25 <Action type="Do.Plugins.Rss.RssFeedAction" />26 <Action type="Do.Plugins.Rss.RssFeedAction" />
26 </Extension>27 </Extension>
28 <Extension path= "/Do/Config">
29 <Config type="Do.Plugins.Rss.Configuration" />
30 </Extension>
27</Addin>31</Addin>
2832
=== modified file 'RSS/src/Configuration.cs'
--- RSS/src/Configuration.cs 2009-01-22 03:46:13 +0000
+++ RSS/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -22,10 +22,12 @@
22using System;22using System;
23using System.IO;23using System.IO;
24using System.Reflection;24using System.Reflection;
25using Do.Platform.Linux;
26using Mono.Unix;
2527
26namespace Do.Plugins.Rss28namespace Do.Plugins.Rss
27{29{
28 public partial class Configuration : Gtk.Bin30 public partial class Configuration : Gtk.Bin, IConfigurable
29 {31 {
30 public Configuration ()32 public Configuration ()
31 {33 {
@@ -35,6 +37,15 @@
35 OpmlChooser.SetUri (RssItemSource.OpmlFile);37 OpmlChooser.SetUri (RssItemSource.OpmlFile);
36 }38 }
3739
40 public string Title {
41 get { return Catalog.GetString ("RSS"); }
42 }
43
44 public Gtk.Bin GetConfiguration ()
45 {
46 return this;
47 }
48
38 protected virtual void OnTimeoutValueChanged (object o, EventArgs e)49 protected virtual void OnTimeoutValueChanged (object o, EventArgs e)
39 {50 {
40 RssItemSource.Timeout = Timeout.ValueAsInt;51 RssItemSource.Timeout = Timeout.ValueAsInt;
4152
=== modified file 'RSS/src/RssItemSource.cs'
--- RSS/src/RssItemSource.cs 2009-01-22 03:46:13 +0000
+++ RSS/src/RssItemSource.cs 2009-06-19 08:23:32 +0000
@@ -28,7 +28,7 @@
2828
29namespace Do.Plugins.Rss29namespace Do.Plugins.Rss
30{30{
31 public class RssItemSource : ItemSource, IConfigurable31 public class RssItemSource : ItemSource
32 {32 {
33 private static List<Item> items; 33 private static List<Item> items;
34 private static IPreferences prefs;34 private static IPreferences prefs;
@@ -131,9 +131,5 @@
131 Log.Error("Could not read OPML file {0}: {1}", opmlFile, e.Message);131 Log.Error("Could not read OPML file {0}: {1}", opmlFile, e.Message);
132 }132 }
133 }133 }
134
135 public Gtk.Bin GetConfiguration () {
136 return new Configuration ();
137 }
138 }134 }
139}135}
140136
=== modified file 'RememberTheMilk/Resources/RTM.addin.xml'
--- RememberTheMilk/Resources/RTM.addin.xml 2009-04-22 03:29:31 +0000
+++ RememberTheMilk/Resources/RTM.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <!-- Extensions included in this assembly -->21 <!-- Extensions included in this assembly -->
@@ -35,4 +36,7 @@
35 <Action type="RememberTheMilk.RTMSetRecurrence" />36 <Action type="RememberTheMilk.RTMSetRecurrence" />
36 <Action type="RememberTheMilk.RTMUncompleteTask" />37 <Action type="RememberTheMilk.RTMUncompleteTask" />
37 </Extension>38 </Extension>
39 <Extension path= "/Do/Config">
40 <Config type="RememberTheMilk.Configuration" />
41 </Extension>
38</Addin>42</Addin>
3943
=== modified file 'RememberTheMilk/src/Configuration.cs'
--- RememberTheMilk/src/Configuration.cs 2009-01-29 16:58:01 +0000
+++ RememberTheMilk/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -21,13 +21,14 @@
21using Mono.Unix;21using Mono.Unix;
22using RtmNet;22using RtmNet;
23using Do.Platform;23using Do.Platform;
24using Do.Platform.Linux;
2425
25using Gtk;26using Gtk;
2627
2728
28namespace RememberTheMilk29namespace RememberTheMilk
29{30{
30 public partial class Configuration : Gtk.Bin31 public partial class Configuration : Gtk.Bin, IConfigurable
31 {32 {
32 //private static IPreferences prefs;33 //private static IPreferences prefs;
33 private LinkButton rtm_ref_btn;34 private LinkButton rtm_ref_btn;
@@ -52,6 +53,15 @@
52 {53 {
53 }54 }
5455
56 public string Title {
57 get { return Catalog.GetString ("Remember The Milk"); }
58 }
59
60 public Gtk.Bin GetConfiguration ()
61 {
62 return this;
63 }
64
55 protected virtual void OnConfirmChkbtnClicked (object sender, System.EventArgs e)65 protected virtual void OnConfirmChkbtnClicked (object sender, System.EventArgs e)
56 {66 {
57 RTM.Preferences.ActionNotification = confirm_chkbtn.Active;67 RTM.Preferences.ActionNotification = confirm_chkbtn.Active;
5868
=== modified file 'RememberTheMilk/src/RTMListItemSource.cs'
--- RememberTheMilk/src/RTMListItemSource.cs 2009-01-08 03:33:27 +0000
+++ RememberTheMilk/src/RTMListItemSource.cs 2009-06-19 08:23:32 +0000
@@ -26,7 +26,7 @@
2626
27namespace RememberTheMilk27namespace RememberTheMilk
28{ 28{
29 public class RTMListItemSource : ItemSource, IConfigurable29 public class RTMListItemSource : ItemSource
30 { 30 {
31 public override string Name {31 public override string Name {
32 get { return "Remember The Milk Task Lists"; }32 get { return "Remember The Milk Task Lists"; }
@@ -69,10 +69,5 @@
69 updateTasks.IsBackground = true;69 updateTasks.IsBackground = true;
70 updateTasks.Start ();70 updateTasks.Start ();
71 }71 }
72
73 public Gtk.Bin GetConfiguration ()
74 {
75 return new Configuration ();
76 }
77 }72 }
78}73}
7974
=== modified file 'RequestTracker/Resources/RequestTracker.addin.xml'
--- RequestTracker/Resources/RequestTracker.addin.xml 2009-03-31 23:19:25 +0000
+++ RequestTracker/Resources/RequestTracker.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,11 +15,14 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <!-- Extensions included in this assembly -->21 <!-- Extensions included in this assembly -->
21 <Extension path="/Do/Action">22 <Extension path="/Do/Action">
22 <Action type="RequestTracker.RTAction" />23 <Action type="RequestTracker.RTAction" />
23 </Extension>24 </Extension>
2425 <Extension path= "/Do/Config">
26 <Config type="RequestTracker.RTPrefs" />
27 </Extension>
25</Addin>28</Addin>
2629
=== modified file 'RequestTracker/src/Configuration.cs'
--- RequestTracker/src/Configuration.cs 2009-03-09 10:31:13 +0000
+++ RequestTracker/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -11,11 +11,20 @@
11{11{
12 12
13 [System.ComponentModel.ToolboxItem(true)]13 [System.ComponentModel.ToolboxItem(true)]
14 public partial class RTPrefs : Gtk.Bin14 public partial class RTPrefs : Gtk.Bin, IConfigurable
15 {15 {
16 Gtk.ListStore rtListStore;16 Gtk.ListStore rtListStore;
17 Gtk.TreeViewColumn nameColumn;17 Gtk.TreeViewColumn nameColumn;
18 Gtk.TreeViewColumn urlColumn;18 Gtk.TreeViewColumn urlColumn;
19
20 public string Title {
21 get { return Catalog.GetString ("Request Tracker"); }
22 }
23
24 public Gtk.Bin GetConfiguration ()
25 {
26 return this;
27 }
19 28
20 protected virtual void OnRemoveBtnClicked (object sender, System.EventArgs e)29 protected virtual void OnRemoveBtnClicked (object sender, System.EventArgs e)
21 {30 {
2231
=== modified file 'RequestTracker/src/RequestTrackerAction.cs'
--- RequestTracker/src/RequestTrackerAction.cs 2009-03-11 10:52:55 +0000
+++ RequestTracker/src/RequestTrackerAction.cs 2009-06-19 08:23:32 +0000
@@ -39,7 +39,7 @@
39 /// Given an ITextItem, RequestTrackerAction will construct a URL39 /// Given an ITextItem, RequestTrackerAction will construct a URL
40 /// and feed it to a web browser40 /// and feed it to a web browser
41 /// </summary>41 /// </summary>
42 class RTAction : Act, IConfigurable42 class RTAction : Act
43 {43 {
44 44
45 public override string Name {45 public override string Name {
@@ -109,12 +109,5 @@
109 {109 {
110 return string.Format (url, ticket);110 return string.Format (url, ticket);
111 }111 }
112
113 public Gtk.Bin GetConfiguration ()
114 {
115 return new RTPrefs ();
116 }
117
118 }112 }
119
120}113}
121114
=== modified file 'SqueezeCenter/Resources/SqueezeCenter.addin.xml'
--- SqueezeCenter/Resources/SqueezeCenter.addin.xml 2009-03-31 23:19:25 +0000
+++ SqueezeCenter/Resources/SqueezeCenter.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <!-- Extensions included in this assembly -->21 <!-- Extensions included in this assembly -->
@@ -33,5 +34,8 @@
33 <Extension path="/Do/ItemSource">34 <Extension path="/Do/ItemSource">
34 <ItemSource type="SqueezeCenter.ItemSource" />35 <ItemSource type="SqueezeCenter.ItemSource" />
35 </Extension>36 </Extension>
37 <Extension path= "/Do/Config">
38 <Config type="SqueezeCenter.Configuration" />
39 </Extension>
3640
37</Addin>41</Addin>
3842
=== modified file 'SqueezeCenter/src/Configuration.cs'
--- SqueezeCenter/src/Configuration.cs 2008-12-24 04:37:17 +0000
+++ SqueezeCenter/src/Configuration.cs 2009-06-19 08:23:32 +0000
@@ -12,11 +12,13 @@
12//// along with this program. If not, see <http://www.gnu.org/licenses/>.12//// along with this program. If not, see <http://www.gnu.org/licenses/>.
1313
14using System;14using System;
15using Do.Platform.Linux;
16using Mono.Unix;
1517
16namespace SqueezeCenter18namespace SqueezeCenter
17{19{
18 20
19 public partial class Configuration : Gtk.Bin21 public partial class Configuration : Gtk.Bin, IConfigurable
20 {22 {
21 23
22 public Configuration()24 public Configuration()
@@ -24,6 +26,15 @@
24 this.Build();26 this.Build();
25 this.LoadSettingsFromFile ();27 this.LoadSettingsFromFile ();
26 }28 }
29
30 public string Title {
31 get { return Catalog.GetString ("Squeezecenter"); }
32 }
33
34 public Gtk.Bin GetConfiguration ()
35 {
36 return this;
37 }
27 38
28 void LoadSettingsFromFile ()39 void LoadSettingsFromFile ()
29 {40 {
3041
=== modified file 'SqueezeCenter/src/ItemSource.cs'
--- SqueezeCenter/src/ItemSource.cs 2009-01-15 06:17:08 +0000
+++ SqueezeCenter/src/ItemSource.cs 2009-06-19 08:23:32 +0000
@@ -16,14 +16,13 @@
16using System.Collections.Generic;16using System.Collections.Generic;
17using System.Threading;17using System.Threading;
1818
19
20using Do.Universe;19using Do.Universe;
21using Do.Platform.Linux;20using Do.Platform.Linux;
2221
23namespace SqueezeCenter22namespace SqueezeCenter
24{23{
25 24
26 public class ItemSource : Do.Universe.ItemSource, IConfigurable25 public class ItemSource : Do.Universe.ItemSource
27 {26 {
28 List<Item> items; 27 List<Item> items;
29 List<AlbumMusicItem> albums;28 List<AlbumMusicItem> albums;
@@ -36,11 +35,6 @@
36 artists = new List<ArtistMusicItem>();35 artists = new List<ArtistMusicItem>();
37 UpdateItems ();36 UpdateItems ();
38 }37 }
39
40 public Gtk.Bin GetConfiguration ()
41 {
42 return new Configuration ();
43 }
4438
45 public override string Name { get { return "SqueezeCenter"; } }39 public override string Name { get { return "SqueezeCenter"; } }
46 public override string Description { get { return "Artists, albums and radio."; } }40 public override string Description { get { return "Artists, albums and radio."; } }
4741
=== modified file 'SystemServices/Resources/SystemServices.addin.xml'
--- SystemServices/Resources/SystemServices.addin.xml 2009-03-31 23:19:25 +0000
+++ SystemServices/Resources/SystemServices.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path = "/Do/ItemSource">21 <Extension path = "/Do/ItemSource">
@@ -25,4 +26,8 @@
25 <Action type="SystemServices.ServiceStopAction" />26 <Action type="SystemServices.ServiceStopAction" />
26 <Action type="SystemServices.ServiceStartAction" />27 <Action type="SystemServices.ServiceStartAction" />
27 </Extension>28 </Extension>
29 <Extension path= "/Do/Config">
30 <Config type="SystemServices.SystemServicesConfig" />
31 </Extension>
32
28</Addin>33</Addin>
2934
=== modified file 'SystemServices/src/ServiceItemSource.cs'
--- SystemServices/src/ServiceItemSource.cs 2008-12-31 20:57:41 +0000
+++ SystemServices/src/ServiceItemSource.cs 2009-06-20 02:49:57 +0000
@@ -31,7 +31,7 @@
31 /// <summary>31 /// <summary>
32 /// Source for services.32 /// Source for services.
33 /// </summary>33 /// </summary>
34 public class ServiceItemSource: ItemSource, IConfigurable {34 public class ServiceItemSource: ItemSource {
35 35
36 List<Item> items;36 List<Item> items;
37 37
@@ -63,11 +63,6 @@
63 public override void UpdateItems ()63 public override void UpdateItems ()
64 {64 {
65 items = SystemServices.LoadServices ();65 items = SystemServices.LoadServices ();
66 }
67
68 public Gtk.Bin GetConfiguration ()
69 {
70 return new SystemServicesConfig ();
71 }66 }
72 }67 }
73}68}
7469
=== modified file 'SystemServices/src/SystemServicesConfig.cs'
--- SystemServices/src/SystemServicesConfig.cs 2008-12-31 20:57:41 +0000
+++ SystemServices/src/SystemServicesConfig.cs 2009-06-19 08:23:32 +0000
@@ -20,12 +20,13 @@
20using System.Collections.Generic;20using System.Collections.Generic;
21using Gtk;21using Gtk;
22using Mono.Unix;22using Mono.Unix;
23using Do.Platform.Linux;
2324
24namespace SystemServices {25namespace SystemServices {
25 26
26 [System.ComponentModel.Category("SystemServices")]27 [System.ComponentModel.Category("SystemServices")]
27 [System.ComponentModel.ToolboxItem(true)]28 [System.ComponentModel.ToolboxItem(true)]
28 public partial class SystemServicesConfig : Gtk.Bin29 public partial class SystemServicesConfig : Gtk.Bin, IConfigurable
29 {30 {
30 public SystemServicesConfig () {31 public SystemServicesConfig () {
31 this.Build ();32 this.Build ();
@@ -43,6 +44,15 @@
43 this.eCommand.Text = SystemServices.SudoCommand;44 this.eCommand.Text = SystemServices.SudoCommand;
44 }45 }
4546
47 public string Title {
48 get { return Catalog.GetString ("System Services"); }
49 }
50
51 public Gtk.Bin GetConfiguration ()
52 {
53 return this;
54 }
55
46 /// <summary>56 /// <summary>
47 /// On update eCommand textbox save this text to preferences.57 /// On update eCommand textbox save this text to preferences.
48 /// </summary>58 /// </summary>
4959
=== modified file 'Tomboy/Resources/Tomboy.addin.xml'
--- Tomboy/Resources/Tomboy.addin.xml 2009-06-11 07:36:57 +0000
+++ Tomboy/Resources/Tomboy.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <Extension path="/Do/ItemSource">21 <Extension path="/Do/ItemSource">
@@ -24,4 +25,7 @@
24 <Action type="Tomboy.NewNoteAction" />25 <Action type="Tomboy.NewNoteAction" />
25 <Action type="Tomboy.SearchNotesAction" />26 <Action type="Tomboy.SearchNotesAction" />
26 </Extension>27 </Extension>
28 <Extension path= "/Do/Config">
29 <Config type="Tomboy.TomboyConfiguration" />
30 </Extension>
27</Addin>31</Addin>
2832
=== modified file 'Tomboy/src/NewNoteAction.cs'
--- Tomboy/src/NewNoteAction.cs 2009-01-21 19:21:55 +0000
+++ Tomboy/src/NewNoteAction.cs 2009-06-20 02:49:57 +0000
@@ -30,7 +30,7 @@
30namespace Tomboy30namespace Tomboy
31{ 31{
3232
33 public class NewNoteAction : Act, IConfigurable33 public class NewNoteAction : Act
34 {34 {
35 35
36 public override string Name {36 public override string Name {
@@ -86,10 +86,5 @@
86 86
87 yield break;87 yield break;
88 }88 }
89
90 public Gtk.Bin GetConfiguration ()
91 {
92 return new TomboyConfiguration ();
93 }
94 }89 }
95}90}
9691
=== modified file 'Tomboy/src/TomboyConfiguration.cs'
--- Tomboy/src/TomboyConfiguration.cs 2009-01-21 19:21:55 +0000
+++ Tomboy/src/TomboyConfiguration.cs 2009-06-19 08:23:32 +0000
@@ -26,7 +26,10 @@
2626
27using System;27using System;
2828
29using Mono.Unix;
30
29using Do.Platform;31using Do.Platform;
32using Do.Platform.Linux;
3033
31namespace Tomboy34namespace Tomboy
32{35{
@@ -34,7 +37,7 @@
34 37
35 [System.ComponentModel.Category("Tomboy")]38 [System.ComponentModel.Category("Tomboy")]
36 [System.ComponentModel.ToolboxItem(true)]39 [System.ComponentModel.ToolboxItem(true)]
37 public partial class TomboyConfiguration : Gtk.Bin40 public partial class TomboyConfiguration : Gtk.Bin, IConfigurable
38 {41 {
39 private const string DeriveTitlePrefKey = "deriveTitle";42 private const string DeriveTitlePrefKey = "deriveTitle";
40 private const string TitleFirstPrefKey = "titleFirst";43 private const string TitleFirstPrefKey = "titleFirst";
@@ -45,6 +48,15 @@
45 {48 {
46 prefs = Services.Preferences.Get<TomboyConfiguration> ();49 prefs = Services.Preferences.Get<TomboyConfiguration> ();
47 }50 }
51
52 public string Title {
53 get { return Catalog.GetString ("Tomboy"); }
54 }
55
56 public Gtk.Bin GetConfiguration ()
57 {
58 return this;
59 }
48 60
49 public static bool DeriveTitle61 public static bool DeriveTitle
50 {62 {
5163
=== modified file 'Translate/Resources/Translate.addin.xml'
--- Translate/Resources/Translate.addin.xml 2009-04-21 03:02:19 +0000
+++ Translate/Resources/Translate.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,9 +15,13 @@
15 15
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
19 20
20 <Extension path="/Do/Action">21 <Extension path="/Do/Action">
21 <Action type="Translate.TranslateAction"/>22 <Action type="Translate.TranslateAction"/>
22 </Extension>23 </Extension>
24 <Extension path= "/Do/Config">
25 <Config type="Translate.ConfigUI" />
26 </Extension>
23</Addin>27</Addin>
2428
=== modified file 'Translate/src/TranslateAction.cs'
--- Translate/src/TranslateAction.cs 2009-04-08 15:19:19 +0000
+++ Translate/src/TranslateAction.cs 2009-06-20 02:49:57 +0000
@@ -33,7 +33,7 @@
33namespace Translate33namespace Translate
34{34{
3535
36 public class TranslateAction : Act, IConfigurable36 public class TranslateAction : Act
37 {37 {
3838
39 const string UrlPattern = "^(https?://)"39 const string UrlPattern = "^(https?://)"
@@ -126,11 +126,6 @@
126 Services.Environment.OpenUrl (url);126 Services.Environment.OpenUrl (url);
127 }127 }
128 yield break;128 yield break;
129 }
130
131 public Gtk.Bin GetConfiguration ()
132 {
133 return new ConfigUI ();
134 } 129 }
135 }130 }
136}
137\ No newline at end of file131\ No newline at end of file
132}
138133
=== modified file 'Translate/src/UI/ConfigUI.cs'
--- Translate/src/UI/ConfigUI.cs 2009-04-08 07:03:00 +0000
+++ Translate/src/UI/ConfigUI.cs 2009-06-20 02:26:06 +0000
@@ -22,13 +22,14 @@
22using System.Collections.Generic;22using System.Collections.Generic;
23using System.Threading;23using System.Threading;
24using Do.Platform;24using Do.Platform;
25using Do.Platform.Linux;
2526
26using Mono.Unix;27using Mono.Unix;
2728
28namespace Translate29namespace Translate
29{30{
30 31
31 public partial class ConfigUI : Gtk.Bin32 public partial class ConfigUI : Gtk.Bin, IConfigurable
32 {33 {
33 static IPreferences TranslatePluginPrefs;34 static IPreferences TranslatePluginPrefs;
34 35
@@ -42,7 +43,16 @@
42 {43 {
43 TranslatePluginPrefs = Services.Preferences.Get<Translate.ConfigUI> ();44 TranslatePluginPrefs = Services.Preferences.Get<Translate.ConfigUI> ();
44 }45 }
45 46
47 public string Title {
48 get { return Catalog.GetString ("Translate"); }
49 }
50
51 public Gtk.Bin GetConfiguration ()
52 {
53 return this;
54 }
55
46 public void SetupColumns ()56 public void SetupColumns ()
47 { 57 {
48 //setup columns58 //setup columns
4959
=== modified file 'YouTube/Resources/Youtube.addin.xml'
--- YouTube/Resources/Youtube.addin.xml 2009-05-07 19:49:44 +0000
+++ YouTube/Resources/Youtube.addin.xml 2009-06-19 08:23:32 +0000
@@ -15,6 +15,7 @@
1515
16 <Dependencies>16 <Dependencies>
17 <Addin id="Universe" version="1.0" />17 <Addin id="Universe" version="1.0" />
18 <Addin id="Platform.Linux" version="1.0" />
18 </Dependencies>19 </Dependencies>
1920
20 <!-- Extensions included in this assembly -->21 <!-- Extensions included in this assembly -->
@@ -27,4 +28,7 @@
27 <Extension path = "/Do/Action">28 <Extension path = "/Do/Action">
28 <Action type="Do.Universe.YouTubeSearchAction" />29 <Action type="Do.Universe.YouTubeSearchAction" />
29 </Extension>30 </Extension>
31 <Extension path= "/Do/Config">
32 <Config type="Do.Universe.YouTubeConfig" />
33 </Extension>
30</Addin>34</Addin>
3135
=== modified file 'YouTube/src/YouTubeFavoriteItemSource.cs'
--- YouTube/src/YouTubeFavoriteItemSource.cs 2009-02-06 19:23:56 +0000
+++ YouTube/src/YouTubeFavoriteItemSource.cs 2009-06-19 08:23:32 +0000
@@ -8,7 +8,7 @@
88
9namespace Do.Universe9namespace Do.Universe
10{10{
11 public class YouTubeFavoriteItemSource : ItemSource, IConfigurable11 public class YouTubeFavoriteItemSource : ItemSource
12 {12 {
13 public YouTubeFavoriteItemSource()13 public YouTubeFavoriteItemSource()
14 {14 {
@@ -34,11 +34,5 @@
34 t.IsBackground = true;34 t.IsBackground = true;
35 t.Start();35 t.Start();
36 }36 }
37
38 public Gtk.Bin GetConfiguration ()
39 {
40 return new YouTubeConfig ();
41 }
42
43 }37 }
44}38}
4539
=== modified file 'YouTube/src/YoutubeConfig.cs'
--- YouTube/src/YoutubeConfig.cs 2009-02-01 20:19:36 +0000
+++ YouTube/src/YoutubeConfig.cs 2009-06-19 08:23:32 +0000
@@ -2,11 +2,12 @@
2using Gtk;2using Gtk;
3using Do.Platform;3using Do.Platform;
4using Do.Platform.Linux;4using Do.Platform.Linux;
5using Mono.Unix;
56
6namespace Do.Universe7namespace Do.Universe
7{ 8{
8 9
9 public class YouTubeConfig : AbstractLoginWidget10 public class YouTubeConfig : AbstractLoginWidget, IConfigurable
10 {11 {
11 const string Uri = "http://www.youtube.com/signup?next_url=/index&";12 const string Uri = "http://www.youtube.com/signup?next_url=/index&";
12 13
@@ -15,8 +16,16 @@
15 Username = Youtube.Preferences.Username;16 Username = Youtube.Preferences.Username;
16 Password = Youtube.Preferences.Password;17 Password = Youtube.Preferences.Password;
17 }18 }
18 19
19 20 public string Title {
21 get { return Catalog.GetString ("Youtube"); }
22 }
23
24 public Gtk.Bin GetConfiguration ()
25 {
26 return this;
27 }
28
20 protected override void SaveAccountData(string username, string password)29 protected override void SaveAccountData(string username, string password)
21 {30 {
22 Youtube.Preferences.Username = username;31 Youtube.Preferences.Username = username;

Subscribers

People subscribed via source and target branches