forked from openpnp/openpnp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changes the configuration directory from .openpnp to .openpnp2.
* Adds a one time Welcome to OpenPnP 2.0 dialog explaining the changes.
- Loading branch information
Showing
5 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Welcome to OpenPnP 2.0! | ||
|
||
Your configuration is safe. | ||
|
||
OpenPnP 2.0 is a major update to OpenPnP and includes many new features and changes to existing | ||
features. As part of this upgrade, you will need to reconfigure your machine, but don't panic. Your | ||
old configuration is still available and you can downgrade back to 1.0 very easily. Keep reading. | ||
|
||
For a list of all the changes in OpenPnP 2.0, please go to Menu -> About. | ||
|
||
OpenPnP uses a new configuration directory. Instead of .openpnp it uses .openpnp2. Your old | ||
configuration, if you had one, is still in .openpnp. If you would like to downgrade back to | ||
1.0 please download the Stable version from http://openpnp.org/downloads/. | ||
|
||
If you are interested in trying the new features in OpenPnP, please be aware that it is currently | ||
under heavy development and breaking changes are expected to happen regularly until at least | ||
the third quarter of 2019. | ||
|
||
If you have any questions, or problems, or just want to discuss the new features, please join | ||
the discussion group at http://groups.google.com/group/openpnp. | ||
|
||
Thanks for trying OpenPnP 2.0. Onward! | ||
|
||
-Jason |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* | ||
* Copyright (C) 2011 Jason von Nieda <jason@vonnieda.org> | ||
* | ||
* This file is part of OpenPnP. | ||
* | ||
* OpenPnP is free software: you can redistribute it and/or modify it under the terms of the GNU | ||
* General Public License as published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* OpenPnP 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 General | ||
* Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with OpenPnP. If not, see | ||
* <http://www.gnu.org/licenses/>. | ||
* | ||
* For more information about OpenPnP visit http://openpnp.org | ||
*/ | ||
|
||
package org.openpnp.gui; | ||
|
||
import java.awt.BorderLayout; | ||
import java.awt.Component; | ||
import java.awt.FlowLayout; | ||
import java.awt.Font; | ||
import java.awt.Frame; | ||
import java.awt.event.ActionEvent; | ||
import java.awt.event.ActionListener; | ||
import java.io.File; | ||
|
||
import javax.swing.BoxLayout; | ||
import javax.swing.JButton; | ||
import javax.swing.JDialog; | ||
import javax.swing.JLabel; | ||
import javax.swing.JPanel; | ||
import javax.swing.JScrollPane; | ||
import javax.swing.JTextPane; | ||
import javax.swing.border.EmptyBorder; | ||
|
||
import org.apache.commons.io.FileUtils; | ||
import org.openpnp.Main; | ||
|
||
@SuppressWarnings("serial") | ||
public class Welcome2_0Dialog extends JDialog { | ||
|
||
private final JPanel contentPanel = new JPanel(); | ||
private JTextPane textPane; | ||
|
||
public Welcome2_0Dialog(Frame frame) { | ||
super(frame, true); | ||
setTitle("Welcome to OpenPnP 2.0"); | ||
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); | ||
setBounds(100, 100, 347, 360); | ||
getContentPane().setLayout(new BorderLayout()); | ||
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); | ||
getContentPane().add(contentPanel, BorderLayout.CENTER); | ||
contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS)); | ||
JLabel lblOpenpnp = new JLabel("Welcome to OpenPnP 2.0"); | ||
lblOpenpnp.setAlignmentX(Component.CENTER_ALIGNMENT); | ||
lblOpenpnp.setFont(new Font("Lucida Grande", Font.BOLD, 32)); | ||
contentPanel.add(lblOpenpnp); | ||
JLabel lblCopyright = new JLabel("Copyright © 2011 - 2019 Jason von Nieda"); | ||
lblCopyright.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); | ||
lblCopyright.setAlignmentX(Component.CENTER_ALIGNMENT); | ||
contentPanel.add(lblCopyright); | ||
JLabel lblVersion = new JLabel("Version: " + Main.getVersion()); | ||
lblVersion.setFont(new Font("Lucida Grande", Font.PLAIN, 10)); | ||
lblVersion.setAlignmentX(Component.CENTER_ALIGNMENT); | ||
contentPanel.add(lblVersion); | ||
|
||
textPane = new JTextPane(); | ||
textPane.setEditable(false); | ||
contentPanel.add(new JScrollPane(textPane)); | ||
JPanel buttonPane = new JPanel(); | ||
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); | ||
getContentPane().add(buttonPane, BorderLayout.SOUTH); | ||
JButton okButton = new JButton("OK"); | ||
okButton.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent arg0) { | ||
setVisible(false); | ||
} | ||
}); | ||
okButton.setActionCommand("OK"); | ||
buttonPane.add(okButton); | ||
getRootPane().setDefaultButton(okButton); | ||
|
||
try { | ||
String s = FileUtils.readFileToString(new File("OPENPNP_2_0.md")); | ||
textPane.setText(s); | ||
textPane.setCaretPosition(0); | ||
} | ||
catch (Exception e) { | ||
|
||
} | ||
} | ||
} |