Merge branch 'master' into transifex_1_integration

This commit is contained in:
Łukasz Jernaś 2010-12-22 23:19:30 +01:00
commit 272a533bee
33 changed files with 1793 additions and 3598 deletions

2
README
View file

@ -94,7 +94,7 @@ Build on OSX:
Get the Mono Framework, Monodevelop, and MacPorts.
Install git-core, automake and intltool using 'port install'.
Make sure that git or a symbolic link to git is in /usr/bin.
Frequently Asked Question
=========================

View file

@ -22,6 +22,7 @@ namespace SparkleLib {
public const string VERSION = "@VERSION@";
public const string LOCALE_DIR = "@prefix@/share/locale";
public const string DATAROOTDIR = "@expanded_datadir@";
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
public const string PREFIX = "@prefix@";
public const string OPEN_COMMAND = "xdg-open";

View file

@ -24,7 +24,7 @@ namespace SparkleLib {
public static class SparklePaths
{
public static string GitPath = GetGitPath ();
public static string GitPath = "/usr/bin/git"; // TODO: Don't hardcode this
public static string HomePath = new UnixUserInfo (UnixEnvironment.UserName).HomeDirectory;
@ -40,7 +40,7 @@ namespace SparkleLib {
public static string SparkleLocalIconPath = SparkleHelpers.CombineMore (SparkleConfigPath, "icons", "hicolor");
public static string SparkleIconPath = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare",
public static string SparkleIconPath = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare",
"icons");

View file

@ -1,155 +0,0 @@
using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using SparkleLib;
namespace SparkleShare
{
public partial class AppDelegate : NSApplicationDelegate
{
MainWindowController mainWindowController;
NSStatusItem StatusItem;
NSMenu Menu;
NSMenuItem FolderMenuItem;
NSMenuItem [] FolderMenuItems;
NSMenuItem SyncMenuItem;
NSMenuItem NotificationsMenuItem;
NSMenuItem AboutMenuItem;
NSMenuItem QuitMenuItem;
public AppDelegate ()
{
}
public override void FinishedLaunching (NSObject notification)
{
// mainWindowController = new MainWindowController ();
// mainWindowController.Window.MakeKeyAndOrderFront (this);
// SparkleStatusIcon = new SparkleStatusIcon ();
// SparkleRepo repo = new SparkleRepo ("/Users/hbons/SparkleShare/SparkleShare-Test");
StatusItem = NSStatusBar.SystemStatusBar.CreateStatusItem (32);
StatusItem.Enabled = true;
StatusItem.Image = NSImage.ImageNamed ("sparkleshare-idle.png");
StatusItem.AlternateImage = NSImage.ImageNamed ("sparkleshare-idle-focus.png");
StatusItem.Image.Size = new SizeF (13, 13);
StatusItem.AlternateImage.Size = new SizeF (13, 13);
StatusItem.HighlightMode = true;
Menu = new NSMenu ();
Menu.AddItem (new NSMenuItem () { Title="Up to date (102 ᴍʙ)", Enabled = true });
Menu.AddItem (NSMenuItem.SeparatorItem);
FolderMenuItem = new NSMenuItem () {
Title="SparkleShare", Enabled = true,
Action = new Selector ("ddd")
};
FolderMenuItem.Activated += delegate {
Console.WriteLine ("DDDD");
};
FolderMenuItem.Image = NSImage.ImageNamed ("NSFolder");
FolderMenuItem.Image.Size = new SizeF (16, 16);
Menu.AddItem (FolderMenuItem);
FolderMenuItems = new NSMenuItem [2] {
new NSMenuItem () { Title = "gnome-design" },
new NSMenuItem () { Title = "tango-icons" }
};
foreach (NSMenuItem item in FolderMenuItems) {
item.Activated += delegate {
};
item.Image = NSImage.ImageNamed ("NSFolder");
Menu.AddItem (item);
};
Menu.AddItem (NSMenuItem.SeparatorItem);
SyncMenuItem = new NSMenuItem () {
Title = "Sync Remote Folder..."
};
SyncMenuItem.Activated += delegate {
};
Menu.AddItem (SyncMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
NotificationsMenuItem = new NSMenuItem () {
Title = "Show Notifications",
State = NSCellStateValue.On
};
NotificationsMenuItem.Activated += delegate {
//StatusItem.Image = NSImage.ImageNamed ("NSComputer");
if (NotificationsMenuItem.State == NSCellStateValue.On)
NotificationsMenuItem.State = NSCellStateValue.Off;
else
NotificationsMenuItem.State = NSCellStateValue.On;
};
Menu.AddItem (NotificationsMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
AboutMenuItem = new NSMenuItem () {
Title = "About"
};
AboutMenuItem.Activated += delegate {
};
Menu.AddItem (AboutMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
QuitMenuItem = new NSMenuItem () {
Title = "Quit"
};
QuitMenuItem.Activated += delegate {
Environment.Exit (0);
};
Menu.AddItem (QuitMenuItem);
StatusItem.Menu = Menu;
}
}
}

View file

@ -2,13 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>sparkleshare.icns</string>
<key>LSEnvironment</key>
<dict>
<key>PATH</key>
<string>/opt/local/bin</string>
</dict>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.SparkleShare</string>
<string>org.sparkleshare.sparkleshare</string>
<key>CFBundleName</key>
<string>SparkleShare</string>
<key>CFBundleVersion</key>
@ -19,5 +21,7 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSBackgroundOnly</key>
<false/>
</dict>
</plist>

View file

@ -0,0 +1,298 @@
//
// Layout.cs
//
// Author:
// Michael Hutchinson <mhutchinson@novell.com>
//
// Copyright (c) 2010 Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Drawing;
using MonoMac.AppKit;
using System.Linq;
namespace MonoDevelop.Platform.Mac
{
interface ILayout
{
LayoutRequest BeginLayout ();
void EndLayout (LayoutRequest request, PointF origin, SizeF allocation);
}
class LayoutRequest
{
public SizeF Size { get; set; }
public bool Visible { get; set; }
public bool ExpandWidth { get; set; }
public bool ExpandHeight { get; set; }
}
abstract class LayoutBox : IEnumerable<ILayout>, ILayout
{
List<ILayout> children = new List<ILayout> ();
public float Spacing { get; set; }
public float PadLeft { get; set; }
public float PadRight { get; set; }
public float PadTop { get; set; }
public float PadBottom { get; set; }
public LayoutAlign Align { get; set; }
public LayoutDirection Direction { get; set; }
public LayoutBox (LayoutDirection direction, float spacing) : this (direction, spacing, 0)
{
}
public LayoutBox (LayoutDirection direction, float spacing, float padding)
{
PadLeft = PadRight = PadTop = PadBottom = padding;
this.Direction = direction;
this.Spacing = spacing;
this.Align = LayoutAlign.Center;
}
public int Count { get { return children.Count; } }
bool IsHorizontal { get { return Direction == LayoutDirection.Horizontal; } }
public IEnumerator<ILayout> GetEnumerator ()
{
return children.GetEnumerator ();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
{
return children.GetEnumerator ();
}
public void Add (ILayout child)
{
children.Add (child);
OnChildAdded (child);
}
ContainerLayoutRequest request = new ContainerLayoutRequest ();
public virtual LayoutRequest BeginLayout ()
{
float width = 0;
float height = 0;
request.ChildRequests.Clear ();
request.ChildRequests.AddRange (children.Select (c => c.BeginLayout ()));
foreach (var r in request.ChildRequests) {
if (!r.Visible)
continue;
request.Visible = true;
if (r.ExpandWidth)
request.ExpandWidth = true;
if (r.ExpandHeight)
request.ExpandHeight = true;
if (IsHorizontal) {
if (width != 0)
width += Spacing;
width += r.Size.Width;
height = Math.Max (height, r.Size.Height);
} else {
if (height != 0)
height += Spacing;
height += r.Size.Height;
width = Math.Max (width, r.Size.Width);
}
}
request.Size = new SizeF (width + PadLeft + PadRight, height + PadTop + PadBottom);
return request;
}
public virtual void EndLayout (LayoutRequest request, PointF origin, SizeF allocation)
{
var childRequests = ((ContainerLayoutRequest) request).ChildRequests;
allocation = new SizeF (allocation.Width - PadLeft - PadRight, allocation.Height - PadBottom - PadTop);
origin = new PointF (origin.X + PadLeft, origin.Y + PadBottom);
var size = request.Size;
size.Height -= (PadTop + PadBottom);
size.Width -= (PadLeft + PadRight);
int wExpandCount = 0;
int hExpandCount = 0;
int visibleCount = 0;
foreach (var childRequest in childRequests) {
if (childRequest.Visible)
visibleCount++;
else
continue;
if (childRequest.ExpandWidth)
wExpandCount++;
if (childRequest.ExpandHeight)
hExpandCount++;
}
float wExpand = 0;
if (allocation.Width > size.Width) {
wExpand = allocation.Width - size.Width;
if (wExpandCount > 0)
wExpand /= wExpandCount;
}
float hExpand = 0;
if (allocation.Height > size.Height) {
hExpand = allocation.Height - size.Height;
if (hExpandCount > 0)
hExpand /= hExpandCount;
}
if (Direction == LayoutDirection.Horizontal) {
float pos = PadLeft;
if (wExpandCount == 0) {
if (Align == LayoutAlign.End)
pos += wExpand;
else if (Align == LayoutAlign.Center)
pos += wExpand / 2;
}
for (int i = 0; i < childRequests.Count; i++) {
var child = children[i];
var childReq = childRequests[i];
if (!childReq.Visible)
continue;
var childSize = new SizeF (childReq.Size.Width, allocation.Height);
if (childReq.ExpandWidth) {
childSize.Width += wExpand;
} else if (hExpandCount == 0 && Align == LayoutAlign.Fill) {
childSize.Width += wExpand / visibleCount;
}
child.EndLayout (childReq, new PointF (pos, origin.Y), childSize);
pos += childSize.Width + Spacing;
}
} else {
float pos = PadBottom;
if (hExpandCount == 0) {
if (Align == LayoutAlign.End)
pos += hExpand;
else if (Align == LayoutAlign.Center)
pos += hExpand / 2;
}
for (int i = 0; i < childRequests.Count; i++) {
var child = children[i];
var childReq = childRequests[i];
if (!childReq.Visible)
continue;
var childSize = new SizeF (allocation.Width, childReq.Size.Height);
if (childReq.ExpandHeight) {
childSize.Height += hExpand;
} else if (hExpandCount == 0 && Align == LayoutAlign.Fill) {
childSize.Height += hExpand / visibleCount;
}
child.EndLayout (childReq, new PointF (origin.X, pos), childSize);
pos += childSize.Height + Spacing;
}
}
}
protected abstract void OnChildAdded (ILayout child);
class ContainerLayoutRequest : LayoutRequest
{
public List<LayoutRequest> ChildRequests = new List<LayoutRequest> ();
}
}
public enum LayoutAlign
{
Begin, Center, End, Fill
}
public enum LayoutDirection
{
Horizontal, Vertical
}
abstract class LayoutAlignment : ILayout
{
public LayoutAlignment ()
{
XAlign = YAlign = LayoutAlign.Center;
}
public LayoutAlign XAlign { get; set; }
public LayoutAlign YAlign { get; set; }
public bool ExpandHeight { get; set; }
public bool ExpandWidth { get; set; }
public float MinHeight { get; set; }
public float MinWidth { get; set; }
public float PadLeft { get; set; }
public float PadRight { get; set; }
public float PadTop { get; set; }
public float PadBottom { get; set; }
public bool Visible { get; set; }
LayoutRequest request = new LayoutRequest ();
public virtual LayoutRequest BeginLayout ()
{
request.Size = new SizeF (MinWidth + PadLeft + PadRight, MinHeight + PadTop + PadBottom);
request.ExpandHeight = this.ExpandHeight;
request.ExpandWidth = this.ExpandWidth;
request.Visible = this.Visible;
return request;
}
public virtual void EndLayout (LayoutRequest request, PointF origin, SizeF allocation)
{
var frame = new RectangleF (origin.X + PadLeft, origin.Y + PadBottom,
allocation.Width - PadLeft - PadRight, allocation.Height - PadTop - PadBottom);
if (allocation.Height > request.Size.Height) {
if (YAlign != LayoutAlign.Fill) {
frame.Height = request.Size.Height - PadTop - PadBottom;
if (YAlign == LayoutAlign.Center) {
frame.Y += (allocation.Height - request.Size.Height) / 2;
} else if (YAlign == LayoutAlign.End) {
frame.Y += (allocation.Height - request.Size.Height);
}
}
}
if (allocation.Width > request.Size.Width) {
if (XAlign != LayoutAlign.Fill) {
frame.Width = request.Size.Width - PadLeft - PadRight;
if (XAlign == LayoutAlign.Center) {
frame.X += (allocation.Width - request.Size.Width) / 2;
} else if (XAlign == LayoutAlign.End) {
frame.X += (allocation.Width - request.Size.Width);
}
}
}
OnLayoutEnded (frame);
}
protected abstract void OnLayoutEnded (RectangleF frame);
}
}

View file

@ -1,18 +0,0 @@
using System;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
namespace SparkleShare
{
class MainClass
{
static void Main (string[] args)
{
NSApplication.Init ();
NSApplication.Main (args);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,35 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
namespace SparkleShare
{
public partial class MainWindow : MonoMac.AppKit.NSWindow
{
#region Constructors
// Called when created from unmanaged code
public MainWindow (IntPtr handle) : base(handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export("initWithCoder:")]
public MainWindow (NSCoder coder) : base(coder)
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
#endregion
}
}

View file

@ -1,23 +0,0 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace SparkleShare {
// Should subclass MonoMac.AppKit.NSWindow
[MonoMac.Foundation.Register("MainWindow")]
public partial class MainWindow {
}
// Should subclass MonoMac.AppKit.NSWindowController
[MonoMac.Foundation.Register("MainWindowController")]
public partial class MainWindowController {
}
}

View file

@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
namespace SparkleShare
{
public partial class MainWindowController : MonoMac.AppKit.NSWindowController
{
#region Constructors
// Called when created from unmanaged code
public MainWindowController (IntPtr handle) : base(handle)
{
Initialize ();
}
// Called when created directly from a XIB file
[Export("initWithCoder:")]
public MainWindowController (NSCoder coder) : base(coder)
{
Initialize ();
}
// Call to load from the XIB/NIB file
public MainWindowController () : base("MainWindow")
{
Initialize ();
}
// Shared initialization code
void Initialize ()
{
}
#endregion
//strongly typed window accessor
public new MainWindow Window {
get { return (MainWindow)base.Window; }
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

View file

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

View file

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View file

@ -0,0 +1,128 @@
// SparkleShare, an instant update workflow to Git.
// 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 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;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using MonoMac.WebKit;
namespace SparkleShare {
public class SparkleLog : NSWindow {
public readonly string LocalPath;
private WebView WebView;
private NSButton CloseButton;
private NSButton OpenFolderButton;
public SparkleLog (IntPtr handle) : base (handle) { }
public SparkleLog (string path) : base ()
{
LocalPath = path;
Delegate = new LogDelegate ();
SetFrame (new RectangleF (0, 0, 480, 640), true);
Center ();
StyleMask = (NSWindowStyle.Closable |
NSWindowStyle.Miniaturizable |
NSWindowStyle.Titled);
MaxSize = new SizeF (480, 640);
MinSize = new SizeF (480, 640);
HasShadow = true;
BackingType = NSBackingStore.Buffered;
ContentView.AddSubview (CreateEventLog ());
OpenFolderButton = new NSButton (new RectangleF (16, 12, 120, 31)) {
Title = "Open Folder",
BezelStyle = NSBezelStyle.Rounded
};
OpenFolderButton.Activated += delegate {
SparkleShare.Controller.OpenSparkleShareFolder (LocalPath);
};
ContentView.AddSubview (OpenFolderButton);
CloseButton = new NSButton (new RectangleF (480 - 120 - 16, 12, 120, 31)) {
Title = "Close",
BezelStyle = NSBezelStyle.Rounded
};
CloseButton.Activated += delegate {
InvokeOnMainThread (delegate {
PerformClose (this);
});
};
ContentView.AddSubview (CloseButton);
string name = System.IO.Path.GetFileName (LocalPath);
Title = String.Format ("Recent Events in {0}", name);
OrderFrontRegardless ();
}
public void UpdateEventLog ()
{
}
private WebView CreateEventLog ()
{
RectangleF frame = new RectangleF (0, 12 + 31 + 16, 480, 640 - (12 + 31 + 16));
WebView = new WebView (frame, "", "");
WebView.MainFrameUrl = "http://www.google.nl/";
return WebView;
}
}
public class LogDelegate : NSWindowDelegate {
public override void WillClose (NSNotification notification)
{
InvokeOnMainThread (delegate {
SparkleUI.OpenLogs.Remove ((SparkleLog) notification.Object);
});
}
}
}

View file

@ -0,0 +1,95 @@
// SparkleShare, an instant update workflow to Git.
// 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 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 MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using SparkleLib;
using System;
using System.Diagnostics;
using System.IO;
namespace SparkleShare {
public class SparkleMacController : SparkleController {
public override void EnableSystemAutostart ()
{
// N/A
}
// Installs a launcher so the user can launch SparkleShare
// from the Internet category if needed
public override void InstallLauncher ()
{
// N/A
}
// Adds the SparkleShare folder to the user's
// list of bookmarked places
public override void AddToBookmarks ()
{
}
// Creates the SparkleShare folder in the user's home folder
public override bool CreateSparkleShareFolder ()
{
if (!Directory.Exists (SparklePaths.SparklePath)) {
Directory.CreateDirectory (SparklePaths.SparklePath);
NSWorkspace.SharedWorkspace.SetIconforFile (NSImage.ImageNamed ("sparkleshare.icns"),
SparklePaths.SparklePath, 0);
return true;
} else {
return false;
}
}
// Opens the SparkleShare folder or an (optional) subfolder
public override void OpenSparkleShareFolder (string subfolder)
{
string folder = Path.Combine (SparklePaths.SparklePath, subfolder);
Process process = new Process ();
process.StartInfo.Arguments = folder.Replace (" ", "\\ "); // Escape space-characters
process.StartInfo.FileName = "open";
process.Start ();
}
}
}

View file

@ -44,27 +44,26 @@
<Reference Include="MonoMac">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Mono.Posix" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindow.cs">
<DependentUpon>MainWindow.xib</DependentUpon>
</Compile>
<Compile Include="MainWindowController.cs">
<DependentUpon>MainWindow.xib</DependentUpon>
</Compile>
<Compile Include="MainWindow.xib.designer.cs">
<DependentUpon>MainWindow.xib</DependentUpon>
</Compile>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs">
<DependentUpon>MainMenu.xib</DependentUpon>
</Compile>
<Compile Include="MainMenu.xib.designer.cs">
<DependentUpon>MainMenu.xib</DependentUpon>
</Compile>
<Compile Include="Layout.cs" />
<Compile Include="SparkleLog.cs" />
<Compile Include="SparkleStatusIcon.cs" />
<Compile Include="..\..\SparkleShare.cs">
<Link>SparkleShare.cs</Link>
</Compile>
<Compile Include="..\..\SparkleController.cs">
<Link>SparkleController.cs</Link>
</Compile>
<Compile Include="SparkleMacController.cs" />
<Compile Include="SparkleUI.cs" />
<Compile Include="SparkleWindow.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="MainWindow.xib" />
<Page Include="MainMenu.xib" />
</ItemGroup>
<ItemGroup>
@ -73,8 +72,19 @@
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
<ItemGroup>
<Content Include="sparkleshare-idle-focus.png" />
<Content Include="sparkleshare-idle.png" />
<Content Include="Pixmaps\idle.png" />
<Content Include="Pixmaps\idle0.png" />
<Content Include="Pixmaps\idle2.png" />
<Content Include="Pixmaps\idle-active.png" />
<Content Include="Pixmaps\idle1.png" />
<Content Include="Pixmaps\idle4.png" />
<Content Include="Pixmaps\idle3.png" />
<Content Include="Pixmaps\sparkleshare-idle.png" />
<Content Include="Pixmaps\sparkleshare-idle-focus.png" />
<Content Include="..\..\..\data\side-splash.png">
<Link>Pixmaps\side-splash.png</Link>
</Content>
<Content Include="sparkleshare.icns" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\SparkleLib\SparkleLib.csproj">
@ -82,4 +92,7 @@
<Name>SparkleLib</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Pixmaps\" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,399 @@
// SparkleShare, an instant update workflow to Git.
// 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 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;
using System.Drawing;
using System.Timers;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using Mono.Unix;
namespace SparkleShare {
// The statusicon that stays in the
// user's notification area
public class SparkleStatusIcon : NSObject {
private Timer Animation;
private int FrameNumber;
private string StateText;
private NSStatusItem StatusItem;
private NSMenu Menu;
private NSMenuItem StateMenuItem;
private NSMenuItem FolderMenuItem;
private NSMenuItem [] FolderMenuItems;
private NSMenuItem SyncMenuItem;
private NSMenuItem NotificationsMenuItem;
private NSMenuItem AboutMenuItem;
private delegate void Task ();
private EventHandler [] Tasks;
// Short alias for the translations
public static string _ (string s)
{
return Catalog.GetString (s);
}
public SparkleStatusIcon () : base ()
{
Animation = CreateAnimation ();
StatusItem = NSStatusBar.SystemStatusBar.CreateStatusItem (28);
StatusItem.HighlightMode = true;
SetNormalState ();
CreateMenu ();
Menu.Delegate = new SparkleStatusIconMenuDelegate ();
SparkleShare.Controller.FolderSizeChanged += delegate {
InvokeOnMainThread (delegate {
UpdateMenu ();
});
};
SparkleShare.Controller.FolderListChanged += delegate {
InvokeOnMainThread (delegate {
SetNormalState ();
CreateMenu ();
});
};
SparkleShare.Controller.OnIdle += delegate {
InvokeOnMainThread (delegate {
SetNormalState ();
UpdateMenu ();
});
};
SparkleShare.Controller.OnSyncing += delegate {
InvokeOnMainThread (delegate {
SetAnimationState ();
UpdateMenu ();
});
};
SparkleShare.Controller.OnError += delegate {
InvokeOnMainThread (delegate {
SetNormalState (true);
UpdateMenu ();
});
};
}
// Creates the Animation that handles the syncing animation
private Timer CreateAnimation ()
{
FrameNumber = 0;
Timer Animation = new Timer () {
Interval = 35
};
Animation.Elapsed += delegate {
if (FrameNumber < 4)
FrameNumber++;
else
FrameNumber = 0;
InvokeOnMainThread (delegate {
StatusItem.AlternateImage = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/idle" + FrameNumber + ".png");
StatusItem.AlternateImage.Size = new SizeF (16, 16);
StatusItem.Image = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/idle" + FrameNumber + ".png");
StatusItem.Image.Size = new SizeF (16, 16);
});
};
return Animation;
}
// Creates the menu that is popped up when the
// user clicks the status icon
public void CreateMenu ()
{
Menu = new NSMenu ();
StateMenuItem = new NSMenuItem () {
Title = StateText
};
Menu.AddItem (StateMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
FolderMenuItem = new NSMenuItem () {
Title = "SparkleShare"
};
FolderMenuItem.Activated += delegate {
SparkleShare.Controller.OpenSparkleShareFolder ();
};
//FolderMenuItem.Image = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/sparkleshare.icns");
FolderMenuItem.Image = NSImage.ImageNamed ("NSFolder");
FolderMenuItem.Image.Size = new SizeF (16, 16);
Menu.AddItem (FolderMenuItem);
if (SparkleShare.Controller.Folders.Count > 0) {
FolderMenuItems = new NSMenuItem [SparkleShare.Controller.Folders.Count];
Tasks = new EventHandler [SparkleShare.Controller.Folders.Count];
int i = 0;
foreach (string path in SparkleShare.Controller.Folders) {
// if (repo.HasUnsyncedChanges)
// folder_action.IconName = "dialog-error";
NSMenuItem item = new NSMenuItem ();
item.Title = System.IO.Path.GetFileName (path);
item.Image = NSImage.ImageNamed ("NSFolder");
item.Image.Size = new SizeF (16, 16);
Tasks [i] = OpenEventLogDelegate(item.Title);
FolderMenuItems [i] = item;
FolderMenuItems [i].Activated += Tasks [i];
Menu.AddItem (FolderMenuItems [i]);
i++;
};
} else {
// TODO: No Remote Folders Yet
}
Menu.AddItem (NSMenuItem.SeparatorItem);
SyncMenuItem = new NSMenuItem () {
Title = "Add Remote Folder..."
};
if (SparkleShare.Controller.FirstRun)
SyncMenuItem.Enabled = false;
SyncMenuItem.Activated += delegate {
SparkleWindow w = new SparkleWindow ();
};
Menu.AddItem (SyncMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
NotificationsMenuItem = new NSMenuItem () {
Title = "Show Notifications"
};
if (SparkleShare.Controller.NotificationsEnabled)
NotificationsMenuItem.State = NSCellStateValue.On;
NotificationsMenuItem.Activated += delegate {
SparkleShare.Controller.ToggleNotifications ();
if (SparkleShare.Controller.NotificationsEnabled)
NotificationsMenuItem.State = NSCellStateValue.On;
else
NotificationsMenuItem.State = NSCellStateValue.Off;
};
Menu.AddItem (NotificationsMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
AboutMenuItem = new NSMenuItem () {
Title = "About"
};
AboutMenuItem.Activated += delegate {
// TODO
};
Menu.AddItem (AboutMenuItem);
StatusItem.Menu = Menu;
StatusItem.Menu.Update ();
Console.WriteLine ("MENU UPDATED");
}
// A method reference that makes sure that opening the
// event log for each repository works correctly
private EventHandler OpenEventLogDelegate (string path)
{
return delegate {
SparkleLog log = SparkleUI.OpenLogs.Find (delegate (SparkleLog l) {
return l.LocalPath.Equals (path);
});
// Check whether the log is already open, create a new one if
// that's not the case or present it to the user if it is
if (log == null) {
InvokeOnMainThread (delegate {
SparkleUI.OpenLogs.Add (new SparkleLog (path));
});
} else {
InvokeOnMainThread (delegate {
log.OrderFrontRegardless ();
});
}
};
}
public void UpdateMenu ()
{
StateMenuItem.Title = StateText;
}
// The state when there's nothing going on
private void SetNormalState ()
{
SetNormalState (false);
}
// The state when there's nothing going on
private void SetNormalState (bool error)
{
Animation.Stop ();
if (SparkleShare.Controller.Folders.Count == 0) {
StateText = _("Welcome to SparkleShare!");
InvokeOnMainThread (delegate {
StatusItem.Image = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/idle.png");
StatusItem.Image.Size = new SizeF (16, 16);
StatusItem.AlternateImage = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/idle-active.png");
StatusItem.AlternateImage.Size = new SizeF (16, 16);
});
} else {
if (error) {
StateText = _("Not everything is synced");
InvokeOnMainThread (delegate {
//Pixbuf = SparkleUIHelpers.GetIcon ("sparkleshare-syncing-error", 24);
});
} else {
StateText = _("Up to date") + " (" + SparkleShare.Controller.FolderSize + ")";
InvokeOnMainThread (delegate {
StatusItem.Image = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/idle.png");
StatusItem.Image.Size = new SizeF (16, 16);
StatusItem.AlternateImage = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/idle-active.png");
StatusItem.AlternateImage.Size = new SizeF (16, 16);
});
}
}
}
// The state when animating
private void SetAnimationState ()
{
StateText = _("Syncing…");
if (!Animation.Enabled)
Animation.Start ();
}
}
public class SparkleStatusIconMenuDelegate : NSMenuDelegate {
public override void MenuWillHighlightItem (NSMenu menu, NSMenuItem item) { }
public override void MenuWillOpen (NSMenu menu)
{
Console.WriteLine ("OPENED");
InvokeOnMainThread (delegate {
foreach (SparkleLog log in SparkleUI.OpenLogs)
log.OrderFrontRegardless ();
});
}
}
}

View file

@ -8,164 +8,58 @@
//
// 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
// 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 Gtk;
using Mono.Unix;
using Mono.Unix.Native;
using SparkleLib;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Drawing;
using System.Timers;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using MonoMac.WebKit;
namespace SparkleShare {
public class SparkleUI {
public partial class AppDelegate : NSApplicationDelegate {
// Workaround to be able to work with SparkleUI as the main class
}
public class SparkleUI : AppDelegate
{
public static SparkleStatusIcon StatusIcon;
public static List <SparkleLog> OpenLogs;
// Short alias for the translations
public static string _(string s)
{
return Catalog.GetString (s);
}
public SparkleUI ()
{
// Initialize the application
Application.Init ();
NSApplication.Init ();
// Create the statusicon
NSApplication.SharedApplication.applicationIconImage
= NSImage.ImageNamed ("sparkleshare.icns");
OpenLogs = new List <SparkleLog> ();
StatusIcon = new SparkleStatusIcon ();
// Keep track of which event logs are open
SparkleUI.OpenLogs = new List <SparkleLog> ();
SparkleShare.Controller.OnFirstRun += delegate {
Application.Invoke (delegate {
SparkleIntro intro = new SparkleIntro ();
intro.ShowAll ();
});
};
SparkleShare.Controller.OnInvitation += delegate (string invitation_file_path) {
Application.Invoke (delegate {
SparkleInvitation invitation = new SparkleInvitation (invitation_file_path);
invitation.Present ();
});
};
// Show a bubble when there are new changes
SparkleShare.Controller.NotificationRaised += delegate (SparkleCommit commit, string repository_path) {
string file_name = "";
string message = null;
if (commit.Added.Count > 0) {
foreach (string added in commit.Added) {
file_name = added;
break;
}
message = String.Format (_("added {0}"), file_name);
}
if (commit.Edited.Count > 0) {
foreach (string modified in commit.Edited) {
file_name = modified;
break;
}
message = String.Format (_("edited {0}"), file_name);
}
if (commit.Deleted.Count > 0) {
foreach (string removed in commit.Deleted) {
file_name = removed;
break;
}
message = String.Format (_("deleted {0}"), file_name);
}
int changes_count = (commit.Added.Count +
commit.Edited.Count +
commit.Deleted.Count);
if (changes_count > 1)
message += " + " + (changes_count - 1);
Application.Invoke (delegate {
SparkleBubble bubble = new SparkleBubble (commit.UserName, message);
string avatar_file_path = SparkleUIHelpers.GetAvatar (commit.UserEmail, 32);
if (avatar_file_path != null)
bubble.Icon = new Gdk.Pixbuf (avatar_file_path);
else
bubble.Icon = SparkleUIHelpers.GetIcon ("avatar-default", 32);
// bubble.AddAction ("", "Show Events", delegate {
// SparkleLog log = new SparkleLog (repository_path);
// log.ShowAll ();
// });
// bubble.Show ();
});
};
// Show a bubble when there was a conflict
SparkleShare.Controller.ConflictNotificationRaised += delegate {
Application.Invoke (delegate {
string title = _("Ouch! Mid-air collision!");
string subtext = _("Don't worry, SparkleShare made a copy of each conflicting file.");
SparkleBubble bubble = new SparkleBubble(title, subtext);
// bubble.Show ();
});
};
}
// Runs the application
public void Run ()
{
Application.Run ();
NSApplication.Main (new string [0]);
}
}
}
}

View file

@ -0,0 +1,69 @@
// SparkleShare, an instant update workflow to Git.
// 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 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;
using System.Drawing;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using MonoMac.WebKit;
namespace SparkleShare {
public class SparkleWindow : NSWindow {
public readonly string LocalPath;
private NSImage SideSplash;
public SparkleWindow () : base ()
{
SetFrame (new RectangleF (0, 0, 640, 480), true);
Center ();
StyleMask = (NSWindowStyle.Closable |
NSWindowStyle.Miniaturizable |
NSWindowStyle.Titled);
MaxSize = new SizeF (640, 480);
MinSize = new SizeF (640, 480);
HasShadow = true;
BackingType = NSBackingStore.Buffered;
SideSplash = new NSImage (NSBundle.MainBundle.ResourcePath + "/Pixmaps/side-splash.png");
SideSplash.Size = new SizeF (150, 480);
NSText tv = new NSText (new RectangleF (200, 200, 200, 200)) {
Value = "TEST"
};
ContentView.AddSubview (new NSImageView (new RectangleF (0, 0, 150, 480)) { Image = SideSplash});
ContentView.AddSubview (new NSTextField (new RectangleF (200, 100, 128, 31)) { BezelStyle = NSTextFieldBezelStyle.Rounded});
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
MakeKeyAndOrderFront (this);
}
}
}

Binary file not shown.

View file

@ -14,6 +14,7 @@
// 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 Mono.Unix;
using SparkleLib;
using System;
@ -25,6 +26,10 @@ using System.Threading;
using System.Text.RegularExpressions;
using System.Xml;
using System.Net;
using System.Security.Cryptography;
using System.Text;
namespace SparkleShare {
public abstract class SparkleController {
@ -106,8 +111,7 @@ namespace SparkleShare {
// Remove the repository when a delete event occurs
watcher.Deleted += delegate (object o, FileSystemEventArgs args) {
if (Directory.Exists (args.FullPath))
RemoveRepository (args.FullPath);
RemoveRepository (args.FullPath);
};
@ -204,20 +208,21 @@ namespace SparkleShare {
}
public List <ChangeSet> GetLog (string path)
public List <SparkleCommit> GetLog (string name)
{
string path = Path.Combine (SparklePaths.SparklePath, name);
int log_size = 30;
List <ChangeSet> list = new List <ChangeSet> ();
List <SparkleCommit> list = new List <SparkleCommit> ();
foreach (SparkleRepo repo in Repositories) {
if (repo.LocalPath.Equals (path)) {
foreach (SparkleCommit commit in repo.GetCommits (log_size))
list.Add ((ChangeSet) commit);
list.Add (commit);
return list;
}
@ -229,6 +234,179 @@ namespace SparkleShare {
}
public string GetHTMLLog (string name)
{
List <SparkleCommit> commits = GetLog (name);
List <ActivityDay> activity_days = new List <ActivityDay> ();
foreach (SparkleCommit commit in commits) {
GetAvatar (commit.UserEmail, 32);
bool commit_inserted = false;
foreach (ActivityDay stored_activity_day in activity_days) {
if (stored_activity_day.DateTime.Year == commit.DateTime.Year &&
stored_activity_day.DateTime.Month == commit.DateTime.Month &&
stored_activity_day.DateTime.Day == commit.DateTime.Day) {
stored_activity_day.Add (commit);
commit_inserted = true;
break;
}
}
if (!commit_inserted) {
ActivityDay activity_day = new ActivityDay (commit.DateTime);
activity_day.Add (commit);
activity_days.Add (activity_day);
}
}
StreamReader reader;
reader = new StreamReader (Defines.PREFIX + "/share/sparkleshare/html/event-log.html");
string event_log_html = reader.ReadToEnd ();
reader.Close ();
reader = new StreamReader (Defines.PREFIX + "/share/sparkleshare/html/day-entry.html");
string day_entry_html = reader.ReadToEnd ();
reader.Close ();
reader = new StreamReader (Defines.PREFIX + "/share/sparkleshare/html/event-entry.html");
string event_entry_html = reader.ReadToEnd ();
reader.Close ();
string event_log = "";
foreach (ActivityDay activity_day in activity_days) {
string event_entries = "";
foreach (SparkleCommit change_set in activity_day) {
string event_entry = "<dl>";
if (change_set.Edited.Count > 0) {
event_entry += "<dt>Edited</dt>";
foreach (string file_path in change_set.Edited) {
if (File.Exists (SparkleHelpers.CombineMore (SparklePaths.SparklePath ,name , file_path))) {
event_entry += "<dd><a href='#'>" + file_path + "</a></dd>";
} else {
event_entry += "<dd>" + SparkleHelpers.CombineMore (SparklePaths.SparklePath, name, file_path) + "</dd>";
}
}
}
if (change_set.Added.Count > 0) {
event_entry += "<dt>Added</dt>";
foreach (string file_path in change_set.Added) {
if (File.Exists (SparkleHelpers.CombineMore (SparklePaths.SparklePath ,name , file_path))) {
event_entry += "<dd><a href='#'>" + file_path + "</a></dd>";
} else {
event_entry += "<dd>" + SparkleHelpers.CombineMore (SparklePaths.SparklePath ,name , file_path) + "</dd>";
}
}
}
if (change_set.Deleted.Count > 0) {
event_entry += "<dt>Deleted</dt>";
foreach (string file_path in change_set.Deleted) {
if (File.Exists (SparkleHelpers.CombineMore (SparklePaths.SparklePath ,name , file_path))) {
event_entry += "<dd><a href='#'>" + file_path + "</a></dd>";
} else {
event_entry += "<dd>" + SparkleHelpers.CombineMore (SparklePaths.SparklePath ,name , file_path) + "</dd>";
}
}
}
Console.WriteLine(GetAvatar (change_set.UserEmail, 32));
event_entry += "</dl>";
event_entries += event_entry_html.Replace ("<!-- $event-entry-content -->", event_entry)
.Replace ("<!-- $event-user-name -->", change_set.UserName)
.Replace ("<!-- $event-avatar-url -->", "file://" +GetAvatar (change_set.UserEmail, 32) )
.Replace ("<!-- $event-time -->", change_set.DateTime.ToString ("H:mm"));
}
string day_entry = "";
DateTime today = DateTime.Now;
DateTime yesterday = DateTime.Now.AddDays (-1);
if (today.Day == activity_day.DateTime.Day &&
today.Month == activity_day.DateTime.Month &&
today.Year == activity_day.DateTime.Year) {
day_entry = day_entry_html.Replace ("<!-- $day-entry-header -->", "<b>Today</b>");
} else if (yesterday.Day == activity_day.DateTime.Day &&
yesterday.Month == activity_day.DateTime.Month &&
yesterday.Year == activity_day.DateTime.Year) {
day_entry = day_entry_html.Replace ("<!-- $day-entry-header -->", "<b>Yesterday</b>");
} else {
day_entry = day_entry_html.Replace ("<!-- $day-entry-header -->",
"<b>" + activity_day.DateTime.ToString ("ddd MMM d, yyyy") + "</b>");
}
event_log += day_entry.Replace ("<!-- $day-entry-content -->", event_entries);
}
string html = event_log_html.Replace ("<!-- $event-log-content -->", event_log);
return html;
}
// Creates a folder in the user's home folder to store configuration
private void CreateConfigurationFolders ()
{
@ -820,6 +998,76 @@ namespace SparkleShare {
}
// Gets the avatar for a specific email address and size
public static string GetAvatar (string email, int size)
{
string avatar_path = SparkleHelpers.CombineMore (SparklePaths.SparkleLocalIconPath,
size + "x" + size, "status");
if (!Directory.Exists (avatar_path)) {
Directory.CreateDirectory (avatar_path);
SparkleHelpers.DebugInfo ("Config", "Created '" + avatar_path + "'");
}
string avatar_file_path = SparkleHelpers.CombineMore (avatar_path, "avatar-" + email);
if (File.Exists (avatar_file_path)) {
return avatar_file_path;
} else {
// Let's try to get the person's gravatar for next time
WebClient web_client = new WebClient ();
Uri uri = new Uri ("http://www.gravatar.com/avatar/" + GetMD5 (email) +
".jpg?s=" + size + "&d=404");
string tmp_file_path = SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, email + size);
if (!File.Exists (tmp_file_path)) {
web_client.DownloadFileAsync (uri, tmp_file_path);
web_client.DownloadFileCompleted += delegate {
if (File.Exists (avatar_file_path))
File.Delete (avatar_file_path);
FileInfo tmp_file_info = new FileInfo (tmp_file_path);
if (tmp_file_info.Length > 255)
File.Move (tmp_file_path, avatar_file_path);
};
}
// Fall back to a generic icon if there is no gravatar
if (File.Exists (avatar_file_path))
return avatar_file_path;
else
return null;
}
}
// Creates an MD5 hash of input
public static string GetMD5 (string s)
{
MD5 md5 = new MD5CryptoServiceProvider ();
Byte[] bytes = ASCIIEncoding.Default.GetBytes (s);
Byte[] encodedBytes = md5.ComputeHash (bytes);
return BitConverter.ToString (encodedBytes).ToLower ().Replace ("-", "");
}
}
@ -827,4 +1075,21 @@ namespace SparkleShare {
}
// All commits that happened on a day
public class ActivityDay : List <SparkleCommit>
{
public DateTime DateTime;
public ActivityDay (DateTime date_time)
{
DateTime = date_time;
DateTime = new DateTime (DateTime.Year, DateTime.Month, DateTime.Day);
}
}
}

View file

@ -194,9 +194,9 @@ GNU Lesser General Public License for more details."; */
vbox.PackStart (new HSeparator (), false, false, 0);
vbox.PackStart (button_bar, false, false, 0);
string image_path = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "pixmaps",
"sparkleshare-about.png");
string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare",
"pixmaps", "sparkleshare-about.png");
System.Console.WriteLine(image_path);
wrapper.PackStart (new Image (image_path), false, false, 0);
wrapper.PackStart (vbox, true, true, 0);

View file

@ -146,7 +146,7 @@ namespace SparkleShare {
Directory.CreateDirectory (SparklePaths.SparklePath);
SparkleHelpers.DebugInfo ("Controller", "Created '" + SparklePaths.SparklePath + "'");
string icon_file_path = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "icons", "hicolor",
string icon_file_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "icons", "hicolor",
"48x48", "apps", "folder-sparkleshare.png");
string gvfs_command_path = SparkleHelpers.CombineMore (Path.VolumeSeparatorChar.ToString (),
@ -196,4 +196,4 @@ namespace SparkleShare {
}
}
}

View file

@ -25,6 +25,7 @@ using SparkleLib;
using SparkleLib.Options;
using System.Text;
namespace SparkleShare {
// This is SparkleShare!
@ -83,8 +84,8 @@ namespace SparkleShare {
if (show_help)
ShowHelp (p);
switch (Environment.OSVersion.Platform) {
switch (SparkleShare.Platform) {
case PlatformID.Unix:
SetProcessName ("sparkleshare");
@ -148,6 +149,11 @@ namespace SparkleShare {
}
// Strange magic needed by SetProcessName ()
[DllImport ("libc")]
private static extern int prctl (int option, byte [] arg2, IntPtr arg3, IntPtr arg4, IntPtr arg5);
// Sets the Unix process name to 'sparkleshare' instead of 'mono'
private static void SetProcessName (string name)
@ -169,12 +175,43 @@ namespace SparkleShare {
}
}
// Strange magic needed by SetProcessName
[DllImport ("libc")]
private static extern int prctl (int option, byte [] arg2, IntPtr arg3, IntPtr arg4, IntPtr arg5);
// Strange magic needed by Platform ()
[DllImport ("libc")]
static extern int uname (IntPtr buf);
// This fixes the PlatformID enumeration for MacOSX in Environment.OSVersion.Platform,
// which is intentionally broken in Mono for hystorical reasons
static PlatformID Platform {
get {
IntPtr buf = IntPtr.Zero;
try {
buf = Marshal.AllocHGlobal (8192);
if (uname (buf) == 0 && Marshal.PtrToStringAnsi (buf) == "Darwin")
return PlatformID.MacOSX;
} catch {
} finally {
if (buf != IntPtr.Zero)
Marshal.FreeHGlobal (buf);
}
return Environment.OSVersion.Platform;
}
}
}
}

View file

@ -48,7 +48,7 @@ namespace SparkleShare {
HBox = new HBox (false, 6);
string image_path = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare",
string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare",
"pixmaps", "side-splash.png");
Image side_splash = new Image (image_path);

View file

@ -16,7 +16,7 @@
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:version="0.47 r22583"
inkscape:version="0.48.0 r9654"
sodipodi:docname="sparkleshare-gnome.svg"
sodipodi:version="0.32"
style="display:inline;enable-background:new"
@ -30,9 +30,9 @@
guidetolerance="10000"
height="300px"
id="base"
inkscape:current-layer="layer18"
inkscape:cx="452.99246"
inkscape:cy="152.00765"
inkscape:current-layer="layer20"
inkscape:cx="363.28616"
inkscape:cy="119.67008"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:pageopacity="0.0"
@ -40,9 +40,9 @@
inkscape:showpageshadow="false"
inkscape:snap-bbox="true"
inkscape:snap-nodes="false"
inkscape:window-height="805"
inkscape:window-width="1332"
inkscape:window-x="412"
inkscape:window-height="778"
inkscape:window-width="1280"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:zoom="1"
objecttolerance="10000"
@ -2561,6 +2561,46 @@
inkscape:label="small sizes"
id="layer20"
inkscape:groupmode="layer">
<image
y="-31"
x="354"
id="image6006"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAB1JREFU
OI1jfK+p+Z+BAsBEieZRA0YNGDVgMBkAAGPfAmCG9D3bAAAAAElFTkSuQmCC
"
height="16"
width="16"
style="opacity:0"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle0.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<g
style="display:inline;enable-background:new"
id="g5147"
transform="translate(51,-250)"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle0.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<path
sodipodi:nodetypes="ccccccccccccc"
id="path5149"
d="m 305.53125,220.5 c -0.57203,0.064 -1.00351,0.54941 -1,1.125 l 0,10.34375 c 6e-5,0.62129 0.50371,1.12494 1.125,1.125 l 10.71875,0 c 0.62129,-6e-5 1.12494,-0.50371 1.125,-1.125 l 0,-8.3125 -0.0312,-1.125 -5.9375,0 -2.28125,-2.03125 -3.59375,0 c -0.0416,-0.002 -0.0834,-0.002 -0.125,0 z"
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999964;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
inkscape:connector-curvature="0" />
<path
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 309.78125,224.5 c -0.2554,0 -0.45965,0.13987 -0.59375,0.34375 -0.43264,0.54853 -1.12354,1.65625 -1.65625,1.65625 l -4.01072,0 -0.0205,5.59375 c 0,1.33756 0.65057,2.40625 1.46875,2.40625 l 12.0625,0 c 0.81819,0 1.46875,-1.06869 1.46875,-2.40625 l 0.0509,-7.59375 z"
id="path5153"
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0" />
<path
style="opacity:0.71595326999999997;fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999987999999995;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4375-3-0);enable-background:new"
d="m 250.0625,476.75 c -0.0458,1.33554 -0.49131,2.35705 -1.21875,3.0625 -0.72744,0.70545 -1.76871,1.125 -3.1875,1.125 l -197.25,0 c -1.418904,0 -2.480488,-0.44927 -3.21875,-1.15625 -0.738262,-0.70698 -1.186879,-1.70494 -1.21875,-3.03125 l 0,3 c 0.03187,1.32631 0.480488,2.32427 1.21875,3.03125 0.738262,0.70698 1.799846,1.15625 3.21875,1.15625 l 197.25,0 c 1.41879,0 2.46006,-0.41955 3.1875,-1.125 0.72744,-0.70545 1.17291,-1.72696 1.21875,-3.0625 l 0,-3 z"
id="path5157"
sodipodi:nodetypes="csccsccsccscc"
transform="matrix(0.06533091,0,0,0.2941173,301.14534,90.449312)"
inkscape:connector-curvature="0" />
</g>
<g
transform="translate(25,-250)"
id="g10370"
@ -2903,21 +2943,27 @@
d="m 312.9375,184.5 c -0.17581,0.22664 -0.44781,0.6386 -0.78125,1.03125 -0.17236,0.20297 -0.35508,0.41053 -0.59375,0.59375 -0.23867,0.18322 -0.5515,0.375 -1.03125,0.375 l -4.6875,0 c -0.20314,0 -0.22418,0.0344 -0.25,0.0625 -0.0258,0.0281 -0.0937,0.12531 -0.0937,0.40625 l 0,5.84375 c 0,3.00491 1.06986,2.68751 0.65625,2.6875 l 15.6875,0 c -0.53644,0 0.65626,0.24559 0.65625,-2.6875 l 0,-8.3125 -9.5625,0 -5e-5,0 z"
style="opacity:0.4;fill:none;stroke:url(#linearGradient10684);stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
</g>
<g
transform="translate(-1574.6884,-850.09618)"
id="g5833"
style="display:inline;enable-background:new">
<path
style="fill:none;stroke:#c66f11;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 1910.9687,825.95775 c -0.1681,0.0217 -0.3164,0.15386 -0.3579,0.31842 l -0.7155,2.14935 c -0.019,0.0382 -0.032,0.0777 -0.039,0.11973 -0.038,-0.0191 -0.078,-0.0318 -0.1196,-0.0395 l -2.1866,0 c -0.1222,0 -0.2415,0.0637 -0.3181,0.15921 -0.1612,0.18061 -0.1208,0.50107 0.079,0.63685 l 1.7891,1.31355 0.038,0.19106 -0.6757,2.10948 c -0.094,0.32925 0.3466,0.66015 0.6361,0.47763 l 1.7889,-1.31343 0.229,0 1.7891,1.31343 c 0.1556,0.1019 0.3785,0.0841 0.5167,-0.0395 0.1171,-0.10827 0.1659,-0.28518 0.1196,-0.4379 l -0.6759,-2.10948 c -0.064,-0.0127 0.025,-0.12737 0.038,-0.19105 l 1.7889,-1.31356 c 0.2004,-0.13577 0.2401,-0.45623 0.079,-0.63684 -0.076,-0.0955 -0.1958,-0.15526 -0.318,-0.15921 l -2.2264,0 c -0.042,0.0127 -0.081,0.0204 -0.1196,0.0395 -0.013,-0.042 -0.02,-0.0815 -0.039,-0.11973 l -0.6759,-2.14934 c -0.02,-0.0752 -0.062,-0.14546 -0.1196,-0.19908 -0.084,-0.0815 -0.2016,-0.1261 -0.318,-0.11973 l 0.014,1.3e-4 -6e-4,1e-5 z"
id="path5717-2"
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 1910.9687,824.95775 c -0.1681,0.0217 -0.3164,0.15386 -0.3579,0.31842 l -0.7155,2.14935 c -0.019,0.0382 -0.032,0.0777 -0.039,0.11973 -0.038,-0.0191 -0.078,-0.0318 -0.1196,-0.0395 l -2.1866,0 c -0.1222,0 -0.2415,0.0637 -0.3181,0.15921 -0.1612,0.18061 -0.1208,0.50107 0.079,0.63685 l 1.7891,1.31355 0.038,0.19106 -0.6757,2.10948 c -0.094,0.32925 0.3466,0.66015 0.6361,0.47763 l 1.7889,-1.31343 0.229,0 1.7891,1.31343 c 0.1556,0.1019 0.3785,0.0841 0.5167,-0.0395 0.1171,-0.10827 0.1659,-0.28518 0.1196,-0.4379 l -0.6759,-2.10948 c -0.064,-0.0127 0.025,-0.12737 0.038,-0.19105 l 1.7889,-1.31356 c 0.2004,-0.13577 0.2401,-0.45623 0.079,-0.63684 -0.076,-0.0955 -0.1958,-0.15526 -0.318,-0.15921 l -2.2264,0 c -0.042,0.0127 -0.081,0.0204 -0.1196,0.0395 -0.013,-0.042 -0.02,-0.0815 -0.039,-0.11973 l -0.6759,-2.14934 c -0.02,-0.0752 -0.062,-0.14546 -0.1196,-0.19908 -0.084,-0.0815 -0.2016,-0.1261 -0.318,-0.11973 l 0.014,1.3e-4 -6e-4,1e-5 z"
id="path5717"
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc" />
</g>
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc"
id="path5717-2"
d="m 336.37623,-23.985396 c -0.1681,0.0217 -0.3164,0.15386 -0.3579,0.31842 l -0.7155,2.14935 c -0.019,0.0382 -0.032,0.0777 -0.039,0.11973 -0.038,-0.0191 -0.078,-0.0318 -0.1196,-0.0395 l -2.1866,0 c -0.1222,0 -0.2415,0.0637 -0.3181,0.15921 -0.1612,0.18061 -0.1208,0.50107 0.079,0.63685 l 1.7891,1.31355 0.038,0.19106 -0.6757,2.10948 c -0.094,0.32925 0.3466,0.66015 0.6361,0.47763 l 1.7889,-1.31343 0.229,0 1.7891,1.31343 c 0.1556,0.1019 0.3785,0.0841 0.5167,-0.0395 0.1171,-0.10827 0.1659,-0.28518 0.1196,-0.4379 l -0.6759,-2.10948 c -0.064,-0.0127 0.025,-0.12737 0.038,-0.19105 l 1.7889,-1.31356 c 0.2004,-0.13577 0.2401,-0.45623 0.079,-0.63684 -0.076,-0.0955 -0.1958,-0.15526 -0.318,-0.15921 l -2.2264,0 c -0.042,0.0127 -0.081,0.0204 -0.1196,0.0395 -0.013,-0.042 -0.02,-0.0815 -0.039,-0.11973 l -0.6759,-2.14934 c -0.02,-0.0752 -0.062,-0.14546 -0.1196,-0.19908 -0.084,-0.0815 -0.2016,-0.1261 -0.318,-0.11973 l 0.014,1.3e-4 -6e-4,10e-6 z"
style="fill:none;stroke:#c66f11;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc"
id="path5717"
d="m 336.37623,-24.985396 c -0.1681,0.0217 -0.3164,0.15386 -0.3579,0.31842 l -0.7155,2.14935 c -0.019,0.0382 -0.032,0.0777 -0.039,0.11973 -0.038,-0.0191 -0.078,-0.0318 -0.1196,-0.0395 l -2.1866,0 c -0.1222,0 -0.2415,0.0637 -0.3181,0.15921 -0.1612,0.18061 -0.1208,0.50107 0.079,0.63685 l 1.7891,1.31355 0.038,0.19106 -0.6757,2.10948 c -0.094,0.32925 0.3466,0.66015 0.6361,0.47763 l 1.7889,-1.31343 0.229,0 1.7891,1.31343 c 0.1556,0.1019 0.3785,0.0841 0.5167,-0.0395 0.1171,-0.10827 0.1659,-0.28518 0.1196,-0.4379 l -0.6759,-2.10948 c -0.064,-0.0127 0.025,-0.12737 0.038,-0.19105 l 1.7889,-1.31356 c 0.2004,-0.13577 0.2401,-0.45623 0.079,-0.63684 -0.076,-0.0955 -0.1958,-0.15526 -0.318,-0.15921 l -2.2264,0 c -0.042,0.0127 -0.081,0.0204 -0.1196,0.0395 -0.013,-0.042 -0.02,-0.0815 -0.039,-0.11973 l -0.6759,-2.14934 c -0.02,-0.0752 -0.062,-0.14546 -0.1196,-0.19908 -0.084,-0.0815 -0.2016,-0.1261 -0.318,-0.11973 l 0.014,1.3e-4 -6e-4,10e-6 z"
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 361.96673,-24.985396 c -0.1681,0.0217 -0.3164,0.15386 -0.3579,0.31842 l -0.7155,2.14935 c -0.019,0.0382 -0.032,0.0777 -0.039,0.11973 -0.038,-0.0191 -0.078,-0.0318 -0.1196,-0.0395 l -2.1866,0 c -0.1222,0 -0.2415,0.0637 -0.3181,0.15921 -0.1612,0.18061 -0.1208,0.50107 0.079,0.63685 l 1.7891,1.31355 0.038,0.19106 -0.6757,2.10948 c -0.094,0.32925 0.3466,0.66015 0.6361,0.47763 l 1.7889,-1.31343 0.229,0 1.7891,1.31343 c 0.1556,0.1019 0.3785,0.0841 0.5167,-0.0395 0.1171,-0.10827 0.1659,-0.28518 0.1196,-0.4379 l -0.6759,-2.10948 c -0.064,-0.0127 0.025,-0.12737 0.038,-0.19105 l 1.7889,-1.31356 c 0.2004,-0.13577 0.2401,-0.45623 0.079,-0.63684 -0.076,-0.0955 -0.1958,-0.15526 -0.318,-0.15921 -0.77058,-0.02023 -1.35701,-0.05941 -2.10293,-0.02679 z"
id="path5179"
sodipodi:nodetypes="cccsccsccccccccsccccsccc"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle0.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<g
id="g5833-3"
style="display:inline;enable-background:new"
@ -3346,6 +3392,276 @@
d="m 1910.9687,824.95775 c -0.1681,0.0217 -0.3164,0.15386 -0.3579,0.31842 l -0.7155,2.14935 c -0.019,0.0382 -0.032,0.0777 -0.039,0.11973 -0.038,-0.0191 -0.078,-0.0318 -0.1196,-0.0395 l -2.1866,0 c -0.1222,0 -0.2415,0.0637 -0.3181,0.15921 -0.1612,0.18061 -0.1208,0.50107 0.079,0.63685 l 1.7891,1.31355 0.038,0.19106 -0.6757,2.10948 c -0.094,0.32925 0.3466,0.66015 0.6361,0.47763 l 1.7889,-1.31343 0.229,0 1.7891,1.31343 c 0.1556,0.1019 0.3785,0.0841 0.5167,-0.0395 0.1171,-0.10827 0.1659,-0.28518 0.1196,-0.4379 l -0.6759,-2.10948 c -0.064,-0.0127 0.025,-0.12737 0.038,-0.19105 l 1.7889,-1.31356 c 0.2004,-0.13577 0.2401,-0.45623 0.079,-0.63684 -0.076,-0.0955 -0.1958,-0.15526 -0.318,-0.15921 l -2.2264,0 c -0.042,0.0127 -0.081,0.0204 -0.1196,0.0395 -0.013,-0.042 -0.02,-0.0815 -0.039,-0.11973 l -0.6759,-2.14934 c -0.02,-0.0752 -0.062,-0.14546 -0.1196,-0.19908 -0.084,-0.0815 -0.2016,-0.1261 -0.318,-0.11973 l 0.014,1.3e-4 -6e-4,1e-5 z"
style="fill:none;stroke:#fde8d0;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
</g>
<g
style="display:inline;enable-background:new"
id="g5159"
transform="translate(-1548.6884,-835.09618)" />
<image
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle1.png"
style="opacity:0"
width="16"
height="16"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAB1JREFU
OI1jfK+p+Z+BAsBEieZRA0YNGDVgMBkAAGPfAmCG9D3bAAAAAElFTkSuQmCC
"
id="image6043"
x="374"
y="-31" />
<g
transform="translate(71,-250)"
id="g6045"
style="display:inline;enable-background:new"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle1.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<path
inkscape:connector-curvature="0"
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999964;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
d="m 305.53125,220.5 c -0.57203,0.064 -1.00351,0.54941 -1,1.125 l 0,10.34375 c 6e-5,0.62129 0.50371,1.12494 1.125,1.125 l 10.71875,0 c 0.62129,-6e-5 1.12494,-0.50371 1.125,-1.125 l 0,-8.3125 -0.0312,-1.125 -5.9375,0 -2.28125,-2.03125 -3.59375,0 c -0.0416,-0.002 -0.0834,-0.002 -0.125,0 z"
id="path6047"
sodipodi:nodetypes="ccccccccccccc" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc"
id="path6049"
d="m 309.78125,224.5 c -0.2554,0 -0.45965,0.13987 -0.59375,0.34375 -0.43264,0.54853 -1.12354,1.65625 -1.65625,1.65625 l -4.01072,0 -0.0205,5.59375 c 0,1.33756 0.65057,2.40625 1.46875,2.40625 l 12.0625,0 c 0.81819,0 1.46875,-1.06869 1.46875,-2.40625 l 0.0509,-7.59375 z"
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<path
inkscape:connector-curvature="0"
transform="matrix(0.06533091,0,0,0.2941173,301.14534,90.449312)"
sodipodi:nodetypes="csccsccsccscc"
id="path6051"
d="m 250.0625,476.75 c -0.0458,1.33554 -0.49131,2.35705 -1.21875,3.0625 -0.72744,0.70545 -1.76871,1.125 -3.1875,1.125 l -197.25,0 c -1.418904,0 -2.480488,-0.44927 -3.21875,-1.15625 -0.738262,-0.70698 -1.186879,-1.70494 -1.21875,-3.03125 l 0,3 c 0.03187,1.32631 0.480488,2.32427 1.21875,3.03125 0.738262,0.70698 1.799846,1.15625 3.21875,1.15625 l 197.25,0 c 1.41879,0 2.46006,-0.41955 3.1875,-1.125 0.72744,-0.70545 1.17291,-1.72696 1.21875,-3.0625 l 0,-3 z"
style="opacity:0.71595327;fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4375-3-0);enable-background:new" />
</g>
<path
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc"
id="path6053"
d="m 382.93859,-24.866208 c -0.16799,-0.02255 -0.34544,0.06673 -0.42812,0.214939 l -1.24741,1.890927 c -0.0282,0.03198 -0.051,0.06677 -0.0687,0.105557 -0.0318,-0.02829 -0.0671,-0.05091 -0.1053,-0.06911 l -2.11209,-0.565934 c -0.11804,-0.03163 -0.24976,-9.75e-4 -0.34847,0.07146 -0.20245,0.132734 -0.24637,0.452731 -0.0885,0.635596 l 1.38816,1.731845 -0.0127,0.194385 -1.19865,1.862717 c -0.17601,0.293703 0.16393,0.727363 0.49081,0.62599 l 2.06788,-0.805674 0.2212,0.05927 1.3882,1.731729 c 0.12392,0.138701 0.34383,0.179198 0.50931,0.09558 0.14114,-0.07427 0.23406,-0.232524 0.22886,-0.392024 l -0.10689,-2.212537 c -0.0585,-0.02883 0.0571,-0.116559 0.0861,-0.174705 l 2.06792,-0.8058 c 0.22871,-0.07928 0.35,-0.378542 0.24113,-0.594694 -0.0487,-0.111916 -0.14894,-0.200646 -0.26595,-0.236089 l -2.15054,-0.576235 c -0.0439,0.0014 -0.0835,-0.0013 -0.12575,0.0072 -0.002,-0.04393 0.002,-0.0839 -0.007,-0.125744 l -0.0966,-2.251039 c 1.4e-4,-0.07781 -0.0222,-0.15655 -0.064,-0.223251 -0.06,-0.100464 -0.16209,-0.173981 -0.27618,-0.197955 l 0.0135,0.0037 -5.8e-4,-1.45e-4 z"
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
inkscape:connector-curvature="0"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle1.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<image
y="-31"
x="394"
id="image6055"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAB1JREFU
OI1jfK+p+Z+BAsBEieZRA0YNGDVgMBkAAGPfAmCG9D3bAAAAAElFTkSuQmCC
"
height="16"
width="16"
style="opacity:0"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle2.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<g
style="display:inline;enable-background:new"
id="g6057"
transform="translate(91,-250)"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle2.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<path
sodipodi:nodetypes="ccccccccccccc"
id="path6059"
d="m 305.53125,220.5 c -0.57203,0.064 -1.00351,0.54941 -1,1.125 l 0,10.34375 c 6e-5,0.62129 0.50371,1.12494 1.125,1.125 l 10.71875,0 c 0.62129,-6e-5 1.12494,-0.50371 1.125,-1.125 l 0,-8.3125 -0.0312,-1.125 -5.9375,0 -2.28125,-2.03125 -3.59375,0 c -0.0416,-0.002 -0.0834,-0.002 -0.125,0 z"
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999964;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
inkscape:connector-curvature="0" />
<path
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 309.78125,224.5 c -0.2554,0 -0.45965,0.13987 -0.59375,0.34375 -0.43264,0.54853 -1.12354,1.65625 -1.65625,1.65625 l -4.01072,0 -0.0205,5.59375 c 0,1.33756 0.65057,2.40625 1.46875,2.40625 l 12.0625,0 c 0.81819,0 1.46875,-1.06869 1.46875,-2.40625 l 0.0509,-7.59375 z"
id="path6061"
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0" />
<path
style="opacity:0.71595327;fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4375-3-0);enable-background:new"
d="m 250.0625,476.75 c -0.0458,1.33554 -0.49131,2.35705 -1.21875,3.0625 -0.72744,0.70545 -1.76871,1.125 -3.1875,1.125 l -197.25,0 c -1.418904,0 -2.480488,-0.44927 -3.21875,-1.15625 -0.738262,-0.70698 -1.186879,-1.70494 -1.21875,-3.03125 l 0,3 c 0.03187,1.32631 0.480488,2.32427 1.21875,3.03125 0.738262,0.70698 1.799846,1.15625 3.21875,1.15625 l 197.25,0 c 1.41879,0 2.46006,-0.41955 3.1875,-1.125 0.72744,-0.70545 1.17291,-1.72696 1.21875,-3.0625 l 0,-3 z"
id="path6063"
sodipodi:nodetypes="csccsccsccscc"
transform="matrix(0.06533091,0,0,0.2941173,301.14534,90.449312)"
inkscape:connector-curvature="0" />
</g>
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 403.92521,-24.541362 c -0.15643,-0.06526 -0.35094,-0.02495 -0.46916,0.09681 l -1.69431,1.503642 c -0.0355,0.02359 -0.0665,0.05129 -0.0937,0.08418 -0.0234,-0.03556 -0.0516,-0.06654 -0.0838,-0.09401 l -1.89365,-1.093299 c -0.10583,-0.0611 -0.24099,-0.06558 -0.35509,-0.02117 -0.2299,0.07581 -0.35515,0.37354 -0.24999,0.591034 l 0.89263,2.032116 -0.0626,0.184474 -1.63991,1.489013 c -0.24603,0.238141 -0.0299,0.745007 0.31206,0.731691 l 2.20595,-0.243015 0.19832,0.114502 0.89269,2.032014 c 0.0838,0.166048 0.28574,0.262082 0.46722,0.224142 0.15555,-0.03521 0.28627,-0.164021 0.32253,-0.319432 l 0.4694,-2.164812 c -0.049,-0.04299 0.0853,-0.09781 0.12838,-0.146468 l 2.20601,-0.243126 c 0.24144,-0.01738 0.43605,-0.275057 0.38683,-0.512021 -0.0181,-0.120707 -0.0919,-0.232358 -0.19578,-0.296878 l -1.92812,-1.113201 c -0.0428,-0.01001 -0.0803,-0.02287 -0.12333,-0.02559 0.009,-0.04295 0.0237,-0.08052 0.0258,-0.123272 l 0.48931,-2.199338 c 0.0203,-0.07512 0.0191,-0.156962 -0.004,-0.232208 -0.0319,-0.11257 -0.11154,-0.210005 -0.21554,-0.262691 l 0.0121,0.0071 -5.3e-4,-2.9e-4 z"
id="path6065"
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle2.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<image
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle3.png"
style="opacity:0"
width="16"
height="16"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAB1JREFU
OI1jfK+p+Z+BAsBEieZRA0YNGDVgMBkAAGPfAmCG9D3bAAAAAElFTkSuQmCC
"
id="image6067"
x="414"
y="-31" />
<g
transform="translate(111,-250)"
id="g6069"
style="display:inline;enable-background:new"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle3.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<path
inkscape:connector-curvature="0"
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999964;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
d="m 305.53125,220.5 c -0.57203,0.064 -1.00351,0.54941 -1,1.125 l 0,10.34375 c 6e-5,0.62129 0.50371,1.12494 1.125,1.125 l 10.71875,0 c 0.62129,-6e-5 1.12494,-0.50371 1.125,-1.125 l 0,-8.3125 -0.0312,-1.125 -5.9375,0 -2.28125,-2.03125 -3.59375,0 c -0.0416,-0.002 -0.0834,-0.002 -0.125,0 z"
id="path6071"
sodipodi:nodetypes="ccccccccccccc" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc"
id="path6073"
d="m 309.78125,224.5 c -0.2554,0 -0.45965,0.13987 -0.59375,0.34375 -0.43264,0.54853 -1.12354,1.65625 -1.65625,1.65625 l -4.01072,0 -0.0205,5.59375 c 0,1.33756 0.65057,2.40625 1.46875,2.40625 l 12.0625,0 c 0.81819,0 1.46875,-1.06869 1.46875,-2.40625 l 0.0509,-7.59375 z"
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<path
inkscape:connector-curvature="0"
transform="matrix(0.06533091,0,0,0.2941173,301.14534,90.449312)"
sodipodi:nodetypes="csccsccsccscc"
id="path6075"
d="m 250.0625,476.75 c -0.0458,1.33554 -0.49131,2.35705 -1.21875,3.0625 -0.72744,0.70545 -1.76871,1.125 -3.1875,1.125 l -197.25,0 c -1.418904,0 -2.480488,-0.44927 -3.21875,-1.15625 -0.738262,-0.70698 -1.186879,-1.70494 -1.21875,-3.03125 l 0,3 c 0.03187,1.32631 0.480488,2.32427 1.21875,3.03125 0.738262,0.70698 1.799846,1.15625 3.21875,1.15625 l 197.25,0 c 1.41879,0 2.46006,-0.41955 3.1875,-1.125 0.72744,-0.70545 1.17291,-1.72696 1.21875,-3.0625 l 0,-3 z"
style="opacity:0.71595327;fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4375-3-0);enable-background:new" />
</g>
<path
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc"
id="path6077"
d="m 424.84506,-23.918951 c -0.13421,-0.103524 -0.33252,-0.11493 -0.47823,-0.02792 l -2.02575,1.013887 c -0.0404,0.0136 -0.0775,0.03233 -0.11229,0.05706 -0.0134,-0.0404 -0.0326,-0.07763 -0.0566,-0.112496 l -1.54616,-1.546158 c -0.0864,-0.08641 -0.2158,-0.125719 -0.33751,-0.112353 -0.24168,0.01372 -0.43972,0.268892 -0.39444,0.506193 l 0.33626,2.193903 -0.10821,0.161986 -1.96941,1.013836 c -0.29929,0.166349 -0.22171,0.711883 0.11205,0.787526 l 2.19368,0.336208 0.16193,0.161929 0.33634,2.19382 c 0.038,0.182079 0.20818,0.327107 0.39329,0.33743 0.15936,0.0062 0.31897,-0.08434 0.39422,-0.225071 l 1.0137,-1.969558 c -0.0362,-0.05421 0.1077,-0.0724 0.16191,-0.10825 l 2.19377,0.336116 c 0.23771,0.0457 0.49238,-0.152827 0.50617,-0.394455 0.0138,-0.121279 -0.0286,-0.248227 -0.11227,-0.337434 l -1.57431,-1.574304 c -0.0387,-0.02075 -0.0716,-0.04287 -0.1125,-0.05664 0.0198,-0.03916 0.0437,-0.07164 0.0568,-0.112394 l 1.04186,-1.997755 c 0.039,-0.06731 0.0591,-0.14667 0.0562,-0.225331 -0.002,-0.11699 -0.0534,-0.231718 -0.14021,-0.309526 l 0.01,0.01 -4.3e-4,-4.17e-4 z"
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
inkscape:connector-curvature="0"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle3.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<image
y="-31"
x="434"
id="image6079"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAB1JREFU
OI1jfK+p+Z+BAsBEieZRA0YNGDVgMBkAAGPfAmCG9D3bAAAAAElFTkSuQmCC
"
height="16"
width="16"
style="opacity:0"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle4.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<g
style="display:inline;enable-background:new"
id="g6081"
transform="translate(131,-250)"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle4.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<path
sodipodi:nodetypes="ccccccccccccc"
id="path6083"
d="m 305.53125,220.5 c -0.57203,0.064 -1.00351,0.54941 -1,1.125 l 0,10.34375 c 6e-5,0.62129 0.50371,1.12494 1.125,1.125 l 10.71875,0 c 0.62129,-6e-5 1.12494,-0.50371 1.125,-1.125 l 0,-8.3125 -0.0312,-1.125 -5.9375,0 -2.28125,-2.03125 -3.59375,0 c -0.0416,-0.002 -0.0834,-0.002 -0.125,0 z"
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999964;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
inkscape:connector-curvature="0" />
<path
style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 309.78125,224.5 c -0.2554,0 -0.45965,0.13987 -0.59375,0.34375 -0.43264,0.54853 -1.12354,1.65625 -1.65625,1.65625 l -4.01072,0 -0.0205,5.59375 c 0,1.33756 0.65057,2.40625 1.46875,2.40625 l 12.0625,0 c 0.81819,0 1.46875,-1.06869 1.46875,-2.40625 l 0.0509,-7.59375 z"
id="path6085"
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0" />
<path
style="opacity:0.71595327;fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter4375-3-0);enable-background:new"
d="m 250.0625,476.75 c -0.0458,1.33554 -0.49131,2.35705 -1.21875,3.0625 -0.72744,0.70545 -1.76871,1.125 -3.1875,1.125 l -197.25,0 c -1.418904,0 -2.480488,-0.44927 -3.21875,-1.15625 -0.738262,-0.70698 -1.186879,-1.70494 -1.21875,-3.03125 l 0,3 c 0.03187,1.32631 0.480488,2.32427 1.21875,3.03125 0.738262,0.70698 1.799846,1.15625 3.21875,1.15625 l 197.25,0 c 1.41879,0 2.46006,-0.41955 3.1875,-1.125 0.72744,-0.70545 1.17291,-1.72696 1.21875,-3.0625 l 0,-3 z"
id="path6087"
sodipodi:nodetypes="csccsccsccscc"
transform="matrix(0.06533091,0,0,0.2941173,301.14534,90.449312)"
inkscape:connector-curvature="0" />
</g>
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 445.54792,-23.023114 c -0.10284,-0.134733 -0.29144,-0.197076 -0.4547,-0.150744 l -2.21914,0.455037 c -0.0426,0.0027 -0.0832,0.01117 -0.12323,0.02605 -0.002,-0.04249 -0.0114,-0.08342 -0.0256,-0.123312 l -1.0933,-1.893649 c -0.0611,-0.105828 -0.17591,-0.177289 -0.29693,-0.195879 -0.237,-0.0493 -0.49433,0.145922 -0.51201,0.386856 l -0.24302,2.206178 -0.14645,0.12846 -2.16471,0.46957 c -0.33214,0.08322 -0.3984,0.630243 -0.0956,0.789692 l 2.03191,0.892518 0.11451,0.198322 -0.24293,2.206119 c -0.0104,0.18571 0.11643,0.369842 0.29256,0.427723 0.15232,0.04723 0.32993,0.0011 0.43904,-0.11537 l 1.48892,-1.640082 c -0.0209,-0.06173 0.12277,-0.04206 0.18441,-0.06266 l 2.03202,0.892452 c 0.21778,0.105667 0.51516,-0.02018 0.59102,-0.250008 0.0447,-0.113574 0.0366,-0.247171 -0.0211,-0.354993 l -1.11321,-1.928123 c -0.032,-0.03006 -0.0581,-0.05994 -0.094,-0.08383 0.0293,-0.0327 0.0608,-0.05789 0.084,-0.09386 l 1.52341,-1.66003 c 0.0551,-0.05492 0.095,-0.126376 0.11261,-0.203108 0.0283,-0.113521 0.008,-0.237643 -0.0553,-0.335268 l 0.007,0.01225 -3.1e-4,-5.14e-4 z"
id="path6089"
sodipodi:nodetypes="cccsccsccccccccsccccsccsccscc"
inkscape:export-filename="/Users/hbons/Code/SparkleShare/SparkleShare/Mac/SparkleShare/idle4.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<rect
style="fill:#fef0f0;fill-opacity:1;stroke:none"
id="rect6091"
width="3"
height="1"
x="363"
y="-23" />
<rect
y="-23"
x="358"
height="1"
width="3"
id="rect6093"
style="fill:#fef0f0;fill-opacity:1;stroke:none" />
<rect
y="-24"
x="361"
height="1"
width="2"
id="rect6095"
style="fill:#fef0f0;fill-opacity:1;stroke:none" />
<rect
y="-21"
x="364"
height="1"
width="1"
id="rect6099"
style="fill:#fef0f0;fill-opacity:1;stroke:none" />
<rect
style="fill:#fef0f0;fill-opacity:1;stroke:none"
id="rect6101"
width="1"
height="1"
x="359"
y="-21" />
<rect
style="fill:#fef0f0;fill-opacity:1;stroke:none"
id="rect6103"
width="2"
height="1"
x="361"
y="-19" />
<rect
y="-18"
x="364"
height="1"
width="1"
id="rect6105"
style="fill:#fef0f0;fill-opacity:1;stroke:none" />
<rect
style="fill:#fef0f0;fill-opacity:1;stroke:none"
id="rect6107"
width="1"
height="1"
x="359"
y="-18" />
<rect
style="fill:#fef0f0;fill-opacity:1;stroke:none"
id="rect6109"
width="1"
height="1"
x="365"
y="-22" />
<rect
y="-22"
x="358"
height="1"
width="1"
id="rect6111"
style="fill:#fef0f0;fill-opacity:1;stroke:none" />
</g>
<g
style="display:inline"

Before

Width:  |  Height:  |  Size: 877 KiB

After

Width:  |  Height:  |  Size: 902 KiB