Rename SparkleLib to Sparkles
1
.gitignore
vendored
|
@ -33,7 +33,6 @@ missing
|
||||||
build/m4/shave/shave
|
build/m4/shave/shave
|
||||||
build/m4/*.m4
|
build/m4/*.m4
|
||||||
build/m4/shave/shave-libtool
|
build/m4/shave/shave-libtool
|
||||||
SparkleLib/Defines.cs
|
|
||||||
SparkleShare/Linux/sparkleshare
|
SparkleShare/Linux/sparkleshare
|
||||||
SparkleShare/Mac/git*
|
SparkleShare/Mac/git*
|
||||||
gnome-doc-utils.make
|
gnome-doc-utils.make
|
||||||
|
|
13
Makefile.am
|
@ -1,22 +1,23 @@
|
||||||
basedirs = build SparkleLib SparkleLib/Git
|
basedirs = build Sparkles Sparkles/Git
|
||||||
|
|
||||||
SUBDIRS = $(basedirs) $(GUISUBDIRS)
|
SUBDIRS = $(basedirs) $(GUISUBDIRS)
|
||||||
DIST_SUBDIRS = $(basedirs) SparkleShare
|
DIST_SUBDIRS = $(basedirs) SparkleShare
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
News.txt \
|
News.txt \
|
||||||
README.md \
|
README.md \
|
||||||
legal/License_for_SparkleShare.txt \
|
legal/License_for_SparkleShare.txt \
|
||||||
legal/License_for_SparkleLib.txt \
|
legal/License_for_Sparkles.txt \
|
||||||
legal/Authors.txt \
|
legal/Authors.txt \
|
||||||
SparkleShare/Linux/README.md \
|
SparkleShare/Linux/README.md \
|
||||||
SparkleShare/Linux/org.sparkleshare.SparkleShare.appdata.xml
|
SparkleShare/Linux/org.sparkleshare.SparkleShare.appdata.xml
|
||||||
|
|
||||||
DISTCLEANFILES = \
|
DISTCLEANFILES = \
|
||||||
intltool-extract \
|
intltool-extract \
|
||||||
intltool-merge \
|
intltool-merge \
|
||||||
intltool-update \
|
intltool-update \
|
||||||
gnome-doc-utils.make
|
gnome-doc-utils.make
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
rm -rf $(top_builddir)/bin
|
rm -rf $(top_builddir)/bin
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ SparkleShare uses the version control system [Git](https://git-scm.com/) under t
|
||||||
|
|
||||||
|
|
||||||
## Free and Open Source
|
## Free and Open Source
|
||||||
`SparkleShare` is Free and Open Source software and licensed under the [GNU General Public License version 3 or later](legal/License_for_SparkleShare.txt). You are welcome to change and redistribute it under certain conditions. Its library `SparkleLib` is licensed under the [GNU Lesser General Public License version 3 or later](legal/License_for_SparkleLib.txt).
|
`SparkleShare` is Free and Open Source software and licensed under the [GNU General Public License version 3 or later](legal/License_for_SparkleShare.txt). You are welcome to change and redistribute it under certain conditions. Its library `Sparkles` is licensed under the [GNU Lesser General Public License version 3 or later](legal/License_for_Sparkles.txt).
|
||||||
|
|
||||||
|
|
||||||
## Compiling from source
|
## Compiling from source
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual Studio 2010
|
# Visual Studio 2010
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Linux", "Linux\SparkleShare.Linux.csproj", "{CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Mac", "SparkleShare\Mac\SparkleShare.Mac.csproj", "{CF5BC8DB-A633-4FCC-8A3E-E3AC9B59FABC}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleLib", "..\SparkleLib\SparkleLib.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles", "Sparkles\Sparkles.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleLib.Git", "..\SparkleLib\Git\SparkleLib.Git.csproj", "{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles.Git", "Sparkles\Git\Sparkles.Git.csproj", "{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Windows", "Windows\SparkleShare.Windows.csproj", "{728483AA-E34B-4441-BF2C-C8BC2901E4E0}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Windows", "SparkleShare\Windows\SparkleShare.Windows.csproj", "{728483AA-E34B-4441-BF2C-C8BC2901E4E0}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
@ -19,6 +19,8 @@ using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class SparkleAboutController {
|
public class SparkleAboutController {
|
||||||
|
@ -39,11 +41,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public SparkleAboutController ()
|
public SparkleAboutController ()
|
||||||
{
|
{
|
||||||
RunningVersion = SparkleLib.Backend.Version;
|
RunningVersion = InstallationInfo.Version;
|
||||||
|
|
||||||
SparkleShare.Controller.ShowAboutWindowEvent += delegate {
|
SparkleShare.Controller.ShowAboutWindowEvent += delegate {
|
||||||
ShowWindowEvent ();
|
ShowWindowEvent ();
|
||||||
new Thread (() => CheckForNewVersion ()).Start ();
|
new Thread (CheckForNewVersion).Start ();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,13 +56,13 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CheckForNewVersion ()
|
void CheckForNewVersion ()
|
||||||
{
|
{
|
||||||
UpdateLabelEvent ("Checking for updates...");
|
UpdateLabelEvent ("Checking for updates...");
|
||||||
Thread.Sleep (500);
|
Thread.Sleep (500);
|
||||||
|
|
||||||
WebClient web_client = new WebClient ();
|
var web_client = new WebClient ();
|
||||||
Uri uri = new Uri ("http://www.sparkleshare.org/version");
|
var uri = new Uri ("http://www.sparkleshare.org/version");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
string latest_version = web_client.DownloadString (uri).Trim ();
|
string latest_version = web_client.DownloadString (uri).Trim ();
|
||||||
|
|
|
@ -23,7 +23,7 @@ using System.Net.Mime;
|
||||||
using System.Net.Security;
|
using System.Net.Security;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare
|
namespace SparkleShare
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,8 +21,8 @@ using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
using SparkleLib.Git;
|
using Sparkles.Git;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
|
|
||||||
// Path where the plugins are kept
|
// Path where the plugins are kept
|
||||||
public abstract string PluginsPath { get; }
|
public abstract string PresetsPath { get; }
|
||||||
|
|
||||||
// Enables SparkleShare to start automatically at login
|
// Enables SparkleShare to start automatically at login
|
||||||
public abstract void CreateStartupItem ();
|
public abstract void CreateStartupItem ();
|
||||||
|
@ -212,11 +212,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public virtual void Initialize ()
|
public virtual void Initialize ()
|
||||||
{
|
{
|
||||||
Logger.LogInfo ("Environment", "SparkleShare " + Backend.Version);
|
Logger.LogInfo ("Environment", "SparkleShare " + InstallationInfo.Version);
|
||||||
Logger.LogInfo ("Environment", "Git " + GitCommand.GitVersion);
|
Logger.LogInfo ("Environment", "Git " + GitCommand.GitVersion);
|
||||||
Logger.LogInfo ("Environment", Backend.Platform + " (" + Environment.OSVersion + ")");
|
Logger.LogInfo ("Environment", InstallationInfo.Platform + " (" + Environment.OSVersion + ")");
|
||||||
|
|
||||||
Plugin.PluginsPath = PluginsPath;
|
Preset.PresetsPath = PresetsPath;
|
||||||
InstallProtocolHandler ();
|
InstallProtocolHandler ();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -394,7 +394,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
repo = (BaseRepository) Activator.CreateInstance (
|
repo = (BaseRepository) Activator.CreateInstance (
|
||||||
Type.GetType ("SparkleLib." + backend + "." + backend + "Repository, SparkleLib." + backend),
|
Type.GetType ("Sparkles." + backend + "." + backend + "Repository, Sparkles." + backend),
|
||||||
new object [] { folder_path, Config });
|
new object [] { folder_path, Config });
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -561,7 +561,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.fetcher = (BaseFetcher) Activator.CreateInstance (
|
this.fetcher = (BaseFetcher) Activator.CreateInstance (
|
||||||
Type.GetType ("SparkleLib." + backend + ".SparkleFetcher, SparkleLib." + backend), info);
|
Type.GetType ("Sparkles." + backend + "." + backend + "Fetcher, Sparkles." + backend), info);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.LogInfo ("Controller",
|
Logger.LogInfo ("Controller",
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
SUBDIRS = HTML \
|
SUBDIRS = HTML \
|
||||||
Plugins \
|
Presets \
|
||||||
Pixmaps
|
Pixmaps
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<sparkleshare>
|
|
||||||
<plugin>
|
|
||||||
<info>
|
|
||||||
<name>Gitorious</name>
|
|
||||||
<description>Open source infrastructure for hosting open source projects</description>
|
|
||||||
<icon>gitorious.png</icon>
|
|
||||||
<backend>Git</backend>
|
|
||||||
<fingerprint>7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d</fingerprint>
|
|
||||||
</info>
|
|
||||||
<address>
|
|
||||||
<value>ssh://git@gitorious.org/</value>
|
|
||||||
<example/>
|
|
||||||
</address>
|
|
||||||
<path>
|
|
||||||
<value/>
|
|
||||||
<example>/project/repository</example>
|
|
||||||
</path>
|
|
||||||
</plugin>
|
|
||||||
</sparkleshare>
|
|
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,19 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<sparkleshare>
|
|
||||||
<plugin>
|
|
||||||
<info>
|
|
||||||
<name>SparkleShare.Net</name>
|
|
||||||
<description>The easiest way to share projects with SparkleShare</description>
|
|
||||||
<icon>ssnet.png</icon>
|
|
||||||
<backend>Git</backend>
|
|
||||||
</info>
|
|
||||||
<address>
|
|
||||||
<value>ssh://storage@sparkleshare.net/</value>
|
|
||||||
<example/>
|
|
||||||
</address>
|
|
||||||
<path>
|
|
||||||
<value/>
|
|
||||||
<example>/username/project</example>
|
|
||||||
</path>
|
|
||||||
</plugin>
|
|
||||||
</sparkleshare>
|
|
Before Width: | Height: | Size: 3.6 KiB |
|
@ -1,18 +1,15 @@
|
||||||
dist_plugins_DATA = \
|
dist_plugins_DATA = \
|
||||||
bitbucket.xml \
|
bitbucket.xml \
|
||||||
github.xml \
|
github.xml \
|
||||||
gitorious.xml \
|
|
||||||
ssnet.xml \
|
|
||||||
own-server.xml \
|
own-server.xml \
|
||||||
planio.xml \
|
planio.xml \
|
||||||
github.png \
|
github.png \
|
||||||
gitorious.png \
|
|
||||||
bitbucket.png \
|
bitbucket.png \
|
||||||
ssnet.png \
|
|
||||||
planio.png \
|
planio.png \
|
||||||
own-server.png
|
own-server.png
|
||||||
|
|
||||||
pluginsdir = $(pkgdatadir)/plugins/
|
pluginsdir = $(pkgdatadir)/presets/
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = \
|
MAINTAINERCLEANFILES = \
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
@ -21,7 +21,7 @@ using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
@ -73,8 +73,8 @@ namespace SparkleShare {
|
||||||
public event ChangePathFieldEventHandler ChangePathFieldEvent = delegate { };
|
public event ChangePathFieldEventHandler ChangePathFieldEvent = delegate { };
|
||||||
public delegate void ChangePathFieldEventHandler (string text, string example_text, FieldState state);
|
public delegate void ChangePathFieldEventHandler (string text, string example_text, FieldState state);
|
||||||
|
|
||||||
public readonly List<Plugin> Plugins = new List<Plugin> ();
|
public readonly List<Preset> Presets = new List<Preset> ();
|
||||||
public Plugin SelectedPlugin;
|
public Preset SelectedPreset;
|
||||||
|
|
||||||
public bool WindowIsOpen { get; private set; }
|
public bool WindowIsOpen { get; private set; }
|
||||||
public SparkleInvite PendingInvite { get; private set; }
|
public SparkleInvite PendingInvite { get; private set; }
|
||||||
|
@ -86,9 +86,9 @@ namespace SparkleShare {
|
||||||
public double ProgressBarPercentage { get; private set; }
|
public double ProgressBarPercentage { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
public int SelectedPluginIndex {
|
public int SelectedPresetIndex {
|
||||||
get {
|
get {
|
||||||
return Plugins.IndexOf (SelectedPlugin);
|
return Presets.IndexOf (SelectedPreset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,35 +117,29 @@ namespace SparkleShare {
|
||||||
PreviousUrl = "";
|
PreviousUrl = "";
|
||||||
SyncingFolder = "";
|
SyncingFolder = "";
|
||||||
|
|
||||||
string local_plugins_path = Plugin.LocalPluginsPath;
|
string local_presets_path = Preset.LocalPresetsPath;
|
||||||
int local_plugins_count = 0;
|
int local_presets_count = 0;
|
||||||
|
|
||||||
// Import all of the plugins
|
// Import all of the presets
|
||||||
if (Directory.Exists (local_plugins_path))
|
if (Directory.Exists (local_presets_path))
|
||||||
// Local plugins go first...
|
// Local presets go first...
|
||||||
foreach (string xml_file_path in Directory.GetFiles (local_plugins_path, "*.xml")) {
|
foreach (string xml_file_path in Directory.GetFiles (local_presets_path, "*.xml")) {
|
||||||
Plugins.Add (new Plugin (xml_file_path));
|
Presets.Add (new Preset (xml_file_path));
|
||||||
local_plugins_count++;
|
local_presets_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...system plugins after that...
|
// ...system presets after that...
|
||||||
if (Directory.Exists (SparkleShare.Controller.PluginsPath)) {
|
if (Directory.Exists (SparkleShare.Controller.PresetsPath)) {
|
||||||
foreach (string xml_file_path in Directory.GetFiles (SparkleShare.Controller.PluginsPath, "*.xml")) {
|
foreach (string xml_file_path in Directory.GetFiles (SparkleShare.Controller.PresetsPath, "*.xml")) {
|
||||||
// ...and "Own server" at the very top
|
// ...and "Own server" at the very top
|
||||||
if (xml_file_path.EndsWith ("own-server.xml")) {
|
if (xml_file_path.EndsWith ("own-server.xml"))
|
||||||
Plugins.Insert (0, new Plugin (xml_file_path));
|
Presets.Insert (0, new Preset (xml_file_path));
|
||||||
|
else
|
||||||
} else if (xml_file_path.EndsWith ("ssnet.xml")) {
|
Presets.Add (new Preset (xml_file_path));
|
||||||
// Plugins.Insert ((local_plugins_count + 1), new SparklePlugin (xml_file_path));
|
|
||||||
// TODO: Skip this plugin for now
|
|
||||||
|
|
||||||
} else {
|
|
||||||
Plugins.Add (new Plugin (xml_file_path));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectedPlugin = Plugins [0];
|
SelectedPreset = Presets [0];
|
||||||
|
|
||||||
SparkleShare.Controller.InviteReceived += delegate (SparkleInvite invite) {
|
SparkleShare.Controller.InviteReceived += delegate (SparkleInvite invite) {
|
||||||
PendingInvite = invite;
|
PendingInvite = invite;
|
||||||
|
@ -203,7 +197,7 @@ namespace SparkleShare {
|
||||||
public void PageCancelled ()
|
public void PageCancelled ()
|
||||||
{
|
{
|
||||||
PendingInvite = null;
|
PendingInvite = null;
|
||||||
SelectedPlugin = Plugins [0];
|
SelectedPreset = Presets [0];
|
||||||
|
|
||||||
PreviousAddress = "";
|
PreviousAddress = "";
|
||||||
PreviousPath = "";
|
PreviousPath = "";
|
||||||
|
@ -275,25 +269,25 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SelectedPluginChanged (int plugin_index)
|
public void SelectedPresetChanged (int preset_index)
|
||||||
{
|
{
|
||||||
SelectedPlugin = Plugins [plugin_index];
|
SelectedPreset = Presets [preset_index];
|
||||||
|
|
||||||
if (SelectedPlugin.Address != null) {
|
if (SelectedPreset.Address != null) {
|
||||||
ChangeAddressFieldEvent (SelectedPlugin.Address, "", FieldState.Disabled);
|
ChangeAddressFieldEvent (SelectedPreset.Address, "", FieldState.Disabled);
|
||||||
|
|
||||||
} else if (SelectedPlugin.AddressExample != null) {
|
} else if (SelectedPreset.AddressExample != null) {
|
||||||
ChangeAddressFieldEvent (this.saved_address, SelectedPlugin.AddressExample, FieldState.Enabled);
|
ChangeAddressFieldEvent (this.saved_address, SelectedPreset.AddressExample, FieldState.Enabled);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ChangeAddressFieldEvent (this.saved_address, "", FieldState.Enabled);
|
ChangeAddressFieldEvent (this.saved_address, "", FieldState.Enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SelectedPlugin.Path != null) {
|
if (SelectedPreset.Path != null) {
|
||||||
ChangePathFieldEvent (SelectedPlugin.Path, "", FieldState.Disabled);
|
ChangePathFieldEvent (SelectedPreset.Path, "", FieldState.Disabled);
|
||||||
|
|
||||||
} else if (SelectedPlugin.PathExample != null) {
|
} else if (SelectedPreset.PathExample != null) {
|
||||||
ChangePathFieldEvent (this.saved_remote_path, SelectedPlugin.PathExample, FieldState.Enabled);
|
ChangePathFieldEvent (this.saved_remote_path, SelectedPreset.PathExample, FieldState.Enabled);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ChangePathFieldEvent (this.saved_remote_path, "", FieldState.Enabled);
|
ChangePathFieldEvent (this.saved_remote_path, "", FieldState.Enabled);
|
||||||
|
@ -307,12 +301,12 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void CheckAddPage (string address, string remote_path, int selected_plugin)
|
public void CheckAddPage (string address, string remote_path, int selected_preset)
|
||||||
{
|
{
|
||||||
address = address.Trim ();
|
address = address.Trim ();
|
||||||
remote_path = remote_path.Trim ();
|
remote_path = remote_path.Trim ();
|
||||||
|
|
||||||
if (selected_plugin == 0)
|
if (selected_preset == 0)
|
||||||
this.saved_address = address;
|
this.saved_address = address;
|
||||||
|
|
||||||
this.saved_remote_path = remote_path;
|
this.saved_remote_path = remote_path;
|
||||||
|
@ -341,7 +335,7 @@ namespace SparkleShare {
|
||||||
remote_path = remote_path.Trim ();
|
remote_path = remote_path.Trim ();
|
||||||
remote_path = remote_path.TrimEnd ("/".ToCharArray ());
|
remote_path = remote_path.TrimEnd ("/".ToCharArray ());
|
||||||
|
|
||||||
if (SelectedPlugin.PathUsesLowerCase)
|
if (SelectedPreset.PathUsesLowerCase)
|
||||||
remote_path = remote_path.ToLower ();
|
remote_path = remote_path.ToLower ();
|
||||||
|
|
||||||
PreviousAddress = address;
|
PreviousAddress = address;
|
||||||
|
@ -353,11 +347,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
SparkleFetcherInfo info = new SparkleFetcherInfo {
|
SparkleFetcherInfo info = new SparkleFetcherInfo {
|
||||||
Address = address,
|
Address = address,
|
||||||
Fingerprint = SelectedPlugin.Fingerprint,
|
Fingerprint = SelectedPreset.Fingerprint,
|
||||||
RemotePath = remote_path,
|
RemotePath = remote_path,
|
||||||
FetchPriorHistory = this.fetch_prior_history,
|
FetchPriorHistory = this.fetch_prior_history,
|
||||||
AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl,
|
AnnouncementsUrl = SelectedPreset.AnnouncementsUrl,
|
||||||
Backend = SelectedPlugin.Backend
|
Backend = SelectedPreset.Backend
|
||||||
};
|
};
|
||||||
|
|
||||||
new Thread (() => { SparkleShare.Controller.StartFetcher (info); }).Start ();
|
new Thread (() => { SparkleShare.Controller.StartFetcher (info); }).Start ();
|
||||||
|
@ -370,23 +364,23 @@ namespace SparkleShare {
|
||||||
{
|
{
|
||||||
SyncingFolder = "";
|
SyncingFolder = "";
|
||||||
|
|
||||||
// Create a local plugin for succesfully added projects, so
|
// Create a local preset for succesfully added projects, so
|
||||||
// so the user can easily use the same host again
|
// so the user can easily use the same host again
|
||||||
if (SelectedPluginIndex == 0) {
|
if (SelectedPresetIndex == 0) {
|
||||||
Plugin new_plugin;
|
Preset new_preset;
|
||||||
Uri uri = new Uri (remote_url);
|
Uri uri = new Uri (remote_url);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
string address = remote_url.Replace (uri.AbsolutePath, "");
|
string address = remote_url.Replace (uri.AbsolutePath, "");
|
||||||
new_plugin = Plugin.Create (uri.Host, address, address, "", "", "/path/to/project");
|
new_preset = Preset.Create (uri.Host, address, address, "", "", "/path/to/project");
|
||||||
|
|
||||||
if (new_plugin != null) {
|
if (new_preset != null) {
|
||||||
Plugins.Insert (1, new_plugin);
|
Presets.Insert (1, new_preset);
|
||||||
Logger.LogInfo ("Controller", "Added plugin for " + uri.Host);
|
Logger.LogInfo ("Controller", "Added preset for " + uri.Host);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
Logger.LogInfo ("Controller", "Failed adding plugin for " + uri.Host);
|
Logger.LogInfo ("Controller", "Failed adding preset for " + uri.Host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,7 +565,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public void FinishPageCompleted ()
|
public void FinishPageCompleted ()
|
||||||
{
|
{
|
||||||
SelectedPlugin = Plugins [0];
|
SelectedPreset = Presets [0];
|
||||||
PreviousUrl = "";
|
PreviousUrl = "";
|
||||||
PreviousAddress = "";
|
PreviousAddress = "";
|
||||||
PreviousPath = "";
|
PreviousPath = "";
|
||||||
|
|
|
@ -18,18 +18,17 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
// This is SparkleShare!
|
|
||||||
public class SparkleShare {
|
public class SparkleShare {
|
||||||
|
|
||||||
public static Controller Controller;
|
public static Controller Controller;
|
||||||
public static UserInterface UI;
|
public static UserInterface UI;
|
||||||
public static string [] Arguments;
|
public static string [] Arguments;
|
||||||
|
|
||||||
private static Mutex program_mutex = new Mutex (false, "SparkleShare");
|
static Mutex program_mutex = new Mutex (false, "SparkleShare");
|
||||||
|
|
||||||
|
|
||||||
#if !__MonoCS__
|
#if !__MonoCS__
|
||||||
|
@ -39,25 +38,23 @@ namespace SparkleShare {
|
||||||
{
|
{
|
||||||
Arguments = args;
|
Arguments = args;
|
||||||
|
|
||||||
if (args.Length != 0 && !args [0].Equals ("help") &&
|
if (args.Length != 0 && (args [0].Equals ("help") || args [0].Equals ("version")) &&
|
||||||
Backend.Platform != PlatformID.MacOSX &&
|
InstallationInfo.Platform != PlatformID.MacOSX &&
|
||||||
Backend.Platform != PlatformID.Win32NT) {
|
InstallationInfo.Platform != PlatformID.Win32NT) {
|
||||||
|
|
||||||
string n = Environment.NewLine;
|
string n = Environment.NewLine;
|
||||||
|
|
||||||
Console.WriteLine (n +
|
Console.WriteLine (n +
|
||||||
"Share and collaborate by syncing with any Git repository instantly." + n +
|
"Share and collaborate by syncing with any Git repository instantly." + n +
|
||||||
n +
|
n +
|
||||||
"Version: " + SparkleLib.Backend.Version + n +
|
"Version: " + InstallationInfo.Version + n +
|
||||||
"Copyright (C) 2010 Hylke Bons and others" + n +
|
"Copyright (C) 2010 Hylke Bons and others" + n +
|
||||||
"This program comes with ABSOLUTELY NO WARRANTY." + n +
|
"This program comes with ABSOLUTELY NO WARRANTY." + n +
|
||||||
n +
|
n +
|
||||||
"This is free software, and you are welcome to redistribute it" + n +
|
"This is free software, and you are welcome to redistribute it" + n +
|
||||||
"under certain conditions. Please read the GNU GPLv3 for details." + n +
|
"under certain conditions. Please read the GNU GPLv3 for details." + n);
|
||||||
n +
|
|
||||||
"Usage: sparkleshare [start|open]");
|
|
||||||
|
|
||||||
Environment.Exit (-1);
|
Environment.Exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only allow one instance of SparkleShare (on Windows)
|
// Only allow one instance of SparkleShare (on Windows)
|
||||||
|
@ -81,15 +78,11 @@ namespace SparkleShare {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
Exception e = (Exception) exception_args.ExceptionObject;
|
|
||||||
Logger.WriteCrashReport (e);
|
|
||||||
|
|
||||||
} finally {
|
static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args)
|
||||||
Environment.Exit (-1);
|
{
|
||||||
}
|
var exception = (Exception) exception_args.ExceptionObject;
|
||||||
|
Logger.WriteCrashReport (exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Timers = System.Timers;
|
using Timers = System.Timers;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@ using System;
|
||||||
|
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using Notifications;
|
using Notifications;
|
||||||
using SparkleLib;
|
|
||||||
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
|
@ -22,18 +22,18 @@ using System.IO;
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using Mono.Unix.Native;
|
using Mono.Unix.Native;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class SparkleController : SparkleControllerBase {
|
public class SparkleController : ControllerBase {
|
||||||
|
|
||||||
public SparkleController ()
|
public SparkleController ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override string PluginsPath {
|
public override string PresetsPath {
|
||||||
get {
|
get {
|
||||||
return Path.Combine (Defines.INSTALL_DIR, "plugins");
|
return Path.Combine (Defines.INSTALL_DIR, "plugins");
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ namespace SparkleShare {
|
||||||
if (Defines.INSTALL_DIR.StartsWith ("/app/"))
|
if (Defines.INSTALL_DIR.StartsWith ("/app/"))
|
||||||
autostart_exec = "xdg-app run org.sparkleshare.SparkleShare";
|
autostart_exec = "xdg-app run org.sparkleshare.SparkleShare";
|
||||||
|
|
||||||
|
// TODO: Ship as .desktop file and copy in place
|
||||||
try {
|
try {
|
||||||
File.WriteAllText (autostart_file_path,
|
File.WriteAllText (autostart_file_path,
|
||||||
"[Desktop Entry]\n" +
|
"[Desktop Entry]\n" +
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace SparkleShare {
|
||||||
this.content_wrapper.StyleContext.AddProvider (css_provider, 800);
|
this.content_wrapper.StyleContext.AddProvider (css_provider, 800);
|
||||||
|
|
||||||
// this.web_view = new WebView () { Editable = false };
|
// this.web_view = new WebView () { Editable = false };
|
||||||
// this.web_view.Settings.EnablePlugins = false;
|
// this.web_view.Settings.EnablePresets = false;
|
||||||
// this.web_view.NavigationRequested += WebViewNavigationRequested;
|
// this.web_view.NavigationRequested += WebViewNavigationRequested;
|
||||||
|
|
||||||
this.scrolled_window.Add (new Button ("WebView"));
|
this.scrolled_window.Add (new Button ("WebView"));
|
||||||
|
|
|
@ -18,7 +18,6 @@ SOURCES = \
|
||||||
../Common/EventLogController.cs \
|
../Common/EventLogController.cs \
|
||||||
../Common/Invite.cs \
|
../Common/Invite.cs \
|
||||||
../Common/NoteController.cs \
|
../Common/NoteController.cs \
|
||||||
../Common/Plugin.cs \
|
|
||||||
../Common/SetupController.cs \
|
../Common/SetupController.cs \
|
||||||
../Common/StatusIconController.cs \
|
../Common/StatusIconController.cs \
|
||||||
About.cs \
|
About.cs \
|
||||||
|
@ -37,9 +36,11 @@ include $(top_srcdir)/build/build.mk
|
||||||
bin_SCRIPTS = sparkleshare
|
bin_SCRIPTS = sparkleshare
|
||||||
|
|
||||||
Applicationsdir = $(datadir)/applications
|
Applicationsdir = $(datadir)/applications
|
||||||
dist_Applications_DATA = org.sparkleshare.SparkleShare.desktop \
|
dist_Applications_DATA = \
|
||||||
|
org.sparkleshare.SparkleShare.desktop \
|
||||||
org.sparkleshare.SparkleShare.Invites.desktop
|
org.sparkleshare.SparkleShare.Invites.desktop
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
test -f $(datadir)/applications/defaults.list && \
|
test -f $(datadir)/applications/defaults.list && \
|
||||||
test -z $(DESTDIR) && update-desktop-database $(datadir)/applications || :
|
test -z $(DESTDIR) && update-desktop-database $(datadir)/applications || :
|
||||||
|
|
||||||
|
|
|
@ -7,3 +7,4 @@ pixmapsdir = $(pkgdatadir)/pixmaps/
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = \
|
MAINTAINERCLEANFILES = \
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
|
||||||
|
|
|
@ -50,3 +50,4 @@ uninstall-hook:
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
EXTRA_DIST = $(wildcard *.png *.svg)
|
EXTRA_DIST = $(wildcard *.png *.svg)
|
||||||
|
|
||||||
|
|
|
@ -18,3 +18,4 @@ uninstall-hook:
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
EXTRA_DIST = $(wildcard *.png *.svg)
|
EXTRA_DIST = $(wildcard *.png *.svg)
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace SparkleShare {
|
||||||
VBox layout_address = new VBox (true, 0);
|
VBox layout_address = new VBox (true, 0);
|
||||||
VBox layout_path = new VBox (true, 0);
|
VBox layout_path = new VBox (true, 0);
|
||||||
|
|
||||||
ListStore store = new ListStore (typeof (string), typeof (Gdk.Pixbuf), typeof (string), typeof (SparklePlugin));
|
ListStore store = new ListStore (typeof (string), typeof (Gdk.Pixbuf), typeof (string), typeof (SparklePreset));
|
||||||
|
|
||||||
SparkleTreeView tree_view = new SparkleTreeView (store) { HeadersVisible = false };
|
SparkleTreeView tree_view = new SparkleTreeView (store) { HeadersVisible = false };
|
||||||
ScrolledWindow scrolled_window = new ScrolledWindow () { ShadowType = ShadowType.In };
|
ScrolledWindow scrolled_window = new ScrolledWindow () { ShadowType = ShadowType.In };
|
||||||
|
@ -157,7 +157,7 @@ namespace SparkleShare {
|
||||||
service_column.PackStart (service_cell, true);
|
service_column.PackStart (service_cell, true);
|
||||||
service_column.SetCellDataFunc (service_cell, new TreeCellDataFunc (RenderServiceColumn));
|
service_column.SetCellDataFunc (service_cell, new TreeCellDataFunc (RenderServiceColumn));
|
||||||
|
|
||||||
foreach (SparklePlugin plugin in Controller.Plugins) {
|
foreach (SparklePreset plugin in Controller.Presets) {
|
||||||
store.AppendValues ("", new Gdk.Pixbuf (plugin.ImagePath),
|
store.AppendValues ("", new Gdk.Pixbuf (plugin.ImagePath),
|
||||||
"<span size=\"small\"><b>" + plugin.Name + "</b>\n" +
|
"<span size=\"small\"><b>" + plugin.Name + "</b>\n" +
|
||||||
"<span fgcolor=\"" + Program.UI.SecondaryTextColor + "\">" + plugin.Description + "</span>" +
|
"<span fgcolor=\"" + Program.UI.SecondaryTextColor + "\">" + plugin.Description + "</span>" +
|
||||||
|
@ -169,13 +169,13 @@ namespace SparkleShare {
|
||||||
|
|
||||||
Entry address_entry = new Entry () {
|
Entry address_entry = new Entry () {
|
||||||
Text = Controller.PreviousAddress,
|
Text = Controller.PreviousAddress,
|
||||||
Sensitive = (Controller.SelectedPlugin.Address == null),
|
Sensitive = (Controller.SelectedPreset.Address == null),
|
||||||
ActivatesDefault = true
|
ActivatesDefault = true
|
||||||
};
|
};
|
||||||
|
|
||||||
Entry path_entry = new Entry () {
|
Entry path_entry = new Entry () {
|
||||||
Text = Controller.PreviousPath,
|
Text = Controller.PreviousPath,
|
||||||
Sensitive = (Controller.SelectedPlugin.Path == null),
|
Sensitive = (Controller.SelectedPreset.Path == null),
|
||||||
ActivatesDefault = true
|
ActivatesDefault = true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -183,19 +183,19 @@ namespace SparkleShare {
|
||||||
Xalign = 0,
|
Xalign = 0,
|
||||||
UseMarkup = true,
|
UseMarkup = true,
|
||||||
Markup = "<span size=\"small\" fgcolor=\"" +
|
Markup = "<span size=\"small\" fgcolor=\"" +
|
||||||
Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPlugin.AddressExample + "</span>"
|
Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPreset.AddressExample + "</span>"
|
||||||
};
|
};
|
||||||
|
|
||||||
Label path_example = new Label () {
|
Label path_example = new Label () {
|
||||||
Xalign = 0,
|
Xalign = 0,
|
||||||
UseMarkup = true,
|
UseMarkup = true,
|
||||||
Markup = "<span size=\"small\" fgcolor=\"" +
|
Markup = "<span size=\"small\" fgcolor=\"" +
|
||||||
Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPlugin.PathExample + "</span>"
|
Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPreset.PathExample + "</span>"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
TreeSelection default_selection = tree_view.Selection;
|
TreeSelection default_selection = tree_view.Selection;
|
||||||
TreePath default_path = new TreePath ("" + Controller.SelectedPluginIndex);
|
TreePath default_path = new TreePath ("" + Controller.SelectedPresetIndex);
|
||||||
default_selection.SelectPath (default_path);
|
default_selection.SelectPath (default_path);
|
||||||
|
|
||||||
tree_view.Model.Foreach (new TreeModelForeachFunc (
|
tree_view.Model.Foreach (new TreeModelForeachFunc (
|
||||||
|
@ -203,7 +203,7 @@ namespace SparkleShare {
|
||||||
string address;
|
string address;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
address = (model.GetValue (iter, 2) as SparklePlugin).Address;
|
address = (model.GetValue (iter, 2) as SparklePreset).Address;
|
||||||
|
|
||||||
} catch (NullReferenceException) {
|
} catch (NullReferenceException) {
|
||||||
address = "";
|
address = "";
|
||||||
|
@ -213,7 +213,7 @@ namespace SparkleShare {
|
||||||
address.Equals (Controller.PreviousAddress)) {
|
address.Equals (Controller.PreviousAddress)) {
|
||||||
|
|
||||||
tree_view.SetCursor (path, service_column, false);
|
tree_view.SetCursor (path, service_column, false);
|
||||||
SparklePlugin plugin = (SparklePlugin) model.GetValue (iter, 2);
|
SparklePreset plugin = (SparklePreset) model.GetValue (iter, 2);
|
||||||
|
|
||||||
if (plugin.Address != null)
|
if (plugin.Address != null)
|
||||||
address_entry.Sensitive = false;
|
address_entry.Sensitive = false;
|
||||||
|
@ -256,7 +256,7 @@ namespace SparkleShare {
|
||||||
layout_vertical.PackStart (scrolled_window, true, true, 0);
|
layout_vertical.PackStart (scrolled_window, true, true, 0);
|
||||||
layout_vertical.PackStart (layout_fields, false, false, 0);
|
layout_vertical.PackStart (layout_fields, false, false, 0);
|
||||||
|
|
||||||
tree_view.ScrollToCell (new TreePath ("" + Controller.SelectedPluginIndex), null, true, 0, 0);
|
tree_view.ScrollToCell (new TreePath ("" + Controller.SelectedPresetIndex), null, true, 0, 0);
|
||||||
|
|
||||||
Add (layout_vertical);
|
Add (layout_vertical);
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
|
|
||||||
tree_view.CursorChanged += delegate (object sender, EventArgs e) {
|
tree_view.CursorChanged += delegate (object sender, EventArgs e) {
|
||||||
Controller.SelectedPluginChanged (tree_view.SelectedRow);
|
Controller.SelectedPresetChanged (tree_view.SelectedRow);
|
||||||
};
|
};
|
||||||
|
|
||||||
address_entry.Changed += delegate {
|
address_entry.Changed += delegate {
|
||||||
|
|
|
@ -167,18 +167,18 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Resources\" />
|
<Folder Include="Resources\" />
|
||||||
<Folder Include="HTML\" />
|
<Folder Include="HTML\" />
|
||||||
<Folder Include="Plugins\" />
|
<Folder Include="Presets\" />
|
||||||
<Folder Include="Controllers\" />
|
<Folder Include="Controllers\" />
|
||||||
<Folder Include="UserInterface\" />
|
<Folder Include="UserInterface\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\SparkleLib\SparkleLib.csproj">
|
<ProjectReference Include="..\..\Sparkles\Sparkles.csproj">
|
||||||
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
||||||
<Name>SparkleLib</Name>
|
<Name>Sparkles</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\SparkleLib\Git\SparkleLib.Git.csproj">
|
<ProjectReference Include="..\..\Sparkles\Git\Sparkles.Git.csproj">
|
||||||
<Project>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</Project>
|
<Project>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</Project>
|
||||||
<Name>SparkleLib.Git</Name>
|
<Name>Sparkles.Git</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -234,60 +234,60 @@
|
||||||
<BundleResource Include="..\Common\Pixmaps\tutorial-slide-2%402x.png">
|
<BundleResource Include="..\Common\Pixmaps\tutorial-slide-2%402x.png">
|
||||||
<Link>Resources\tutorial-slide-2%402x.png</Link>
|
<Link>Resources\tutorial-slide-2%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\bitbucket%402x.png">
|
<BundleResource Include="..\Common\Presets\bitbucket%402x.png">
|
||||||
<Link>Plugins\bitbucket%402x.png</Link>
|
<Link>Presets\bitbucket%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\github%402x.png">
|
<BundleResource Include="..\Common\Presets\github%402x.png">
|
||||||
<Link>Plugins\github%402x.png</Link>
|
<Link>Presets\github%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\gitorious%402x.png">
|
<BundleResource Include="..\Common\Presets\gitorious%402x.png">
|
||||||
<Link>Plugins\gitorious%402x.png</Link>
|
<Link>Presets\gitorious%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\own-server%402x.png">
|
<BundleResource Include="..\Common\Presets\own-server%402x.png">
|
||||||
<Link>Plugins\own-server%402x.png</Link>
|
<Link>Presets\own-server%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\ssnet%402x.png">
|
<BundleResource Include="..\Common\Presets\ssnet%402x.png">
|
||||||
<Link>Plugins\ssnet%402x.png</Link>
|
<Link>Presets\ssnet%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\bitbucket.xml">
|
<BundleResource Include="..\Common\Presets\bitbucket.xml">
|
||||||
<Link>Plugins\bitbucket.xml</Link>
|
<Link>Presets\bitbucket.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\github.xml">
|
<BundleResource Include="..\Common\Presets\github.xml">
|
||||||
<Link>Plugins\github.xml</Link>
|
<Link>Presets\github.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\gitorious.xml">
|
<BundleResource Include="..\Common\Presets\gitorious.xml">
|
||||||
<Link>Plugins\gitorious.xml</Link>
|
<Link>Presets\gitorious.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\own-server.xml">
|
<BundleResource Include="..\Common\Presets\own-server.xml">
|
||||||
<Link>Plugins\own-server.xml</Link>
|
<Link>Presets\own-server.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\bitbucket.png">
|
<BundleResource Include="..\Common\Presets\bitbucket.png">
|
||||||
<Link>Plugins\bitbucket.png</Link>
|
<Link>Presets\bitbucket.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\github.png">
|
<BundleResource Include="..\Common\Presets\github.png">
|
||||||
<Link>Plugins\github.png</Link>
|
<Link>Presets\github.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\gitorious.png">
|
<BundleResource Include="..\Common\Presets\gitorious.png">
|
||||||
<Link>Plugins\gitorious.png</Link>
|
<Link>Presets\gitorious.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\own-server.png">
|
<BundleResource Include="..\Common\Presets\own-server.png">
|
||||||
<Link>Plugins\own-server.png</Link>
|
<Link>Presets\own-server.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\ssnet.png">
|
<BundleResource Include="..\Common\Presets\ssnet.png">
|
||||||
<Link>Plugins\ssnet.png</Link>
|
<Link>Presets\ssnet.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\ssnet.xml">
|
<BundleResource Include="..\Common\Presets\ssnet.xml">
|
||||||
<Link>Plugins\ssnet.xml</Link>
|
<Link>Presets\ssnet.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="Resources\tutorial-slide-3%402x.png" />
|
<BundleResource Include="Resources\tutorial-slide-3%402x.png" />
|
||||||
<BundleResource Include="..\Common\Plugins\planio.png">
|
<BundleResource Include="..\Common\Presets\planio.png">
|
||||||
<Link>Plugins\planio.png</Link>
|
<Link>Presets\planio.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\planio.xml">
|
<BundleResource Include="..\Common\Presets\planio.xml">
|
||||||
<Link>Plugins\planio.xml</Link>
|
<Link>Presets\planio.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\planio%402x.png">
|
<BundleResource Include="..\Common\Presets\planio%402x.png">
|
||||||
<Link>Plugins\planio%402x.png</Link>
|
<Link>Presets\planio%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Pixmaps\text-balloon.png">
|
<BundleResource Include="..\Common\Pixmaps\text-balloon.png">
|
||||||
<Link>Resources\text-balloon.png</Link>
|
<Link>Resources\text-balloon.png</Link>
|
||||||
|
|
|
@ -19,11 +19,12 @@ using System;
|
||||||
|
|
||||||
using GLib;
|
using GLib;
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using SparkleLib;
|
|
||||||
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class SparkleUI {
|
public class UserInterface {
|
||||||
|
|
||||||
public static string AssetsPath = Defines.INSTALL_DIR;
|
public static string AssetsPath = Defines.INSTALL_DIR;
|
||||||
|
|
||||||
|
@ -37,15 +38,15 @@ namespace SparkleShare {
|
||||||
public readonly string SecondaryTextColor;
|
public readonly string SecondaryTextColor;
|
||||||
public readonly string SecondaryTextColorSelected;
|
public readonly string SecondaryTextColorSelected;
|
||||||
|
|
||||||
private Gtk.Application application;
|
Gtk.Application application;
|
||||||
|
|
||||||
|
|
||||||
public SparkleUI ()
|
public UserInterface ()
|
||||||
{
|
{
|
||||||
this.application = new Gtk.Application ("org.sparkleshare.SparkleShare", 0);
|
application = new Gtk.Application ("org.sparkleshare.SparkleShare", 0);
|
||||||
|
|
||||||
this.application.Register (null);
|
application.Register (null);
|
||||||
this.application.Activated += ApplicationActivatedDelegate;
|
application.Activated += ApplicationActivatedDelegate;
|
||||||
|
|
||||||
Gdk.Color color = SparkleUIHelpers.RGBAToColor (new Label().StyleContext.GetColor (StateFlags.Insensitive));
|
Gdk.Color color = SparkleUIHelpers.RGBAToColor (new Label().StyleContext.GetColor (StateFlags.Insensitive));
|
||||||
SecondaryTextColor = SparkleUIHelpers.ColorToHex (color);
|
SecondaryTextColor = SparkleUIHelpers.ColorToHex (color);
|
||||||
|
@ -61,16 +62,16 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public void Run ()
|
public void Run ()
|
||||||
{
|
{
|
||||||
(this.application as GLib.Application).Run (null, null);
|
(application as GLib.Application).Run (null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ApplicationActivatedDelegate (object sender, EventArgs args)
|
void ApplicationActivatedDelegate (object sender, EventArgs args)
|
||||||
{
|
{
|
||||||
if (this.application.Windows.Length > 0) {
|
if (application.Windows.Length > 0) {
|
||||||
bool has_visible_windows = false;
|
bool has_visible_windows = false;
|
||||||
|
|
||||||
foreach (Window window in this.application.Windows) {
|
foreach (Window window in application.Windows) {
|
||||||
if (window.Visible) {
|
if (window.Visible) {
|
||||||
window.Present ();
|
window.Present ();
|
||||||
has_visible_windows = true;
|
has_visible_windows = true;
|
||||||
|
@ -88,9 +89,9 @@ namespace SparkleShare {
|
||||||
StatusIcon = new SparkleStatusIcon ();
|
StatusIcon = new SparkleStatusIcon ();
|
||||||
Note = new SparkleNote ();
|
Note = new SparkleNote ();
|
||||||
|
|
||||||
Setup.Application = this.application;
|
Setup.Application = application;
|
||||||
EventLog.Application = this.application;
|
EventLog.Application = application;
|
||||||
About.Application = this.application;
|
About.Application = application;
|
||||||
|
|
||||||
Program.Controller.UIHasLoaded ();
|
Program.Controller.UIHasLoaded ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ case $1 in
|
||||||
curl --insecure --output ~/SparkleShare/.$invite.xml $open
|
curl --insecure --output ~/SparkleShare/.$invite.xml $open
|
||||||
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe"
|
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe"
|
||||||
;;
|
;;
|
||||||
help|--help)
|
help|--help|version|--version)
|
||||||
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" --help
|
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" help
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2
|
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2
|
||||||
|
|
|
@ -24,16 +24,16 @@ using Mono.Unix.Native;
|
||||||
using MonoMac.Foundation;
|
using MonoMac.Foundation;
|
||||||
using MonoMac.AppKit;
|
using MonoMac.AppKit;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
using SparkleLib.Git;
|
using Sparkles.Git;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class Controller : BaseController {
|
public class Controller : BaseController {
|
||||||
|
|
||||||
public override string PluginsPath {
|
public override string PresetsPath {
|
||||||
get {
|
get {
|
||||||
return Path.Combine (NSBundle.MainBundle.ResourcePath, "Plugins");
|
return Path.Combine (NSBundle.MainBundle.ResourcePath, "Presets");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override void SetFolderIcon ()
|
public override void SetFolderIcon ()
|
||||||
{
|
{
|
||||||
if (Environment.OSVersion.Version.Major >= 14) {
|
/* if (Environment.OSVersion.Version.Major >= 14) {
|
||||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
NSWorkspace.SharedWorkspace.SetIconforFile (
|
||||||
NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"),
|
NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"),
|
||||||
SparkleShare.Controller.FoldersPath, 0);
|
SparkleShare.Controller.FoldersPath, 0);
|
||||||
|
@ -147,7 +147,7 @@ namespace SparkleShare {
|
||||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
NSWorkspace.SharedWorkspace.SetIconforFile (
|
||||||
NSImage.ImageNamed ("sparkleshare-folder.icns"),
|
NSImage.ImageNamed ("sparkleshare-folder.icns"),
|
||||||
SparkleShare.Controller.FoldersPath, 0);
|
SparkleShare.Controller.FoldersPath, 0);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,6 @@
|
||||||
<Link>SparkleShare.cs</Link>
|
<Link>SparkleShare.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="MacWatcher.cs" />
|
<Compile Include="MacWatcher.cs" />
|
||||||
<Compile Include="..\Common\Plugin.cs">
|
|
||||||
<Link>Plugin.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\Common\Invite.cs">
|
<Compile Include="..\Common\Invite.cs">
|
||||||
<Link>Invite.cs</Link>
|
<Link>Invite.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -128,10 +125,10 @@
|
||||||
<Compile Include="UserInterface\SetupWindow.cs" />
|
<Compile Include="UserInterface\SetupWindow.cs" />
|
||||||
<Compile Include="UserInterface\StatusIcon.cs" />
|
<Compile Include="UserInterface\StatusIcon.cs" />
|
||||||
<Compile Include="UserInterface\UserInterface.cs" />
|
<Compile Include="UserInterface\UserInterface.cs" />
|
||||||
<Compile Include="Controllers\Controller.cs" />
|
|
||||||
<Compile Include="..\Common\BaseController.cs">
|
<Compile Include="..\Common\BaseController.cs">
|
||||||
<Link>Controllers\BaseController.cs</Link>
|
<Link>Controllers\BaseController.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Controller.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<InterfaceDefinition Include="MainMenu.xib" />
|
<InterfaceDefinition Include="MainMenu.xib" />
|
||||||
|
@ -167,20 +164,10 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Resources\" />
|
<Folder Include="Resources\" />
|
||||||
<Folder Include="HTML\" />
|
<Folder Include="HTML\" />
|
||||||
<Folder Include="Plugins\" />
|
<Folder Include="Presets\" />
|
||||||
<Folder Include="Controllers\" />
|
<Folder Include="Controllers\" />
|
||||||
<Folder Include="UserInterface\" />
|
<Folder Include="UserInterface\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\SparkleLib\SparkleLib.csproj">
|
|
||||||
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
|
||||||
<Name>SparkleLib</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\SparkleLib\Git\SparkleLib.Git.csproj">
|
|
||||||
<Project>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</Project>
|
|
||||||
<Name>SparkleLib.Git</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BundleResource Include="..\Common\Pixmaps\side-splash.png">
|
<BundleResource Include="..\Common\Pixmaps\side-splash.png">
|
||||||
<Link>Resources\side-splash.png</Link>
|
<Link>Resources\side-splash.png</Link>
|
||||||
|
@ -234,60 +221,42 @@
|
||||||
<BundleResource Include="..\Common\Pixmaps\tutorial-slide-2%402x.png">
|
<BundleResource Include="..\Common\Pixmaps\tutorial-slide-2%402x.png">
|
||||||
<Link>Resources\tutorial-slide-2%402x.png</Link>
|
<Link>Resources\tutorial-slide-2%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\bitbucket%402x.png">
|
<BundleResource Include="..\Common\Presets\bitbucket%402x.png">
|
||||||
<Link>Plugins\bitbucket%402x.png</Link>
|
<Link>Presets\bitbucket%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\github%402x.png">
|
<BundleResource Include="..\Common\Presets\github%402x.png">
|
||||||
<Link>Plugins\github%402x.png</Link>
|
<Link>Presets\github%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\gitorious%402x.png">
|
<BundleResource Include="..\Common\Presets\own-server%402x.png">
|
||||||
<Link>Plugins\gitorious%402x.png</Link>
|
<Link>Presets\own-server%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\own-server%402x.png">
|
<BundleResource Include="..\Common\Presets\bitbucket.xml">
|
||||||
<Link>Plugins\own-server%402x.png</Link>
|
<Link>Presets\bitbucket.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\ssnet%402x.png">
|
<BundleResource Include="..\Common\Presets\github.xml">
|
||||||
<Link>Plugins\ssnet%402x.png</Link>
|
<Link>Presets\github.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\bitbucket.xml">
|
<BundleResource Include="..\Common\Presets\own-server.xml">
|
||||||
<Link>Plugins\bitbucket.xml</Link>
|
<Link>Presets\own-server.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\github.xml">
|
<BundleResource Include="..\Common\Presets\bitbucket.png">
|
||||||
<Link>Plugins\github.xml</Link>
|
<Link>Presets\bitbucket.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\gitorious.xml">
|
<BundleResource Include="..\Common\Presets\github.png">
|
||||||
<Link>Plugins\gitorious.xml</Link>
|
<Link>Presets\github.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\own-server.xml">
|
<BundleResource Include="..\Common\Presets\own-server.png">
|
||||||
<Link>Plugins\own-server.xml</Link>
|
<Link>Presets\own-server.png</Link>
|
||||||
</BundleResource>
|
|
||||||
<BundleResource Include="..\Common\Plugins\bitbucket.png">
|
|
||||||
<Link>Plugins\bitbucket.png</Link>
|
|
||||||
</BundleResource>
|
|
||||||
<BundleResource Include="..\Common\Plugins\github.png">
|
|
||||||
<Link>Plugins\github.png</Link>
|
|
||||||
</BundleResource>
|
|
||||||
<BundleResource Include="..\Common\Plugins\gitorious.png">
|
|
||||||
<Link>Plugins\gitorious.png</Link>
|
|
||||||
</BundleResource>
|
|
||||||
<BundleResource Include="..\Common\Plugins\own-server.png">
|
|
||||||
<Link>Plugins\own-server.png</Link>
|
|
||||||
</BundleResource>
|
|
||||||
<BundleResource Include="..\Common\Plugins\ssnet.png">
|
|
||||||
<Link>Plugins\ssnet.png</Link>
|
|
||||||
</BundleResource>
|
|
||||||
<BundleResource Include="..\Common\Plugins\ssnet.xml">
|
|
||||||
<Link>Plugins\ssnet.xml</Link>
|
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="Resources\tutorial-slide-3%402x.png" />
|
<BundleResource Include="Resources\tutorial-slide-3%402x.png" />
|
||||||
<BundleResource Include="..\Common\Plugins\planio.png">
|
<BundleResource Include="..\Common\Presets\planio.png">
|
||||||
<Link>Plugins\planio.png</Link>
|
<Link>Presets\planio.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\planio.xml">
|
<BundleResource Include="..\Common\Presets\planio.xml">
|
||||||
<Link>Plugins\planio.xml</Link>
|
<Link>Presets\planio.xml</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Plugins\planio%402x.png">
|
<BundleResource Include="..\Common\Presets\planio%402x.png">
|
||||||
<Link>Plugins\planio%402x.png</Link>
|
<Link>Presets\planio%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
<BundleResource Include="..\Common\Pixmaps\text-balloon.png">
|
<BundleResource Include="..\Common\Pixmaps\text-balloon.png">
|
||||||
<Link>Resources\text-balloon.png</Link>
|
<Link>Resources\text-balloon.png</Link>
|
||||||
|
@ -296,4 +265,14 @@
|
||||||
<Link>Resources\text-balloon%402x.png</Link>
|
<Link>Resources\text-balloon%402x.png</Link>
|
||||||
</BundleResource>
|
</BundleResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Sparkles\Sparkles.csproj">
|
||||||
|
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
||||||
|
<Name>Sparkles</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Sparkles\Git\Sparkles.Git.csproj">
|
||||||
|
<Project>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</Project>
|
||||||
|
<Name>Sparkles.Git</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -30,18 +30,20 @@ namespace SparkleShare {
|
||||||
public SparkleEventLogController Controller = new SparkleEventLogController ();
|
public SparkleEventLogController Controller = new SparkleEventLogController ();
|
||||||
public float TitlebarHeight;
|
public float TitlebarHeight;
|
||||||
|
|
||||||
private WebView web_view;
|
WebView web_view;
|
||||||
private NSBox background;
|
NSBox background;
|
||||||
private NSBox cover;
|
NSBox cover;
|
||||||
private NSPopUpButton popup_button;
|
NSPopUpButton popup_button;
|
||||||
private NSProgressIndicator progress_indicator;
|
NSProgressIndicator progress_indicator;
|
||||||
private NSTextField size_label, size_label_value, history_label, history_label_value;
|
NSTextField size_label, size_label_value, history_label, history_label_value;
|
||||||
private NSButton hidden_close_button;
|
NSButton hidden_close_button;
|
||||||
|
|
||||||
|
|
||||||
public EventLog (IntPtr handle) : base (handle) { }
|
public EventLog (IntPtr handle) : base (handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public EventLog () : base ()
|
public EventLog ()
|
||||||
{
|
{
|
||||||
Title = "Recent Changes";
|
Title = "Recent Changes";
|
||||||
Delegate = new SparkleEventsDelegate ();
|
Delegate = new SparkleEventsDelegate ();
|
||||||
|
|
|
@ -189,7 +189,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
AddressTextField = new NSTextField () {
|
AddressTextField = new NSTextField () {
|
||||||
Frame = new RectangleF (190, Frame.Height - 336, 196, 22),
|
Frame = new RectangleF (190, Frame.Height - 336, 196, 22),
|
||||||
Enabled = (Controller.SelectedPlugin.Address == null),
|
Enabled = (Controller.SelectedPreset.Address == null),
|
||||||
Delegate = new SparkleTextFieldDelegate (),
|
Delegate = new SparkleTextFieldDelegate (),
|
||||||
StringValue = "" + Controller.PreviousAddress
|
StringValue = "" + Controller.PreviousAddress
|
||||||
};
|
};
|
||||||
|
@ -203,24 +203,24 @@ namespace SparkleShare {
|
||||||
|
|
||||||
PathTextField = new NSTextField () {
|
PathTextField = new NSTextField () {
|
||||||
Frame = new RectangleF (190 + 196 + 16, Frame.Height - 336, 196, 22),
|
Frame = new RectangleF (190 + 196 + 16, Frame.Height - 336, 196, 22),
|
||||||
Enabled = (Controller.SelectedPlugin.Path == null),
|
Enabled = (Controller.SelectedPreset.Path == null),
|
||||||
Delegate = new SparkleTextFieldDelegate (),
|
Delegate = new SparkleTextFieldDelegate (),
|
||||||
StringValue = "" + Controller.PreviousPath
|
StringValue = "" + Controller.PreviousPath
|
||||||
};
|
};
|
||||||
|
|
||||||
PathTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail;
|
PathTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail;
|
||||||
|
|
||||||
PathHelpLabel = new SparkleLabel (Controller.SelectedPlugin.PathExample, NSTextAlignment.Left) {
|
PathHelpLabel = new SparkleLabel (Controller.SelectedPreset.PathExample, NSTextAlignment.Left) {
|
||||||
TextColor = NSColor.DisabledControlText,
|
TextColor = NSColor.DisabledControlText,
|
||||||
Frame = new RectangleF (190 + 196 + 16, Frame.Height - 358, 204, 19)
|
Frame = new RectangleF (190 + 196 + 16, Frame.Height - 358, 204, 19)
|
||||||
};
|
};
|
||||||
|
|
||||||
AddressHelpLabel = new SparkleLabel (Controller.SelectedPlugin.AddressExample, NSTextAlignment.Left) {
|
AddressHelpLabel = new SparkleLabel (Controller.SelectedPreset.AddressExample, NSTextAlignment.Left) {
|
||||||
TextColor = NSColor.DisabledControlText,
|
TextColor = NSColor.DisabledControlText,
|
||||||
Frame = new RectangleF (190, Frame.Height - 358, 204, 19)
|
Frame = new RectangleF (190, Frame.Height - 358, 204, 19)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (TableView == null || TableView.RowCount != Controller.Plugins.Count) {
|
if (TableView == null || TableView.RowCount != Controller.Presets.Count) {
|
||||||
TableView = new NSTableView () {
|
TableView = new NSTableView () {
|
||||||
Frame = new RectangleF (0, 0, 0, 0),
|
Frame = new RectangleF (0, 0, 0, 0),
|
||||||
RowHeight = 38,
|
RowHeight = 38,
|
||||||
|
@ -256,21 +256,21 @@ namespace SparkleShare {
|
||||||
|
|
||||||
// Hi-res display support was added after Snow Leopard
|
// Hi-res display support was added after Snow Leopard
|
||||||
if (Environment.OSVersion.Version.Major < 11)
|
if (Environment.OSVersion.Version.Major < 11)
|
||||||
DataSource = new SparkleDataSource (1, Controller.Plugins);
|
DataSource = new SparkleDataSource (1, Controller.Presets);
|
||||||
else
|
else
|
||||||
DataSource = new SparkleDataSource (BackingScaleFactor, Controller.Plugins);
|
DataSource = new SparkleDataSource (BackingScaleFactor, Controller.Presets);
|
||||||
|
|
||||||
TableView.DataSource = DataSource;
|
TableView.DataSource = DataSource;
|
||||||
TableView.ReloadData ();
|
TableView.ReloadData ();
|
||||||
|
|
||||||
(TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate {
|
(TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate {
|
||||||
Controller.SelectedPluginChanged (TableView.SelectedRow);
|
Controller.SelectedPresetChanged (TableView.SelectedRow);
|
||||||
Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow);
|
Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
TableView.SelectRow (Controller.SelectedPluginIndex, false);
|
TableView.SelectRow (Controller.SelectedPresetIndex, false);
|
||||||
TableView.ScrollRowToVisible (Controller.SelectedPluginIndex);
|
TableView.ScrollRowToVisible (Controller.SelectedPresetIndex);
|
||||||
MakeFirstResponder ((NSResponder) TableView);
|
MakeFirstResponder ((NSResponder) TableView);
|
||||||
|
|
||||||
HistoryCheckButton = new NSButton () {
|
HistoryCheckButton = new NSButton () {
|
||||||
|
@ -730,7 +730,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
int backing_scale_factor;
|
int backing_scale_factor;
|
||||||
|
|
||||||
public SparkleDataSource (float backing_scale_factor, List<Plugin> plugins)
|
public SparkleDataSource (float backing_scale_factor, List<Preset> plugins)
|
||||||
{
|
{
|
||||||
Items = new List <object> ();
|
Items = new List <object> ();
|
||||||
Cells = new NSAttributedString [plugins.Count];
|
Cells = new NSAttributedString [plugins.Count];
|
||||||
|
@ -739,7 +739,7 @@ namespace SparkleShare {
|
||||||
this.backing_scale_factor = (int) backing_scale_factor;
|
this.backing_scale_factor = (int) backing_scale_factor;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (Plugin plugin in plugins) {
|
foreach (Preset plugin in plugins) {
|
||||||
Items.Add (plugin);
|
Items.Add (plugin);
|
||||||
|
|
||||||
NSTextFieldCell cell = new NSTextFieldCell ();
|
NSTextFieldCell cell = new NSTextFieldCell ();
|
||||||
|
@ -815,27 +815,24 @@ namespace SparkleShare {
|
||||||
SparkleShare.UI.Setup.FirstResponder == table_view) {
|
SparkleShare.UI.Setup.FirstResponder == table_view) {
|
||||||
|
|
||||||
return SelectedCells [row_index];
|
return SelectedCells [row_index];
|
||||||
|
|
||||||
} else {
|
|
||||||
return Cells [row_index];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
return Cells [row_index];
|
||||||
Plugin plugin = (Plugin) Items [row_index];
|
|
||||||
string path = plugin.ImagePath;
|
|
||||||
|
|
||||||
if (backing_scale_factor >= 2) {
|
|
||||||
string hi_path = String.Format ("{0}@{1}x{2}",
|
|
||||||
Path.Combine (Path.GetDirectoryName (path), Path.GetFileNameWithoutExtension (path)),
|
|
||||||
backing_scale_factor, Path.GetExtension (path)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (File.Exists (hi_path))
|
|
||||||
path = hi_path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new NSImage (path) { Size = new SizeF (24, 24) };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string image_path = (Items [row_index] as Preset).ImagePath;
|
||||||
|
|
||||||
|
if (backing_scale_factor >= 2) {
|
||||||
|
string hi_path = String.Format ("{0}@{1}x{2}",
|
||||||
|
Path.Combine (Path.GetDirectoryName (image_path), Path.GetFileNameWithoutExtension (image_path)),
|
||||||
|
backing_scale_factor, Path.GetExtension (image_path)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (File.Exists (hi_path))
|
||||||
|
image_path = hi_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new NSImage (image_path) { Size = new SizeF (24, 24) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,18 +41,7 @@ namespace SparkleShare {
|
||||||
FontName = "Lucida Grande";
|
FontName = "Lucida Grande";
|
||||||
|
|
||||||
SparkleShare.Controller.Invoke (() => {
|
SparkleShare.Controller.Invoke (() => {
|
||||||
if (Environment.OSVersion.Version.Major >= 14) {
|
// NSApplication.SharedApplication.ApplicationIconImage = NSImage.ImageNamed ("Resources/sparkleshare-app.icns");
|
||||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
|
||||||
NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"),
|
|
||||||
SparkleShare.Controller.FoldersPath, 0);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
NSWorkspace.SharedWorkspace.SetIconforFile (
|
|
||||||
NSImage.ImageNamed ("sparkleshare-folder.icns"),
|
|
||||||
SparkleShare.Controller.FoldersPath, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
NSApplication.SharedApplication.ApplicationIconImage = NSImage.ImageNamed ("sparkleshare-app.icns");
|
|
||||||
|
|
||||||
Setup = new Setup ();
|
Setup = new Setup ();
|
||||||
EventLog = new EventLog ();
|
EventLog = new EventLog ();
|
||||||
|
|
|
@ -19,6 +19,6 @@ cp ${MONO_PATH}/lib/libMonoPosixHelper.dylib ../MacOS/
|
||||||
sed -i .bak 's/libMonoPosixHelper.dylib/@executable_path\/libMonoPosixHelper.dylib/' ./config
|
sed -i .bak 's/libMonoPosixHelper.dylib/@executable_path\/libMonoPosixHelper.dylib/' ./config
|
||||||
|
|
||||||
# merge all Assemblies into one Mac binary
|
# merge all Assemblies into one Mac binary
|
||||||
mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe SparkleLib.dll MonoMac.dll SparkleLib.Git.dll
|
mkbundle --static --deps --config ./config -o ../MacOS/SparkleShare SparkleShare.exe Sparkles.dll MonoMac.dll Sparkles.Git.dll
|
||||||
rm *.dll *.exe
|
rm *.dll *.exe
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ using System.Windows;
|
||||||
using Forms = System.Windows.Forms;
|
using Forms = System.Windows.Forms;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override string PluginsPath
|
public override string PresetsPath
|
||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
return Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "plugins");
|
return Path.Combine (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "plugins");
|
||||||
|
@ -63,7 +63,7 @@ namespace SparkleShare {
|
||||||
Environment.SetEnvironmentVariable ("PATH", new_PATH);
|
Environment.SetEnvironmentVariable ("PATH", new_PATH);
|
||||||
Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile));
|
Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile));
|
||||||
|
|
||||||
SparkleLib.Git.SparkleGit.SSHPath = Path.Combine (msysgit_path, "bin", "ssh.exe");
|
Sparkles.Git.SparkleGit.SSHPath = Path.Combine (msysgit_path, "bin", "ssh.exe");
|
||||||
|
|
||||||
base.Initialize ();
|
base.Initialize ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace SparkleShare
|
||||||
|
|
||||||
private void UpdateContent (string html)
|
private void UpdateContent (string html)
|
||||||
{
|
{
|
||||||
string pixmaps_path = Path.Combine (SparkleLib.SparkleConfig.DefaultConfig.TmpPath, "Pixmaps");
|
string pixmaps_path = Path.Combine (Sparkles.SparkleConfig.DefaultConfig.TmpPath, "Pixmaps");
|
||||||
pixmaps_path = pixmaps_path.Replace ("\\", "/");
|
pixmaps_path = pixmaps_path.Replace ("\\", "/");
|
||||||
|
|
||||||
html = html.Replace ("<a href=", "<a class='windows' href=");
|
html = html.Replace ("<a href=", "<a class='windows' href=");
|
||||||
|
@ -207,7 +207,7 @@ namespace SparkleShare
|
||||||
|
|
||||||
private void WriteOutImages ()
|
private void WriteOutImages ()
|
||||||
{
|
{
|
||||||
string tmp_path = SparkleLib.SparkleConfig.DefaultConfig.TmpPath;
|
string tmp_path = Sparkles.SparkleConfig.DefaultConfig.TmpPath;
|
||||||
string pixmaps_path = Path.Combine (tmp_path, "Pixmaps");
|
string pixmaps_path = Path.Combine (tmp_path, "Pixmaps");
|
||||||
|
|
||||||
if (!Directory.Exists (pixmaps_path))
|
if (!Directory.Exists (pixmaps_path))
|
||||||
|
|
|
@ -22,7 +22,7 @@ using System.Windows;
|
||||||
using System.Windows.Forms.Integration;
|
using System.Windows.Forms.Integration;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ namespace SparkleShare {
|
||||||
header_style.Setters.Add (new Setter (GridViewColumnHeader.VisibilityProperty, Visibility.Collapsed));
|
header_style.Setters.Add (new Setter (GridViewColumnHeader.VisibilityProperty, Visibility.Collapsed));
|
||||||
grid_view.ColumnHeaderContainerStyle = header_style;
|
grid_view.ColumnHeaderContainerStyle = header_style;
|
||||||
|
|
||||||
foreach (SparklePlugin plugin in Controller.Plugins) {
|
foreach (SparklePreset plugin in Controller.Presets) {
|
||||||
// FIXME: images are blurry
|
// FIXME: images are blurry
|
||||||
BitmapFrame image = BitmapFrame.Create (
|
BitmapFrame image = BitmapFrame.Create (
|
||||||
new Uri (plugin.ImagePath)
|
new Uri (plugin.ImagePath)
|
||||||
|
@ -284,7 +284,7 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
list_view.View = grid_view;
|
list_view.View = grid_view;
|
||||||
list_view.SelectedIndex = Controller.SelectedPluginIndex;
|
list_view.SelectedIndex = Controller.SelectedPresetIndex;
|
||||||
|
|
||||||
TextBlock address_label = new TextBlock () {
|
TextBlock address_label = new TextBlock () {
|
||||||
Text = "Address:",
|
Text = "Address:",
|
||||||
|
@ -294,11 +294,11 @@ namespace SparkleShare {
|
||||||
TextBox address_box = new TextBox () {
|
TextBox address_box = new TextBox () {
|
||||||
Width = 200,
|
Width = 200,
|
||||||
Text = Controller.PreviousAddress,
|
Text = Controller.PreviousAddress,
|
||||||
IsEnabled = (Controller.SelectedPlugin.Address == null)
|
IsEnabled = (Controller.SelectedPreset.Address == null)
|
||||||
};
|
};
|
||||||
|
|
||||||
TextBlock address_help_label = new TextBlock () {
|
TextBlock address_help_label = new TextBlock () {
|
||||||
Text = Controller.SelectedPlugin.AddressExample,
|
Text = Controller.SelectedPreset.AddressExample,
|
||||||
FontSize = 11,
|
FontSize = 11,
|
||||||
Foreground = new SolidColorBrush (Color.FromRgb (128, 128, 128))
|
Foreground = new SolidColorBrush (Color.FromRgb (128, 128, 128))
|
||||||
};
|
};
|
||||||
|
@ -312,11 +312,11 @@ namespace SparkleShare {
|
||||||
TextBox path_box = new TextBox () {
|
TextBox path_box = new TextBox () {
|
||||||
Width = 200,
|
Width = 200,
|
||||||
Text = Controller.PreviousPath,
|
Text = Controller.PreviousPath,
|
||||||
IsEnabled = (Controller.SelectedPlugin.Path == null)
|
IsEnabled = (Controller.SelectedPreset.Path == null)
|
||||||
};
|
};
|
||||||
|
|
||||||
TextBlock path_help_label = new TextBlock () {
|
TextBlock path_help_label = new TextBlock () {
|
||||||
Text = Controller.SelectedPlugin.PathExample,
|
Text = Controller.SelectedPreset.PathExample,
|
||||||
FontSize = 11,
|
FontSize = 11,
|
||||||
Width = 200,
|
Width = 200,
|
||||||
Foreground = new SolidColorBrush (Color.FromRgb (128, 128, 128))
|
Foreground = new SolidColorBrush (Color.FromRgb (128, 128, 128))
|
||||||
|
@ -409,11 +409,11 @@ namespace SparkleShare {
|
||||||
};
|
};
|
||||||
|
|
||||||
list_view.SelectionChanged += delegate {
|
list_view.SelectionChanged += delegate {
|
||||||
Controller.SelectedPluginChanged (list_view.SelectedIndex);
|
Controller.SelectedPresetChanged (list_view.SelectedIndex);
|
||||||
};
|
};
|
||||||
|
|
||||||
list_view.KeyDown += delegate {
|
list_view.KeyDown += delegate {
|
||||||
Controller.SelectedPluginChanged (list_view.SelectedIndex);
|
Controller.SelectedPresetChanged (list_view.SelectedIndex);
|
||||||
};
|
};
|
||||||
|
|
||||||
Controller.CheckAddPage (address_box.Text, path_box.Text, list_view.SelectedIndex);
|
Controller.CheckAddPage (address_box.Text, path_box.Text, list_view.SelectedIndex);
|
||||||
|
|
|
@ -202,54 +202,54 @@
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\Common\Plugins\github.png">
|
<None Include="..\Common\Presets\github.png">
|
||||||
<Link>Plugins\github.png</Link>
|
<Link>Presets\github.png</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\gitorious.png">
|
<None Include="..\Common\Presets\gitorious.png">
|
||||||
<Link>Plugins\gitorious.png</Link>
|
<Link>Presets\gitorious.png</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\own-server.png">
|
<None Include="..\Common\Presets\own-server.png">
|
||||||
<Link>Plugins\own-server.png</Link>
|
<Link>Presets\own-server.png</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\bitbucket.png">
|
<None Include="..\Common\Presets\bitbucket.png">
|
||||||
<Link>Plugins\bitbucket.png</Link>
|
<Link>Presets\bitbucket.png</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\ssnet.png">
|
<None Include="..\Common\Presets\ssnet.png">
|
||||||
<Link>Plugins\ssnet.png</Link>
|
<Link>Presets\ssnet.png</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\planio.png">
|
<None Include="..\Common\Presets\planio.png">
|
||||||
<Link>Plugins\planio.png</Link>
|
<Link>Presets\planio.png</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\Common\Plugins\ssnet.xml">
|
<None Include="..\Common\Presets\ssnet.xml">
|
||||||
<Link>Plugins\ssnet.xml</Link>
|
<Link>Presets\ssnet.xml</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\bitbucket.xml">
|
<None Include="..\Common\Presets\bitbucket.xml">
|
||||||
<Link>Plugins\bitbucket.xml</Link>
|
<Link>Presets\bitbucket.xml</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\github.xml">
|
<None Include="..\Common\Presets\github.xml">
|
||||||
<Link>Plugins\github.xml</Link>
|
<Link>Presets\github.xml</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\gitorious.xml">
|
<None Include="..\Common\Presets\gitorious.xml">
|
||||||
<Link>Plugins\gitorious.xml</Link>
|
<Link>Presets\gitorious.xml</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\own-server.xml">
|
<None Include="..\Common\Presets\own-server.xml">
|
||||||
<Link>Plugins\own-server.xml</Link>
|
<Link>Presets\own-server.xml</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="..\Common\Plugins\planio.xml">
|
<None Include="..\Common\Presets\planio.xml">
|
||||||
<Link>Plugins\planio.xml</Link>
|
<Link>Presets\planio.xml</Link>
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -281,11 +281,11 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="SparkleLib\Git\SparkleLib.Git.csproj">
|
<ProjectReference Include="SparkleLib\Git\SparkleLib.Git.csproj">
|
||||||
<Project>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</Project>
|
<Project>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</Project>
|
||||||
<Name>SparkleLib.Git</Name>
|
<Name>Sparkles.Git</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="SparkleLib\SparkleLib.csproj">
|
<ProjectReference Include="SparkleLib\SparkleLib.csproj">
|
||||||
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
||||||
<Name>SparkleLib</Name>
|
<Name>Sparkles</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
<File Id='SparkleShareInviteOpener.exe' Name='SparkleShareInviteOpener.exe' Source='!(wix.root)\bin\SparkleShareInviteOpener.exe' DiskId='1' />
|
<File Id='SparkleShareInviteOpener.exe' Name='SparkleShareInviteOpener.exe' Source='!(wix.root)\bin\SparkleShareInviteOpener.exe' DiskId='1' />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id='Libraries' Guid='0DA692D5-4DBE-4251-9F62-E7C1A76F10E1'>
|
<Component Id='Libraries' Guid='0DA692D5-4DBE-4251-9F62-E7C1A76F10E1'>
|
||||||
<File Id='SparkleLib.Git.dll' Name='SparkleLib.Git.dll' Source='!(wix.root)\bin\SparkleLib.Git.dll' DiskId='1' />
|
<File Id='Sparkles.Git.dll' Name='Sparkles.Git.dll' Source='!(wix.root)\bin\Sparkles.Git.dll' DiskId='1' />
|
||||||
<File Id='SparkleLib.dll' Name='SparkleLib.dll' Source='!(wix.root)\bin\SparkleLib.dll' DiskId='1' />
|
<File Id='Sparkles.dll' Name='Sparkles.dll' Source='!(wix.root)\bin\Sparkles.dll' DiskId='1' />
|
||||||
<File Id='sparkleshare_app.ico' Name='sparkleshare.ico' Source='!(wix.root)\SparkleShare\Windows\Pixmaps\sparkleshare-app.ico' DiskId='1' />
|
<File Id='sparkleshare_app.ico' Name='sparkleshare.ico' Source='!(wix.root)\SparkleShare\Windows\Pixmaps\sparkleshare-app.ico' DiskId='1' />
|
||||||
</Component>
|
</Component>
|
||||||
<Directory Id='MSYSGIT_DIR' Name='msysgit'>
|
<Directory Id='MSYSGIT_DIR' Name='msysgit'>
|
||||||
|
|
|
@ -19,7 +19,7 @@ using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using SparkleLib;
|
using Sparkles;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public abstract class AuthenticationInfo
|
public abstract class AuthenticationInfo
|
||||||
{
|
{
|
2
SparkleLib/BaseFetcher.cs → Sparkles/BaseFetcher.cs
Executable file → Normal file
|
@ -22,7 +22,7 @@ using System.IO;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class SparkleFetcherInfo {
|
public class SparkleFetcherInfo {
|
||||||
public string Address;
|
public string Address;
|
2
SparkleLib/BaseListener.cs → Sparkles/BaseListener.cs
Executable file → Normal file
|
@ -19,7 +19,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public enum DisconnectReason {
|
public enum DisconnectReason {
|
||||||
None,
|
None,
|
|
@ -22,7 +22,7 @@ using System.Threading;
|
||||||
|
|
||||||
using Timers = System.Timers;
|
using Timers = System.Timers;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public enum SyncStatus {
|
public enum SyncStatus {
|
||||||
Idle,
|
Idle,
|
|
@ -19,7 +19,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public enum ChangeType {
|
public enum ChangeType {
|
||||||
Added,
|
Added,
|
|
@ -19,7 +19,7 @@ using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class Command : Process {
|
public class Command : Process {
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ namespace SparkleLib {
|
||||||
if (!string.IsNullOrEmpty (StartInfo.WorkingDirectory))
|
if (!string.IsNullOrEmpty (StartInfo.WorkingDirectory))
|
||||||
folder = Path.GetFileName (StartInfo.WorkingDirectory) + " | ";
|
folder = Path.GetFileName (StartInfo.WorkingDirectory) + " | ";
|
||||||
|
|
||||||
if (this.write_output)
|
if (write_output)
|
||||||
Logger.LogInfo ("Cmd", folder + Path.GetFileName (StartInfo.FileName) + " " + StartInfo.Arguments);
|
Logger.LogInfo ("Cmd", folder + Path.GetFileName (StartInfo.FileName) + " " + StartInfo.Arguments);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -103,7 +103,7 @@ namespace SparkleLib {
|
||||||
{
|
{
|
||||||
string [] possible_command_paths = {
|
string [] possible_command_paths = {
|
||||||
Environment.GetFolderPath (Environment.SpecialFolder.Personal) + "/bin/" + name,
|
Environment.GetFolderPath (Environment.SpecialFolder.Personal) + "/bin/" + name,
|
||||||
Defines.INSTALL_DIR + "/bin/" + name,
|
InstallationInfo.Directory + "/bin/" + name,
|
||||||
"/usr/local/bin/" + name,
|
"/usr/local/bin/" + name,
|
||||||
"/usr/bin/" + name,
|
"/usr/bin/" + name,
|
||||||
"/opt/local/bin/" + name
|
"/opt/local/bin/" + name
|
||||||
|
@ -118,4 +118,3 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
8
SparkleLib/Configuration.cs → Sparkles/Configuration.cs
Executable file → Normal file
|
@ -20,7 +20,7 @@ using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class Configuration : XmlDocument {
|
public class Configuration : XmlDocument {
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public string HomePath {
|
public string HomePath {
|
||||||
get {
|
get {
|
||||||
if (Backend.Platform == PlatformID.Win32NT)
|
if (InstallationInfo.Platform == PlatformID.Win32NT)
|
||||||
return Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
|
return Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
|
||||||
else
|
else
|
||||||
return Environment.GetFolderPath (Environment.SpecialFolder.Personal);
|
return Environment.GetFolderPath (Environment.SpecialFolder.Personal);
|
||||||
|
@ -110,8 +110,8 @@ namespace SparkleLib {
|
||||||
{
|
{
|
||||||
string user_name = "Unknown";
|
string user_name = "Unknown";
|
||||||
|
|
||||||
if (Backend.Platform == PlatformID.Unix ||
|
if (InstallationInfo.Platform == PlatformID.Unix ||
|
||||||
Backend.Platform == PlatformID.MacOSX) {
|
InstallationInfo.Platform == PlatformID.MacOSX) {
|
||||||
|
|
||||||
user_name = Environment.UserName;
|
user_name = Environment.UserName;
|
||||||
if (string.IsNullOrEmpty (user_name))
|
if (string.IsNullOrEmpty (user_name))
|
2
SparkleLib/Extensions.cs → Sparkles/Extensions.cs
Executable file → Normal file
|
@ -20,7 +20,7 @@ using System.IO;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public static class Extensions {
|
public static class Extensions {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
namespace SparkleLib.Git {
|
namespace Sparkles.Git {
|
||||||
|
|
||||||
public class GitCommand : Command {
|
public class GitCommand : Command {
|
||||||
|
|
4
SparkleLib/Git/GitFetcher.cs → Sparkles/Git/GitFetcher.cs
Executable file → Normal file
|
@ -21,7 +21,7 @@ using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace SparkleLib.Git {
|
namespace Sparkles.Git {
|
||||||
|
|
||||||
public class GitFetcher : SSHFetcher {
|
public class GitFetcher : SSHFetcher {
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ namespace SparkleLib.Git {
|
||||||
"push.default matching"
|
"push.default matching"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Backend.Platform == PlatformID.Win32NT)
|
if (InstallationInfo.Platform == PlatformID.Win32NT)
|
||||||
settings [0] = "core.autocrlf true";
|
settings [0] = "core.autocrlf true";
|
||||||
|
|
||||||
foreach (string setting in settings) {
|
foreach (string setting in settings) {
|
|
@ -23,7 +23,7 @@ using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace SparkleLib.Git {
|
namespace Sparkles.Git {
|
||||||
|
|
||||||
public class GitRepository : BaseRepository {
|
public class GitRepository : BaseRepository {
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
ASSEMBLY = SparkleLib.Git
|
ASSEMBLY = Sparkles.Git
|
||||||
TARGET = library
|
TARGET = library
|
||||||
|
|
||||||
LINK = -r:$(DIR_BIN)/SparkleLib.dll
|
LINK = -r:$(DIR_BIN)/Sparkles.dll
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
GitCommand.cs \
|
GitCommand.cs \
|
||||||
GitFetcher.cs \
|
GitFetcher.cs \
|
||||||
GitRepository.cs
|
GitRepository.cs
|
||||||
|
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
for ASM in $(EXTRA_BUNDLE); do \
|
for ASM in $(EXTRA_BUNDLE); do \
|
||||||
$(INSTALL) -m 0755 $$ASM $(DESTDIR)$(moduledir); \
|
$(INSTALL) -m 0755 $$ASM $(DESTDIR)$(moduledir); \
|
||||||
|
@ -20,3 +19,4 @@ uninstall-hook:
|
||||||
done;
|
done;
|
||||||
|
|
||||||
include $(top_srcdir)/build/build.mk
|
include $(top_srcdir)/build/build.mk
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<ProjectGuid>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</ProjectGuid>
|
<ProjectGuid>{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>SparkleLib.Git</RootNamespace>
|
<RootNamespace>Sparkles.Git</RootNamespace>
|
||||||
<AssemblyName>SparkleLib.Git</AssemblyName>
|
<AssemblyName>Sparkles.Git</AssemblyName>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ReleaseVersion>
|
<ReleaseVersion>
|
||||||
</ReleaseVersion>
|
</ReleaseVersion>
|
||||||
|
@ -45,15 +45,15 @@
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\SparkleLib.csproj">
|
|
||||||
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
|
||||||
<Name>SparkleLib</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="GitFetcher.cs" />
|
<Compile Include="GitFetcher.cs" />
|
||||||
<Compile Include="GitCommand.cs" />
|
<Compile Include="GitCommand.cs" />
|
||||||
<Compile Include="GitRepository.cs" />
|
<Compile Include="GitRepository.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Sparkles.csproj">
|
||||||
|
<Project>{2C914413-B31C-4362-93C7-1AE34F09112A}</Project>
|
||||||
|
<Name>Sparkles</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
29
Sparkles/InstallationInfo.Directory.cs
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
// SparkleShare, a collaboration and sharing tool.
|
||||||
|
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly:AssemblyTitle ("Sparkles")]
|
||||||
|
[assembly:AssemblyVersion ("2.0")]
|
||||||
|
[assembly:AssemblyCopyright ("Copyright (c) 2010 Hylke Bons and others")]
|
||||||
|
|
||||||
|
namespace Sparkles {
|
||||||
|
|
||||||
|
public partial class InstallationInfo {
|
||||||
|
public const string Directory = "/app/share/sparkleshare";
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,16 +15,15 @@
|
||||||
// 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;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly:AssemblyTitle ("SparkleLib")]
|
[assembly:AssemblyTitle ("Sparkles")]
|
||||||
[assembly:AssemblyVersion ("@VERSION@")]
|
[assembly:AssemblyVersion ("@VERSION@")]
|
||||||
[assembly:AssemblyCopyright ("Copyright (c) 2010 Hylke Bons and others")]
|
[assembly:AssemblyCopyright ("Copyright (c) 2010 Hylke Bons and others")]
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class Defines {
|
public partial class InstallationInfo {
|
||||||
public const string INSTALL_DIR = "@expanded_datadir@/sparkleshare";
|
public const string Directory = "@expanded_datadir@/sparkleshare";
|
||||||
}
|
}
|
||||||
}
|
}
|
6
SparkleLib/Backend.cs → Sparkles/InstallationInfo.cs
Executable file → Normal file
|
@ -1,4 +1,4 @@
|
||||||
// SparkleShare, a collaboration and sharing tool.
|
// SparkleShare, a collaboration and sharing tool.
|
||||||
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
|
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
|
||||||
//
|
//
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -19,9 +19,9 @@ using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public static class Backend {
|
public partial class InstallationInfo {
|
||||||
|
|
||||||
public static string Version {
|
public static string Version {
|
||||||
get {
|
get {
|
|
@ -18,7 +18,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public static class ListenerFactory {
|
public static class ListenerFactory {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public static class Logger {
|
public static class Logger {
|
||||||
|
|
||||||
|
@ -65,21 +65,24 @@ namespace SparkleLib {
|
||||||
{
|
{
|
||||||
string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
|
string home_path = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
|
||||||
|
|
||||||
if (Backend.Platform == PlatformID.Win32NT)
|
if (InstallationInfo.Platform == PlatformID.Win32NT)
|
||||||
home_path = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
|
home_path = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
|
||||||
|
|
||||||
string crash_report_file_path = new string [] { home_path, "SparkleShare", "crash_report.txt" }.Combine ();
|
string crash_report_file_path = new string [] { home_path, "SparkleShare", "crash_report.txt" }.Combine ();
|
||||||
|
|
||||||
string n = Environment.NewLine;
|
string n = Environment.NewLine;
|
||||||
string crash_report = "Oops! SparkleShare has crashed... :(" + n + n +
|
string crash_report =
|
||||||
|
"Oops! SparkleShare has crashed... :(" + n +
|
||||||
|
n +
|
||||||
"If you want to help fix this crash, please report it at " + n +
|
"If you want to help fix this crash, please report it at " + n +
|
||||||
"https://github.com/hbons/SparkleShare/issues and include the lines below." + n + n +
|
"https://github.com/hbons/SparkleShare/issues and include the lines below." + n +
|
||||||
"Remove any sensitive information like file names, IP addresses, domain names, etc. if needed." + n + n +
|
n +
|
||||||
"------" + n + n +
|
"Remove any sensitive information like file names, IP addresses, domain names, etc. if needed." + n +
|
||||||
"SparkleShare version: " + Backend.Version + n +
|
n +
|
||||||
"Operating system: " + Backend.Platform + " (" + Environment.OSVersion + ")" + n;
|
"------" + n +
|
||||||
|
n;
|
||||||
|
|
||||||
crash_report += e.GetType () + ": " + e.Message + n + e.StackTrace + n;
|
crash_report += e.GetType () + ": " + e.Message + n + e.StackTrace + n + n;
|
||||||
|
|
||||||
if (e.InnerException != null)
|
if (e.InnerException != null)
|
||||||
crash_report += n + e.InnerException.Message + n + e.InnerException.StackTrace + n;
|
crash_report += n + e.InnerException.Message + n + e.InnerException.StackTrace + n;
|
||||||
|
@ -89,13 +92,10 @@ namespace SparkleLib {
|
||||||
string [] debug_lines = debug_log.Split (Environment.NewLine.ToCharArray ());
|
string [] debug_lines = debug_log.Split (Environment.NewLine.ToCharArray ());
|
||||||
int line_count = 50;
|
int line_count = 50;
|
||||||
|
|
||||||
if (debug_lines.Length > line_count) {
|
if (debug_lines.Length > line_count)
|
||||||
crash_report += string.Join (Environment.NewLine, debug_lines,
|
crash_report += string.Join (n, debug_lines, (debug_lines.Length - line_count), line_count) + n;
|
||||||
(debug_lines.Length - line_count), line_count) + n;
|
else
|
||||||
|
|
||||||
} else {
|
|
||||||
crash_report += debug_log + n;
|
crash_report += debug_log + n;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllText (crash_report_file_path, crash_report);
|
File.WriteAllText (crash_report_file_path, crash_report);
|
|
@ -1,11 +1,11 @@
|
||||||
ASSEMBLY = SparkleLib
|
ASSEMBLY = Sparkles
|
||||||
TARGET = library
|
TARGET = library
|
||||||
|
|
||||||
ASSEMBLY_INFO_SOURCE = Defines.cs
|
ASSEMBLY_INFO_SOURCE = InstallationInfo.Directory.cs
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
AuthenticationInfo.cs \
|
AuthenticationInfo.cs \
|
||||||
Backend.cs \
|
InstallationInfo.cs \
|
||||||
BaseFetcher.cs \
|
BaseFetcher.cs \
|
||||||
BaseListener.cs \
|
BaseListener.cs \
|
||||||
BaseRepository.cs \
|
BaseRepository.cs \
|
||||||
|
@ -15,6 +15,7 @@ SOURCES = \
|
||||||
Extensions.cs \
|
Extensions.cs \
|
||||||
ListenerFactory.cs \
|
ListenerFactory.cs \
|
||||||
Logger.cs \
|
Logger.cs \
|
||||||
|
Preset.cs \
|
||||||
SSHAuthenticationInfo.cs \
|
SSHAuthenticationInfo.cs \
|
||||||
SSHFetcher.cs \
|
SSHFetcher.cs \
|
||||||
TcpListener.cs \
|
TcpListener.cs \
|
||||||
|
@ -32,3 +33,4 @@ uninstall-hook:
|
||||||
done;
|
done;
|
||||||
|
|
||||||
include $(top_srcdir)/build/build.mk
|
include $(top_srcdir)/build/build.mk
|
||||||
|
|
|
@ -22,12 +22,12 @@ using IO = System.IO;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class Plugin : XmlDocument {
|
public class Preset : XmlDocument {
|
||||||
|
|
||||||
public static string PluginsPath = "";
|
public static string PresetsPath = "";
|
||||||
|
|
||||||
public static string LocalPluginsPath = IO.Path.Combine (
|
public static string LocalPresetsPath = IO.Path.Combine (
|
||||||
Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "sparkleshare", "plugins");
|
Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "sparkleshare", "presets");
|
||||||
|
|
||||||
new public string Name { get { return GetValue ("info", "name"); } }
|
new public string Name { get { return GetValue ("info", "name"); } }
|
||||||
public string Description { get { return GetValue ("info", "description"); } }
|
public string Description { get { return GetValue ("info", "description"); } }
|
||||||
|
@ -42,12 +42,12 @@ namespace SparkleShare {
|
||||||
public string ImagePath {
|
public string ImagePath {
|
||||||
get {
|
get {
|
||||||
string image_file_name = GetValue ("info", "icon");
|
string image_file_name = GetValue ("info", "icon");
|
||||||
string image_path = IO.Path.Combine (this.plugin_directory, image_file_name);
|
string image_path = IO.Path.Combine (preset_directory, image_file_name);
|
||||||
|
|
||||||
if (IO.File.Exists (image_path))
|
if (IO.File.Exists (image_path))
|
||||||
return image_path;
|
return image_path;
|
||||||
else
|
|
||||||
return IO.Path.Combine (PluginsPath, image_file_name);
|
return IO.Path.Combine (PresetsPath, image_file_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,27 +62,29 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string plugin_directory;
|
string preset_directory;
|
||||||
|
|
||||||
|
|
||||||
public Plugin (string plugin_path)
|
public Preset (string preset_path)
|
||||||
{
|
{
|
||||||
this.plugin_directory = System.IO.Path.GetDirectoryName (plugin_path);
|
preset_directory = IO.Path.GetDirectoryName (preset_path);
|
||||||
Load (plugin_path);
|
Load (preset_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static Plugin Create (string name, string description, string address_value,
|
// TODO: Gitlab preset
|
||||||
|
public static Preset Create (string name, string description, string address_value,
|
||||||
string address_example, string path_value, string path_example)
|
string address_example, string path_value, string path_example)
|
||||||
{
|
{
|
||||||
string plugin_path = System.IO.Path.Combine (LocalPluginsPath, name + ".xml");
|
string preset_path = IO.Path.Combine (LocalPresetsPath, name + ".xml");
|
||||||
|
|
||||||
if (IO.File.Exists (plugin_path))
|
if (IO.File.Exists (preset_path))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
string plugin_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
|
// TODO: Don't write maually
|
||||||
|
string preset_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
|
||||||
"<sparkleshare>" +
|
"<sparkleshare>" +
|
||||||
" <plugin>" +
|
" <preset>" +
|
||||||
" <info>" +
|
" <info>" +
|
||||||
" <name>" + name + "</name>" +
|
" <name>" + name + "</name>" +
|
||||||
" <description>" + description + "</description>" +
|
" <description>" + description + "</description>" +
|
||||||
|
@ -96,23 +98,23 @@ namespace SparkleShare {
|
||||||
" <value>" + path_value + "</value>" +
|
" <value>" + path_value + "</value>" +
|
||||||
" <example>" + path_example + "</example>" +
|
" <example>" + path_example + "</example>" +
|
||||||
" </path>" +
|
" </path>" +
|
||||||
" </plugin>" +
|
" </preset>" +
|
||||||
"</sparkleshare>";
|
"</sparkleshare>";
|
||||||
|
|
||||||
plugin_xml = plugin_xml.Replace ("<value></value>", "<value/>");
|
preset_xml = preset_xml.Replace ("<value></value>", "<value/>");
|
||||||
plugin_xml = plugin_xml.Replace ("<example></example>", "<example/>");
|
preset_xml = preset_xml.Replace ("<example></example>", "<example/>");
|
||||||
|
|
||||||
if (!IO.Directory.Exists (LocalPluginsPath))
|
if (!IO.Directory.Exists (LocalPresetsPath))
|
||||||
IO.Directory.CreateDirectory (LocalPluginsPath);
|
IO.Directory.CreateDirectory (LocalPresetsPath);
|
||||||
|
|
||||||
IO.File.WriteAllText (plugin_path, plugin_xml);
|
IO.File.WriteAllText (preset_path, preset_xml);
|
||||||
return new Plugin (plugin_path);
|
return new Preset (preset_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private string GetValue (string a, string b)
|
private string GetValue (string a, string b)
|
||||||
{
|
{
|
||||||
XmlNode node = SelectSingleNode ("/sparkleshare/plugin/" + a + "/" + b + "/text()");
|
XmlNode node = SelectSingleNode ("/sparkleshare/preset/" + a + "/" + b + "/text()");
|
||||||
|
|
||||||
if (node != null && !string.IsNullOrEmpty (node.Value))
|
if (node != null && !string.IsNullOrEmpty (node.Value))
|
||||||
return node.Value;
|
return node.Value;
|
|
@ -20,7 +20,7 @@ using System.Net;
|
||||||
|
|
||||||
using IO = System.IO;
|
using IO = System.IO;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class SSHAuthenticationInfo : AuthenticationInfo {
|
public class SSHAuthenticationInfo : AuthenticationInfo {
|
||||||
|
|
|
@ -20,7 +20,7 @@ using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public abstract class SSHFetcher : BaseFetcher {
|
public abstract class SSHFetcher : BaseFetcher {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{2C914413-B31C-4362-93C7-1AE34F09112A}</ProjectGuid>
|
<ProjectGuid>{2C914413-B31C-4362-93C7-1AE34F09112A}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RootNamespace>SparkleLib</RootNamespace>
|
<RootNamespace>Sparkles</RootNamespace>
|
||||||
<AssemblyName>SparkleLib</AssemblyName>
|
<AssemblyName>Sparkles</AssemblyName>
|
||||||
<ReleaseVersion>
|
<ReleaseVersion>
|
||||||
</ReleaseVersion>
|
</ReleaseVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -32,11 +32,10 @@
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Backend.cs" />
|
|
||||||
<Compile Include="Configuration.cs" />
|
<Compile Include="Configuration.cs" />
|
||||||
<Compile Include="Extensions.cs" />
|
<Compile Include="Extensions.cs" />
|
||||||
<Compile Include="Logger.cs" />
|
<Compile Include="Logger.cs" />
|
||||||
<Compile Include="Defines.cs" />
|
<Compile Include="InstallationInfo.Directory.cs" />
|
||||||
<Compile Include="Command.cs" />
|
<Compile Include="Command.cs" />
|
||||||
<Compile Include="SSHFetcher.cs">
|
<Compile Include="SSHFetcher.cs">
|
||||||
<Link>Fetcher\SSHFetcher.cs</Link>
|
<Link>Fetcher\SSHFetcher.cs</Link>
|
||||||
|
@ -71,6 +70,8 @@
|
||||||
<Compile Include="Watcher.cs">
|
<Compile Include="Watcher.cs">
|
||||||
<Link>Repository\Watcher.cs</Link>
|
<Link>Repository\Watcher.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="InstallationInfo.cs" />
|
||||||
|
<Compile Include="Preset.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Fetcher\" />
|
<Folder Include="Fetcher\" />
|
|
@ -20,7 +20,7 @@ using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class TcpListener : BaseListener {
|
public class TcpListener : BaseListener {
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ namespace SparkleLib {
|
||||||
if (this.socket != null)
|
if (this.socket != null)
|
||||||
this.socket.Close ();
|
this.socket.Close ();
|
||||||
|
|
||||||
OnDisconnected (SparkleLib.DisconnectReason.TimeOut, e.Message);
|
OnDisconnected (Sparkles.DisconnectReason.TimeOut, e.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class User {
|
public class User {
|
||||||
|
|
2
SparkleLib/Watcher.cs → Sparkles/Watcher.cs
Executable file → Normal file
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace Sparkles {
|
||||||
|
|
||||||
public class Watcher : FileSystemWatcher {
|
public class Watcher : FileSystemWatcher {
|
||||||
|
|
|
@ -4,3 +4,4 @@ EXTRA_DIST = \
|
||||||
icon-theme-installer
|
icon-theme-installer
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,14 @@ LINK_MONO_POSIX = -r:Mono.Posix
|
||||||
|
|
||||||
LINK_GLIB = $(GLIBSHARP_LIBS)
|
LINK_GLIB = $(GLIBSHARP_LIBS)
|
||||||
LINK_GTK = $(GTKSHARP_LIBS)
|
LINK_GTK = $(GTKSHARP_LIBS)
|
||||||
LINK_GNOME = $(GNOME_SHARP_LIBS)
|
|
||||||
LINK_WEBKIT = $(WEBKITGTK_SHARP_LIBS)
|
LINK_WEBKIT = $(WEBKITGTK_SHARP_LIBS)
|
||||||
LINK_APP_INDICATOR = $(APP_INDICATOR_LIBS)
|
LINK_APP_INDICATOR = $(APP_INDICATOR_LIBS)
|
||||||
|
|
||||||
REF_SPARKLELIB = $(LINK_SYSTEM) $(LINK_MONO_POSIX)
|
REF_SPARKLES = $(LINK_SYSTEM) $(LINK_MONO_POSIX)
|
||||||
LINK_SPARKLELIB = -r:$(DIR_BIN)/SparkleLib.dll
|
LINK_SPARKLES = -r:$(DIR_BIN)/Sparkles.dll
|
||||||
LINK_SPARKLELIB_DEPS = $(REF_SPARKLELIB) $(LINK_SPARKLELIB)
|
LINK_SPARKLES_DEPS = $(REF_SPARKLES) $(LINK_SPARKLES)
|
||||||
|
|
||||||
REF_SPARKLESHARE = $(LINK_GTK) $(LINK_SPARKLELIB_DEPS) $(LINK_APP_INDICATOR) $(LINK_WEBKIT)
|
REF_SPARKLESHARE = $(LINK_GTK) $(LINK_SPARKLES_DEPS) $(LINK_APP_INDICATOR) $(LINK_WEBKIT)
|
||||||
|
|
||||||
# Cute hack to replace a space with something
|
# Cute hack to replace a space with something
|
||||||
colon:= :
|
colon:= :
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
include $(top_srcdir)/build/build.environment.mk
|
include $(top_srcdir)/build/build.environment.mk
|
||||||
include $(top_srcdir)/build/build.rules.mk
|
include $(top_srcdir)/build/build.rules.mk
|
||||||
|
|
||||||
|
|
|
@ -75,4 +75,3 @@ EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED)
|
||||||
CLEANFILES = $(OUTPUT_FILES) $(ASSEMBLY_FILE).config
|
CLEANFILES = $(OUTPUT_FILES) $(ASSEMBLY_FILE).config
|
||||||
DISTCLEANFILES = *.pidb
|
DISTCLEANFILES = *.pidb
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,13 @@ if [ "$1" = "" ]; then
|
||||||
echo "No version number specified. Usage: ./bump-version.sh VERSION_NUMBER"
|
echo "No version number specified. Usage: ./bump-version.sh VERSION_NUMBER"
|
||||||
else
|
else
|
||||||
sed -i.bak "s/ Version='[^']*'/ Version='$1'/" ../SparkleShare/Windows/SparkleShare.wxs
|
sed -i.bak "s/ Version='[^']*'/ Version='$1'/" ../SparkleShare/Windows/SparkleShare.wxs
|
||||||
sed -i.bak "s/assembly:AssemblyVersion *(\"[^\"]*\")/assembly:AssemblyVersion (\"$1\")/" ../SparkleLib/Defines.cs
|
sed -i.bak "s/assembly:AssemblyVersion *(\"[^\"]*\")/assembly:AssemblyVersion (\"$1\")/" ../Sparkles/InstallationInfo.Directory.cs
|
||||||
sed -i.bak "s/m4_define(.sparkleshare_version[^)]*)/m4_define([sparkleshare_version], [$1])/" ../configure.ac
|
sed -i.bak "s/m4_define(.sparkleshare_version[^)]*)/m4_define([sparkleshare_version], [$1])/" ../configure.ac
|
||||||
cat ../SparkleShare/Mac/Info.plist | eval "sed -e '/<key>CFBundleShortVersionString<\/key>/{N;s#<string>.*<\/string>#<string>$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist.tmp
|
cat ../SparkleShare/Mac/Info.plist | eval "sed -e '/<key>CFBundleShortVersionString<\/key>/{N;s#<string>.*<\/string>#<string>$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist.tmp
|
||||||
cat ../SparkleShare/Mac/Info.plist.tmp | eval "sed -e '/<key>CFBundleVersion<\/key>/{N;s#<string>.*<\/string>#<string>$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist
|
cat ../SparkleShare/Mac/Info.plist.tmp | eval "sed -e '/<key>CFBundleVersion<\/key>/{N;s#<string>.*<\/string>#<string>$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist
|
||||||
rm ../SparkleShare/Mac/Info.plist.tmp
|
rm ../SparkleShare/Mac/Info.plist.tmp
|
||||||
rm ../SparkleShare/Windows/SparkleShare.wxs.bak
|
rm ../SparkleShare/Windows/SparkleShare.wxs.bak
|
||||||
rm ../SparkleLib/Defines.cs.bak
|
rm ../Sparkles/InstallationInfo.Directory.cs.bak
|
||||||
rm ../configure.ac.bak
|
rm ../configure.ac.bak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -109,12 +109,12 @@ build/Makefile
|
||||||
build/m4/Makefile
|
build/m4/Makefile
|
||||||
build/m4/shave/shave
|
build/m4/shave/shave
|
||||||
build/m4/shave/shave-libtool
|
build/m4/shave/shave-libtool
|
||||||
SparkleLib/Defines.cs
|
Sparkles/InstallationInfo.Directory.cs
|
||||||
SparkleLib/Makefile
|
Sparkles/Makefile
|
||||||
SparkleLib/Git/Makefile
|
Sparkles/Git/Makefile
|
||||||
SparkleShare/Common/Makefile
|
SparkleShare/Common/Makefile
|
||||||
SparkleShare/Common/HTML/Makefile
|
SparkleShare/Common/HTML/Makefile
|
||||||
SparkleShare/Common/Plugins/Makefile
|
SparkleShare/Common/Presets/Makefile
|
||||||
SparkleShare/Common/Pixmaps/Makefile
|
SparkleShare/Common/Pixmaps/Makefile
|
||||||
SparkleShare/Linux/Makefile
|
SparkleShare/Linux/Makefile
|
||||||
SparkleShare/Linux/Pixmaps/Makefile
|
SparkleShare/Linux/Pixmaps/Makefile
|
||||||
|
|