[RFC][Icedtea-Web]: Hide unused components in itw-settings.

Dr Andrew John Hughes ahughes at redhat.com
Tue Mar 1 14:40:10 PST 2011


On 11:56 Tue 01 Mar     , Andrew Su wrote:
> 
> 
> ----- Original Message -----
> > From: "Deepak Bhole" <dbhole at redhat.com>
> > To: "Andrew Su" <asu at redhat.com>
> > Cc: "IcedTea" <distro-pkg-dev at openjdk.java.net>
> > Sent: Tuesday, March 1, 2011 11:43:51 AM
> > Subject: Re: [RFC][Icedtea-Web]: Hide unused components in itw-settings.
> > * Andrew Su <asu at redhat.com> [2011-03-01 11:35]:
> > >
> > >
> > 
> > Looks good now, thanks!
> > 
> > One minor thing.. I think you inadvertently changed indent for the
> > stateChanged(ChangeEvent e) function. Please fix that. After that, OK
> > for HEAD.
> 

What's the ETA for this to actually work?  I'm not keen on having all this dead code around.

> Thanks for the review!
> Pushed as changeset 738c9c852dda.
> 
> Regards,
>   Andrew
> 
> > 
> > Deepak
> > 
> > > ----- Original Message -----
> > > > From: "Deepak Bhole" <dbhole at redhat.com>
> > > > To: "Andrew Su" <asu at redhat.com>
> > > > Cc: "IcedTea" <distro-pkg-dev at openjdk.java.net>
> > > > Sent: Monday, February 28, 2011 10:21:46 AM
> > > > Subject: Re: [RFC][Icedtea-Web]: Hide unused components in
> > > > itw-settings.
> > > > * Andrew Su <asu at redhat.com> [2011-02-27 22:47]:
> > > > > Hello,
> > > > >
> > > > >  The attached patch will hide the unused components in
> > > > >  itw-settings.
> > > > >  Unused:
> > > > >    Setting cache size.
> > > > >    Selecting another JRE for plugin to bind to.
> > > > >
> > > > >
> > > > > Questions? Comments? Concerns?
> > > > >
> > > > > Cheers,
> > > > >   Andrew
> > > >
> > > >
> > > > Indentations are off. In the interest of keeping it looking clean,
> > > > can
> > > > you
> > > > please fix it so that the // are right beside the code, and
> > > > aligned?
> > >
> > > Fixed.
> > >
> > > > e.g.
> > > >
> > > >
> > > > > - new SettingsPanel(Translator.R("CPTabRuntimes"),
> > > > > createRuntimesSettingsPanel()),
> > > > > + // new SettingsPanel(Translator.R("CPTabRuntimes"),
> > > > > createRuntimesSettingsPanel()),
> > > >
> > > > to
> > > >
> > > > > - new SettingsPanel(Translator.R("CPTabRuntimes"),
> > > > > createRuntimesSettingsPanel()),
> > > > > + // new SettingsPanel(Translator.R("CPTabRuntimes"),
> > > > > createRuntimesSettingsPanel()),
> > > >
> > > > Also, please add a comment in the code stating why it is disabled,
> > > > so
> > > > that it
> > > > is not forgotten in the future.
> > >
> > > Added.
> > >
> > > Sorry for late response, missed the e-mail. Here is the updated
> > > patch which fixes the comment spacing and gives a short note about
> > > it.
> > >
> > > ChangeLog:
> > >
> > > 2011-03-01 Andrew Su <asu at redhat.com>
> > >         * netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java
> > >         (createMainSettingsPanel): Commented out unimplemented
> > >         feature.
> > >         *
> > >         netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
> > >         (addComponents): Commented out unimplemented feature.
> > >
> > >
> > > Cheers,
> > >   Andrew
> > 
> > > diff -r c4b91b61f88e
> > > netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java
> > > --- a/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java Mon
> > > Feb 28 17:29:31 2011 -0500
> > > +++ b/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java Tue
> > > Mar 01 11:29:52 2011 -0500
> > > @@ -221,11 +221,13 @@
> > >          SettingsPanel[] panels = new SettingsPanel[] { new
> > >          SettingsPanel(Translator.R("CPTabAbout"),
> > >          createAboutPanel()),
> > >                  new SettingsPanel(Translator.R("CPTabCache"),
> > >                  createCacheSettingsPanel()),
> > >                  new SettingsPanel(Translator.R("CPTabCertificate"),
> > >                  createCertificatesSettingsPanel()),
> > > - // new SettingsPanel(Translator.R("CPTabClassLoader"),
> > > createClassLoaderSettingsPanel()),
> > > + // TODO: This is commented out since this is not implemented yet
> > > + // new SettingsPanel(Translator.R("CPTabClassLoader"),
> > > createClassLoaderSettingsPanel()),
> > >                  new SettingsPanel(Translator.R("CPTabDebugging"),
> > >                  createDebugSettingsPanel()),
> > >                  new
> > >                  SettingsPanel(Translator.R("CPTabDesktopIntegration"),
> > >                  createDesktopSettingsPanel()),
> > >                  new SettingsPanel(Translator.R("CPTabNetwork"),
> > >                  createNetworkSettingsPanel()),
> > > - new SettingsPanel(Translator.R("CPTabRuntimes"),
> > > createRuntimesSettingsPanel()),
> > > + // TODO: This is commented out since this is not implemented yet
> > > + // new SettingsPanel(Translator.R("CPTabRuntimes"),
> > > createRuntimesSettingsPanel()),
> > >                  new SettingsPanel(Translator.R("CPTabSecurity"),
> > >                  createSecuritySettingsPanel()), };
> > >
> > >          // Add panels.
> > > diff -r c4b91b61f88e
> > > netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
> > > ---
> > > a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
> > > Mon Feb 28 17:29:31 2011 -0500
> > > +++
> > > b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
> > > Tue Mar 01 11:29:52 2011 -0500
> > > @@ -151,16 +151,17 @@
> > >              }
> > >          });
> > >
> > > + // 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;
> > > @@ -169,16 +170,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"));
> > > @@ -215,13 +216,13 @@
> > >      }
> > >
> > >      @Override
> > > - public void stateChanged(ChangeEvent e) {
> > > - Object o = e.getSource();
> > > - if (o instanceof JSlider)
> > > - spCacheSize.setValue(((JSlider) o).getValue());
> > > - else if (o instanceof JSpinner)
> > > - slCacheSize.setValue((Integer) ((JSpinner) o).getValue());
> > > + public void stateChanged(ChangeEvent e) {
> > > + Object o = e.getSource();
> > > + if (o instanceof JSlider)
> > > + spCacheSize.setValue(((JSlider) o).getValue());
> > > + else if (o instanceof JSpinner)
> > > + slCacheSize.setValue((Integer) ((JSpinner) o).getValue());
> > >
> > > - config.setProperty(properties[2],
> > > spCacheSize.getValue().toString());
> > > - }
> > > + config.setProperty(properties[2],
> > > spCacheSize.getValue().toString());
> > > + }
> > >  }

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D  0698 0713 C3ED F586 2A37



More information about the distro-pkg-dev mailing list