diff --git a/SparkleShare/Windows/SparkleController.cs b/SparkleShare/Windows/SparkleController.cs index 73f063f2..630c4756 100644 --- a/SparkleShare/Windows/SparkleController.cs +++ b/SparkleShare/Windows/SparkleController.cs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +using System.Reflection; using SparkleLib; using System; using System.Collections.Generic; @@ -30,6 +31,15 @@ namespace SparkleShare { public class SparkleController : SparkleControllerBase { + public override string PluginsPath + { + get + { + return Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "plugins"); + } + } + + public SparkleController () : base () { } diff --git a/SparkleShare/Windows/SparkleSetup.cs b/SparkleShare/Windows/SparkleSetup.cs index b1d3dabe..d98e36d4 100644 --- a/SparkleShare/Windows/SparkleSetup.cs +++ b/SparkleShare/Windows/SparkleSetup.cs @@ -52,8 +52,8 @@ namespace SparkleShare { switch (type) { case PageType.Add: tabControl.SelectedIndex = 1; - if (!string.IsNullOrEmpty (Controller.PreviousServer)) - ServerEntry.Text = Controller.PreviousServer; + if (!string.IsNullOrEmpty (Controller.PreviousUrl)) + ServerEntry.Text = Controller.PreviousUrl; else ServerEntry.Text = ""; FolderEntry.Text = ""; @@ -78,6 +78,14 @@ namespace SparkleShare { tabControl.SelectedIndex = 2; Show (); break; + case PageType.Tutorial: + if (Controller.TutorialPageNumber==1) + Controller.TutorialSkipped (); + else + Controller.ShowAddPage (); + break; + default: + throw new NotImplementedException("unknown PageType"); } }); }; diff --git a/SparkleShare/Windows/SparkleShare.csproj b/SparkleShare/Windows/SparkleShare.csproj index aa14867a..04d1290a 100644 --- a/SparkleShare/Windows/SparkleShare.csproj +++ b/SparkleShare/Windows/SparkleShare.csproj @@ -80,6 +80,9 @@ SparkleExtensions.cs + + SparklePlugin.cs + @@ -225,4 +228,48 @@ Icons.resx + + + plugins\bitbucket.png + Always + + + plugins\github.png + Always + + + plugins\gitorious.png + Always + + + plugins\gnome.png + Always + + + plugins\own-server.png + Always + + + + + plugins\bitbucket.xml + Always + + + plugins\github.xml + Always + + + plugins\gitorious.xml + Always + + + plugins\gnome.xml + Always + + + plugins\own-server.xml + Always + + \ No newline at end of file diff --git a/SparkleShare/Windows/build.cmd b/SparkleShare/Windows/build.cmd index f38f4de7..116c7abc 100644 --- a/SparkleShare/Windows/build.cmd +++ b/SparkleShare/Windows/build.cmd @@ -1,4 +1,7 @@ @echo off + +call %~dp0\..\..\data\plugins\build.cmd + set WinDirNet=%WinDir%\Microsoft.NET\Framework set msbuild="%WinDirNet%\v3.5\msbuild.exe" if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe" diff --git a/data/plugins/build.cmd b/data/plugins/build.cmd new file mode 100644 index 00000000..88e88349 --- /dev/null +++ b/data/plugins/build.cmd @@ -0,0 +1,11 @@ +@echo off +pushd %~dp0 + +set xslt=..\..\tools\xslt\bin\release\xslt.exe +if not exist %xslt% call ..\..\tools\xslt\build.cmd + +for %%a in (*.xml.in) do ( + %xslt% parse_plugins.xsl %%a %%~dpna +) + +popd diff --git a/data/plugins/parse_plugins.xsl b/data/plugins/parse_plugins.xsl new file mode 100644 index 00000000..bded3cc8 --- /dev/null +++ b/data/plugins/parse_plugins.xsl @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/xslt/Program.cs b/tools/xslt/Program.cs new file mode 100644 index 00000000..3c83769a --- /dev/null +++ b/tools/xslt/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Xml.Xsl; + +namespace xslt { + class Program { + static void Main (string [] args) + { + if (args.Length < 3) { + Console.WriteLine ("usage: xslt.exe "); + return; + } + + var xsl = new XslCompiledTransform (); + xsl.Load (args [0]); + xsl.Transform (args [1], args [2]); + } + } +} diff --git a/tools/xslt/Properties/AssemblyInfo.cs b/tools/xslt/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..de3f66b6 --- /dev/null +++ b/tools/xslt/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle ("xslt")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("Arbor")] +[assembly: AssemblyProduct ("xslt")] +[assembly: AssemblyCopyright ("Copyright © Arbor 2011")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible (false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid ("651c6b20-ae3a-4ddb-926d-58fae061a383")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion ("1.0.0.0")] +[assembly: AssemblyFileVersion ("1.0.0.0")] diff --git a/tools/xslt/build.cmd b/tools/xslt/build.cmd new file mode 100644 index 00000000..d6db03bd --- /dev/null +++ b/tools/xslt/build.cmd @@ -0,0 +1,6 @@ +@echo off +set WinDirNet=%WinDir%\Microsoft.NET\Framework +set msbuild="%WinDirNet%\v3.5\msbuild.exe" +if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe" + +%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" %~dp0\xslt.sln diff --git a/tools/xslt/xslt.csproj b/tools/xslt/xslt.csproj new file mode 100644 index 00000000..f587b44e --- /dev/null +++ b/tools/xslt/xslt.csproj @@ -0,0 +1,59 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {61025396-A57B-4566-9C2D-2F6A51681A2C} + Exe + Properties + xslt + xslt + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + \ No newline at end of file diff --git a/tools/xslt/xslt.sln b/tools/xslt/xslt.sln new file mode 100644 index 00000000..2e811fcd --- /dev/null +++ b/tools/xslt/xslt.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xslt", "xslt.csproj", "{61025396-A57B-4566-9C2D-2F6A51681A2C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {61025396-A57B-4566-9C2D-2F6A51681A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61025396-A57B-4566-9C2D-2F6A51681A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61025396-A57B-4566-9C2D-2F6A51681A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61025396-A57B-4566-9C2D-2F6A51681A2C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal