diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 1c510b6f32..a403a87f70 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -29,20 +29,27 @@ jobs:
run: |
# Set default FORK_REPO and BRANCH_NAME values.
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}"
- FORK_REPO="${GITHUB_HEAD_REPOSITORY:-${GITHUB_ACTOR}/openhospital-core}"
- CHECK_BRANCH_URL="https://github.com/${GITHUB_ACTOR}/openhospital-core/tree/$BRANCH_NAME"
- echo "Checking branch existence with: curl -s -o /dev/null -w \"%{http_code}\" $CHECK_BRANCH_URL"
- # Determine FORK_REPO with fallback logic
- if [[ -n "${GITHUB_HEAD_REPOSITORY}" ]]; then
- echo "Using ${GITHUB_HEAD_REPOSITORY}."
- FORK_REPO=${GITHUB_HEAD_REPOSITORY}
- elif curl -s -o /dev/null -w "%{http_code}" $CHECK_BRANCH_URL | grep -q "200"; then
- echo "Using ${GITHUB_ACTOR}/openhospital-core"
- FORK_REPO=${GITHUB_ACTOR}/openhospital-core
- else
- echo "Using informatici/openhospital-core."
+ if [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REPOSITORY" == "informatici/openhospital-gui" ]]; then
+ # For pushes to the main repository, default to the main core repo
FORK_REPO="informatici/openhospital-core"
+ else
+ # For pull requests or other pushes, use the contributor fork if applicable
+ if [[ -n "$GITHUB_HEAD_REPOSITORY" ]]; then
+ FORK_REPO="$GITHUB_HEAD_REPOSITORY"
+ else
+ # Check if the actor's repo exists with the branch
+ FORK_REPO="${GITHUB_ACTOR}/openhospital-core"
+ CHECK_BRANCH_URL="https://github.com/$FORK_REPO/tree/$BRANCH_NAME"
+ echo "Checking branch existence with: curl -s -o /dev/null -w \"%{http_code}\" $CHECK_BRANCH_URL"
+
+ if curl -s -o /dev/null -w "%{http_code}" "$CHECK_BRANCH_URL" | grep -q "200"; then
+ echo "Branch $BRANCH_NAME exists in $FORK_REPO."
+ else
+ # Fallback to the main repository if the branch doesn’t exist in the fork
+ FORK_REPO="informatici/openhospital-core"
+ fi
+ fi
fi
# Export FORK_REPO and BRANCH_NAME to GITHUB_ENV for the next step
diff --git a/pom.xml b/pom.xml
index 2c73b6ab6d..889a7b95ad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.5.1
+ 3.5.2
org.apache.maven.plugins
diff --git a/rpt_extra/hmis108_adm_by_diagnosisOut.jasper b/rpt_extra/hmis108_adm_by_diagnosisOut.jasper
index 15fa56079a..7d88b0946f 100644
Binary files a/rpt_extra/hmis108_adm_by_diagnosisOut.jasper and b/rpt_extra/hmis108_adm_by_diagnosisOut.jasper differ
diff --git a/rpt_extra/hmis108_adm_by_diagnosisOut.jrxml b/rpt_extra/hmis108_adm_by_diagnosisOut.jrxml
index 4de1dd9cb3..7d4e66dd41 100644
--- a/rpt_extra/hmis108_adm_by_diagnosisOut.jrxml
+++ b/rpt_extra/hmis108_adm_by_diagnosisOut.jrxml
@@ -1,5 +1,5 @@
-
+
@@ -156,7 +156,7 @@ $F{AliveFemaleAdult}.longValue()+$F{DeadFemaleAdult}.longValue())]]>
-
+
@@ -196,19 +196,6 @@ $F{AliveFemaleAdult}.longValue()+$F{DeadFemaleAdult}.longValue())]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -242,6 +229,19 @@ $F{AliveFemaleAdult}.longValue()+$F{DeadFemaleAdult}.longValue())]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/rpt_extra/hmis108_cover.jasper b/rpt_extra/hmis108_cover.jasper
index b71ba80bbf..89bd4373ea 100644
Binary files a/rpt_extra/hmis108_cover.jasper and b/rpt_extra/hmis108_cover.jasper differ
diff --git a/rpt_extra/hmis108_cover.jrxml b/rpt_extra/hmis108_cover.jrxml
index 429e13d786..d0acb105fb 100644
--- a/rpt_extra/hmis108_cover.jrxml
+++ b/rpt_extra/hmis108_cover.jrxml
@@ -1,5 +1,5 @@
-
+
@@ -146,7 +146,7 @@ SELECT WRD_ID_A wardid,
-
+
@@ -159,7 +159,7 @@ SELECT WRD_ID_A wardid,
-
+
@@ -237,7 +237,7 @@ SELECT WRD_ID_A wardid,
-
+
@@ -251,7 +251,7 @@ SELECT WRD_ID_A wardid,
-
+
diff --git a/src/main/java/org/isf/accounting/gui/PatientBillEdit.java b/src/main/java/org/isf/accounting/gui/PatientBillEdit.java
index 4923780d49..23349004c3 100644
--- a/src/main/java/org/isf/accounting/gui/PatientBillEdit.java
+++ b/src/main/java/org/isf/accounting/gui/PatientBillEdit.java
@@ -845,11 +845,13 @@ private JButton getJButtonTrashPatient() {
jButtonTrashPatient.setPreferredSize(new Dimension(25, 25));
jButtonTrashPatient.setIcon(new ImageIcon("rsc/icons/remove_patient_button.png"));
jButtonTrashPatient.setToolTipText(MessageBundle.getMessage("angal.newbill.removethepatientassociatedwiththisbill.tooltip"));
+ if (thisBill.getBillPatient() == null) {
+ jButtonTrashPatient.setEnabled(false);
+ }
jButtonTrashPatient.addActionListener(actionEvent -> {
// BILL
thisBill.setBillPatient(null);
thisBill.setIsPatient(false);
- thisBill.getBillPatient().setCode(0);
thisBill.setPatName(""); //$NON-NLS-1$
thisBill.setAdmission(null);
// INTERFACE
@@ -895,6 +897,9 @@ private void setJButtonPickPatient() {
jButtonPickPatient.setText(MessageBundle.getMessage("angal.newbill.changepatient.btn"));
jButtonPickPatient.setMnemonic(MessageBundle.getMnemonic("angal.newbill.changepatient.btn.key"));
jButtonPickPatient.setToolTipText(MessageBundle.getMessage("angal.newbill.changethepatientassociatedwiththisbill.tooltip"));
+ if (jButtonTrashPatient != null) {
+ jButtonTrashPatient.setEnabled(true);
+ }
}
}
diff --git a/src/main/java/org/isf/examination/gui/PatientExaminationEdit.java b/src/main/java/org/isf/examination/gui/PatientExaminationEdit.java
index 847b5e35ab..359e7add98 100644
--- a/src/main/java/org/isf/examination/gui/PatientExaminationEdit.java
+++ b/src/main/java/org/isf/examination/gui/PatientExaminationEdit.java
@@ -1468,7 +1468,7 @@ public void actionPerformed(ActionEvent actionEvent) {
if (weight != 0 && height != 0) {
if (weight == ExaminationParameters.WEIGHT_MIN || weight == ExaminationParameters.WEIGHT_MAX || height == ExaminationParameters.HEIGHT_MIN || height == ExaminationParameters.HEIGHT_MAX) {
- int response = MessageDialog.yesNo(null, MessageBundle.getMessage("angal.patient.examination.minmaxvalues.msg"));
+ int response = MessageDialog.yesNo(null, "angal.patient.examination.minmaxvalues.msg");
if (response == JOptionPane.YES_OPTION) {
savePatientExamaination();
}
@@ -1476,7 +1476,7 @@ public void actionPerformed(ActionEvent actionEvent) {
savePatientExamaination();
}
} else {
- MessageDialog.error(null, MessageBundle.getMessage("angal.patient.examination.nonzero.msg"));
+ MessageDialog.error(null, "angal.patient.examination.nonzero.msg");
}
}
}
diff --git a/src/main/java/org/isf/medicals/gui/MedicalBrowser.java b/src/main/java/org/isf/medicals/gui/MedicalBrowser.java
index 231810640a..74b3f27d7f 100644
--- a/src/main/java/org/isf/medicals/gui/MedicalBrowser.java
+++ b/src/main/java/org/isf/medicals/gui/MedicalBrowser.java
@@ -595,7 +595,7 @@ private JComboBox getComboBoxMedicalType() {
pbox.addItem(STR_ALL);
List type;
try {
- type = medicalTypeManager.getMedicalType();
+ type = medicalTypeManager.getAllActiveMedicalType();
for (MedicalType elem : type) {
pbox.addItem(elem);
}
diff --git a/src/main/java/org/isf/medicals/gui/MedicalEdit.java b/src/main/java/org/isf/medicals/gui/MedicalEdit.java
index 61825d0143..f953292a70 100644
--- a/src/main/java/org/isf/medicals/gui/MedicalEdit.java
+++ b/src/main/java/org/isf/medicals/gui/MedicalEdit.java
@@ -432,7 +432,7 @@ private JComboBox getTypeComboBox() {
if (typeComboBox == null) {
typeComboBox = new JComboBox<>();
try {
- List types = medicalTypeManager.getMedicalType();
+ List types = medicalTypeManager.getAllActiveMedicalType();
for (MedicalType elem : types) {
typeComboBox.addItem(elem);
}
diff --git a/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java b/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java
index 99ab7dc533..02b7a0c10c 100644
--- a/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java
+++ b/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java
@@ -618,7 +618,7 @@ private JComboBox getMedicalTypeBox() {
medicalTypeBox.addItem(TEXT_ALL);
try {
- medical = medicalTypeBrowserManager.getMedicalType();
+ medical = medicalTypeBrowserManager.getAllActiveMedicalType();
for (MedicalType aMedicalType : medical) {
medicalTypeBox.addItem(aMedicalType);
diff --git a/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java b/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java
index 5c50678441..eaeee96f85 100644
--- a/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java
+++ b/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java
@@ -783,8 +783,7 @@ public void focusLost(FocusEvent e) {
weightFrom = Integer.parseInt(jWeightFromTextField.getText());
if (weightTo < 0 || weightTo > 200) {
jWeightToTextField.setText(""); //$NON-NLS-1$
- JOptionPane
- .showMessageDialog(WardPharmacy.this, MessageBundle.getMessage("angal.medicalstockward.insertavalidweight")); //$NON-NLS-1$
+ MessageDialog.error(WardPharmacy.this, "angal.medicalstockward.insertavalidweight");
}
} catch (NumberFormatException ex) {
jWeightToTextField.setText("0"); //$NON-NLS-1$
@@ -813,7 +812,7 @@ public void focusLost(FocusEvent e) {
weightTo = Integer.parseInt(jWeightToTextField.getText());
if (weightFrom < 0) {
jWeightFromTextField.setText("");
- JOptionPane.showMessageDialog(WardPharmacy.this, MessageBundle.getMessage("angal.medicalstockward.insertavalidweight"));
+ MessageDialog.error(WardPharmacy.this, "angal.medicalstockward.insertavalidweight");
}
} catch (NumberFormatException ex) {
jWeightFromTextField.setText("0");
@@ -1461,8 +1460,8 @@ class DrugsModel extends DefaultTableModel {
public DrugsModel() {
try {
- tableModel = movWardBrowserManager.getMedicalsWardTotalQuantity(wardSelected.getCode().charAt(0));
- wardDrugs = movWardBrowserManager.getMedicalsWard(wardSelected.getCode().charAt(0), true);
+ tableModel = movWardBrowserManager.getMedicalsWardTotalQuantity(wardSelected.getCode());
+ wardDrugs = movWardBrowserManager.getMedicalsWard(wardSelected.getCode(), true);
} catch (OHServiceException e) {
OHServiceExceptionUtil.showMessages(e);
tableModel = new ArrayList<>();
diff --git a/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java b/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java
index 194ade63bb..bdc0a51b6f 100644
--- a/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java
+++ b/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java
@@ -162,7 +162,7 @@ public WardPharmacyRectify(JFrame owner, Ward ward) {
super(owner, true);
selectedWard = ward;
try {
- wardDrugs = movWardBrowserManager.getMedicalsWard(selectedWard.getCode().charAt(0), false);
+ wardDrugs = movWardBrowserManager.getMedicalsWard(selectedWard.getCode(), false);
} catch (OHServiceException e) {
OHServiceExceptionUtil.showMessages(e);
}
@@ -184,7 +184,7 @@ public WardPharmacyRectify(JFrame owner, Ward ward, Medical medical) {
super(owner, true);
selectedWard = ward;
try {
- wardDrugs = movWardBrowserManager.getMedicalsWard(selectedWard.getCode().charAt(0), false);
+ wardDrugs = movWardBrowserManager.getMedicalsWard(selectedWard.getCode(), false);
} catch (OHServiceException e) {
OHServiceExceptionUtil.showMessages(e);
}
@@ -376,7 +376,7 @@ private void initComponents() {
double movQuantity = lotQty - newQty;
if (movQuantity == 0. || newQty < 0) {
- JOptionPane.showMessageDialog(this, MessageBundle.getMessage("angal.medicalstockward.rectify.pleaseinsertavalidvalue"));
+ MessageDialog.error(this, "angal.medicalstockward.rectify.pleaseinsertavalidvalue");
return;
}
if (newQty == 0.) {
diff --git a/src/main/java/org/isf/medtype/gui/MedicalTypeBrowser.java b/src/main/java/org/isf/medtype/gui/MedicalTypeBrowser.java
index 6c9fdb9d49..7e173e9744 100644
--- a/src/main/java/org/isf/medtype/gui/MedicalTypeBrowser.java
+++ b/src/main/java/org/isf/medtype/gui/MedicalTypeBrowser.java
@@ -54,9 +54,10 @@ public class MedicalTypeBrowser extends ModalJFrame implements MedicalTypeListen
private List pMedicalType;
private String[] pColumns = {
MessageBundle.getMessage("angal.common.code.txt").toUpperCase(),
- MessageBundle.getMessage("angal.common.description.txt").toUpperCase()
+ MessageBundle.getMessage("angal.common.description.txt").toUpperCase(),
+ MessageBundle.getMessage("angal.common.deleted.label").toUpperCase()
};
- private int[] pColumnWidth = {80, 200};
+ private final int[] pColumnWidth = { 20, 200, 20 };
private JPanel jContainPanel;
private JPanel jButtonPanel;
private JButton jNewButton;
@@ -198,6 +199,7 @@ private JTable getJTable() {
jTable = new JTable(model);
jTable.getColumnModel().getColumn(0).setMinWidth(pColumnWidth[0]);
jTable.getColumnModel().getColumn(1).setMinWidth(pColumnWidth[1]);
+ jTable.getColumnModel().getColumn(2).setMinWidth(pColumnWidth[2]);
}
return jTable;
}
@@ -243,6 +245,8 @@ public Object getValueAt(int r, int c) {
return medType.getCode();
} else if (c == 1) {
return medType.getDescription();
+ } else if (c == 2) {
+ return medType.getDeleted() == 'Y';
}
return null;
}
@@ -251,6 +255,11 @@ public Object getValueAt(int r, int c) {
public boolean isCellEditable(int arg0, int arg1) {
return false;
}
+
+ @Override
+ public Class getColumnClass(int column) {
+ return (column == 2) ? Boolean.class : String.class;
+ }
}
@Override
diff --git a/src/main/java/org/isf/medtype/gui/MedicalTypeBrowserEdit.java b/src/main/java/org/isf/medtype/gui/MedicalTypeBrowserEdit.java
index 82e8f69556..36e4613717 100644
--- a/src/main/java/org/isf/medtype/gui/MedicalTypeBrowserEdit.java
+++ b/src/main/java/org/isf/medtype/gui/MedicalTypeBrowserEdit.java
@@ -26,6 +26,7 @@
import java.util.EventListener;
import javax.swing.JButton;
+import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
@@ -95,8 +96,10 @@ private void fireMedicalUpdated() {
private JButton cancelButton;
private JButton okButton;
private JTextField descriptionTextField;
+ private JCheckBox deletedCheckbox;
private VoLimitedTextField codeTextField;
private String lastdescription;
+ private char isLastDeleted;
private MedicalType medicalType;
private boolean insert;
private JPanel jDataPanel;
@@ -110,6 +113,7 @@ public MedicalTypeBrowserEdit(JFrame owner, MedicalType old, boolean inserting)
insert = inserting;
medicalType = old; //medical type will be used for every operation
lastdescription = medicalType.getDescription();
+ isLastDeleted = medicalType.getDeleted();
initialize();
}
@@ -124,6 +128,7 @@ private void initialize() {
this.setTitle(MessageBundle.getMessage("angal.medtype.editmedicaltype.title"));
}
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+ this.getDeletedField();
this.pack();
this.setLocationRelativeTo(null);
}
@@ -197,7 +202,8 @@ private JButton getOkButton() {
medicalType.setDescription(descriptionTextField.getText());
medicalType.setCode(codeTextField.getText());
-
+ medicalType.setDeleted(deletedCheckbox.isSelected() ? 'Y' : 'N');
+
if (insert) { // inserting
try {
MedicalType insertedMedicalType = medicalTypeBrowserManager.newMedicalType(medicalType);
@@ -211,7 +217,7 @@ private JButton getOkButton() {
OHServiceExceptionUtil.showMessages(e1);
}
} else { // updating
- if (descriptionTextField.getText().equals(lastdescription)) {
+ if (descriptionTextField.getText().equals(lastdescription) && medicalType.getDeleted() == isLastDeleted) {
dispose();
} else {
try {
@@ -263,6 +269,14 @@ private JTextField getCodeTextField() {
}
return codeTextField;
}
+
+ private JCheckBox getDeletedField() {
+ if (deletedCheckbox == null) {
+ deletedCheckbox = new JCheckBox(MessageBundle.getMessage("angal.common.deleted.label"));
+ deletedCheckbox.setSelected(medicalType.getDeleted() == 'Y');
+ }
+ return deletedCheckbox;
+ }
/**
* This method initializes jDataPanel
@@ -276,7 +290,9 @@ private JPanel getJDataPanel() {
jDataPanel.add(getCodeTextField());
jDataPanel.add(new JLabel(MessageBundle.getMessage("angal.common.description.txt") + ':'));
jDataPanel.add(getDescriptionTextField());
- SpringUtilities.makeCompactGrid(jDataPanel, 2, 2, 5, 5, 5, 5);
+ jDataPanel.add(new JLabel(MessageBundle.getMessage("angal.common.deleted.label") + ':'));
+ jDataPanel.add(getDeletedField());
+ SpringUtilities.makeCompactGrid(jDataPanel, 3, 2, 5, 5, 5, 5);
}
return jDataPanel;
}
diff --git a/src/main/java/org/isf/menu/gui/GroupEdit.java b/src/main/java/org/isf/menu/gui/GroupEdit.java
index 5e17a2098a..7e59ca01d7 100644
--- a/src/main/java/org/isf/menu/gui/GroupEdit.java
+++ b/src/main/java/org/isf/menu/gui/GroupEdit.java
@@ -187,7 +187,7 @@ private JButton getOkButton() {
okButton.setMnemonic(MessageBundle.getMnemonic("angal.common.ok.btn.key"));
okButton.addActionListener(actionEvent -> {
if (nameTextField.getText().isEmpty()) {
- MessageDialog.error(null, MessageBundle.getMessage("angal.groupsbrowser.pleaseinsertavalidusergroupname.msg"));
+ MessageDialog.error(null, "angal.groupsbrowser.pleaseinsertavalidusergroupname.msg");
return;
}
diff --git a/src/main/java/org/isf/menu/gui/UserEdit.java b/src/main/java/org/isf/menu/gui/UserEdit.java
index 2c444058bd..55fa9c1833 100644
--- a/src/main/java/org/isf/menu/gui/UserEdit.java
+++ b/src/main/java/org/isf/menu/gui/UserEdit.java
@@ -340,20 +340,24 @@ private JComboBox getUserGroupComboBox() {
if (userGroupComboBox == null) {
userGroupComboBox = new JComboBox<>();
try {
- List group = userBrowsingManager.getUserGroup();
+ List groups = userBrowsingManager.getUserGroup();
if (insert) {
- if (group != null) {
- for (UserGroup elem : group) {
- userGroupComboBox.addItem(elem);
+ if (groups != null) {
+ for (UserGroup group : groups) {
+ if (!group.isDeleted()) {
+ userGroupComboBox.addItem(group);
+ }
}
}
} else {
UserGroup selectedUserGroup = null;
- if (group != null) {
- for (UserGroup elem : group) {
- userGroupComboBox.addItem(elem);
- if (user.getUserGroupName().equals(elem)) {
- selectedUserGroup = elem;
+ if (groups != null) {
+ for (UserGroup group : groups) {
+ if (!group.isDeleted()) {
+ userGroupComboBox.addItem(group);
+ if (user.getUserGroupName().equals(group)) {
+ selectedUserGroup = group;
+ }
}
}
}
diff --git a/src/main/java/org/isf/opd/gui/OpdBrowser.java b/src/main/java/org/isf/opd/gui/OpdBrowser.java
index cba8241a35..aa192c6c59 100644
--- a/src/main/java/org/isf/opd/gui/OpdBrowser.java
+++ b/src/main/java/org/isf/opd/gui/OpdBrowser.java
@@ -1142,7 +1142,7 @@ public void keyPressed(KeyEvent e) {
try {
code = Integer.parseInt(codeHint);
} catch (NumberFormatException e1) {
- MessageDialog.error(OpdBrowser.this, MessageBundle.getMessage("angal.common.pleaseinsertavalidnumber.msg"));
+ MessageDialog.error(OpdBrowser.this, "angal.common.pleaseinsertavalidnumber.msg");
return;
}
progYearFilter.setText("");
@@ -1155,7 +1155,7 @@ public void keyPressed(KeyEvent e) {
((AbstractTableModel) jTable.getModel()).fireTableDataChanged();
rowCounter.setText(rowCounterText + pSur.size());
} else {
- MessageDialog.info(OpdBrowser.this, MessageBundle.getMessage("angal.common.nodatatoshow.msg"));
+ MessageDialog.info(OpdBrowser.this, "angal.common.nodatatoshow.msg");
}
}
}
@@ -1176,7 +1176,7 @@ public void keyPressed(KeyEvent e) {
try {
code = Integer.parseInt(codeHint);
} catch (NumberFormatException e1) {
- MessageDialog.error(OpdBrowser.this, MessageBundle.getMessage("angal.common.pleaseinsertavalidnumber.msg"));
+ MessageDialog.error(OpdBrowser.this, "angal.common.pleaseinsertavalidnumber.msg");
return;
}
opdCodeFilter.setText("");
@@ -1185,7 +1185,7 @@ public void keyPressed(KeyEvent e) {
((AbstractTableModel) jTable.getModel()).fireTableDataChanged();
rowCounter.setText(rowCounterText + pSur.size());
if (pSur.isEmpty()) {
- MessageDialog.info(OpdBrowser.this, MessageBundle.getMessage("angal.common.nodatatoshow.msg"));
+ MessageDialog.info(OpdBrowser.this, "angal.common.nodatatoshow.msg");
}
}
}
@@ -1206,7 +1206,7 @@ public void keyPressed(KeyEvent e) {
try {
code = Integer.parseInt(codeHint);
} catch (NumberFormatException e1) {
- MessageDialog.error(OpdBrowser.this, MessageBundle.getMessage("angal.common.pleaseinsertavalidnumber.msg"));
+ MessageDialog.error(OpdBrowser.this, "angal.common.pleaseinsertavalidnumber.msg");
return;
}
opdCodeFilter.setText("");
@@ -1216,7 +1216,7 @@ public void keyPressed(KeyEvent e) {
((AbstractTableModel) jTable.getModel()).fireTableDataChanged();
rowCounter.setText(rowCounterText + pSur.size());
if (pSur.isEmpty()) {
- MessageDialog.info(OpdBrowser.this, MessageBundle.getMessage("angal.common.nodatatoshow.msg"));
+ MessageDialog.info(OpdBrowser.this, "angal.common.nodatatoshow.msg");
}
} catch (OHServiceException ohServiceException) {
MessageDialog.showExceptions(ohServiceException);
diff --git a/src/main/java/org/isf/priceslist/gui/ListBrowser.java b/src/main/java/org/isf/priceslist/gui/ListBrowser.java
index 898c481497..00ec407d66 100644
--- a/src/main/java/org/isf/priceslist/gui/ListBrowser.java
+++ b/src/main/java/org/isf/priceslist/gui/ListBrowser.java
@@ -116,7 +116,7 @@ private JButton getJButtonDelete() {
jButtonDelete.setMnemonic(MessageBundle.getMnemonic("angal.common.delete.btn.key"));
jButtonDelete.addActionListener(actionEvent -> {
if (jTablePriceLists.getSelectedRow() < 0) {
- JOptionPane.showMessageDialog(null, MessageBundle.getMessage("angal.priceslist.pleaseselectalisttodelete"));
+ MessageDialog.error(null, "angal.priceslist.pleaseselectalisttodelete");
} else {
if (jTablePriceLists.getRowCount() == 1) {
MessageDialog.error(null, "angal.priceslist.sorryatleastonelist");
diff --git a/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java b/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java
index 497418c7cb..6663e6c806 100644
--- a/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java
+++ b/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java
@@ -217,6 +217,7 @@ private ActionListener buildConfirmationActionListener(List che
TelemetryManager telemetryManager, TelemetryUtils telemetryUtils) {
return new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
if (!agreementCheckbox.isSelected()) {