Esempio n. 1
0
  @Handler
  public void showConfig(final ClientPrefsOpenedEvent event) {
    final PreferencesDialogModel manager = event.getModel();
    final PreferencesCategory general =
        new PluginPreferencesCategory(
            pluginInfo,
            "FreeDesktop Notifications",
            "General configuration for FreeDesktop Notifications plugin.");

    general.addSetting(
        new PreferencesSetting(
            PreferencesType.INTEGER,
            pluginInfo.getDomain(),
            "general.timeout",
            "Timeout",
            "Length of time in seconds before the notification popup closes.",
            manager.getConfigManager(),
            manager.getIdentity()));
    general.addSetting(
        new PreferencesSetting(
            PreferencesType.FILE,
            pluginInfo.getDomain(),
            "general.icon",
            "icon",
            "Path to icon to use on the notification.",
            manager.getConfigManager(),
            manager.getIdentity()));
    general.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            pluginInfo.getDomain(),
            "advanced.escapehtml",
            "Escape HTML",
            "Some Implementations randomly parse HTML, escape it before showing?",
            manager.getConfigManager(),
            manager.getIdentity()));
    general.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            pluginInfo.getDomain(),
            "advanced.stripcodes",
            "Strip Control Codes",
            "Strip IRC Control codes from messages?",
            manager.getConfigManager(),
            manager.getIdentity()));

    manager.getCategory("Plugins").addSubCategory(general);
  }
Esempio n. 2
0
 @Provides
 @PluginDomain(SystrayPlugin.class)
 public String getSettingsDomain() {
   return pluginInfo.getDomain();
 }