Skip to content

Commit

Permalink
Disable auto-detect for BurntToast
Browse files Browse the repository at this point in the history
BurntToastNotifier.tryInit is too slow to include by default.

fixes #18
fixes #19
  • Loading branch information
Sean Flanigan authored and jcgay committed Apr 15, 2019
1 parent b59f553 commit 03952d5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Go to [Wiki](https://github.com/jcgay/send-notification/wiki) to read full confi
| **AnyBar** for [OS X](https://github.com/tonsky/AnyBar) and [Linux](https://github.com/limpbrains/somebar) | ![anybar](http://jeanchristophegay.com/images/notifier.anybar_maven.png) |
| **[Toaster](https://github.com/nels-o/toaster)** for Windows 8 | ![toaster](http://jeanchristophegay.com/images/notifier.toaster.png) |
| **[Notify](https://github.com/dorkbox/Notify)** since Java 6 | ![Notify](http://jeanchristophegay.com/images/notifier.notify.png) |
| **[BurntToast](https://github.com/Windos/BurntToast)** for Windows 10 | ![BurntToast](http://jeanchristophegay.com/images/notifier.burnttoast.png) |
| **[BurntToast](https://github.com/Windos/BurntToast)** for Windows 10 (NB must be [enabled manually](https://github.com/jcgay/send-notification/wiki/burnttoast)) | ![BurntToast](http://jeanchristophegay.com/images/notifier.burnttoast.png) |
| **[Slack](https://slack.com)** | ![Slack](http://jeanchristophegay.com/images/slack-success.png) |

# Build status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ public Set<DiscoverableNotifier> available(Properties configuration, Application
winNotifiers.add(byName(SNARL, configuration, application));
winNotifiers.add(new GrowlNotifier(application, GrowlConfiguration.create(configuration), DEBUG));
winNotifiers.add(byName(TOASTER, configuration, application));
winNotifiers.add(byName(BURNT_TOAST, configuration, application));
winNotifiers.add(byName(SYSTEM_TRAY, configuration, application));
return unmodifiableSet(winNotifiers);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Notifier init() {

@Override
public boolean tryInit() {
PowerShellResponse response = PowerShell.executeSingleCommand("Get-Module -ListAvailable | Format-Table Name");
PowerShellResponse response = PowerShell.executeSingleCommand("Get-Module -ListAvailable -Name BurntToast | Format-Table Name");
return !response.isError() && response.getCommandOutput().toLowerCase().contains("burnttoast");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class NotifierProviderSpec extends Specification {
)
}

def "should return all available notifiers for windows"() {
def "should return all automatically configured notifiers for windows"() {
given:
def provider = new NotifierProvider(new OperatingSystem('windows'))

Expand All @@ -55,7 +55,6 @@ class NotifierProviderSpec extends Specification {
new SnarlNotifier(application, SnarlConfiguration.byDefault()),
new GrowlNotifier(application, GrowlConfiguration.byDefault(), DEBUG),
new ToasterNotifier(ToasterConfiguration.byDefault(), new RuntimeExecutor(application.timeout())),
new BurntToastNotifier(application, BurntToastNotifierConfiguration.byDefault()),
new SystemTrayNotifier(application)
)
}
Expand Down

0 comments on commit 03952d5

Please sign in to comment.