Skip to content

Commit

Permalink
#59. Implemented a general balloon notifications setting as workaroun…
Browse files Browse the repository at this point in the history
…d for more flexible customization of balloon notifications, #52.
  • Loading branch information
zionyx committed Nov 3, 2015
1 parent f430ad4 commit 2194db0
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 150 deletions.
14 changes: 14 additions & 0 deletions JenkinsTray/BusinessComponents/ConfigurationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ public bool IsTreadUnstableAsFailed()
public bool IsSoundNotificationsEnabled()
{
return NotificationSettings.SoundNotifications;
}

public bool IsBalloonNotificationsEnabled()
{
return NotificationSettings.BalloonNotifications;
}

public void SetTreadUnstableAsFailed(bool value)
Expand Down Expand Up @@ -259,6 +264,15 @@ public void SetSoundNotifications(bool value)
NotificationSettings.SoundNotifications = value;
SaveConfiguration();
}
}

public void SetBalloonNotifications(bool value)
{
if (NotificationSettings.BalloonNotifications != value)
{
NotificationSettings.BalloonNotifications = value;
SaveConfiguration();
}
}
}
}
5 changes: 4 additions & 1 deletion JenkinsTray/Entities/NotificationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class NotificationSettings
public string FixedSoundPath { get; set; }

[JsonProperty("treatUnstableAsFailed")]
public bool TreatUnstableAsFailed { get; set; }
public bool TreatUnstableAsFailed { get; set; }

[JsonProperty("balloonNotifications")]
public bool BalloonNotifications { get; set; }
}
}
Loading

0 comments on commit 2194db0

Please sign in to comment.