This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 3cda6fbabd8fa7e768932efdbbbbf19b8569b8ff Author: servantie <servantie.c@gmail.com> Date: Thu Jun 9 17:57:32 2016 +0200 fix to display error message when the sync went wrong --- .../org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 0af876d..3c9f162 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -361,6 +361,9 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener */ @org.jdesktop.application.Action public void generateUpdate() { + //reinitialiser les trucs + updateArea.setText(""); + updateJson = new ArrayList<>(); //get the various objects for updates (on several urls) updateJson = taskToJSONFormat(task, datePickerFrom.getDate(), datePickerTo.getDate(), isIncludingAnnotations(), timezone); @@ -464,6 +467,7 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener } } } + connection.disconnect(); } catch (MalformedURLException e) { log.error("URL malformed"); //abort synchronization of this task if the url is wrong @@ -481,12 +485,14 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener log.error("Update error, wrong URL?"); String message = getResourceMap().getString("action.updateError"); String title = getResourceMap().getString("action.updateErrorTitle"); - JOptionPane.showMessageDialog(this.getMainComponent(), message, title, - JOptionPane.ERROR_MESSAGE); - + infoBox(message, title); } } + public static void infoBox(String infoMessage, String titleBar) + { + JOptionPane.showMessageDialog(null, infoMessage, "Erreur : " + titleBar, JOptionPane.ERROR_MESSAGE); + } @Override public void changedUpdate(DocumentEvent e) { documentChanged(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.