diff --git a/.gitignore b/.gitignore
index 70faa4c1..1fee9b75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,7 +33,6 @@ missing
build/m4/shave/shave
build/m4/*.m4
build/m4/shave/shave-libtool
-SparkleLib/Defines.cs
SparkleShare/Linux/sparkleshare
SparkleShare/Mac/git*
gnome-doc-utils.make
diff --git a/Makefile.am b/Makefile.am
index d2771fea..a01cb1c1 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,22 +1,23 @@
-basedirs = build SparkleLib SparkleLib/Git
+basedirs = build Sparkles Sparkles/Git
SUBDIRS = $(basedirs) $(GUISUBDIRS)
DIST_SUBDIRS = $(basedirs) SparkleShare
EXTRA_DIST = \
News.txt \
- README.md \
+ README.md \
legal/License_for_SparkleShare.txt \
- legal/License_for_SparkleLib.txt \
+ legal/License_for_Sparkles.txt \
legal/Authors.txt \
SparkleShare/Linux/README.md \
SparkleShare/Linux/org.sparkleshare.SparkleShare.appdata.xml
DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update \
+ intltool-extract \
+ intltool-merge \
+ intltool-update \
gnome-doc-utils.make
clean-local:
rm -rf $(top_builddir)/bin
+
diff --git a/README.md b/README.md
index a2908d76..2a3512dd 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ SparkleShare uses the version control system [Git](https://git-scm.com/) under t
## 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
diff --git a/SparkleShare/SparkleShare.sln b/SparkleShare.sln
similarity index 85%
rename from SparkleShare/SparkleShare.sln
rename to SparkleShare.sln
index 7a25902b..1d7731b6 100644
--- a/SparkleShare/SparkleShare.sln
+++ b/SparkleShare.sln
@@ -1,13 +1,13 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# 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
-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
-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
-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
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/SparkleShare/Common/AboutController.cs b/SparkleShare/Common/AboutController.cs
index bc553b4c..60c4e91a 100644
--- a/SparkleShare/Common/AboutController.cs
+++ b/SparkleShare/Common/AboutController.cs
@@ -19,6 +19,8 @@ using System;
using System.Net;
using System.Threading;
+using Sparkles;
+
namespace SparkleShare {
public class SparkleAboutController {
@@ -39,11 +41,11 @@ namespace SparkleShare {
public SparkleAboutController ()
{
- RunningVersion = SparkleLib.Backend.Version;
+ RunningVersion = InstallationInfo.Version;
SparkleShare.Controller.ShowAboutWindowEvent += delegate {
ShowWindowEvent ();
- new Thread (() => CheckForNewVersion ()).Start ();
+ new Thread (CheckForNewVersion).Start ();
};
}
@@ -54,13 +56,13 @@ namespace SparkleShare {
}
- private void CheckForNewVersion ()
+ void CheckForNewVersion ()
{
UpdateLabelEvent ("Checking for updates...");
Thread.Sleep (500);
- WebClient web_client = new WebClient ();
- Uri uri = new Uri ("http://www.sparkleshare.org/version");
+ var web_client = new WebClient ();
+ var uri = new Uri ("http://www.sparkleshare.org/version");
try {
string latest_version = web_client.DownloadString (uri).Trim ();
diff --git a/SparkleShare/Common/Avatars.cs b/SparkleShare/Common/Avatars.cs
index c0cb0e65..981c05d5 100644
--- a/SparkleShare/Common/Avatars.cs
+++ b/SparkleShare/Common/Avatars.cs
@@ -23,7 +23,7 @@ using System.Net.Mime;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare
{
diff --git a/SparkleShare/Common/BaseController.cs b/SparkleShare/Common/BaseController.cs
index d2dac560..46bb2487 100644
--- a/SparkleShare/Common/BaseController.cs
+++ b/SparkleShare/Common/BaseController.cs
@@ -21,8 +21,8 @@ using System.IO;
using System.Linq;
using System.Threading;
-using SparkleLib;
-using SparkleLib.Git;
+using Sparkles;
+using Sparkles.Git;
namespace SparkleShare {
@@ -155,7 +155,7 @@ namespace SparkleShare {
// Path where the plugins are kept
- public abstract string PluginsPath { get; }
+ public abstract string PresetsPath { get; }
// Enables SparkleShare to start automatically at login
public abstract void CreateStartupItem ();
@@ -212,11 +212,11 @@ namespace SparkleShare {
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", Backend.Platform + " (" + Environment.OSVersion + ")");
+ Logger.LogInfo ("Environment", InstallationInfo.Platform + " (" + Environment.OSVersion + ")");
- Plugin.PluginsPath = PluginsPath;
+ Preset.PresetsPath = PresetsPath;
InstallProtocolHandler ();
try {
@@ -394,7 +394,7 @@ namespace SparkleShare {
try {
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 });
} catch (Exception e) {
@@ -561,7 +561,7 @@ namespace SparkleShare {
try {
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) {
Logger.LogInfo ("Controller",
diff --git a/SparkleShare/Common/BubblesController.cs b/SparkleShare/Common/BubblesController.cs
index b0665a85..7ed3dfaf 100644
--- a/SparkleShare/Common/BubblesController.cs
+++ b/SparkleShare/Common/BubblesController.cs
@@ -18,7 +18,7 @@
using System;
using System.Text;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
diff --git a/SparkleShare/Common/EventLogController.cs b/SparkleShare/Common/EventLogController.cs
index ba4a5cb4..acbf4239 100644
--- a/SparkleShare/Common/EventLogController.cs
+++ b/SparkleShare/Common/EventLogController.cs
@@ -24,7 +24,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
diff --git a/SparkleShare/Common/Invite.cs b/SparkleShare/Common/Invite.cs
index 7a8098bc..4e923855 100644
--- a/SparkleShare/Common/Invite.cs
+++ b/SparkleShare/Common/Invite.cs
@@ -21,7 +21,7 @@ using System.Net;
using System.Text;
using System.Xml;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
diff --git a/SparkleShare/Common/Makefile.am b/SparkleShare/Common/Makefile.am
index 2f972e5d..04d55813 100644
--- a/SparkleShare/Common/Makefile.am
+++ b/SparkleShare/Common/Makefile.am
@@ -1,3 +1,3 @@
SUBDIRS = HTML \
- Plugins \
+ Presets \
Pixmaps
diff --git a/SparkleShare/Common/NoteController.cs b/SparkleShare/Common/NoteController.cs
index edd09fde..6edcd82d 100644
--- a/SparkleShare/Common/NoteController.cs
+++ b/SparkleShare/Common/NoteController.cs
@@ -18,7 +18,7 @@
using System;
using System.Threading;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
diff --git a/SparkleShare/Common/Plugins/gitorious.png b/SparkleShare/Common/Plugins/gitorious.png
deleted file mode 100644
index 731835b7..00000000
Binary files a/SparkleShare/Common/Plugins/gitorious.png and /dev/null differ
diff --git a/SparkleShare/Common/Plugins/gitorious.xml b/SparkleShare/Common/Plugins/gitorious.xml
deleted file mode 100644
index d0cee9ed..00000000
--- a/SparkleShare/Common/Plugins/gitorious.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- Gitorious
- Open source infrastructure for hosting open source projects
- gitorious.png
- Git
- 7e:af:8d:ec:f0:39:5e:ba:52:16:ce:19:fa:d4:b8:7d
-
-
- ssh://git@gitorious.org/
-
-
-
-
- /project/repository
-
-
-
diff --git a/SparkleShare/Common/Plugins/gitorious@2x.png b/SparkleShare/Common/Plugins/gitorious@2x.png
deleted file mode 100644
index 806f1138..00000000
Binary files a/SparkleShare/Common/Plugins/gitorious@2x.png and /dev/null differ
diff --git a/SparkleShare/Common/Plugins/ssnet.png b/SparkleShare/Common/Plugins/ssnet.png
deleted file mode 100644
index 8aac4605..00000000
Binary files a/SparkleShare/Common/Plugins/ssnet.png and /dev/null differ
diff --git a/SparkleShare/Common/Plugins/ssnet.xml b/SparkleShare/Common/Plugins/ssnet.xml
deleted file mode 100644
index 718e6f3c..00000000
--- a/SparkleShare/Common/Plugins/ssnet.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- SparkleShare.Net
- The easiest way to share projects with SparkleShare
- ssnet.png
- Git
-
-
- ssh://storage@sparkleshare.net/
-
-
-
-
- /username/project
-
-
-
diff --git a/SparkleShare/Common/Plugins/ssnet@2x.png b/SparkleShare/Common/Plugins/ssnet@2x.png
deleted file mode 100644
index 3449b9e4..00000000
Binary files a/SparkleShare/Common/Plugins/ssnet@2x.png and /dev/null differ
diff --git a/SparkleShare/Common/Plugins/Makefile.am b/SparkleShare/Common/Presets/Makefile.am
similarity index 66%
rename from SparkleShare/Common/Plugins/Makefile.am
rename to SparkleShare/Common/Presets/Makefile.am
index dc0a0493..7cc5a110 100644
--- a/SparkleShare/Common/Plugins/Makefile.am
+++ b/SparkleShare/Common/Presets/Makefile.am
@@ -1,18 +1,15 @@
dist_plugins_DATA = \
bitbucket.xml \
github.xml \
- gitorious.xml \
- ssnet.xml \
own-server.xml \
planio.xml \
github.png \
- gitorious.png \
bitbucket.png \
- ssnet.png \
planio.png \
own-server.png
-pluginsdir = $(pkgdatadir)/plugins/
+pluginsdir = $(pkgdatadir)/presets/
MAINTAINERCLEANFILES = \
Makefile.in
+
diff --git a/SparkleShare/Common/Plugins/bitbucket.png b/SparkleShare/Common/Presets/bitbucket.png
similarity index 100%
rename from SparkleShare/Common/Plugins/bitbucket.png
rename to SparkleShare/Common/Presets/bitbucket.png
diff --git a/SparkleShare/Common/Plugins/bitbucket.xml b/SparkleShare/Common/Presets/bitbucket.xml
similarity index 100%
rename from SparkleShare/Common/Plugins/bitbucket.xml
rename to SparkleShare/Common/Presets/bitbucket.xml
diff --git a/SparkleShare/Common/Plugins/bitbucket@2x.png b/SparkleShare/Common/Presets/bitbucket@2x.png
similarity index 100%
rename from SparkleShare/Common/Plugins/bitbucket@2x.png
rename to SparkleShare/Common/Presets/bitbucket@2x.png
diff --git a/SparkleShare/Common/Plugins/github.png b/SparkleShare/Common/Presets/github.png
similarity index 100%
rename from SparkleShare/Common/Plugins/github.png
rename to SparkleShare/Common/Presets/github.png
diff --git a/SparkleShare/Common/Plugins/github.xml b/SparkleShare/Common/Presets/github.xml
similarity index 100%
rename from SparkleShare/Common/Plugins/github.xml
rename to SparkleShare/Common/Presets/github.xml
diff --git a/SparkleShare/Common/Plugins/github@2x.png b/SparkleShare/Common/Presets/github@2x.png
similarity index 100%
rename from SparkleShare/Common/Plugins/github@2x.png
rename to SparkleShare/Common/Presets/github@2x.png
diff --git a/SparkleShare/Common/Plugins/own-server.png b/SparkleShare/Common/Presets/own-server.png
similarity index 100%
rename from SparkleShare/Common/Plugins/own-server.png
rename to SparkleShare/Common/Presets/own-server.png
diff --git a/SparkleShare/Common/Plugins/own-server.xml b/SparkleShare/Common/Presets/own-server.xml
similarity index 100%
rename from SparkleShare/Common/Plugins/own-server.xml
rename to SparkleShare/Common/Presets/own-server.xml
diff --git a/SparkleShare/Common/Plugins/own-server@2x.png b/SparkleShare/Common/Presets/own-server@2x.png
similarity index 100%
rename from SparkleShare/Common/Plugins/own-server@2x.png
rename to SparkleShare/Common/Presets/own-server@2x.png
diff --git a/SparkleShare/Common/Plugins/parse_plugins.xsl b/SparkleShare/Common/Presets/parse_plugins.xsl
similarity index 100%
rename from SparkleShare/Common/Plugins/parse_plugins.xsl
rename to SparkleShare/Common/Presets/parse_plugins.xsl
diff --git a/SparkleShare/Common/Plugins/planio.png b/SparkleShare/Common/Presets/planio.png
similarity index 100%
rename from SparkleShare/Common/Plugins/planio.png
rename to SparkleShare/Common/Presets/planio.png
diff --git a/SparkleShare/Common/Plugins/planio.xml b/SparkleShare/Common/Presets/planio.xml
similarity index 100%
rename from SparkleShare/Common/Plugins/planio.xml
rename to SparkleShare/Common/Presets/planio.xml
diff --git a/SparkleShare/Common/Plugins/planio@2x.png b/SparkleShare/Common/Presets/planio@2x.png
similarity index 100%
rename from SparkleShare/Common/Plugins/planio@2x.png
rename to SparkleShare/Common/Presets/planio@2x.png
diff --git a/SparkleShare/Common/SetupController.cs b/SparkleShare/Common/SetupController.cs
index 54c7252b..9897ef0a 100644
--- a/SparkleShare/Common/SetupController.cs
+++ b/SparkleShare/Common/SetupController.cs
@@ -21,7 +21,7 @@ using System.IO;
using System.Text.RegularExpressions;
using System.Threading;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
@@ -73,8 +73,8 @@ namespace SparkleShare {
public event ChangePathFieldEventHandler ChangePathFieldEvent = delegate { };
public delegate void ChangePathFieldEventHandler (string text, string example_text, FieldState state);
- public readonly List Plugins = new List ();
- public Plugin SelectedPlugin;
+ public readonly List Presets = new List ();
+ public Preset SelectedPreset;
public bool WindowIsOpen { get; private set; }
public SparkleInvite PendingInvite { get; private set; }
@@ -86,9 +86,9 @@ namespace SparkleShare {
public double ProgressBarPercentage { get; private set; }
- public int SelectedPluginIndex {
+ public int SelectedPresetIndex {
get {
- return Plugins.IndexOf (SelectedPlugin);
+ return Presets.IndexOf (SelectedPreset);
}
}
@@ -117,35 +117,29 @@ namespace SparkleShare {
PreviousUrl = "";
SyncingFolder = "";
- string local_plugins_path = Plugin.LocalPluginsPath;
- int local_plugins_count = 0;
+ string local_presets_path = Preset.LocalPresetsPath;
+ int local_presets_count = 0;
- // Import all of the plugins
- if (Directory.Exists (local_plugins_path))
- // Local plugins go first...
- foreach (string xml_file_path in Directory.GetFiles (local_plugins_path, "*.xml")) {
- Plugins.Add (new Plugin (xml_file_path));
- local_plugins_count++;
+ // Import all of the presets
+ if (Directory.Exists (local_presets_path))
+ // Local presets go first...
+ foreach (string xml_file_path in Directory.GetFiles (local_presets_path, "*.xml")) {
+ Presets.Add (new Preset (xml_file_path));
+ local_presets_count++;
}
- // ...system plugins after that...
- if (Directory.Exists (SparkleShare.Controller.PluginsPath)) {
- foreach (string xml_file_path in Directory.GetFiles (SparkleShare.Controller.PluginsPath, "*.xml")) {
+ // ...system presets after that...
+ if (Directory.Exists (SparkleShare.Controller.PresetsPath)) {
+ foreach (string xml_file_path in Directory.GetFiles (SparkleShare.Controller.PresetsPath, "*.xml")) {
// ...and "Own server" at the very top
- if (xml_file_path.EndsWith ("own-server.xml")) {
- Plugins.Insert (0, new Plugin (xml_file_path));
-
- } else if (xml_file_path.EndsWith ("ssnet.xml")) {
- // 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));
- }
+ if (xml_file_path.EndsWith ("own-server.xml"))
+ Presets.Insert (0, new Preset (xml_file_path));
+ else
+ Presets.Add (new Preset (xml_file_path));
}
}
- SelectedPlugin = Plugins [0];
+ SelectedPreset = Presets [0];
SparkleShare.Controller.InviteReceived += delegate (SparkleInvite invite) {
PendingInvite = invite;
@@ -203,7 +197,7 @@ namespace SparkleShare {
public void PageCancelled ()
{
PendingInvite = null;
- SelectedPlugin = Plugins [0];
+ SelectedPreset = Presets [0];
PreviousAddress = "";
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) {
- ChangeAddressFieldEvent (SelectedPlugin.Address, "", FieldState.Disabled);
+ if (SelectedPreset.Address != null) {
+ ChangeAddressFieldEvent (SelectedPreset.Address, "", FieldState.Disabled);
- } else if (SelectedPlugin.AddressExample != null) {
- ChangeAddressFieldEvent (this.saved_address, SelectedPlugin.AddressExample, FieldState.Enabled);
+ } else if (SelectedPreset.AddressExample != null) {
+ ChangeAddressFieldEvent (this.saved_address, SelectedPreset.AddressExample, FieldState.Enabled);
} else {
ChangeAddressFieldEvent (this.saved_address, "", FieldState.Enabled);
}
- if (SelectedPlugin.Path != null) {
- ChangePathFieldEvent (SelectedPlugin.Path, "", FieldState.Disabled);
+ if (SelectedPreset.Path != null) {
+ ChangePathFieldEvent (SelectedPreset.Path, "", FieldState.Disabled);
- } else if (SelectedPlugin.PathExample != null) {
- ChangePathFieldEvent (this.saved_remote_path, SelectedPlugin.PathExample, FieldState.Enabled);
+ } else if (SelectedPreset.PathExample != null) {
+ ChangePathFieldEvent (this.saved_remote_path, SelectedPreset.PathExample, FieldState.Enabled);
} else {
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 ();
remote_path = remote_path.Trim ();
- if (selected_plugin == 0)
+ if (selected_preset == 0)
this.saved_address = address;
this.saved_remote_path = remote_path;
@@ -341,7 +335,7 @@ namespace SparkleShare {
remote_path = remote_path.Trim ();
remote_path = remote_path.TrimEnd ("/".ToCharArray ());
- if (SelectedPlugin.PathUsesLowerCase)
+ if (SelectedPreset.PathUsesLowerCase)
remote_path = remote_path.ToLower ();
PreviousAddress = address;
@@ -353,11 +347,11 @@ namespace SparkleShare {
SparkleFetcherInfo info = new SparkleFetcherInfo {
Address = address,
- Fingerprint = SelectedPlugin.Fingerprint,
+ Fingerprint = SelectedPreset.Fingerprint,
RemotePath = remote_path,
FetchPriorHistory = this.fetch_prior_history,
- AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl,
- Backend = SelectedPlugin.Backend
+ AnnouncementsUrl = SelectedPreset.AnnouncementsUrl,
+ Backend = SelectedPreset.Backend
};
new Thread (() => { SparkleShare.Controller.StartFetcher (info); }).Start ();
@@ -370,23 +364,23 @@ namespace SparkleShare {
{
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
- if (SelectedPluginIndex == 0) {
- Plugin new_plugin;
+ if (SelectedPresetIndex == 0) {
+ Preset new_preset;
Uri uri = new Uri (remote_url);
try {
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) {
- Plugins.Insert (1, new_plugin);
- Logger.LogInfo ("Controller", "Added plugin for " + uri.Host);
+ if (new_preset != null) {
+ Presets.Insert (1, new_preset);
+ Logger.LogInfo ("Controller", "Added preset for " + uri.Host);
}
} 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 ()
{
- SelectedPlugin = Plugins [0];
+ SelectedPreset = Presets [0];
PreviousUrl = "";
PreviousAddress = "";
PreviousPath = "";
diff --git a/SparkleShare/Common/SparkleShare.cs b/SparkleShare/Common/SparkleShare.cs
index 8cd4330a..d949ef1d 100644
--- a/SparkleShare/Common/SparkleShare.cs
+++ b/SparkleShare/Common/SparkleShare.cs
@@ -18,18 +18,17 @@
using System;
using System.Threading;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
- // This is SparkleShare!
public class SparkleShare {
public static Controller Controller;
public static UserInterface UI;
public static string [] Arguments;
- private static Mutex program_mutex = new Mutex (false, "SparkleShare");
+ static Mutex program_mutex = new Mutex (false, "SparkleShare");
#if !__MonoCS__
@@ -39,25 +38,23 @@ namespace SparkleShare {
{
Arguments = args;
- if (args.Length != 0 && !args [0].Equals ("help") &&
- Backend.Platform != PlatformID.MacOSX &&
- Backend.Platform != PlatformID.Win32NT) {
+ if (args.Length != 0 && (args [0].Equals ("help") || args [0].Equals ("version")) &&
+ InstallationInfo.Platform != PlatformID.MacOSX &&
+ InstallationInfo.Platform != PlatformID.Win32NT) {
string n = Environment.NewLine;
Console.WriteLine (n +
"Share and collaborate by syncing with any Git repository instantly." + n +
n +
- "Version: " + SparkleLib.Backend.Version + n +
+ "Version: " + InstallationInfo.Version + n +
"Copyright (C) 2010 Hylke Bons and others" + n +
"This program comes with ABSOLUTELY NO WARRANTY." + n +
n +
"This is free software, and you are welcome to redistribute it" + n +
- "under certain conditions. Please read the GNU GPLv3 for details." + n +
- n +
- "Usage: sparkleshare [start|open]");
+ "under certain conditions. Please read the GNU GPLv3 for details." + n);
- Environment.Exit (-1);
+ Environment.Exit (0);
}
// Only allow one instance of SparkleShare (on Windows)
@@ -81,15 +78,11 @@ namespace SparkleShare {
#endif
}
- private static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args)
+
+ static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args)
{
- try {
- Exception e = (Exception) exception_args.ExceptionObject;
- Logger.WriteCrashReport (e);
-
- } finally {
- Environment.Exit (-1);
- }
+ var exception = (Exception) exception_args.ExceptionObject;
+ Logger.WriteCrashReport (exception);
}
}
}
diff --git a/SparkleShare/Common/StatusIconController.cs b/SparkleShare/Common/StatusIconController.cs
index 16bda33a..bfc3d2e2 100644
--- a/SparkleShare/Common/StatusIconController.cs
+++ b/SparkleShare/Common/StatusIconController.cs
@@ -20,7 +20,7 @@ using System.Collections.Generic;
using System.Threading;
using Timers = System.Timers;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
diff --git a/SparkleShare/Linux/Bubbles.cs b/SparkleShare/Linux/Bubbles.cs
index 8ec6dfb3..d1b9def4 100755
--- a/SparkleShare/Linux/Bubbles.cs
+++ b/SparkleShare/Linux/Bubbles.cs
@@ -19,7 +19,8 @@ using System;
using Gtk;
using Notifications;
-using SparkleLib;
+
+using Sparkles;
namespace SparkleShare {
diff --git a/SparkleShare/Linux/Controller.cs b/SparkleShare/Linux/Controller.cs
index c6a6852c..5f231f86 100755
--- a/SparkleShare/Linux/Controller.cs
+++ b/SparkleShare/Linux/Controller.cs
@@ -22,18 +22,18 @@ using System.IO;
using Gtk;
using Mono.Unix.Native;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
- public class SparkleController : SparkleControllerBase {
+ public class SparkleController : ControllerBase {
public SparkleController ()
{
}
- public override string PluginsPath {
+ public override string PresetsPath {
get {
return Path.Combine (Defines.INSTALL_DIR, "plugins");
}
@@ -58,6 +58,7 @@ namespace SparkleShare {
if (Defines.INSTALL_DIR.StartsWith ("/app/"))
autostart_exec = "xdg-app run org.sparkleshare.SparkleShare";
+ // TODO: Ship as .desktop file and copy in place
try {
File.WriteAllText (autostart_file_path,
"[Desktop Entry]\n" +
diff --git a/SparkleShare/Linux/EventLog.cs b/SparkleShare/Linux/EventLog.cs
index 701f2704..b9cb5dfc 100755
--- a/SparkleShare/Linux/EventLog.cs
+++ b/SparkleShare/Linux/EventLog.cs
@@ -74,7 +74,7 @@ namespace SparkleShare {
this.content_wrapper.StyleContext.AddProvider (css_provider, 800);
// 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.scrolled_window.Add (new Button ("WebView"));
diff --git a/SparkleShare/Linux/Makefile.am b/SparkleShare/Linux/Makefile.am
index 51dc6a32..792d0108 100644
--- a/SparkleShare/Linux/Makefile.am
+++ b/SparkleShare/Linux/Makefile.am
@@ -18,7 +18,6 @@ SOURCES = \
../Common/EventLogController.cs \
../Common/Invite.cs \
../Common/NoteController.cs \
- ../Common/Plugin.cs \
../Common/SetupController.cs \
../Common/StatusIconController.cs \
About.cs \
@@ -37,9 +36,11 @@ include $(top_srcdir)/build/build.mk
bin_SCRIPTS = sparkleshare
Applicationsdir = $(datadir)/applications
-dist_Applications_DATA = org.sparkleshare.SparkleShare.desktop \
+dist_Applications_DATA = \
+ org.sparkleshare.SparkleShare.desktop \
org.sparkleshare.SparkleShare.Invites.desktop
install-data-hook:
test -f $(datadir)/applications/defaults.list && \
test -z $(DESTDIR) && update-desktop-database $(datadir)/applications || :
+
diff --git a/SparkleShare/Linux/Pixmaps/Makefile.am b/SparkleShare/Linux/Pixmaps/Makefile.am
index 91e7038a..ebbcebca 100755
--- a/SparkleShare/Linux/Pixmaps/Makefile.am
+++ b/SparkleShare/Linux/Pixmaps/Makefile.am
@@ -7,3 +7,4 @@ pixmapsdir = $(pkgdatadir)/pixmaps/
MAINTAINERCLEANFILES = \
Makefile.in
+
diff --git a/SparkleShare/Linux/Pixmaps/icons/Makefile.am b/SparkleShare/Linux/Pixmaps/icons/Makefile.am
index 9954f9b7..4b769ec9 100755
--- a/SparkleShare/Linux/Pixmaps/icons/Makefile.am
+++ b/SparkleShare/Linux/Pixmaps/icons/Makefile.am
@@ -50,3 +50,4 @@ uninstall-hook:
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = $(wildcard *.png *.svg)
+
diff --git a/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am b/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am
index 89edffb3..a694312a 100644
--- a/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am
+++ b/SparkleShare/Linux/Pixmaps/icons/gnome/Makefile.am
@@ -18,3 +18,4 @@ uninstall-hook:
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = $(wildcard *.png *.svg)
+
diff --git a/SparkleShare/Linux/Setup.cs b/SparkleShare/Linux/Setup.cs
index b04c670f..e45c95ae 100755
--- a/SparkleShare/Linux/Setup.cs
+++ b/SparkleShare/Linux/Setup.cs
@@ -137,7 +137,7 @@ namespace SparkleShare {
VBox layout_address = 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 };
ScrolledWindow scrolled_window = new ScrolledWindow () { ShadowType = ShadowType.In };
@@ -157,7 +157,7 @@ namespace SparkleShare {
service_column.PackStart (service_cell, true);
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),
"" + plugin.Name + "\n" +
"" + plugin.Description + "" +
@@ -169,13 +169,13 @@ namespace SparkleShare {
Entry address_entry = new Entry () {
Text = Controller.PreviousAddress,
- Sensitive = (Controller.SelectedPlugin.Address == null),
+ Sensitive = (Controller.SelectedPreset.Address == null),
ActivatesDefault = true
};
Entry path_entry = new Entry () {
Text = Controller.PreviousPath,
- Sensitive = (Controller.SelectedPlugin.Path == null),
+ Sensitive = (Controller.SelectedPreset.Path == null),
ActivatesDefault = true
};
@@ -183,19 +183,19 @@ namespace SparkleShare {
Xalign = 0,
UseMarkup = true,
Markup = "" + Controller.SelectedPlugin.AddressExample + ""
+ Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPreset.AddressExample + ""
};
Label path_example = new Label () {
Xalign = 0,
UseMarkup = true,
Markup = "" + Controller.SelectedPlugin.PathExample + ""
+ Program.UI.SecondaryTextColor + "\">" + Controller.SelectedPreset.PathExample + ""
};
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);
tree_view.Model.Foreach (new TreeModelForeachFunc (
@@ -203,7 +203,7 @@ namespace SparkleShare {
string address;
try {
- address = (model.GetValue (iter, 2) as SparklePlugin).Address;
+ address = (model.GetValue (iter, 2) as SparklePreset).Address;
} catch (NullReferenceException) {
address = "";
@@ -213,7 +213,7 @@ namespace SparkleShare {
address.Equals (Controller.PreviousAddress)) {
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)
address_entry.Sensitive = false;
@@ -256,7 +256,7 @@ namespace SparkleShare {
layout_vertical.PackStart (scrolled_window, true, true, 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);
@@ -301,7 +301,7 @@ namespace SparkleShare {
tree_view.CursorChanged += delegate (object sender, EventArgs e) {
- Controller.SelectedPluginChanged (tree_view.SelectedRow);
+ Controller.SelectedPresetChanged (tree_view.SelectedRow);
};
address_entry.Changed += delegate {
diff --git a/SparkleShare/Linux/SparkleShare.Linux.csproj b/SparkleShare/Linux/SparkleShare.Linux.csproj
index 14726223..c151da8e 100644
--- a/SparkleShare/Linux/SparkleShare.Linux.csproj
+++ b/SparkleShare/Linux/SparkleShare.Linux.csproj
@@ -167,18 +167,18 @@
-
+
-
+
{2C914413-B31C-4362-93C7-1AE34F09112A}
- SparkleLib
+ Sparkles
-
+
{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}
- SparkleLib.Git
+ Sparkles.Git
@@ -234,60 +234,60 @@
Resources\tutorial-slide-2%402x.png
-
- Plugins\bitbucket%402x.png
+
+ Presets\bitbucket%402x.png
-
- Plugins\github%402x.png
+
+ Presets\github%402x.png
-
- Plugins\gitorious%402x.png
+
+ Presets\gitorious%402x.png
-
- Plugins\own-server%402x.png
+
+ Presets\own-server%402x.png
-
- Plugins\ssnet%402x.png
+
+ Presets\ssnet%402x.png
-
- Plugins\bitbucket.xml
+
+ Presets\bitbucket.xml
-
- Plugins\github.xml
+
+ Presets\github.xml
-
- Plugins\gitorious.xml
+
+ Presets\gitorious.xml
-
- Plugins\own-server.xml
+
+ Presets\own-server.xml
-
- Plugins\bitbucket.png
+
+ Presets\bitbucket.png
-
- Plugins\github.png
+
+ Presets\github.png
-
- Plugins\gitorious.png
+
+ Presets\gitorious.png
-
- Plugins\own-server.png
+
+ Presets\own-server.png
-
- Plugins\ssnet.png
+
+ Presets\ssnet.png
-
- Plugins\ssnet.xml
+
+ Presets\ssnet.xml
-
- Plugins\planio.png
+
+ Presets\planio.png
-
- Plugins\planio.xml
+
+ Presets\planio.xml
-
- Plugins\planio%402x.png
+
+ Presets\planio%402x.png
Resources\text-balloon.png
diff --git a/SparkleShare/Linux/UserInterface.cs b/SparkleShare/Linux/UserInterface.cs
index 45ec21e0..13f95948 100644
--- a/SparkleShare/Linux/UserInterface.cs
+++ b/SparkleShare/Linux/UserInterface.cs
@@ -19,11 +19,12 @@ using System;
using GLib;
using Gtk;
-using SparkleLib;
+
+using Sparkles;
namespace SparkleShare {
- public class SparkleUI {
+ public class UserInterface {
public static string AssetsPath = Defines.INSTALL_DIR;
@@ -37,15 +38,15 @@ namespace SparkleShare {
public readonly string SecondaryTextColor;
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);
- this.application.Activated += ApplicationActivatedDelegate;
+ application.Register (null);
+ application.Activated += ApplicationActivatedDelegate;
Gdk.Color color = SparkleUIHelpers.RGBAToColor (new Label().StyleContext.GetColor (StateFlags.Insensitive));
SecondaryTextColor = SparkleUIHelpers.ColorToHex (color);
@@ -61,16 +62,16 @@ namespace SparkleShare {
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;
- foreach (Window window in this.application.Windows) {
+ foreach (Window window in application.Windows) {
if (window.Visible) {
window.Present ();
has_visible_windows = true;
@@ -88,9 +89,9 @@ namespace SparkleShare {
StatusIcon = new SparkleStatusIcon ();
Note = new SparkleNote ();
- Setup.Application = this.application;
- EventLog.Application = this.application;
- About.Application = this.application;
+ Setup.Application = application;
+ EventLog.Application = application;
+ About.Application = application;
Program.Controller.UIHasLoaded ();
}
diff --git a/SparkleShare/Linux/sparkleshare.in b/SparkleShare/Linux/sparkleshare.in
index 2a9bfb38..fed7aec1 100755
--- a/SparkleShare/Linux/sparkleshare.in
+++ b/SparkleShare/Linux/sparkleshare.in
@@ -12,8 +12,8 @@ case $1 in
curl --insecure --output ~/SparkleShare/.$invite.xml $open
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe"
;;
- help|--help)
- mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" --help
+ help|--help|version|--version)
+ mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" help
;;
*)
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2
diff --git a/SparkleShare/Mac/Controllers/Controller.cs b/SparkleShare/Mac/Controller.cs
similarity index 97%
rename from SparkleShare/Mac/Controllers/Controller.cs
rename to SparkleShare/Mac/Controller.cs
index f04817cd..ccf7140b 100644
--- a/SparkleShare/Mac/Controllers/Controller.cs
+++ b/SparkleShare/Mac/Controller.cs
@@ -24,16 +24,16 @@ using Mono.Unix.Native;
using MonoMac.Foundation;
using MonoMac.AppKit;
-using SparkleLib;
-using SparkleLib.Git;
+using Sparkles;
+using Sparkles.Git;
namespace SparkleShare {
public class Controller : BaseController {
- public override string PluginsPath {
+ public override string PresetsPath {
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 ()
{
- if (Environment.OSVersion.Version.Major >= 14) {
+ /* if (Environment.OSVersion.Version.Major >= 14) {
NSWorkspace.SharedWorkspace.SetIconforFile (
NSImage.ImageNamed ("sparkleshare-folder-yosemite.icns"),
SparkleShare.Controller.FoldersPath, 0);
@@ -147,7 +147,7 @@ namespace SparkleShare {
NSWorkspace.SharedWorkspace.SetIconforFile (
NSImage.ImageNamed ("sparkleshare-folder.icns"),
SparkleShare.Controller.FoldersPath, 0);
- }
+ }*/
}
diff --git a/SparkleShare/Mac/SparkleShare.Mac.csproj b/SparkleShare/Mac/SparkleShare.Mac.csproj
index 14726223..43229c83 100644
--- a/SparkleShare/Mac/SparkleShare.Mac.csproj
+++ b/SparkleShare/Mac/SparkleShare.Mac.csproj
@@ -95,9 +95,6 @@
SparkleShare.cs
-
- Plugin.cs
-
Invite.cs
@@ -128,10 +125,10 @@
-
Controllers\BaseController.cs
+
@@ -167,20 +164,10 @@
-
+
-
-
- {2C914413-B31C-4362-93C7-1AE34F09112A}
- SparkleLib
-
-
- {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}
- SparkleLib.Git
-
-
Resources\side-splash.png
@@ -234,60 +221,42 @@
Resources\tutorial-slide-2%402x.png
-
- Plugins\bitbucket%402x.png
+
+ Presets\bitbucket%402x.png
-
- Plugins\github%402x.png
+
+ Presets\github%402x.png
-
- Plugins\gitorious%402x.png
+
+ Presets\own-server%402x.png
-
- Plugins\own-server%402x.png
+
+ Presets\bitbucket.xml
-
- Plugins\ssnet%402x.png
+
+ Presets\github.xml
-
- Plugins\bitbucket.xml
+
+ Presets\own-server.xml
-
- Plugins\github.xml
+
+ Presets\bitbucket.png
-
- Plugins\gitorious.xml
+
+ Presets\github.png
-
- Plugins\own-server.xml
-
-
- Plugins\bitbucket.png
-
-
- Plugins\github.png
-
-
- Plugins\gitorious.png
-
-
- Plugins\own-server.png
-
-
- Plugins\ssnet.png
-
-
- Plugins\ssnet.xml
+
+ Presets\own-server.png
-
- Plugins\planio.png
+
+ Presets\planio.png
-
- Plugins\planio.xml
+
+ Presets\planio.xml
-
- Plugins\planio%402x.png
+
+ Presets\planio%402x.png
Resources\text-balloon.png
@@ -296,4 +265,14 @@
Resources\text-balloon%402x.png
+
+
+ {2C914413-B31C-4362-93C7-1AE34F09112A}
+ Sparkles
+
+
+ {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}
+ Sparkles.Git
+
+
diff --git a/SparkleShare/Mac/UserInterface/EventLog.cs b/SparkleShare/Mac/UserInterface/EventLog.cs
index 3a289f31..e5d3d61e 100644
--- a/SparkleShare/Mac/UserInterface/EventLog.cs
+++ b/SparkleShare/Mac/UserInterface/EventLog.cs
@@ -30,18 +30,20 @@ namespace SparkleShare {
public SparkleEventLogController Controller = new SparkleEventLogController ();
public float TitlebarHeight;
- private WebView web_view;
- private NSBox background;
- private NSBox cover;
- private NSPopUpButton popup_button;
- private NSProgressIndicator progress_indicator;
- private NSTextField size_label, size_label_value, history_label, history_label_value;
- private NSButton hidden_close_button;
+ WebView web_view;
+ NSBox background;
+ NSBox cover;
+ NSPopUpButton popup_button;
+ NSProgressIndicator progress_indicator;
+ NSTextField size_label, size_label_value, history_label, history_label_value;
+ NSButton hidden_close_button;
- public EventLog (IntPtr handle) : base (handle) { }
+ public EventLog (IntPtr handle) : base (handle)
+ {
+ }
- public EventLog () : base ()
+ public EventLog ()
{
Title = "Recent Changes";
Delegate = new SparkleEventsDelegate ();
diff --git a/SparkleShare/Mac/UserInterface/Setup.cs b/SparkleShare/Mac/UserInterface/Setup.cs
index 3232b5e8..7fc86314 100644
--- a/SparkleShare/Mac/UserInterface/Setup.cs
+++ b/SparkleShare/Mac/UserInterface/Setup.cs
@@ -189,7 +189,7 @@ namespace SparkleShare {
AddressTextField = new NSTextField () {
Frame = new RectangleF (190, Frame.Height - 336, 196, 22),
- Enabled = (Controller.SelectedPlugin.Address == null),
+ Enabled = (Controller.SelectedPreset.Address == null),
Delegate = new SparkleTextFieldDelegate (),
StringValue = "" + Controller.PreviousAddress
};
@@ -203,24 +203,24 @@ namespace SparkleShare {
PathTextField = new NSTextField () {
Frame = new RectangleF (190 + 196 + 16, Frame.Height - 336, 196, 22),
- Enabled = (Controller.SelectedPlugin.Path == null),
+ Enabled = (Controller.SelectedPreset.Path == null),
Delegate = new SparkleTextFieldDelegate (),
StringValue = "" + Controller.PreviousPath
};
PathTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail;
- PathHelpLabel = new SparkleLabel (Controller.SelectedPlugin.PathExample, NSTextAlignment.Left) {
+ PathHelpLabel = new SparkleLabel (Controller.SelectedPreset.PathExample, NSTextAlignment.Left) {
TextColor = NSColor.DisabledControlText,
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,
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 () {
Frame = new RectangleF (0, 0, 0, 0),
RowHeight = 38,
@@ -256,21 +256,21 @@ namespace SparkleShare {
// Hi-res display support was added after Snow Leopard
if (Environment.OSVersion.Version.Major < 11)
- DataSource = new SparkleDataSource (1, Controller.Plugins);
+ DataSource = new SparkleDataSource (1, Controller.Presets);
else
- DataSource = new SparkleDataSource (BackingScaleFactor, Controller.Plugins);
+ DataSource = new SparkleDataSource (BackingScaleFactor, Controller.Presets);
TableView.DataSource = DataSource;
TableView.ReloadData ();
(TableView.Delegate as SparkleTableViewDelegate).SelectionChanged += delegate {
- Controller.SelectedPluginChanged (TableView.SelectedRow);
+ Controller.SelectedPresetChanged (TableView.SelectedRow);
Controller.CheckAddPage (AddressTextField.StringValue, PathTextField.StringValue, TableView.SelectedRow);
};
}
- TableView.SelectRow (Controller.SelectedPluginIndex, false);
- TableView.ScrollRowToVisible (Controller.SelectedPluginIndex);
+ TableView.SelectRow (Controller.SelectedPresetIndex, false);
+ TableView.ScrollRowToVisible (Controller.SelectedPresetIndex);
MakeFirstResponder ((NSResponder) TableView);
HistoryCheckButton = new NSButton () {
@@ -730,7 +730,7 @@ namespace SparkleShare {
int backing_scale_factor;
- public SparkleDataSource (float backing_scale_factor, List plugins)
+ public SparkleDataSource (float backing_scale_factor, List plugins)
{
Items = new List
-
- Plugins\github.png
+
+ Presets\github.png
Always
-
- Plugins\gitorious.png
+
+ Presets\gitorious.png
Always
-
- Plugins\own-server.png
+
+ Presets\own-server.png
Always
-
- Plugins\bitbucket.png
+
+ Presets\bitbucket.png
Always
-
- Plugins\ssnet.png
+
+ Presets\ssnet.png
Always
-
- Plugins\planio.png
+
+ Presets\planio.png
Always
-
- Plugins\ssnet.xml
+
+ Presets\ssnet.xml
Always
-
- Plugins\bitbucket.xml
+
+ Presets\bitbucket.xml
Always
-
- Plugins\github.xml
+
+ Presets\github.xml
Always
-
- Plugins\gitorious.xml
+
+ Presets\gitorious.xml
Always
-
- Plugins\own-server.xml
+
+ Presets\own-server.xml
Always
-
- Plugins\planio.xml
+
+ Presets\planio.xml
Always
@@ -281,11 +281,11 @@
{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}
- SparkleLib.Git
+ Sparkles.Git
{2C914413-B31C-4362-93C7-1AE34F09112A}
- SparkleLib
+ Sparkles
diff --git a/SparkleShare/Windows/SparkleShare.vssettings b/SparkleShare/Windows/SparkleShare.vssettings
index 9651a513..240532e9 100644
--- a/SparkleShare/Windows/SparkleShare.vssettings
+++ b/SparkleShare/Windows/SparkleShare.vssettings
@@ -91,7 +91,7 @@
True
\[{"Error":[^n];"SharepointError";"HasException":true
True
- C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\WebTestPlugins\DefaultSharePointRules.xml
+ C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\WebTestPresets\DefaultSharePointRules.xml
AAEAAAD/////AQAAAAAAAAAMAgAAAGxNaWNyb3NvZnQuVmlzdWFsU3R1ZGlvLlF1YWxpdHlUb29scy5Wc2lwLCBWZXJzaW9uPTEyLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EEAQAAAMMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNaWNyb3NvZnQuVmlzdWFsU3R1ZGlvLlRlc3RUb29scy5Wc2lwLlVSTFBhdHRlcm4sIE1pY3Jvc29mdC5WaXN1YWxTdHVkaW8uUXVhbGl0eVRvb2xzLlZzaXAsIFZlcnNpb249MTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAyTWljcm9zb2Z0LlZpc3VhbFN0dWRpby5UZXN0VG9vbHMuVnNpcC5VUkxQYXR0ZXJuW10CAAAACAgJAwAAAAQAAAAEAAAABwMAAAAAAQAAAAQAAAAEME1pY3Jvc29mdC5WaXN1YWxTdHVkaW8uVGVzdFRvb2xzLlZzaXAuVVJMUGF0dGVybgIAAAAJBAAAAAkFAAAACQYAAAAJBwAAAAwIAAAASVN5c3RlbSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFBAAAADBNaWNyb3NvZnQuVmlzdWFsU3R1ZGlvLlRlc3RUb29scy5Wc2lwLlVSTFBhdHRlcm4DAAAAD1Byb3BlcnR5Q2hhbmdlZAptX2NyaXRlcmlhCW1fcGF0dGVybgQBATFTeXN0ZW0uQ29tcG9uZW50TW9kZWwuUHJvcGVydHlDaGFuZ2VkRXZlbnRIYW5kbGVyCAAAAAIAAAAKBgkAAAAIRW5kc1dpdGgGCgAAAAlibGFuay5naWYBBQAAAAQAAAAKCQkAAAAGDAAAAAlibGFuay5odG0BBgAAAAQAAAAKCQkAAAAGDgAAAA9TY3JpcHRSZXN4LmFzaHgBBwAAAAQAAAAKCQkAAAAGEAAAAA5jb21tYW5kdWkuYXNoeAs=
True
True1101011110101111100010011110001001101111000000167577360473600210110111000050001500015001000100010002000200050001000010000250100050012510001100111111111100001110010011000000001012048509000100011000001011http://referencesource.microsoft.com/symbolshttp://msdl.microsoft.com/download/symbolsFunction: $FUNCTION, Thread: $TID $TNAME506464101csv3.01002.03.01100Falsefalsetruefalsefalse-1TrueTrueTrue25TruefalsefalseTrueTrueTrue8, 8SnapLinesTrueTrueTrueTruePreserveTrueTrueTrueTrueFalseTrueTrueTrueTrueTruePreserveTrueFalseDoubleQuote120FalseNoneFalseTrueTrueTrueTrueTrueTrueTrueTrue%VsInstallDir%\xml\Schemas
\ No newline at end of file
diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs
index e889b4af..3b6c6871 100644
--- a/SparkleShare/Windows/SparkleShare.wxs
+++ b/SparkleShare/Windows/SparkleShare.wxs
@@ -20,8 +20,8 @@
-
-
+
+
diff --git a/SparkleShare/Windows/SparkleUI.cs b/SparkleShare/Windows/SparkleUI.cs
index 31f5ebb1..447f0c6b 100644
--- a/SparkleShare/Windows/SparkleUI.cs
+++ b/SparkleShare/Windows/SparkleUI.cs
@@ -19,7 +19,7 @@ using System;
using System.Threading;
using System.Windows.Forms;
-using SparkleLib;
+using Sparkles;
namespace SparkleShare {
diff --git a/SparkleLib/AuthenticationInfo.cs b/Sparkles/AuthenticationInfo.cs
similarity index 97%
rename from SparkleLib/AuthenticationInfo.cs
rename to Sparkles/AuthenticationInfo.cs
index b4b1db58..0396e086 100644
--- a/SparkleLib/AuthenticationInfo.cs
+++ b/Sparkles/AuthenticationInfo.cs
@@ -15,7 +15,7 @@
// along with this program. If not, see .
-namespace SparkleLib {
+namespace Sparkles {
public abstract class AuthenticationInfo
{
diff --git a/SparkleLib/BaseFetcher.cs b/Sparkles/BaseFetcher.cs
old mode 100755
new mode 100644
similarity index 99%
rename from SparkleLib/BaseFetcher.cs
rename to Sparkles/BaseFetcher.cs
index 2297ab57..77721bf1
--- a/SparkleLib/BaseFetcher.cs
+++ b/Sparkles/BaseFetcher.cs
@@ -22,7 +22,7 @@ using System.IO;
using System.Security.Cryptography;
using System.Threading;
-namespace SparkleLib {
+namespace Sparkles {
public class SparkleFetcherInfo {
public string Address;
diff --git a/SparkleLib/BaseListener.cs b/Sparkles/BaseListener.cs
old mode 100755
new mode 100644
similarity index 99%
rename from SparkleLib/BaseListener.cs
rename to Sparkles/BaseListener.cs
index 2174517f..13ae7a09
--- a/SparkleLib/BaseListener.cs
+++ b/Sparkles/BaseListener.cs
@@ -19,7 +19,7 @@ using System;
using System.Collections.Generic;
using System.Timers;
-namespace SparkleLib {
+namespace Sparkles {
public enum DisconnectReason {
None,
diff --git a/SparkleLib/BaseRepository.cs b/Sparkles/BaseRepository.cs
similarity index 99%
rename from SparkleLib/BaseRepository.cs
rename to Sparkles/BaseRepository.cs
index bbc9a354..15b668db 100644
--- a/SparkleLib/BaseRepository.cs
+++ b/Sparkles/BaseRepository.cs
@@ -22,7 +22,7 @@ using System.Threading;
using Timers = System.Timers;
-namespace SparkleLib {
+namespace Sparkles {
public enum SyncStatus {
Idle,
diff --git a/SparkleLib/ChangeSet.cs b/Sparkles/ChangeSet.cs
similarity index 99%
rename from SparkleLib/ChangeSet.cs
rename to Sparkles/ChangeSet.cs
index cbe71062..875e1f97 100644
--- a/SparkleLib/ChangeSet.cs
+++ b/Sparkles/ChangeSet.cs
@@ -19,7 +19,7 @@ using System;
using System.IO;
using System.Collections.Generic;
-namespace SparkleLib {
+namespace Sparkles {
public enum ChangeType {
Added,
diff --git a/SparkleLib/Command.cs b/Sparkles/Command.cs
similarity index 96%
rename from SparkleLib/Command.cs
rename to Sparkles/Command.cs
index 832c7459..701776e0 100644
--- a/SparkleLib/Command.cs
+++ b/Sparkles/Command.cs
@@ -19,7 +19,7 @@ using System;
using System.Diagnostics;
using System.IO;
-namespace SparkleLib {
+namespace Sparkles {
public class Command : Process {
@@ -52,7 +52,7 @@ namespace SparkleLib {
if (!string.IsNullOrEmpty (StartInfo.WorkingDirectory))
folder = Path.GetFileName (StartInfo.WorkingDirectory) + " | ";
- if (this.write_output)
+ if (write_output)
Logger.LogInfo ("Cmd", folder + Path.GetFileName (StartInfo.FileName) + " " + StartInfo.Arguments);
try {
@@ -103,7 +103,7 @@ namespace SparkleLib {
{
string [] possible_command_paths = {
Environment.GetFolderPath (Environment.SpecialFolder.Personal) + "/bin/" + name,
- Defines.INSTALL_DIR + "/bin/" + name,
+ InstallationInfo.Directory + "/bin/" + name,
"/usr/local/bin/" + name,
"/usr/bin/" + name,
"/opt/local/bin/" + name
@@ -118,4 +118,3 @@ namespace SparkleLib {
}
}
}
-
diff --git a/SparkleLib/Configuration.cs b/Sparkles/Configuration.cs
old mode 100755
new mode 100644
similarity index 97%
rename from SparkleLib/Configuration.cs
rename to Sparkles/Configuration.cs
index f5cc18b8..b733d497
--- a/SparkleLib/Configuration.cs
+++ b/Sparkles/Configuration.cs
@@ -20,7 +20,7 @@ using System.IO;
using System.Collections.Generic;
using System.Xml;
-namespace SparkleLib {
+namespace Sparkles {
public class Configuration : XmlDocument {
@@ -34,7 +34,7 @@ namespace SparkleLib {
public string HomePath {
get {
- if (Backend.Platform == PlatformID.Win32NT)
+ if (InstallationInfo.Platform == PlatformID.Win32NT)
return Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
else
return Environment.GetFolderPath (Environment.SpecialFolder.Personal);
@@ -110,8 +110,8 @@ namespace SparkleLib {
{
string user_name = "Unknown";
- if (Backend.Platform == PlatformID.Unix ||
- Backend.Platform == PlatformID.MacOSX) {
+ if (InstallationInfo.Platform == PlatformID.Unix ||
+ InstallationInfo.Platform == PlatformID.MacOSX) {
user_name = Environment.UserName;
if (string.IsNullOrEmpty (user_name))
diff --git a/SparkleLib/Extensions.cs b/Sparkles/Extensions.cs
old mode 100755
new mode 100644
similarity index 99%
rename from SparkleLib/Extensions.cs
rename to Sparkles/Extensions.cs
index 0b28480c..06fc27b2
--- a/SparkleLib/Extensions.cs
+++ b/Sparkles/Extensions.cs
@@ -20,7 +20,7 @@ using System.IO;
using System.Security.Cryptography;
using System.Text;
-namespace SparkleLib {
+namespace Sparkles {
public static class Extensions {
diff --git a/SparkleLib/Git/GitCommand.cs b/Sparkles/Git/GitCommand.cs
similarity index 98%
rename from SparkleLib/Git/GitCommand.cs
rename to Sparkles/Git/GitCommand.cs
index 4b85a5a6..b2f24a47 100644
--- a/SparkleLib/Git/GitCommand.cs
+++ b/Sparkles/Git/GitCommand.cs
@@ -15,7 +15,7 @@
// along with this program. If not, see .
-namespace SparkleLib.Git {
+namespace Sparkles.Git {
public class GitCommand : Command {
diff --git a/SparkleLib/Git/GitFetcher.cs b/Sparkles/Git/GitFetcher.cs
old mode 100755
new mode 100644
similarity index 99%
rename from SparkleLib/Git/GitFetcher.cs
rename to Sparkles/Git/GitFetcher.cs
index 5b3f49fa..fec8a8b9
--- a/SparkleLib/Git/GitFetcher.cs
+++ b/Sparkles/Git/GitFetcher.cs
@@ -21,7 +21,7 @@ using System.IO;
using System.Text.RegularExpressions;
using System.Threading;
-namespace SparkleLib.Git {
+namespace Sparkles.Git {
public class GitFetcher : SSHFetcher {
@@ -259,7 +259,7 @@ namespace SparkleLib.Git {
"push.default matching"
};
- if (Backend.Platform == PlatformID.Win32NT)
+ if (InstallationInfo.Platform == PlatformID.Win32NT)
settings [0] = "core.autocrlf true";
foreach (string setting in settings) {
diff --git a/SparkleLib/Git/GitRepository.cs b/Sparkles/Git/GitRepository.cs
similarity index 99%
rename from SparkleLib/Git/GitRepository.cs
rename to Sparkles/Git/GitRepository.cs
index e8a5e2b6..7145838d 100644
--- a/SparkleLib/Git/GitRepository.cs
+++ b/Sparkles/Git/GitRepository.cs
@@ -23,7 +23,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
-namespace SparkleLib.Git {
+namespace Sparkles.Git {
public class GitRepository : BaseRepository {
diff --git a/SparkleLib/Git/Makefile.am b/Sparkles/Git/Makefile.am
similarity index 84%
rename from SparkleLib/Git/Makefile.am
rename to Sparkles/Git/Makefile.am
index c376b41e..864c4710 100755
--- a/SparkleLib/Git/Makefile.am
+++ b/Sparkles/Git/Makefile.am
@@ -1,14 +1,13 @@
-ASSEMBLY = SparkleLib.Git
+ASSEMBLY = Sparkles.Git
TARGET = library
-LINK = -r:$(DIR_BIN)/SparkleLib.dll
+LINK = -r:$(DIR_BIN)/Sparkles.dll
SOURCES = \
GitCommand.cs \
GitFetcher.cs \
GitRepository.cs
-
install-data-hook:
for ASM in $(EXTRA_BUNDLE); do \
$(INSTALL) -m 0755 $$ASM $(DESTDIR)$(moduledir); \
@@ -20,3 +19,4 @@ uninstall-hook:
done;
include $(top_srcdir)/build/build.mk
+
diff --git a/SparkleLib/Git/SparkleLib.Git.csproj b/Sparkles/Git/Sparkles.Git.csproj
similarity index 91%
rename from SparkleLib/Git/SparkleLib.Git.csproj
rename to Sparkles/Git/Sparkles.Git.csproj
index 8023d098..c4ca1fd3 100644
--- a/SparkleLib/Git/SparkleLib.Git.csproj
+++ b/Sparkles/Git/Sparkles.Git.csproj
@@ -8,8 +8,8 @@
{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}
Library
Properties
- SparkleLib.Git
- SparkleLib.Git
+ Sparkles.Git
+ Sparkles.Git
512
@@ -45,15 +45,15 @@
-->
-
-
- {2C914413-B31C-4362-93C7-1AE34F09112A}
- SparkleLib
-
-
+
+
+ {2C914413-B31C-4362-93C7-1AE34F09112A}
+ Sparkles
+
+
diff --git a/Sparkles/InstallationInfo.Directory.cs b/Sparkles/InstallationInfo.Directory.cs
new file mode 100644
index 00000000..e2745a08
--- /dev/null
+++ b/Sparkles/InstallationInfo.Directory.cs
@@ -0,0 +1,29 @@
+// SparkleShare, a collaboration and sharing tool.
+// Copyright (C) 2010 Hylke Bons
+//
+// 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 .
+
+
+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";
+ }
+}
diff --git a/SparkleLib/Defines.cs.in b/Sparkles/InstallationInfo.Directory.cs.in
similarity index 83%
rename from SparkleLib/Defines.cs.in
rename to Sparkles/InstallationInfo.Directory.cs.in
index 8ba23317..09cd3ef1 100755
--- a/SparkleLib/Defines.cs.in
+++ b/Sparkles/InstallationInfo.Directory.cs.in
@@ -15,16 +15,15 @@
// along with this program. If not, see .
-using System;
using System.Reflection;
-[assembly:AssemblyTitle ("SparkleLib")]
+[assembly:AssemblyTitle ("Sparkles")]
[assembly:AssemblyVersion ("@VERSION@")]
[assembly:AssemblyCopyright ("Copyright (c) 2010 Hylke Bons and others")]
-namespace SparkleLib {
+namespace Sparkles {
- public class Defines {
- public const string INSTALL_DIR = "@expanded_datadir@/sparkleshare";
+ public partial class InstallationInfo {
+ public const string Directory = "@expanded_datadir@/sparkleshare";
}
}
diff --git a/SparkleLib/Backend.cs b/Sparkles/InstallationInfo.cs
old mode 100755
new mode 100644
similarity index 93%
rename from SparkleLib/Backend.cs
rename to Sparkles/InstallationInfo.cs
index c6297c5b..9f0c930c
--- a/SparkleLib/Backend.cs
+++ b/Sparkles/InstallationInfo.cs
@@ -1,4 +1,4 @@
-// SparkleShare, a collaboration and sharing tool.
+// SparkleShare, a collaboration and sharing tool.
// Copyright (C) 2010 Hylke Bons
//
// This program is free software: you can redistribute it and/or modify
@@ -19,9 +19,9 @@ using System;
using System.Reflection;
using System.Runtime.InteropServices;
-namespace SparkleLib {
-
- public static class Backend {
+namespace Sparkles {
+
+ public partial class InstallationInfo {
public static string Version {
get {
diff --git a/SparkleLib/ListenerFactory.cs b/Sparkles/ListenerFactory.cs
similarity index 99%
rename from SparkleLib/ListenerFactory.cs
rename to Sparkles/ListenerFactory.cs
index 1ca2b7d4..c4f63028 100644
--- a/SparkleLib/ListenerFactory.cs
+++ b/Sparkles/ListenerFactory.cs
@@ -18,7 +18,7 @@
using System;
using System.Collections.Generic;
-namespace SparkleLib {
+namespace Sparkles {
public static class ListenerFactory {
diff --git a/SparkleLib/Logger.cs b/Sparkles/Logger.cs
similarity index 82%
rename from SparkleLib/Logger.cs
rename to Sparkles/Logger.cs
index df93e57e..2abd59ab 100644
--- a/SparkleLib/Logger.cs
+++ b/Sparkles/Logger.cs
@@ -18,7 +18,7 @@
using System;
using System.IO;
-namespace SparkleLib {
+namespace Sparkles {
public static class Logger {
@@ -65,21 +65,24 @@ namespace SparkleLib {
{
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);
string crash_report_file_path = new string [] { home_path, "SparkleShare", "crash_report.txt" }.Combine ();
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 +
- "https://github.com/hbons/SparkleShare/issues and include the lines below." + n + n +
- "Remove any sensitive information like file names, IP addresses, domain names, etc. if needed." + n + n +
- "------" + n + n +
- "SparkleShare version: " + Backend.Version + n +
- "Operating system: " + Backend.Platform + " (" + Environment.OSVersion + ")" + n;
+ "https://github.com/hbons/SparkleShare/issues and include the lines below." + n +
+ n +
+ "Remove any sensitive information like file names, IP addresses, domain names, etc. if needed." + n +
+ 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)
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 ());
int line_count = 50;
- if (debug_lines.Length > line_count) {
- crash_report += string.Join (Environment.NewLine, debug_lines,
- (debug_lines.Length - line_count), line_count) + n;
-
- } else {
+ if (debug_lines.Length > line_count)
+ crash_report += string.Join (n, debug_lines, (debug_lines.Length - line_count), line_count) + n;
+ else
crash_report += debug_log + n;
- }
}
File.WriteAllText (crash_report_file_path, crash_report);
diff --git a/SparkleLib/Makefile.am b/Sparkles/Makefile.am
similarity index 83%
rename from SparkleLib/Makefile.am
rename to Sparkles/Makefile.am
index 9e2ec19a..08763e72 100755
--- a/SparkleLib/Makefile.am
+++ b/Sparkles/Makefile.am
@@ -1,11 +1,11 @@
-ASSEMBLY = SparkleLib
+ASSEMBLY = Sparkles
TARGET = library
-ASSEMBLY_INFO_SOURCE = Defines.cs
+ASSEMBLY_INFO_SOURCE = InstallationInfo.Directory.cs
SOURCES = \
AuthenticationInfo.cs \
- Backend.cs \
+ InstallationInfo.cs \
BaseFetcher.cs \
BaseListener.cs \
BaseRepository.cs \
@@ -15,6 +15,7 @@ SOURCES = \
Extensions.cs \
ListenerFactory.cs \
Logger.cs \
+ Preset.cs \
SSHAuthenticationInfo.cs \
SSHFetcher.cs \
TcpListener.cs \
@@ -32,3 +33,4 @@ uninstall-hook:
done;
include $(top_srcdir)/build/build.mk
+
diff --git a/SparkleShare/Common/Plugin.cs b/Sparkles/Preset.cs
similarity index 71%
rename from SparkleShare/Common/Plugin.cs
rename to Sparkles/Preset.cs
index 264affd0..af8f392e 100644
--- a/SparkleShare/Common/Plugin.cs
+++ b/Sparkles/Preset.cs
@@ -22,12 +22,12 @@ using IO = System.IO;
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 (
- Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "sparkleshare", "plugins");
+ public static string LocalPresetsPath = IO.Path.Combine (
+ Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "sparkleshare", "presets");
new public string Name { get { return GetValue ("info", "name"); } }
public string Description { get { return GetValue ("info", "description"); } }
@@ -42,12 +42,12 @@ namespace SparkleShare {
public string ImagePath {
get {
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))
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);
- Load (plugin_path);
+ preset_directory = IO.Path.GetDirectoryName (preset_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 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;
- string plugin_xml = "" +
+ // TODO: Don't write maually
+ string preset_xml = "" +
"" +
- " " +
+ " " +
" " +
" " + name + "" +
" " + description + "" +
@@ -96,23 +98,23 @@ namespace SparkleShare {
" " + path_value + "" +
" " + path_example + "" +
" " +
- " " +
+ " " +
"";
- plugin_xml = plugin_xml.Replace ("", "");
- plugin_xml = plugin_xml.Replace ("", "");
+ preset_xml = preset_xml.Replace ("", "");
+ preset_xml = preset_xml.Replace ("", "");
- if (!IO.Directory.Exists (LocalPluginsPath))
- IO.Directory.CreateDirectory (LocalPluginsPath);
+ if (!IO.Directory.Exists (LocalPresetsPath))
+ IO.Directory.CreateDirectory (LocalPresetsPath);
- IO.File.WriteAllText (plugin_path, plugin_xml);
- return new Plugin (plugin_path);
+ IO.File.WriteAllText (preset_path, preset_xml);
+ return new Preset (preset_path);
}
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))
return node.Value;
@@ -120,4 +122,4 @@ namespace SparkleShare {
return null;
}
}
-}
\ No newline at end of file
+}
diff --git a/SparkleLib/SSHAuthenticationInfo.cs b/Sparkles/SSHAuthenticationInfo.cs
similarity index 99%
rename from SparkleLib/SSHAuthenticationInfo.cs
rename to Sparkles/SSHAuthenticationInfo.cs
index abe84d0b..637dce6f 100644
--- a/SparkleLib/SSHAuthenticationInfo.cs
+++ b/Sparkles/SSHAuthenticationInfo.cs
@@ -20,7 +20,7 @@ using System.Net;
using IO = System.IO;
-namespace SparkleLib {
+namespace Sparkles {
public class SSHAuthenticationInfo : AuthenticationInfo {
diff --git a/SparkleLib/SSHFetcher.cs b/Sparkles/SSHFetcher.cs
similarity index 99%
rename from SparkleLib/SSHFetcher.cs
rename to Sparkles/SSHFetcher.cs
index 9bb9e46b..e62df067 100644
--- a/SparkleLib/SSHFetcher.cs
+++ b/Sparkles/SSHFetcher.cs
@@ -20,7 +20,7 @@ using System.Diagnostics;
using System.IO;
using System.Security.Cryptography;
-namespace SparkleLib {
+namespace Sparkles {
public abstract class SSHFetcher : BaseFetcher {
diff --git a/SparkleLib/SparkleLib.csproj b/Sparkles/Sparkles.csproj
similarity index 92%
rename from SparkleLib/SparkleLib.csproj
rename to Sparkles/Sparkles.csproj
index 5c8c84b9..fc3d3488 100644
--- a/SparkleLib/SparkleLib.csproj
+++ b/Sparkles/Sparkles.csproj
@@ -7,8 +7,8 @@
2.0
{2C914413-B31C-4362-93C7-1AE34F09112A}
Library
- SparkleLib
- SparkleLib
+ Sparkles
+ Sparkles
@@ -32,11 +32,10 @@
-
-
+
Fetcher\SSHFetcher.cs
@@ -71,6 +70,8 @@
Repository\Watcher.cs
+
+
diff --git a/SparkleLib/TcpListener.cs b/Sparkles/TcpListener.cs
similarity index 98%
rename from SparkleLib/TcpListener.cs
rename to Sparkles/TcpListener.cs
index e125154c..3fa1b14c 100644
--- a/SparkleLib/TcpListener.cs
+++ b/Sparkles/TcpListener.cs
@@ -20,7 +20,7 @@ using System.Net.Sockets;
using System.Text;
using System.Threading;
-namespace SparkleLib {
+namespace Sparkles {
public class TcpListener : BaseListener {
@@ -82,7 +82,7 @@ namespace SparkleLib {
if (this.socket != null)
this.socket.Close ();
- OnDisconnected (SparkleLib.DisconnectReason.TimeOut, e.Message);
+ OnDisconnected (Sparkles.DisconnectReason.TimeOut, e.Message);
return;
}
diff --git a/SparkleLib/User.cs b/Sparkles/User.cs
similarity index 97%
rename from SparkleLib/User.cs
rename to Sparkles/User.cs
index 4f4c4652..947f1e77 100644
--- a/SparkleLib/User.cs
+++ b/Sparkles/User.cs
@@ -15,7 +15,7 @@
// along with this program. If not, see .
-namespace SparkleLib {
+namespace Sparkles {
public class User {
diff --git a/SparkleLib/Watcher.cs b/Sparkles/Watcher.cs
old mode 100755
new mode 100644
similarity index 98%
rename from SparkleLib/Watcher.cs
rename to Sparkles/Watcher.cs
index d25a688a..d581f18d
--- a/SparkleLib/Watcher.cs
+++ b/Sparkles/Watcher.cs
@@ -17,7 +17,7 @@
using System.IO;
-namespace SparkleLib {
+namespace Sparkles {
public class Watcher : FileSystemWatcher {
diff --git a/build/Makefile.am b/build/Makefile.am
index 6f9c81df..c99d383a 100755
--- a/build/Makefile.am
+++ b/build/Makefile.am
@@ -4,3 +4,4 @@ EXTRA_DIST = \
icon-theme-installer
MAINTAINERCLEANFILES = Makefile.in
+
diff --git a/build/build.environment.mk b/build/build.environment.mk
index 8fd2b446..24866848 100755
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -11,15 +11,14 @@ LINK_MONO_POSIX = -r:Mono.Posix
LINK_GLIB = $(GLIBSHARP_LIBS)
LINK_GTK = $(GTKSHARP_LIBS)
-LINK_GNOME = $(GNOME_SHARP_LIBS)
LINK_WEBKIT = $(WEBKITGTK_SHARP_LIBS)
LINK_APP_INDICATOR = $(APP_INDICATOR_LIBS)
-REF_SPARKLELIB = $(LINK_SYSTEM) $(LINK_MONO_POSIX)
-LINK_SPARKLELIB = -r:$(DIR_BIN)/SparkleLib.dll
-LINK_SPARKLELIB_DEPS = $(REF_SPARKLELIB) $(LINK_SPARKLELIB)
+REF_SPARKLES = $(LINK_SYSTEM) $(LINK_MONO_POSIX)
+LINK_SPARKLES = -r:$(DIR_BIN)/Sparkles.dll
+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
colon:= :
diff --git a/build/build.mk b/build/build.mk
index 78e07604..bb00ae72 100755
--- a/build/build.mk
+++ b/build/build.mk
@@ -1,3 +1,2 @@
include $(top_srcdir)/build/build.environment.mk
include $(top_srcdir)/build/build.rules.mk
-
diff --git a/build/build.rules.mk b/build/build.rules.mk
index 0beed5c0..1fdba24a 100755
--- a/build/build.rules.mk
+++ b/build/build.rules.mk
@@ -75,4 +75,3 @@ EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED)
CLEANFILES = $(OUTPUT_FILES) $(ASSEMBLY_FILE).config
DISTCLEANFILES = *.pidb
MAINTAINERCLEANFILES = Makefile.in
-
diff --git a/build/bump-version.sh b/build/bump-version.sh
index 0f6769e9..ed8b657b 100755
--- a/build/bump-version.sh
+++ b/build/bump-version.sh
@@ -4,13 +4,13 @@ if [ "$1" = "" ]; then
echo "No version number specified. Usage: ./bump-version.sh VERSION_NUMBER"
else
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
cat ../SparkleShare/Mac/Info.plist | eval "sed -e '/CFBundleShortVersionString<\/key>/{N;s#.*<\/string>#$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist.tmp
cat ../SparkleShare/Mac/Info.plist.tmp | eval "sed -e '/CFBundleVersion<\/key>/{N;s#.*<\/string>#$1<\/string>#;}'" > ../SparkleShare/Mac/Info.plist
rm ../SparkleShare/Mac/Info.plist.tmp
rm ../SparkleShare/Windows/SparkleShare.wxs.bak
- rm ../SparkleLib/Defines.cs.bak
+ rm ../Sparkles/InstallationInfo.Directory.cs.bak
rm ../configure.ac.bak
fi
diff --git a/configure.ac b/configure.ac
index 46d475f8..270aa398 100755
--- a/configure.ac
+++ b/configure.ac
@@ -109,12 +109,12 @@ build/Makefile
build/m4/Makefile
build/m4/shave/shave
build/m4/shave/shave-libtool
-SparkleLib/Defines.cs
-SparkleLib/Makefile
-SparkleLib/Git/Makefile
+Sparkles/InstallationInfo.Directory.cs
+Sparkles/Makefile
+Sparkles/Git/Makefile
SparkleShare/Common/Makefile
SparkleShare/Common/HTML/Makefile
-SparkleShare/Common/Plugins/Makefile
+SparkleShare/Common/Presets/Makefile
SparkleShare/Common/Pixmaps/Makefile
SparkleShare/Linux/Makefile
SparkleShare/Linux/Pixmaps/Makefile
diff --git a/legal/License_for_SparkleLib.txt b/legal/License_for_Sparkles.txt
similarity index 100%
rename from legal/License_for_SparkleLib.txt
rename to legal/License_for_Sparkles.txt