Index: /extensions/jiwigo/trunk/.classpath
===================================================================
--- /extensions/jiwigo/trunk/.classpath	(revision 9877)
+++ /extensions/jiwigo/trunk/.classpath	(revision 9878)
@@ -23,4 +23,4 @@
   <classpathentry kind="var" path="M2_REPO/org/swinglabs/swing-worker/1.1/swing-worker-1.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/swinglabs/swingx/1.6.1/swingx-1.6.1.jar"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-6-openjdk"/>
 </classpath>
Index: /extensions/jiwigo/trunk/pom.xml
===================================================================
--- /extensions/jiwigo/trunk/pom.xml	(revision 9877)
+++ /extensions/jiwigo/trunk/pom.xml	(revision 9878)
@@ -3,5 +3,5 @@
   <groupId>Jiwigo</groupId>
   <artifactId>Jiwigo</artifactId>
-  <version>0.13</version>
+  <version>0.14</version>
 
 	<repositories>
Index: /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/ImagesManagement.java
===================================================================
--- /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/ImagesManagement.java	(revision 9877)
+++ /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/ImagesManagement.java	(revision 9878)
@@ -2,4 +2,5 @@
 
 import java.awt.image.BufferedImage;
+import java.io.IOException;
 import java.net.URL;
 import java.util.HashMap;
@@ -8,5 +9,8 @@
 import javax.imageio.ImageIO;
 
+import fr.mael.jiwigo.Main;
 import fr.mael.jiwigo.om.Image;
+import fr.mael.jiwigo.service.ImageService;
+import fr.mael.jiwigo.transverse.exception.ProxyAuthenticationException;
 import fr.mael.jiwigo.transverse.util.Tools;
 
@@ -90,4 +94,10 @@
 
     /**
+     * integer that contains the current category of the browser
+     * it allows to empty the list of images if the category changes
+     */
+    private Integer currentCategory = -1;
+
+    /**
      * singleton
      */
