/hg/icedtea-web: Small alignment of icon usage

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Thu Jun 8 08:11:23 UTC 2017


changeset 6b1cf786d486 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=6b1cf786d486
author: Jiri Vanek <jvanek at redhat.com>
date: Thu Jun 08 10:21:41 2017 +0200

	Small alignment of icon usage
	* netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java: removed custom loading of netx.icon and replaced by standard call.
	* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: added usage of netx.icon


diffstat:

 ChangeLog                                                         |   7 +++++
 netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java          |  12 +---------
 netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java |   2 +
 3 files changed, 10 insertions(+), 11 deletions(-)

diffs (56 lines):

diff -r 78cfd3f75bc9 -r 6b1cf786d486 ChangeLog
--- a/ChangeLog	Wed Jun 07 15:55:11 2017 +0200
+++ b/ChangeLog	Thu Jun 08 10:21:41 2017 +0200
@@ -1,3 +1,10 @@
+2017-06-08  Jiri Vanek <jvanek at redhat.com>
+
+	Small alignment of icon usage
+	* netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java: removed custom loading
+	of netx.icon and replaced by standard call.
+	* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: added usage of netx.icon
+
 2017-06-07  Jiri Vanek <jvanek at redhat.com>
             Tereza Hlavackova <hlavackova.tereza at gmail.com>
 
diff -r 78cfd3f75bc9 -r 6b1cf786d486 netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java	Wed Jun 07 15:55:11 2017 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java	Thu Jun 08 10:21:41 2017 +0200
@@ -139,18 +139,8 @@
         descriptionPanel.add(description);
 
         JLabel image = new JLabel();
+        image.setIcon(new ImageIcon(ImageResources.INSTANCE.getApplicationImages().get(0)));
 
-        ClassLoader cl = getClass().getClassLoader();
-        if (cl == null) {
-            cl = ClassLoader.getSystemClassLoader();
-        }
-
-        try {
-            URL imgUrl = cl.getResource("net/sourceforge/jnlp/resources/netx-icon.png");
-            image.setIcon(new ImageIcon(ImageIO.read(imgUrl)));
-        } catch (IOException e) {
-            OutputController.getLogger().log(OutputController.Level.ERROR_ALL, e);
-        }
 
         JPanel topPanel = new JPanel(new BorderLayout());
         topPanel.setBackground(UIManager.getColor("TextPane.background"));
diff -r 78cfd3f75bc9 -r 6b1cf786d486 netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
--- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Wed Jun 07 15:55:11 2017 +0200
+++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Thu Jun 08 10:21:41 2017 +0200
@@ -114,6 +114,7 @@
 import net.sourceforge.jnlp.security.policyeditor.PolicyEditorPermissions.Group;
 import net.sourceforge.jnlp.util.FileUtils;
 import net.sourceforge.jnlp.util.FileUtils.OpenFileResult;
+import net.sourceforge.jnlp.util.ImageResources;
 import net.sourceforge.jnlp.util.docprovider.PolicyEditorTextsProvider;
 import net.sourceforge.jnlp.util.docprovider.TextsProvider;
 import net.sourceforge.jnlp.util.docprovider.formatters.formatters.PlainTextFormatter;
@@ -673,6 +674,7 @@
 
         private PolicyEditorFrame(final PolicyEditor editor) {
             super();
+            setIconImages(ImageResources.INSTANCE.getApplicationImages());
             preparePolicyEditorWindow(this, editor);
         }
 


More information about the distro-pkg-dev mailing list