diff --git a/SparkleShare/Common/Pixmaps/Sources/tutorial-slides.svg b/SparkleShare/Common/Pixmaps/Sources/tutorial-slides.svg
index c0885a4e..faec2900 100644
--- a/SparkleShare/Common/Pixmaps/Sources/tutorial-slides.svg
+++ b/SparkleShare/Common/Pixmaps/Sources/tutorial-slides.svg
@@ -27,7 +27,7 @@
image/svg+xml
-
+
@@ -168,472 +168,6 @@
fx="175.71603"
fy="188.90077"
r="174.30182" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2637,9 +2171,9 @@
xlink:href="#linearGradient215490"
id="radialGradient215496"
cx="716.86841"
- cy="98.250001"
+ cy="98.25"
fx="716.86841"
- fy="98.250001"
+ fy="98.25"
r="21.63158"
gradientTransform="matrix(1,0,0,0.8321167,-150,14.494534)"
gradientUnits="userSpaceOnUse" />
@@ -2649,7 +2183,8 @@
x="-0.13660859"
width="1.2732172"
y="-0.16495746"
- height="1.3299149">
+ height="1.3299149"
+ color-interpolation-filters="sRGB">
+ r="38.686306" />
+ transform="translate(-598.47981,950.82807)">
+ transform="matrix(0.27604322,0,0,0.27604322,448.49529,-42.824795)" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ inkscape:export-xdpi="180"
+ inkscape:export-ydpi="180"
+ inkscape:export-filename="/Users/hbons/Projects/SparkleShare/SparkleShare/Common/Pixmaps/tutorial-slide-1@2x.png" />
+ style="display:inline"
+ transform="translate(0.5,-0.5)">
PerformClose (this));
};
@@ -120,16 +83,13 @@ namespace SparkleShare {
private void CreateAbout ()
{
string about_image_path = Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "about.png");
-
- this.about_image = new NSImage (about_image_path);
- this.about_image.Size = new SizeF (640, 260);
+ this.about_image = new NSImage (about_image_path) { Size = new SizeF (640, 260) };
this.about_image_view = new NSImageView () {
Image = this.about_image,
Frame = new RectangleF (0, 0, 640, 260)
};
-
this.version_text_field = new NSTextField () {
StringValue = "version " + Controller.RunningVersion,
Frame = new RectangleF (295, 140, 318, 22),
@@ -138,8 +98,8 @@ namespace SparkleShare {
Editable = false,
DrawsBackground = false,
TextColor = NSColor.White,
- Font = NSFontManager.SharedFontManager.FontWithFamily
- ("Lucida Grande", NSFontTraitMask.Unbold, 0, 11)
+ Font = NSFontManager.SharedFontManager.FontWithFamily (
+ "Lucida Grande", NSFontTraitMask.Unbold, 0, 11)
};
this.updates_text_field = new NSTextField () {
@@ -148,9 +108,9 @@ namespace SparkleShare {
Bordered = false,
Editable = false,
DrawsBackground = false,
- Font = NSFontManager.SharedFontManager.FontWithFamily
- ("Lucida Grande", NSFontTraitMask.Unbold, 0, 11),
- TextColor = NSColor.FromCalibratedRgba (0.45f, 0.62f, 0.81f, 1.0f) // Tango Sky Blue #1
+ TextColor = NSColor.FromCalibratedRgba (1.0f, 1.0f, 1.0f, 0.5f),
+ Font = NSFontManager.SharedFontManager.FontWithFamily (
+ "Lucida Grande", NSFontTraitMask.Unbold, 0, 11)
};
this.credits_text_field = new NSTextField () {
@@ -168,10 +128,45 @@ namespace SparkleShare {
"Lucida Grande", NSFontTraitMask.Unbold, 0, 11),
};
+ this.website_link = new SparkleLink ("Website", Controller.WebsiteLinkAddress);
+ this.website_link.Frame = new RectangleF (new PointF (295, 25), this.website_link.Frame.Size);
+
+ this.credits_link = new SparkleLink ("Credits", Controller.CreditsLinkAddress);
+ this.credits_link.Frame = new RectangleF (
+ new PointF (this.website_link.Frame.X + this.website_link.Frame.Width + 10, 25),
+ this.credits_link.Frame.Size);
+
+ this.report_problem_link = new SparkleLink ("Report a problem", Controller.ReportProblemLinkAddress);
+ this.report_problem_link.Frame = new RectangleF (
+ new PointF (this.credits_link.Frame.X + this.credits_link.Frame.Width + 10, 25),
+ this.report_problem_link.Frame.Size);
+
+ this.debug_log_link = new SparkleLink ("Debug log", Controller.DebugLogLinkAddress);
+ this.debug_log_link.Frame = new RectangleF (
+ new PointF (this.report_problem_link.Frame.X + this.report_problem_link.Frame.Width + 10, 25),
+ this.debug_log_link.Frame.Size);
+
+ this.hidden_close_button = new NSButton () {
+ Frame = new RectangleF (0, 0, 0, 0),
+ KeyEquivalentModifierMask = NSEventModifierMask.CommandKeyMask,
+ KeyEquivalent = "w"
+ };
+
+
+ this.hidden_close_button.Activated += delegate {
+ Controller.WindowClosed ();
+ };
+
+
+ ContentView.AddSubview (this.hidden_close_button);
ContentView.AddSubview (this.about_image_view);
ContentView.AddSubview (this.version_text_field);
ContentView.AddSubview (this.updates_text_field);
ContentView.AddSubview (this.credits_text_field);
+ ContentView.AddSubview (this.website_link);
+ ContentView.AddSubview (this.credits_link);
+ ContentView.AddSubview (this.report_problem_link);
+ ContentView.AddSubview (this.debug_log_link);
}
@@ -235,7 +230,6 @@ namespace SparkleShare {
s.Append (name_attributes);
Cell.AttributedStringValue = s;
-
SizeToFit ();
}
diff --git a/SparkleShare/Mac/SparkleController.cs b/SparkleShare/Mac/SparkleController.cs
index 3fc3a319..7e55d06e 100755
--- a/SparkleShare/Mac/SparkleController.cs
+++ b/SparkleShare/Mac/SparkleController.cs
@@ -22,7 +22,6 @@ using System.Threading;
using MonoMac.Foundation;
using MonoMac.AppKit;
-using MonoMac.ObjCRuntime;
using SparkleLib;
@@ -93,56 +92,9 @@ namespace SparkleShare {
}
- // Adds the SparkleShare folder to the user's
- // list of bookmarked places
public override void AddToBookmarks ()
- {/*
- NSMutableDictionary sidebar_plist = NSMutableDictionary.FromDictionary (
- NSUserDefaults.StandardUserDefaults.PersistentDomainForName ("com.apple.sidebarlists"));
-
- // Go through the sidebar categories
- foreach (NSString sidebar_category in sidebar_plist.Keys) {
-
- // Find the favorites
- if (sidebar_category.ToString ().Equals ("favorites")) {
-
- // Get the favorites
- NSMutableDictionary favorites = NSMutableDictionary.FromDictionary(
- (NSDictionary) sidebar_plist.ValueForKey (sidebar_category));
-
- // Go through the favorites
- foreach (NSString favorite in favorites.Keys) {
-
- // Find the custom favorites
- if (favorite.ToString ().Equals ("VolumesList")) {
-
- // Get the custom favorites
- NSMutableArray custom_favorites = (NSMutableArray) favorites.ValueForKey (favorite);
-
- NSMutableDictionary properties = new NSMutableDictionary ();
- properties.SetValueForKey (new NSString ("1935819892"), new NSString ("com.apple.LSSharedFileList.TemplateSystemSelector"));
-
- NSMutableDictionary new_favorite = new NSMutableDictionary ();
- new_favorite.SetValueForKey (new NSString ("SparkleShare"), new NSString ("Name"));
-
- new_favorite.SetValueForKey (NSData.FromString ("ImgR SYSL fldr"), new NSString ("Icon"));
-
- new_favorite.SetValueForKey (NSData.FromString (SparkleConfig.DefaultConfig.FoldersPath),
- new NSString ("Alias"));
-
- new_favorite.SetValueForKey (properties, new NSString ("CustomItemProperties"));
-
- // Add to the favorites
- custom_favorites.Add (new_favorite);
- favorites.SetValueForKey ((NSArray) custom_favorites, new NSString (favorite.ToString ()));
- sidebar_plist.SetValueForKey (favorites, new NSString (sidebar_category.ToString ()));
- }
- }
-
- }
- }
-
- NSUserDefaults.StandardUserDefaults.SetPersistentDomain (sidebar_plist, "com.apple.sidebarlists");*/
+ {
+ // TODO
}
@@ -157,7 +109,6 @@ namespace SparkleShare {
Program.Controller.FoldersPath, 0);
return true;
-
}
return false;
diff --git a/SparkleShare/Mac/SparkleEventLog.cs b/SparkleShare/Mac/SparkleEventLog.cs
index 04dac347..6393c1c9 100755
--- a/SparkleShare/Mac/SparkleEventLog.cs
+++ b/SparkleShare/Mac/SparkleEventLog.cs
@@ -376,15 +376,12 @@ namespace SparkleShare {
public class SparkleEventsDelegate : NSWindowDelegate {
- public event WindowResizedHandler WindowResized;
+ public event WindowResizedHandler WindowResized = delegate { };
public delegate void WindowResizedHandler (SizeF new_window_size);
-
public override SizeF WillResize (NSWindow sender, SizeF to_frame_size)
{
- if (WindowResized != null)
- WindowResized (to_frame_size);
-
+ WindowResized (to_frame_size);
return to_frame_size;
}
@@ -398,15 +395,13 @@ namespace SparkleShare {
public class SparkleWebPolicyDelegate : WebPolicyDelegate {
- public event LinkClickedHandler LinkClicked;
+ public event LinkClickedHandler LinkClicked = delegate { };
public delegate void LinkClickedHandler (string href);
-
public override void DecidePolicyForNavigation (WebView web_view, NSDictionary action_info,
NSUrlRequest request, WebFrame frame, NSObject decision_token)
{
- if (LinkClicked != null)
- LinkClicked (request.Url.ToString ());
+ LinkClicked (request.Url.ToString ());
}
}
}
diff --git a/SparkleShare/Mac/SparkleSetup.cs b/SparkleShare/Mac/SparkleSetup.cs
index 8f9a9e23..f5a8a6b7 100755
--- a/SparkleShare/Mac/SparkleSetup.cs
+++ b/SparkleShare/Mac/SparkleSetup.cs
@@ -957,9 +957,8 @@ namespace SparkleShare {
[Register("SparkleDataSource")]
public class SparkleDataSource : NSTableViewDataSource {
- public List