Add SparkleAbout to .csproj

This commit is contained in:
Hylke Bons 2011-03-08 23:55:21 +00:00
parent a13d6a996c
commit 5d8717d354
5 changed files with 57 additions and 36 deletions

View file

@ -15,11 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using GitSharp;
using GitSharp.Commands;
using GitSharp.Core.Transport;
using Meebey.SmartIrc4net;
using Mono.Unix;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -27,6 +22,12 @@ using System.IO;
using System.Text.RegularExpressions;
using System.Timers;
using GitSharp;
using GitSharp.Commands;
using GitSharp.Core.Transport;
using Meebey.SmartIrc4net;
using Mono.Unix;
namespace SparkleLib {
public class SparkleRepo : Repository {

View file

@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="29"/>
<integer value="57"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -962,6 +962,14 @@
</object>
<int key="connectionID">534</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1050"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">538</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -1768,7 +1776,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">534</int>
<int key="maxID">538</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">

View file

@ -17,13 +17,13 @@
using System;
using System.Drawing;
using System.IO;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using MonoMac.WebKit;
using System.IO;
namespace SparkleShare {
public class SparkleLog : NSWindow {

View file

@ -101,6 +101,7 @@
<Compile Include="..\SparkleShare.cs">
<Link>SparkleShare.cs</Link>
</Compile>
<Compile Include="SparkleAbout.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="MainMenu.xib" />

View file

@ -20,6 +20,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Timers;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
@ -28,35 +29,27 @@ using MonoMac.WebKit;
namespace SparkleShare {
public partial class AppDelegate : NSApplicationDelegate {
public override void WillBecomeActive (NSNotification notification)
{
SparkleUI.NewEvents = 0;
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
}
}
public class SparkleUI : AppDelegate
{
public static SparkleStatusIcon StatusIcon;
public static List <SparkleLog> OpenLogs;
public static int NewEvents;
public static SparkleIntro Intro;
public static NSFont Font;
public SparkleAbout About;
public SparkleUI ()
{
NSApplication.Init ();
SetSparkleIcon ();
// TODO: Getting crashes when I remove this
NSApplication.SharedApplication.ApplicationIconImage
= NSImage.ImageNamed ("sparkleshare.icns");
@ -64,17 +57,18 @@ namespace SparkleShare {
Font = NSFontManager.SharedFontManager.FontWithFamily
("Lucida Grande", NSFontTraitMask.Condensed, 0, 13);
OpenLogs = new List <SparkleLog> ();
StatusIcon = new SparkleStatusIcon ();
NewEvents = 0;
SparkleShare.Controller.NotificationRaised += delegate {
InvokeOnMainThread (delegate {
NewEvents++;
NSApplication.SharedApplication.DockTile.BadgeLabel = NewEvents.ToString ();
@ -124,7 +118,7 @@ namespace SparkleShare {
public void SetSparkleIcon ()
{
string folder_icon_path = Path.Combine (NSBundle.MainBundle.ResourcePath,
"sparkleshare-mac.icns");
@ -132,17 +126,34 @@ namespace SparkleShare {
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon,
SparkleShare.Controller.SparklePath, 0);
}
public void Run ()
{
NSApplication.Main (new string [0]);
NSApplication.Main (new string [0]);
}
public override void WillBecomeActive (NSNotification notification)
{
NewEvents = 0;
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
}
public override void OrderFrontStandardAboutPanel (NSObject sender)
{
// FIXME: Doesn't work
About = new SparkleAbout ();
}
}
}