Ignore:
Timestamp:
Oct 16, 2010, 1:56:54 PM (14 years ago)
Author:
mlg
Message:

bug correction
is now impossible to add files if the application is already sending photos.
feature:0001887

Location:
extensions/jiwigo/trunk/src/main
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/ImagesManagement.java

    r7221 r7223  
    7878         */
    7979        public static int privacyLevel = 1;
     80
     81        /**
     82         * boolean that defines if the application is sending files
     83         *
     84         */
     85        public static boolean sendingFiles = false;
    8086
    8187
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailCategoryPanel.java

    r7222 r7223  
    55import java.awt.Graphics;
    66import java.io.File;
     7import java.io.IOException;
    78import javax.swing.JOptionPane;
    89import javax.swing.JPanel;
     
    9495                                        new DialogPrivacyLevel();
    9596                                }
    96                                 new Thread(new ThreadEnvoiPhoto(files)).start();
    97 
     97                                if (ImagesManagement.sendingFiles) {
     98                                        JOptionPane.showMessageDialog(null, Messages.getMessage("alreadySendingError"), Messages.getMessage("error"),
     99                                                        JOptionPane.ERROR_MESSAGE);
     100                                } else {
     101                                        new Thread(new ThreadEnvoiPhoto(files)).start();
     102                                }
    98103                        }
    99104                });
     
    144149                int nb = 1;
    145150                JPanel panelh = new JPanel(new FlowLayout());
     151                try {
     152                        ImagesManagement.LIST_IMAGE = ImageService.getInstance().listerParCategory(categoryId, false);
     153                } catch (IOException e1) {
     154                        e1.printStackTrace();
     155                }
    146156                for (Image image : ImagesManagement.LIST_IMAGE) {
    147157                        try {
     
    214224                @Override
    215225                public void run() {
    216 
     226                        ImagesManagement.sendingFiles = true;
    217227                        for (int i = 0; i < files.length; i++) {
    218228                                MainFrame.getInstance().setAdditionalMessage("<html><i>" + (i + 1) + "/" + files.length + " : </i></html>");
     
    236246                        rafraichir(categoryId, true);
    237247                        MainFrame.getInstance().getProgressBar().setValue(0);
     248                        ImagesManagement.sendingFiles = false;
    238249                }
    239250        }
  • extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages.properties

    r7070 r7223  
    44error=Error
    55welcomeMessage=Welcome to Jiwigo
    6 version=0.13
     6version=0.14
    77commentaires=Comments
    88loading=Loading...
     
    5757listingTagsError=Error while getting tags
    5858addingTagsError=Error while adding tags
     59alreadySendingError=The application is already sending files. Please wait before sending other files.
    5960
    6061#####################################################
  • extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_de.properties

    r6995 r7223  
    44error=Fehler
    55welcomeMessage=Willkommen bei Jiwigo
    6 version=0.13
     6version=0.14
    77commentaires=Kommentare
    88loading=Ladet...
  • extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_en.properties

    r7070 r7223  
    44error=Error
    55welcomeMessage=Welcome to Jiwigo
    6 version=0.13
     6version=0.14
    77commentaires=Comments
    88loading=Loading...
     
    5757listingTagsError=Error while getting tags
    5858addingTagsError=Error while adding tags
     59alreadySendingError=The application is already sending files. Please wait before sending other files.
    5960
    6061#####################################################
  • extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_es.properties

    r6998 r7223  
    44error=Error
    55welcomeMessage=Bienvenidos a Jiwigo
    6 version=0.11b
     6version=0.14
    77commentaires=Comentarios
    88loading=Descarga...
  • extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_fr.properties

    r7070 r7223  
    44error=Erreur
    55welcomeMessage=Bienvenue dans Jiwigo
    6 version=0.13
     6version=0.14
    77commentaires=Commentaires
    88loading=Chargement...
     
    5757listingTagsError=Erreur lors de la récupération des tags
    5858addingTagsError=Erreur lors de l'ajout de tags
     59alreadySendingError=Un envoi de photo est en cours. Veuillez attendre qu'il soit fini.
    5960
    6061#####################################################
  • extensions/jiwigo/trunk/src/main/resources/fr/mael/jiwigo/trad/messages_it.properties

    r6995 r7223  
    44error=Errore
    55welcomeMessage=Benvenuti su Jiwigo
    6 version=0.13
     6version=0.14
    77commentaires=Commenti
    88loading=Caricamento in corso...
Note: See TracChangeset for help on using the changeset viewer.