Пример #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);
  }
  /** {@inheritDoc} */
  @Override
  public void showConfig(final PreferencesDialogModel manager) {
    final PreferencesCategory general =
        new PluginPreferencesCategory(getPluginInfo(), "VLC Media Source", "", "category-vlc");

    final PreferencesSetting setting =
        new PreferencesSetting(
            PreferencesType.LABEL, getDomain(), "", "Instructions", "Instructions");
    setting.setValue(
        "<html><p>"
            + "The VLC media source requires that VLC's web interface is"
            + " enabled. To do this, follow the steps below:</p>"
            + "<ol style='margin-left: 20px; padding-left: 0px;'>"
            + "<li>Open VLC's preferences dialog (found in the 'Tools' "
            + "menu)"
            + "<li>Set the 'Show settings' option to 'All'"
            + "<li>Expand the 'Interface' category by clicking on the plus "
            + "sign next to it"
            + "<li>Select the 'Main interfaces' category"
            + "<li>Check the box next to 'HTTP remote control interface'"
            + "<li>Expand the 'Main interfaces' category"
            + "<li>Select the 'HTTP' category"
            + "<li>In the 'Host address' field, enter 'localhost:8082'"
            + "<li>In the 'Source directory' field enter the path to VLC's"
            + " http directory<ul style='margin-left: 5px; padding-left: "
            + "0px; list-style-type: none;'>"
            + "<li style='padding-bottom: 5px'>For Linux users this may be "
            + "/usr/share/vlc/http/"
            + "<li>For Windows users this will be under the main VLC "
            + "directory, e.g. C:\\Program Files\\VLC\\http</ul><li>Click "
            + "'Save'<li>Restart VLC</ol></html>");
    general.addSetting(setting);
    general.addSetting(
        new PreferencesSetting(
            PreferencesType.TEXT,
            getDomain(),
            "host",
            "Hostname and port",
            "The host and port that VLC listens on for web connections"));

    manager.getCategory("Plugins").addSubCategory(general);
  }
Пример #3
0
  /** {@inheritDoc} */
  @Override
  public void showConfig(final PreferencesDialogModel manager) {
    final PreferencesCategory category =
        new PluginPreferencesCategory(
            getPluginInfo(),
            "Twitter Plugin",
            "Settings related to the twitter plugin",
            "category-twitter");
    final PreferencesCategory advanced =
        new PluginPreferencesCategory(
            getPluginInfo(),
            "Advanced",
            "Advanced Settings related to the twitter plugin",
            "category-twitter");

    category.addSetting(
        new PreferencesSetting(
            PreferencesType.INTEGER,
            getDomain(),
            "statuscount",
            "Statuses to request",
            "How many statuses to request at a time?"));
    category.addSetting(
        new PreferencesSetting(
            PreferencesType.INTEGER,
            getDomain(),
            "apicalls",
            "API Calls",
            "Aim to only use how many API Calls per hour? (Twitter has a max of 350)"));
    category.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            getDomain(),
            "saveLastIDs",
            "Remember shown items",
            "Should previously shown items not be shown again next time?"));
    category.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            getDomain(),
            "getSentMessages",
            "Show own Direct Messages",
            "Should we try to show our own direct messages to people not just ones to us?"));

    advanced.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            getDomain(),
            "autoAt",
            "Prepend nicknames with @",
            "Should all nicknmaes be shown with an @ infront of them? (Makes tab competion easier)"));
    advanced.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            getDomain(),
            "replaceOpeningNickname",
            "Replace opening nickame?",
            "Should nicknames at the start of the message be replaced? (eg Replace foo: with @foo)"));
    advanced.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            getDomain(),
            "debugEnabled",
            "Debugging Enabled?",
            "Should more debugging be enabled on the twitter plugin?"));
    advanced.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            getDomain(),
            "hide500Errors",
            "Hide HTTP 50x Errors",
            "At times twitter gives a lot of 502/503 errors. Should this be hidden from you?"));
    advanced.addSetting(
        new PreferencesSetting(
            PreferencesType.BOOLEAN,
            getDomain(),
            "autoLeaveMessageChannel",
            "Leave & channels automatically?",
            "Should you automatically be parted from & channels after sending a message?"));

    category.addSubCategory(advanced);

    manager.getCategory("Plugins").addSubCategory(category);
  }