Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving of config without pressing "Apply" or "OK" #270

Closed
sclassen opened this issue Jun 3, 2019 · 1 comment
Closed

Saving of config without pressing "Apply" or "OK" #270

sclassen opened this issue Jun 3, 2019 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@sclassen
Copy link
Contributor

sclassen commented Jun 3, 2019

I noticed that sometimes the config is saved to the file system without me pressing any of the "OK" or "Apply" buttons in the control panel.

Digging into the code I found the following in the class UnsignedAppletsTrustingListPanel:

    private void mainPolicyComboBoxActionPerformed(java.awt.event.ActionEvent evt) {
        try {
            conf.setProperty(ConfigurationConstants.KEY_SECURITY_LEVEL, ((AppletSecurityLevel) mainPolicyComboBox.getSelectedItem()).toChars());
            conf.save();
        } catch (Exception ex) {
            LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, ex);
            JOptionPane.showMessageDialog(this, ex);
        }
    }

When changing the value of the combo box the entire configuration is saved to the file system.

Is this intended behavior or not?

@karianna karianna added this to the 2.0.x milestone Jun 3, 2019
@karianna karianna added the bug Something isn't working label Jun 3, 2019
@karianna karianna changed the title Saving of config without pressing "Applay" or "OK" Saving of config without pressing "Apply" or "OK" Jun 3, 2019
@AndreasEhret
Copy link
Contributor

as the rest of the dialog's comboboxes do follow the ok/apply/cancel pattern this looks like a bug to me. Saving the entire config when main policy changes makes "cancel" not work any longer, therefore we should remove save on selection changed as proposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants