diff --git a/SparkleShare/Mac/SparkleShare/AppDelegate.cs b/SparkleShare/Mac/SparkleShare/AppDelegate.cs
index 77d455bd..e69de29b 100644
--- a/SparkleShare/Mac/SparkleShare/AppDelegate.cs
+++ b/SparkleShare/Mac/SparkleShare/AppDelegate.cs
@@ -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;
-
- }
- }
-}
-
diff --git a/SparkleShare/Mac/SparkleShare/Info.plist b/SparkleShare/Mac/SparkleShare/Info.plist
index 16ec0ef3..f2caa9e3 100644
--- a/SparkleShare/Mac/SparkleShare/Info.plist
+++ b/SparkleShare/Mac/SparkleShare/Info.plist
@@ -8,7 +8,7 @@
/opt/local/bin
CFBundleIdentifier
- com.yourcompany.SparkleShare
+ org.sparkleshare.sparkleshare
CFBundleName
SparkleShare
CFBundleVersion
@@ -19,5 +19,7 @@
MainMenu
NSPrincipalClass
NSApplication
+ LSBackgroundOnly
+
diff --git a/SparkleShare/Mac/SparkleShare/Main.cs b/SparkleShare/Mac/SparkleShare/Main.cs
index f54dc597..abdc2be4 100644
--- a/SparkleShare/Mac/SparkleShare/Main.cs
+++ b/SparkleShare/Mac/SparkleShare/Main.cs
@@ -14,5 +14,153 @@ namespace SparkleShare
NSApplication.Main (args);
}
}
+
+
+ [MonoMac.Foundation.Register("AppDelegate")]
+ 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;
+
+ }
+ }
+
}
diff --git a/SparkleShare/Mac/SparkleShare/MainMenu.xib.designer.cs b/SparkleShare/Mac/SparkleShare/MainMenu.xib.designer.cs
index 01952cd1..93a0d735 100644
--- a/SparkleShare/Mac/SparkleShare/MainMenu.xib.designer.cs
+++ b/SparkleShare/Mac/SparkleShare/MainMenu.xib.designer.cs
@@ -10,9 +10,4 @@
namespace SparkleShare {
-
- // Should subclass MonoMac.AppKit.NSResponder
- [MonoMac.Foundation.Register("AppDelegate")]
- public partial class AppDelegate {
- }
}
diff --git a/SparkleShare/Mac/SparkleShare/SparkleShare.csproj b/SparkleShare/Mac/SparkleShare/SparkleShare.csproj
index 8387f87f..3780b5b2 100644
--- a/SparkleShare/Mac/SparkleShare/SparkleShare.csproj
+++ b/SparkleShare/Mac/SparkleShare/SparkleShare.csproj
@@ -46,25 +46,12 @@
-
- MainWindow.xib
-
-
- MainWindow.xib
-
-
- MainWindow.xib
-
-
- MainMenu.xib
-
MainMenu.xib
-