rpms/java-1.6.0-openjdk/EL-5 java-1.6.0-openjdk-netxtmp.patch, NONE, 1.1 java-1.6.0-openjdk.spec, 1.30, 1.31

Lubomir Rintel lkundrak at fedoraproject.org
Mon Oct 27 14:39:41 UTC 2008


Author: lkundrak

Update of /cvs/pkgs/rpms/java-1.6.0-openjdk/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31389

Modified Files:
	java-1.6.0-openjdk.spec 
Added Files:
	java-1.6.0-openjdk-netxtmp.patch 
Log Message:
* Mon Oct 27 2008 Lubomir Rintel <lkundrak at v3.sk> - 1:1.6.0.0-1.0.b12.2
- Remove the tmpdir dialog from JNLP client (#467591)


java-1.6.0-openjdk-netxtmp.patch:

--- NEW FILE java-1.6.0-openjdk-netxtmp.patch ---
Removes the annoying dialog fron Web Start client.
https://bugzilla.redhat.com/show_bug.cgi?id=467591

Lubomir Rintel <lkundrak at v3.sk>

diff -Nurp icedtea6-1.3.1/rt/net/sourceforge/jnlp/runtime/InstallDialog.java icedtea6-1.3.1.netxtmp/rt/net/sourceforge/jnlp/runtime/InstallDialog.java
--- icedtea6-1.3.1/rt/net/sourceforge/jnlp/runtime/InstallDialog.java	2008-09-30 19:27:56.000000000 +0200
+++ icedtea6-1.3.1.jnlpdialog/rt/net/sourceforge/jnlp/runtime/InstallDialog.java	1970-01-01 01:00:00.000000000 +0100
@@ -1,171 +0,0 @@
-// Copyright (C) 2001-2003 Jon A. Maxwell (JAM)
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// 
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-// 
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-
-package net.sourceforge.jnlp.runtime;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import java.util.List;
-import javax.swing.*;
-import javax.jnlp.*;
-
-import net.sourceforge.jnlp.*;
-
-/**
- * Prompt for an install location.
- *
- * @author <a href="mailto:jmaxwell at users.sourceforge.net">Jon A. Maxwell (JAM)</a> - initial author
- * @version $Revision: 1.7 $ 
- */
-class InstallDialog extends Dialog implements ActionListener {
-
-    private static String R(String key) { return JNLPRuntime.getMessage(key); }
-
-    private ImageIcon background;
-    private TextField installField = new TextField();
-    private Button ok = new Button(R("ButOk"));
-    private Button cancel = new Button(R("ButCancel"));
-    private Button browse = new Button(R("ButBrowse"));
-    private boolean canceled = false;
-
-    static Frame createFrame() {
-        Frame f = new Frame();
-        f.setIconImage(JNLPRuntime.getWindowIcon());
-        return f;
-    }
-
-    InstallDialog() {
-        super(createFrame(), R("CChooseCache"), true);
-
-        URL icon = (new sun.misc.Launcher()).getClassLoader().getResource("net/sourceforge/jnlp/resources/install.png");
-        
-        background = new ImageIcon(icon);
-        setLayout(new BorderLayout());
-        setBackground(Color.white);
-
-        String home = System.getProperty("java.io.tmpdir");
-        installField.setText((new File(home)).toString());
-
-        ok.addActionListener(this);
-        cancel.addActionListener(this);
-        browse.addActionListener(this);
-
-        Font f = new Font("SansSerif", Font.BOLD, 14);
-
-        installField.setFont(f);
-        ok.setFont(f);
-        cancel.setFont(f);
-        browse.setFont(f);
-
-        Panel top = new Panel(new GridLayout(2, 1, 0, 10));
-        Label l1 = new Label(R("CChooseCacheInfo"));
-        Label l2 = new Label(R("CChooseCacheDir")+":");
-        l1.setFont(f);
-        l2.setFont(f);
-        top.add(l1);
-        top.add(l2);
-
-        Panel field = new Panel(new BorderLayout());
-        field.add(top, BorderLayout.NORTH);
-        field.add(installField, BorderLayout.CENTER);
-        field.add(browse, BorderLayout.EAST);
-
-        Panel grid = new Panel(new GridLayout(1, 2, 8, 8));
-        grid.add(ok);
-        grid.add(cancel);
-        
-        Panel choice = new Panel(new FlowLayout(FlowLayout.CENTER, 4, 0));
-        choice.add(grid);
-
-        add(field, BorderLayout.NORTH);
-        add(new Panel(), BorderLayout.CENTER);
-        add(choice, BorderLayout.SOUTH);
-    }
-
-    public Insets getInsets() {
-        Insets s = super.getInsets();
-        return new Insets(s.top + 55, s.left + 7, s.bottom + 6, s.right + 4);
-        //return new Insets(s.top + 115, s.left + 7, s.bottom + 6, s.right + 4);
-    }
-
-    public Dimension getPreferredSize() {
-        Dimension d = super.getPreferredSize();
-        if (background == null)
-            return d;
-
-        Insets in = super.getInsets();
-        d.width = background.getIconWidth() + in.left + in.right;
-        d.height = Math.max(d.height + 8, background.getIconHeight() + 8 + in.top + in.bottom);
-
-        return d;
-    }
-
-    public void paint(Graphics g) {
-		
-        Insets sin = super.getInsets();
-        g.drawImage(background.getImage(), sin.left, sin.top, this);
-		
-    }
-
-    public void actionPerformed(ActionEvent evt) {
-        if (evt.getSource() == cancel) {
-            canceled = true;
-            dispose();
-        }
-        if (evt.getSource() == ok) {
-            File f = new File(installField.getText());
-
-            try {
-                f.mkdirs();
-                dispose();
-            }
-            catch (Exception ex) {
-                JOptionPane.showMessageDialog(this, "Install directory cannot be created.", 
-                                              "ERROR", JOptionPane.ERROR_MESSAGE); 
-            }
-        }
-        if (evt.getSource() == browse) {
-            JFileChooser fc = new JFileChooser();
-            fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-            int r = fc.showOpenDialog(this); 
-            if (r == JFileChooser.APPROVE_OPTION)
-                installField.setText(fc.getSelectedFile().toString());
-        }
-    }
-
-
-    static File getInstallDir() {
-        InstallDialog id = new InstallDialog();
-
-        //id.setResizable(false);
-        id.pack();
-        Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
-        id.setLocation(screen.width/2-id.getWidth()/2,
-                       screen.height/2-id.getHeight()/2);
-        id.setVisible(true);
-
-        if (id.canceled)
-            return null;
-
-        return new File(id.installField.getText());
-    }
-
-}
-
diff -Nurp icedtea6-1.3.1/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java icedtea6-1.3.1.netxtmp/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java
--- icedtea6-1.3.1/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java	2008-09-30 19:27:56.000000000 +0200
+++ icedtea6-1.3.1.jnlpdialog/rt/net/sourceforge/jnlp/runtime/JNLPRuntime.java	2008-10-27 13:43:05.000000000 +0100
@@ -248,31 +248,24 @@ public class JNLPRuntime {
 
     /**
      * Returns the system default base dir for or if not set,
-     * prompts the user for the location.
+     * uses java.io.tmpdir system property.
      *
      * @return the base dir, or null if the user canceled the dialog
      * @throws IOException if there was an io exception
      */
     public static File getDefaultBaseDir() {
         PropertiesFile props = JNLPRuntime.getProperties();
+        String baseStr;
 
-        loadWindowIcon();
-
-        String baseStr = props.getProperty("basedir");
+        baseStr = props.getProperty("basedir");
         if (baseStr != null)
             return new File(baseStr);
 
-        if (isHeadless())
-            return null;
-
-        File baseDir = InstallDialog.getInstallDir();
-        if (baseDir == null)
-            return null;
-
-        props.setProperty("basedir", baseDir.toString());
-        props.store();
+        baseStr = System.getProperty("java.io.tmpdir");
+        if (baseStr != null)
+            return new File(baseStr);
 
-        return baseDir;
+        return null;
     }
 
     /**


Index: java-1.6.0-openjdk.spec
===================================================================
RCS file: /cvs/pkgs/rpms/java-1.6.0-openjdk/EL-5/java-1.6.0-openjdk.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- java-1.6.0-openjdk.spec	25 Oct 2008 09:02:17 -0000	1.30
+++ java-1.6.0-openjdk.spec	27 Oct 2008 14:39:11 -0000	1.31
@@ -105,7 +105,7 @@
 
 Name:    java-%{javaver}-%{origin}
 Version: %{javaver}.%{buildver}
-Release: 1.0.%{openjdkver}%{?dist}.1
+Release: 1.0.%{openjdkver}%{?dist}.2
 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
 # and this change was brought into RHEL-4.  java-1.5.0-ibm packages
 # also included the epoch in their virtual provides.  This created a
@@ -136,7 +136,8 @@
 Patch1:   java-1.6.0-openjdk-java-access-bridge-tck.patch
 Patch2:   java-1.6.0-openjdk-makefile.patch
 Patch3:   java-1.6.0-openjdk-java-access-bridge-idlj.patch
-Patch10:   java-1.6.0-openjdk-freetype.patch
+Patch10:  java-1.6.0-openjdk-freetype.patch
+Patch11:  java-1.6.0-openjdk-netxtmp.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -881,6 +882,9 @@
 %{_jvmdir}/%{jredir}/lib/%{archinstall}/IcedTeaPlugin.so
 
 %changelog
+* Mon Oct 27 2008 Lubomir Rintel <lkundrak at v3.sk> - 1:1.6.0.0-1.0.b12.2
+- Remove the tmpdir dialog from JNLP client (#467591)
+
 * Fri Oct 24 2008 Lubomir Rintel <lkundrak at v3.sk> - 1:1.6.0.0-1.0.b12.1
 - Merge 1.3.1 with IcedTeaPlugin from devel.
 




More information about the scm-commits mailing list