diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs
index 4c600e26..4755cccc 100644
--- a/SparkleLib/Git/SparkleRepoGit.cs
+++ b/SparkleLib/Git/SparkleRepoGit.cs
@@ -737,6 +737,7 @@ namespace SparkleLib.Git {
!path.Equals (LocalPath)) {
File.Create (Path.Combine (path, ".empty")).Close ();
+ File.SetAttributes (Path.Combine (path, ".empty"), FileAttributes.Hidden);
}
}
diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs
index 6fac69aa..f66a8b15 100644
--- a/SparkleShare/SparkleControllerBase.cs
+++ b/SparkleShare/SparkleControllerBase.cs
@@ -990,7 +990,8 @@ namespace SparkleShare {
string tmp_path = SparkleConfig.DefaultConfig.TmpPath;
if (!Directory.Exists (tmp_path)) {
Directory.CreateDirectory (tmp_path);
- File.SetAttributes (tmp_path, File.GetAttributes (tmp_path) | FileAttributes.Hidden);
+
+ File.SetAttributes (tmp_path, FileAttributes.Directory | FileAttributes.Hidden);
}
diff --git a/SparkleShare/Windows/SparkleAbout.cs b/SparkleShare/Windows/SparkleAbout.cs
index 05799377..35c2439e 100644
--- a/SparkleShare/Windows/SparkleAbout.cs
+++ b/SparkleShare/Windows/SparkleAbout.cs
@@ -96,15 +96,11 @@ namespace SparkleShare {
Height = 260
};
- BitmapImage bitmap_image = new BitmapImage();
-
- bitmap_image.BeginInit();
- // TODO: get relative reference to the image
- bitmap_image.UriSource = new Uri(@"C:\Users\Hylke\Code\SparkleShare\data\about.png");
- bitmap_image.DecodePixelWidth = 640;
- bitmap_image.EndInit();
-
- image.Source = bitmap_image;
+ image.Source =
+ System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
+ Icons.about.GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty,
+ BitmapSizeOptions.FromWidthAndHeight(640, 260));
+
Label version = new Label () {
diff --git a/SparkleShare/Windows/SparkleSetupWindow.cs b/SparkleShare/Windows/SparkleSetupWindow.cs
index a5291523..d80e1e7a 100644
--- a/SparkleShare/Windows/SparkleSetupWindow.cs
+++ b/SparkleShare/Windows/SparkleSetupWindow.cs
@@ -26,6 +26,8 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
+using System.Reflection;
+
namespace SparkleShare {
public class SparkleSetupWindow : Window {
@@ -37,6 +39,7 @@ namespace SparkleShare {
private Image side_splash;
private Rectangle bar;
+
private Rectangle line;
@@ -70,18 +73,25 @@ namespace SparkleShare {
Width = 150,
Height = 482
};
+ System.Reflection.Assembly thisExe;
+thisExe = System.Reflection.Assembly.GetExecutingAssembly();
+string [] resources = thisExe.GetManifestResourceNames();
+string list = "";
+
+// Build the string of resources.
+foreach (string resource in resources)
+ list += resource + "\r\n";
+ MessageBox.Show (list);
- BitmapImage bitmap_image = new BitmapImage();
+;
+Assembly thisassembly = Assembly.GetExecutingAssembly();
+System.IO.Stream imageStream= thisassembly.GetManifestResourceStream("SparkleShare.Pixmaps.side-splash.png");
+BitmapFrame bmp= BitmapFrame.Create(imageStream);
+
- bitmap_image.BeginInit ();
- bitmap_image.DecodePixelWidth = 150;
+ this.side_splash.Source = bmp;
- bitmap_image.UriSource =
- new Uri (@"C:\Users\Hylke\Code\SparkleShare\data\side-splash.png");
- bitmap_image.EndInit ();
- this.side_splash.Source = bitmap_image;
-
ContentCanvas.Children.Add (this.bar);
Canvas.SetRight (bar, 0);
diff --git a/SparkleShare/Windows/SparkleShare.csproj b/SparkleShare/Windows/SparkleShare.csproj
index 4f557070..f3e1353d 100644
--- a/SparkleShare/Windows/SparkleShare.csproj
+++ b/SparkleShare/Windows/SparkleShare.csproj
@@ -213,6 +213,9 @@
SparkleSetup.cs
Designer
+
+ Pixmaps\side-splash.png
+
@@ -387,4 +390,8 @@
+
+
+
+
diff --git a/SparkleShare/Windows/SparkleStatusIcon.cs b/SparkleShare/Windows/SparkleStatusIcon.cs
index 01704cfe..78996657 100644
--- a/SparkleShare/Windows/SparkleStatusIcon.cs
+++ b/SparkleShare/Windows/SparkleStatusIcon.cs
@@ -40,7 +40,7 @@ namespace SparkleShare {
private WinForms.NotifyIcon notify_icon = new WinForms.NotifyIcon () {
Text = "SparkleShare",
- Icon = Icons.sparkleshare,
+
Visible = true
};
@@ -55,6 +55,7 @@ namespace SparkleShare {
public SparkleStatusIcon ()
{
+ notify_icon.Icon = Icon.FromHandle(Icons.document_added_12.GetHicon());
AnimationFrames = CreateAnimationFrames ();
Animation = CreateAnimation ();
@@ -162,9 +163,17 @@ namespace SparkleShare {
IsEnabled = false
};
+ System.Windows.Controls.Image i = new System.Windows.Controls.Image();
+ i.Source =
+ System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
+ Icons.folder_sparkleshare_16.GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty,
+ System.Windows.Media.Imaging.BitmapSizeOptions.FromWidthAndHeight(16, 16));
+
+
MenuItem folder_item = new MenuItem () {
Header = " SparkleShare"//,
- //Icon = Icons.sparkleshare
+ ,Icon = i
+
};
folder_item.Click += delegate {
@@ -230,6 +239,14 @@ namespace SparkleShare {
};
subfolder_item.Click += OpenFolderDelegate (folder_name);
+
+ System.Windows.Controls.Image i2 = new System.Windows.Controls.Image();
+ i2.Source =
+ System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
+ Icons.sparkleshare_windows_status.GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty,
+ System.Windows.Media.Imaging.BitmapSizeOptions.FromWidthAndHeight(16, 16));
+
+ subfolder_item.Icon = i2;
/*
if (Program.Controller.UnsyncedFolders.Contains (folder_name))
subfolder_item.Icon = Icons.dialog_error_16;
@@ -295,7 +312,7 @@ namespace SparkleShare {
StateText = _(" Welcome to SparkleShare!");
Dispatcher.Invoke ((Action)delegate {
- this.notify_icon.Icon = GetIconFromBitmap (AnimationFrames [0]);
+ this.notify_icon.Icon = GetIconFromBitmap (Icons.sparkleshare_windows_status);
});
} else {
@@ -308,7 +325,7 @@ namespace SparkleShare {
} else {
StateText = _(" Files up to date") + Controller.FolderSize;
Dispatcher.Invoke ((Action)delegate {
- this.notify_icon.Icon = GetIconFromBitmap (AnimationFrames [0]);
+ this.notify_icon.Icon = GetIconFromBitmap (Icons.sparkleshare_windows_status);
});
}
}
@@ -324,7 +341,7 @@ namespace SparkleShare {
// The state when animating
private void SetAnimationState ()
{
- StateText = _("Syncing…");
+ StateText = _(" Syncing…");
if (!Animation.Enabled)
Animation.Start ();
diff --git a/data/tutorial-slide-1-windows.png b/data/tutorial-slide-1-windows.png
new file mode 100644
index 00000000..8d51fee8
Binary files /dev/null and b/data/tutorial-slide-1-windows.png differ
diff --git a/data/tutorial-slide-3-windows.png b/data/tutorial-slide-3-windows.png
new file mode 100644
index 00000000..025a9fe8
Binary files /dev/null and b/data/tutorial-slide-3-windows.png differ