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 01169e795192c5032402c195d7e451616a8f33f8 Author: servantie <servantie.c@gmail.com> Date: Wed Jul 20 15:16:55 2016 +0200 in case of task merging with SyncInfo, added a warning message Synchronization information of tasks merged will be lost, the task being merged into will retain its SyncInfo --- src/main/java/org/chorem/jtimer/JTimer.java | 17 ++++++++++++++--- .../org/chorem/jtimer/resources/JTimer.properties | 1 + .../org/chorem/jtimer/resources/JTimer_fr.properties | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/JTimer.java b/src/main/java/org/chorem/jtimer/JTimer.java index eeae51d..5ca6508 100644 --- a/src/main/java/org/chorem/jtimer/JTimer.java +++ b/src/main/java/org/chorem/jtimer/JTimer.java @@ -1053,9 +1053,20 @@ public class JTimer extends SingleFrameApplication implements TimerTask destinationTask = tasks.get(0); List<TimerTask> otherTasks = tasks.subList(1, tasks.size()); - int confirm = JOptionPane.showConfirmDialog(getMainFrame(), - resourceMap.getString("input.mergeTaskMessage", tasks.size(), - destinationTask.getName()), resourceMap + //check for syncInfos, if there are some in the tasks being merged, warn with a message + String mergeMessage = resourceMap.getString("input.mergeTaskMessage", tasks.size(), + destinationTask.getName()); + boolean syncInfoInMergedTasks = false; + for (TimerTask task : otherTasks) { + if (!task.getSynchronizingInfoList().isEmpty()) { + syncInfoInMergedTasks = true; + } + } + if (syncInfoInMergedTasks) { + mergeMessage = resourceMap.getString("input.mergeTaskWithSyncInfoMessage", tasks.size(), destinationTask.getName()); + } + int confirm = JOptionPane.showConfirmDialog(getMainFrame(), mergeMessage + , resourceMap .getString("input.mergeTaskTitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (confirm == JOptionPane.YES_OPTION) { diff --git a/src/main/resources/org/chorem/jtimer/resources/JTimer.properties b/src/main/resources/org/chorem/jtimer/resources/JTimer.properties index 4120155..e841b89 100644 --- a/src/main/resources/org/chorem/jtimer/resources/JTimer.properties +++ b/src/main/resources/org/chorem/jtimer/resources/JTimer.properties @@ -171,6 +171,7 @@ input.deleteTaskTitle=Confirm input.deleteTaskMessage=Do you want to delete task "%s" ? input.deleteTasksMessage=Do you want to delete the %d selected tasks ? input.mergeTaskMessage=Do you want to merge selected %d tasks\ninto "%s" ? +input.mergeTaskWithSyncInfoMessage = Do you want to merge selected %d tasks\ninto "%s" ? \nSynchronization Information will be lost ! input.mergeTaskTitle=Merge input.addAnnotationTitle=Add annotation input.addAnnotationMessage=Annotation for task "%s" : diff --git a/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties b/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties index b070bbf..0f3aa4b 100644 --- a/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties +++ b/src/main/resources/org/chorem/jtimer/resources/JTimer_fr.properties @@ -135,6 +135,8 @@ input.deleteTaskTitle=Confirmation input.deleteTaskMessage=Voulez-vous supprimer la t\u00E2che "%s" ? input.deleteTasksMessage=Voulez-vous supprimer les %d t\u00E2ches s\u00E9lectionn\u00E9es ? input.mergeTaskMessage=Voulez-vous fusionner les %d t\u00E2ches s\u00E9lectionn\u00E9es\ndans la t\u00E2ches "%s" ? +input.mergeTaskWithSyncInfoMessage = Voulez-vous fusionner les %d t\u00E2ches s\u00E9lectionn\u00E9es\ndans la t\u00E2che "%s" ?\n Les informations de synchronisation seront perdues ! + input.mergeTaskTitle=Fusionner input.addAnnotationTitle=Ajouter une annotation input.addAnnotationMessage=Annotation pour la t\u00E2che "%s" : -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.