mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Library manager: "remove" button removed
This commit is contained in:
parent
9b5fa9fb9a
commit
a83d6e9886
@ -67,8 +67,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
|
|
||||||
private JPanel panel;
|
private JPanel panel;
|
||||||
private JButton installButton;
|
private JButton installButton;
|
||||||
private JButton removeButton;
|
|
||||||
private Component removeButtonPlaceholder;
|
|
||||||
private Component installButtonPlaceholder;
|
private Component installButtonPlaceholder;
|
||||||
private JComboBox downgradeChooser;
|
private JComboBox downgradeChooser;
|
||||||
private JComboBox versionToInstallChooser;
|
private JComboBox versionToInstallChooser;
|
||||||
@ -90,18 +88,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
installButtonPlaceholder = Box.createRigidArea(new Dimension(width, 1));
|
installButtonPlaceholder = Box.createRigidArea(new Dimension(width, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
removeButton = new JButton(_("Remove"));
|
|
||||||
removeButton.addActionListener(new ActionListener() {
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
onRemove(editorValue.getInstalled());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
int width = removeButton.getPreferredSize().width;
|
|
||||||
removeButtonPlaceholder = Box.createRigidArea(new Dimension(width, 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
downgradeButton = new JButton(_("Install"));
|
downgradeButton = new JButton(_("Install"));
|
||||||
downgradeButton.addActionListener(new ActionListener() {
|
downgradeButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -154,8 +140,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
buttonsPanel.add(Box.createHorizontalStrut(5));
|
buttonsPanel.add(Box.createHorizontalStrut(5));
|
||||||
buttonsPanel.add(installButton);
|
buttonsPanel.add(installButton);
|
||||||
buttonsPanel.add(Box.createHorizontalStrut(5));
|
buttonsPanel.add(Box.createHorizontalStrut(5));
|
||||||
buttonsPanel.add(removeButton);
|
|
||||||
buttonsPanel.add(Box.createHorizontalStrut(5));
|
|
||||||
buttonsPanel.add(Box.createHorizontalStrut(15));
|
buttonsPanel.add(Box.createHorizontalStrut(15));
|
||||||
|
|
||||||
panel.add(buttonsPanel);
|
panel.add(buttonsPanel);
|
||||||
@ -343,8 +327,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
}
|
}
|
||||||
installButton.setVisible(installable || upgradable);
|
installButton.setVisible(installable || upgradable);
|
||||||
installButtonPlaceholder.setVisible(!(installable || upgradable));
|
installButtonPlaceholder.setVisible(!(installable || upgradable));
|
||||||
removeButton.setVisible(removable);
|
|
||||||
removeButtonPlaceholder.setVisible(!removable);
|
|
||||||
|
|
||||||
String name = selected.getName();
|
String name = selected.getName();
|
||||||
String author = selected.getAuthor();
|
String author = selected.getAuthor();
|
||||||
@ -444,7 +426,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
|
|
||||||
public void enable(boolean enabled) {
|
public void enable(boolean enabled) {
|
||||||
installButton.setEnabled(enabled);
|
installButton.setEnabled(enabled);
|
||||||
removeButton.setEnabled(enabled);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(String status) {
|
public void setStatus(String status) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user