Skip to content

Commit

Permalink
Merge pull request #2099 from dbmalkovsky/dbmMessageDialog
Browse files Browse the repository at this point in the history
Chore: MessageDialog methods takes a bundle key not the resolved message
  • Loading branch information
dbmalkovsky authored Dec 4, 2024
2 parents 3e01153 + 1a41c2c commit 4e06954
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1468,15 +1468,15 @@ 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();
}
} else {
savePatientExamaination();
}
} else {
MessageDialog.error(null, MessageBundle.getMessage("angal.patient.examination.nonzero.msg"));
MessageDialog.error(null, "angal.patient.examination.nonzero.msg");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/isf/menu/gui/GroupEdit.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/isf/opd/gui/OpdBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand All @@ -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");
}
}
}
Expand All @@ -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("");
Expand All @@ -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");
}
}
}
Expand All @@ -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("");
Expand All @@ -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);
Expand Down

0 comments on commit 4e06954

Please sign in to comment.