fix errors after merge, add code to support new features
This commit is contained in:
parent
89ecfe2d20
commit
a3a98e42c0
|
@ -14,6 +14,7 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
using SparkleLib;
|
using SparkleLib;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -30,6 +31,15 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public class SparkleController : SparkleControllerBase {
|
public class SparkleController : SparkleControllerBase {
|
||||||
|
|
||||||
|
public override string PluginsPath
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "plugins");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public SparkleController () : base ()
|
public SparkleController () : base ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ namespace SparkleShare {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PageType.Add:
|
case PageType.Add:
|
||||||
tabControl.SelectedIndex = 1;
|
tabControl.SelectedIndex = 1;
|
||||||
if (!string.IsNullOrEmpty (Controller.PreviousServer))
|
if (!string.IsNullOrEmpty (Controller.PreviousUrl))
|
||||||
ServerEntry.Text = Controller.PreviousServer;
|
ServerEntry.Text = Controller.PreviousUrl;
|
||||||
else
|
else
|
||||||
ServerEntry.Text = "";
|
ServerEntry.Text = "";
|
||||||
FolderEntry.Text = "";
|
FolderEntry.Text = "";
|
||||||
|
@ -78,6 +78,14 @@ namespace SparkleShare {
|
||||||
tabControl.SelectedIndex = 2;
|
tabControl.SelectedIndex = 2;
|
||||||
Show ();
|
Show ();
|
||||||
break;
|
break;
|
||||||
|
case PageType.Tutorial:
|
||||||
|
if (Controller.TutorialPageNumber==1)
|
||||||
|
Controller.TutorialSkipped ();
|
||||||
|
else
|
||||||
|
Controller.ShowAddPage ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new NotImplementedException("unknown PageType");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -80,6 +80,9 @@
|
||||||
<Compile Include="..\SparkleExtensions.cs">
|
<Compile Include="..\SparkleExtensions.cs">
|
||||||
<Link>SparkleExtensions.cs</Link>
|
<Link>SparkleExtensions.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\SparklePlugin.cs">
|
||||||
|
<Link>SparklePlugin.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ApplicationSchemeHandler.cs" />
|
<Compile Include="ApplicationSchemeHandler.cs" />
|
||||||
<Compile Include="AssemblyInfo.cs" />
|
<Compile Include="AssemblyInfo.cs" />
|
||||||
<Compile Include="controls\ExampleTextBox.cs">
|
<Compile Include="controls\ExampleTextBox.cs">
|
||||||
|
@ -225,4 +228,48 @@
|
||||||
<LastGenOutput>Icons.resx</LastGenOutput>
|
<LastGenOutput>Icons.resx</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\..\data\plugins\bitbucket.png">
|
||||||
|
<Link>plugins\bitbucket.png</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\github.png">
|
||||||
|
<Link>plugins\github.png</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\gitorious.png">
|
||||||
|
<Link>plugins\gitorious.png</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\gnome.png">
|
||||||
|
<Link>plugins\gnome.png</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\own-server.png">
|
||||||
|
<Link>plugins\own-server.png</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\..\data\plugins\bitbucket.xml">
|
||||||
|
<Link>plugins\bitbucket.xml</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\github.xml">
|
||||||
|
<Link>plugins\github.xml</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\gitorious.xml">
|
||||||
|
<Link>plugins\gitorious.xml</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\gnome.xml">
|
||||||
|
<Link>plugins\gnome.xml</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="..\..\data\plugins\own-server.xml">
|
||||||
|
<Link>plugins\own-server.xml</Link>
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,4 +1,7 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
call %~dp0\..\..\data\plugins\build.cmd
|
||||||
|
|
||||||
set WinDirNet=%WinDir%\Microsoft.NET\Framework
|
set WinDirNet=%WinDir%\Microsoft.NET\Framework
|
||||||
set msbuild="%WinDirNet%\v3.5\msbuild.exe"
|
set msbuild="%WinDirNet%\v3.5\msbuild.exe"
|
||||||
if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe"
|
if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe"
|
||||||
|
|
11
data/plugins/build.cmd
Normal file
11
data/plugins/build.cmd
Normal file
|
@ -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
|
33
data/plugins/parse_plugins.xsl
Normal file
33
data/plugins/parse_plugins.xsl
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
<xsl:output method="xml" indent="yes" encoding="utf-8" />
|
||||||
|
|
||||||
|
<!-- rename tags with underscore to name without underscore -->
|
||||||
|
|
||||||
|
<xsl:template match="//_name">
|
||||||
|
<name>
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</name>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="//_description">
|
||||||
|
<description>
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</description>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="//_example">
|
||||||
|
<example>
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
</example>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- copy anything else -->
|
||||||
|
<xsl:template match="@*|node()">
|
||||||
|
<xsl:copy>
|
||||||
|
<xsl:apply-templates select="@*|node()"/>
|
||||||
|
</xsl:copy>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
18
tools/xslt/Program.cs
Normal file
18
tools/xslt/Program.cs
Normal file
|
@ -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 <file.xsl> <input.xml> <output.xml>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var xsl = new XslCompiledTransform ();
|
||||||
|
xsl.Load (args [0]);
|
||||||
|
xsl.Transform (args [1], args [2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
tools/xslt/Properties/AssemblyInfo.cs
Normal file
36
tools/xslt/Properties/AssemblyInfo.cs
Normal file
|
@ -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")]
|
6
tools/xslt/build.cmd
Normal file
6
tools/xslt/build.cmd
Normal file
|
@ -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
|
59
tools/xslt/xslt.csproj
Normal file
59
tools/xslt/xslt.csproj
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>9.0.21022</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{61025396-A57B-4566-9C2D-2F6A51681A2C}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>xslt</RootNamespace>
|
||||||
|
<AssemblyName>xslt</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml.Linq">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.DataSetExtensions">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
20
tools/xslt/xslt.sln
Normal file
20
tools/xslt/xslt.sln
Normal file
|
@ -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
|
Loading…
Reference in a new issue