[RFC][IcedTea-Web]: Renable setting cache size limit on itw-settings

Deepak Bhole dbhole at redhat.com
Wed Apr 20 07:17:27 PDT 2011


* Andrew Su <asu at redhat.com> [2011-04-20 09:49]:
> hello,
> 
> This patch re-enables the controls in itw-settings to set a limit on cache items.
> 

Missing Changelog. It would be straightforward though. OK after adding
changelog entry.

Cheers,
Deepak

> Cheers,
>   Andrew

> diff -r bc48727cfc1a netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
> --- a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java	Wed Apr 20 09:26:50 2011 -0400
> +++ b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java	Wed Apr 20 09:43:55 2011 -0400
> @@ -151,17 +151,15 @@
>              }
>          });
>  
> -        // TODO: This property is currently not honored, uncomment to enable when it is implemented.
> -        // This is to work with how much space is available for caching.
> -        // JLabel lCacheSize = new JLabel(Translator.R("TIFPCacheSize") + ":");
> -        // slCacheSize = new JSlider(minSize, maxSize, Integer.parseInt(this.config.getProperty(properties[2])));
> -        // slCacheSize.setMinorTickSpacing(50);
> -        // slCacheSize.setPaintTicks(true);
> -        // SpinnerNumberModel snmCacheSize = new SpinnerNumberModel(Integer.parseInt(this.config.getProperty(properties[2])), minSize, maxSize, 1);
> -        // spCacheSize = new JSpinner(snmCacheSize);
> -        //
> -        // slCacheSize.addChangeListener(this);
> -        // spCacheSize.addChangeListener(this);
> +        JLabel lCacheSize = new JLabel(Translator.R("TIFPCacheSize") + ":");
> +        slCacheSize = new JSlider(minSize, maxSize, Integer.parseInt(this.config.getProperty(properties[2])));
> +        slCacheSize.setMinorTickSpacing(50);
> +        slCacheSize.setPaintTicks(true);
> +        SpinnerNumberModel snmCacheSize = new SpinnerNumberModel(Integer.parseInt(this.config.getProperty(properties[2])), minSize, maxSize, 1);
> +        spCacheSize = new JSpinner(snmCacheSize);
> +
> +        slCacheSize.addChangeListener(this);
> +        spCacheSize.addChangeListener(this);
>  
>          c.gridy = 0;
>          c.gridx = 0;
> @@ -170,16 +168,16 @@
>          c.gridx = 1;
>          c.weightx = 0;
>          diskSpacePanel.add(cbCompression, c);
> -        // c.gridy = 1;
> -        // c.gridx = 0;
> -        // c.gridwidth = GridBagConstraints.REMAINDER;
> +        c.gridy = 1;
> +        c.gridx = 0;
> +        c.gridwidth = GridBagConstraints.REMAINDER;
>          c.weightx = 1;
> -        // diskSpacePanel.add(lCacheSize, c);
> -        // c.gridwidth = 1;
> -        // c.gridy = 2;
> -        // diskSpacePanel.add(slCacheSize, c);
> -        // c.gridx = 1;
> -        // diskSpacePanel.add(spCacheSize, c);
> +        diskSpacePanel.add(lCacheSize, c);
> +        c.gridwidth = 1;
> +        c.gridy = 2;
> +        diskSpacePanel.add(slCacheSize, c);
> +        c.gridx = 1;
> +        diskSpacePanel.add(spCacheSize, c);
>  
>          JPanel buttonDeleteRestore = new JPanel(new FlowLayout(FlowLayout.TRAILING));
>          JButton bViewFiles = new JButton(Translator.R("TIFPViewFiles"));




More information about the distro-pkg-dev mailing list