@@ -142,9 +152,20 @@
      */
     public void setCurrentImage(Image image) {
+	if (!image.getIdCategory().equals(currentCategory)) {
+	    try {
+		listImage = ImageService.getInstance(Main.sessionManager).listByCategory(image.getIdCategory(), true);
+		currentCategory = image.getIdCategory();
+	    } catch (IOException e) {
+		LOG.error(Tools.getStackTrace(e));
+	    } catch (ProxyAuthenticationException e) {
+		LOG.error(Tools.getStackTrace(e));
+	    }
+	}
 	currentImage = image;
 	int compteur = 0;
 	for (Image im : listImage) {
-	    if (im.equals(image)) {
+	    if (im.getIdentifier().equals(image.getIdentifier())) {
 		currentImageIndex = compteur;
+		return;
 	    }
 	    compteur++;
Index: /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/MyCollapsiblePanel.java
===================================================================
--- /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/MyCollapsiblePanel.java	(revision 9877)
+++ /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/MyCollapsiblePanel.java	(revision 9878)
@@ -1,23 +1,23 @@
 package fr.mael.jiwigo.ui;
 
-/* 
-  * $Id: CollapsiblePaneDemo.java 1164 2009-11-03 04:22:00Z kschaefe $ 
-  * 
-  * Copyright 2009 Sun Microsystems, Inc., 4150 Network Circle, 
-  * Santa Clara, California 95054, U.S.A. All rights reserved. 
-  * 
-  * This library is free software; you can redistribute it and/or 
-  * modify it under the terms of the GNU Lesser General Public 
-  * License as published by the Free Software Foundation; either 
-  * version 2.1 of the License, or (at your option) any later version. 
-  *  
-  * This library is distributed in the hope that it will be useful, 
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-  * Lesser General Public License for more details. 
-  *  
-  * You should have received a copy of the GNU Lesser General Public 
-  * License along with this library; if not, write to the Free Software 
-  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
+/*
+  * $Id: CollapsiblePaneDemo.java 1164 2009-11-03 04:22:00Z kschaefe $
+  *
+  * Copyright 2009 Sun Microsystems, Inc., 4150 Network Circle,
+  * Santa Clara, California 95054, U.S.A. All rights reserved.
+  *
+  * This library is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU Lesser General Public
+  * License as published by the Free Software Foundation; either
+  * version 2.1 of the License, or (at your option) any later version.
+  *
+  * This library is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this library; if not, write to the Free Software
+  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   */
 
@@ -33,5 +33,5 @@
 import fr.mael.jiwigo.ui.browser.BrowserPanel;
 
-/** 
+/**
    Copyright (c) 2010, Mael
    All rights reserved.
@@ -58,6 +58,6 @@
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
- * @author Karl George Schaefer 
+ *
+ * @author Karl George Schaefer
  */
 @SuppressWarnings("serial")
@@ -68,6 +68,6 @@
     private JSplitPane splitPane;
 
-    //    /** 
-    //     * main method allows us to run as a standalone demo. 
+    //    /**
+    //     * main method allows us to run as a standalone demo.
     //     */
     //    public static void main(String[] args) {
@@ -91,4 +91,13 @@
 	splitPane.setTopComponent(browserFrame);
 	splitPane.setBottomComponent(tabbedPane);
+	//	splitPane.addPropertyChangeListener(new PropertyChangeListener() {
+	//
+	//	    @Override
+	//	    public void propertyChange(PropertyChangeEvent evt) {
+	//		if (evt.getPropertyName().equals("dividerLocation")) {
+	//		    browserFrame.callRepaint();
+	//		}
+	//	    }
+	//	});
 	splitPane.setResizeWeight(0.5);
 	add(splitPane, BorderLayout.CENTER);
@@ -105,5 +114,5 @@
     //    public void changeSize(Dimension dimension) {
     //	Dimension dim = new Dimension(dimension.width, dimension.height - 400);
-    //	
+    //
     //    }
 
Index: /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserImagePanel.java
===================================================================
--- /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserImagePanel.java	(revision 9877)
+++ /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserImagePanel.java	(revision 9878)
@@ -53,5 +53,5 @@
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-   
+
  * Panel qui affiche une image
  * @author mael
@@ -61,5 +61,7 @@
 	MouseListener {
     private BufferedImage image;
-    private double scale = 1.0;
+    //FIXME where I put scale = 1.0, there are display bugs (easy to reproduce : just have to move the horizontal
+    //splitpane where an image is loaded.
+    private double scale = 0.99;
     boolean flipH = false;
     boolean flipV = false;
Index: /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserPanel.java
===================================================================
--- /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserPanel.java	(revision 9877)
+++ /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/browser/BrowserPanel.java	(revision 9878)
@@ -32,5 +32,4 @@
 import fr.mael.jiwigo.transverse.util.Tools;
 import fr.mael.jiwigo.ui.comments.CommentsDialog;
-import fr.mael.jiwigo.ui.mainframe.MainFrame;
 
 /**
@@ -253,6 +252,6 @@
     public void changeImage() {
 	imagePanel.changeImage();
-	MainFrame.getInstance().getCollapsiblePanel().revalidate();
-	MainFrame.getInstance().getCollapsiblePanel().repaint();
+	//	MainFrame.getInstance().getCollapsiblePanel().revalidate();
+	//	MainFrame.getInstance().getCollapsiblePanel().repaint();
     }
 
@@ -316,4 +315,22 @@
     }
 
+    public void callRepaint() {
+	if (menuBar != null) {
+	    menuBar.repaint();
+	    menuBar.revalidate();
+	}
+	if (panelBoutons != null) {
+	    panelBoutons.repaint();
+	    panelBoutons.revalidate();
+	}
+	if (imagePanel != null) {
+	    imagePanel.repaint();
+	    imagePanel.revalidate();
+	}
+
+	repaint();
+	revalidate();
+    }
+
     //    @Override
     //    public void dispose() {
Index: /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/MainFrame.java
===================================================================
--- /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/MainFrame.java	(revision 9877)
+++ /extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/MainFrame.java	(revision 9878)
@@ -163,4 +163,6 @@
 	tabbedPane = new JTabbedPaneWithCloseIcons();
 	collapsiblePanel = new MyCollapsiblePanel(tabbedPane);
+	//	splitPane.setTopComponent(browserFrame);
+	//	splitPane.setBottomComponent(tabbedPane);
 	splitPane.setRightComponent(collapsiblePanel);
 
@@ -197,4 +199,6 @@
 
     public void setBrowserVisible() {
+	splitPane.remove(imageSearchPanel);
+	splitPane.remove(collapsiblePanel);
 	splitPane.setRightComponent(collapsiblePanel);
 	splitPane.revalidate();
@@ -205,4 +209,7 @@
 
     public void setImageSearchPanelVisible() {
+	splitPane.remove(imageSearchPanel);
+	splitPane.remove(collapsiblePanel);
+	splitPane.setLeftComponent(categoriesTree);
 	splitPane.setRightComponent(imageSearchPanel);
 	splitPane.revalidate();
@@ -317,10 +324,10 @@
     }
 
-    /**
-     * @return the collapsiblePanel
-     */
-    public MyCollapsiblePanel getCollapsiblePanel() {
-	return collapsiblePanel;
-    }
+    //    /**
+    //     * @return the collapsiblePanel
+    //     */
+    //    public MyCollapsiblePanel getCollapsiblePanel() {
+    //	return collapsiblePanel;
+    //    }
 
     /**
Index: /extensions/jiwigo/trunk/src/main/resources/log4j.xml
===================================================================
--- /extensions/jiwigo/trunk/src/main/resources/log4j.xml	(revision 9877)
+++ /extensions/jiwigo/trunk/src/main/resources/log4j.xml	(revision 9878)
@@ -10,5 +10,5 @@
 		</layout>
 	</appender>
-	
+
 	<appender name="fichier" class="org.apache.log4j.DailyRollingFileAppender">
 		<param name="File" value="logs/jiwigo.log" />
@@ -18,14 +18,14 @@
 			<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n" />
 		</layout>
-	</appender>	
+	</appender>
 
 
 	<!-- Déclaration loggers -->
 	<logger name="fr.mael.jiwigo" additivity="false">
-		<level value="DEBUG" />
+		<level value="INFO" />
 		<appender-ref ref="console" />
 		<appender-ref ref="fichier" />
 	</logger>
-	
+
 
 
Index: /extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java
===================================================================
--- /extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java	(revision 9877)
+++ /extensions/jiwigo/trunk/src/test/java/fr/mael/jiwigo/service/ServicesTest.java	(revision 9878)
@@ -1,3 +1,5 @@
 package fr.mael.jiwigo.service;
+
+import java.util.List;
 
 import org.junit.Test;
@@ -6,4 +8,5 @@
 import fr.mael.jiwigo.TestBase;
 import fr.mael.jiwigo.om.Category;
+import fr.mael.jiwigo.om.Comment;
 import fr.mael.jiwigo.om.Image;
 
@@ -25,7 +28,8 @@
 
 	Image image = ImageService.getInstance(Main.sessionManager).listByCategory(cat.getIdentifier(), true).get(0);
-	int firstCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size();
+	List<Comment> comments = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier());
+	//	int firstCount = comments.size();
 	CommentService.getInstance(Main.sessionManager).create("comment test", image.getIdentifier(), "none");
-	int secondCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size();
+	//	int secondCount = CommentService.getInstance(Main.sessionManager).list(image.getIdentifier()).size();
 	//	Assert.assertSame(firstCount + 1, secondCount);
     }
