Move the notification options to Notifier

- Move enabling of tray notifications to RuneLiteConfig
- Move request when focused notification option to RuneLiteConfig and
use it in notifier
- Move request window focus to RuneLiteConfig and use it in notifier
- Change Notifier to use Guice for creation

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-02-28 10:48:32 +01:00
parent f1b541473f
commit 6ffe5da929
5 changed files with 76 additions and 37 deletions

View File

@@ -76,6 +76,16 @@ public interface RuneLiteConfig extends Config
return false;
}
@ConfigItem(
keyName = "notificationTray",
name = "Enable tray notifications",
description = "Enables tray notifications"
)
default boolean enableTrayNotifications()
{
return true;
}
@ConfigItem(
keyName = "notificationSound",
name = "Enable sound on notifications",
@@ -85,4 +95,24 @@ public interface RuneLiteConfig extends Config
{
return true;
}
}
@ConfigItem(
keyName = "notificationFocused",
name = "Send notifications when focused",
description = "Toggles idle notifications for when the client is focused"
)
default boolean sendNotificationsWhenFocused()
{
return false;
}
@ConfigItem(
keyName = "notificationRequestFocus",
name = "Request focus on notification",
description = "Toggles window focus request"
)
default boolean requestFocusOnNotification()
{
return true;
}
}