Search in sources :

Example 1 with GeneralSettingsConfigItem

use of com.google.security.zynamics.binnavi.config.GeneralSettingsConfigItem in project binnavi by google.

the class CGeneralSettingsPanel method save.

@Override
protected boolean save() {
    final GeneralSettingsConfigItem settings = ConfigManager.instance().getGeneralSettings();
    settings.setIdaDirectory(idaDirectoryPanel.getText());
    settings.setLogLevel(logLevelBox.getSelectedIndex());
    settings.setDefaultScriptingLanguage(scriptingBox.getSelectedLanguage());
    settings.setSupportEmailAddress(emailBox.getText());
    switch(logLevelBox.getSelectedIndex()) {
        case 0:
            NaviLogger.setLevel(Level.OFF);
            break;
        case 1:
            NaviLogger.setLevel(Level.INFO);
            break;
        case 2:
            NaviLogger.setLevel(Level.ALL);
            break;
        default:
            throw new IllegalStateException("IE01190: Invalid log level selection");
    }
    return false;
}
Also used : GeneralSettingsConfigItem(com.google.security.zynamics.binnavi.config.GeneralSettingsConfigItem)

Aggregations

GeneralSettingsConfigItem (com.google.security.zynamics.binnavi.config.GeneralSettingsConfigItem)1