Fix notifications
This commit is contained in:
parent
10b05898dd
commit
538bdf0dd0
|
@ -53,7 +53,7 @@ namespace SparkleLib {
|
|||
Nick = GetSHA1 (DateTime.Now.ToString () + "sparkles");
|
||||
|
||||
Nick = "s" + Nick.Substring (0, 7);
|
||||
Channel = "#" + GetSHA1 (server + folder_name);
|
||||
Channel = "#" + GetSHA1 (server + folder_name + "sparkles");
|
||||
|
||||
Client = new IrcClient () {
|
||||
PingTimeout = 180,
|
||||
|
|
|
@ -256,8 +256,8 @@ namespace SparkleLib {
|
|||
LocalPath = path;
|
||||
Name = Path.GetFileName (LocalPath);
|
||||
|
||||
RemoteName = Path.GetFileNameWithoutExtension (RemoteOriginUrl);
|
||||
RemoteOriginUrl = Config ["remote.origin.url"];
|
||||
RemoteName = Path.GetFileNameWithoutExtension (RemoteOriginUrl);
|
||||
Domain = GetDomain (RemoteOriginUrl);
|
||||
Description = GetDescription ();
|
||||
UserName = Config ["user.name"];
|
||||
|
@ -307,7 +307,7 @@ namespace SparkleLib {
|
|||
|
||||
|
||||
// Listen to the irc channel on the server...
|
||||
Listener = new SparkleListener (Domain, "#" + RemoteName, UserEmail);
|
||||
Listener = new SparkleListener (Domain, RemoteName, UserEmail);
|
||||
|
||||
// ...fetch remote changes every 60 seconds if that fails
|
||||
RemoteTimer = new Timer () {
|
||||
|
|
|
@ -30,11 +30,25 @@ namespace SparkleShare {
|
|||
|
||||
public partial class AppDelegate : NSApplicationDelegate {
|
||||
|
||||
public override void WillBecomeActive (NSNotification notification)
|
||||
{
|
||||
|
||||
NSApplication.SharedApplication.DockTile.BadgeLabel = null;
|
||||
|
||||
}
|
||||
|
||||
public override void OrderFrontStandardAboutPanel (NSObject sender)
|
||||
{
|
||||
|
||||
// FIXME: Doesn't work
|
||||
new SparkleAbout ();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class SparkleUI : AppDelegate
|
||||
{
|
||||
public class SparkleUI : AppDelegate {
|
||||
|
||||
public static SparkleStatusIcon StatusIcon;
|
||||
public static List <SparkleLog> OpenLogs;
|
||||
|
@ -45,6 +59,7 @@ namespace SparkleShare {
|
|||
private SparkleAbout About;
|
||||
private NSAlert Alert;
|
||||
|
||||
|
||||
public SparkleUI ()
|
||||
{
|
||||
|
||||
|
@ -78,8 +93,11 @@ namespace SparkleShare {
|
|||
|
||||
InvokeOnMainThread (delegate {
|
||||
|
||||
NewEvents++;
|
||||
NSApplication.SharedApplication.DockTile.BadgeLabel = NewEvents.ToString ();
|
||||
if (NSApplication.SharedApplication.DockTile.BadgeLabel == null)
|
||||
NSApplication.SharedApplication.DockTile.BadgeLabel = "1";
|
||||
else
|
||||
NSApplication.SharedApplication.DockTile.BadgeLabel =
|
||||
(int.Parse (NSApplication.SharedApplication.DockTile.BadgeLabel) + 1).ToString ();
|
||||
|
||||
foreach (SparkleLog log in SparkleUI.OpenLogs)
|
||||
log.UpdateEventLog ();
|
||||
|
@ -147,22 +165,7 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
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 ();
|
||||
About.Update ();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue