From b9a41a58c8f871c278742251a1970264bdfeebd4 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Paour Date: Wed, 18 Feb 2004 00:07:18 +0000 Subject: [PATCH] 2004-02-17 Pierre-Luc Paour (1.3.2-b1) * Albums are now sorted alphabetically when using the latest protocol. * Added a new launcher in the IA project for debug, which sets the output to a console. * When IA console is set, the Log will automatically be sent to stdout. This is to make it easier to have users send in bug reports that include exceptions. --- ChangeLog | 10 + build.xml | 2 +- com/gallery/GalleryRemote/GalleryComm2.java | 7 +- .../GalleryRemote/GalleryRemoteMainFrame.java | 4 +- com/gallery/GalleryRemote/Log.java | 1 + com/gallery/GalleryRemote/MainFrame.java | 2 + com/gallery/GalleryRemote/model/Album.java | 4 + defaults.properties | 4 +- gallery_remote.iap_xml | 251 +++++++++++++++++- 9 files changed, 266 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index eed56af..8a2c2d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-02-17 Pierre-Luc Paour (1.3.2-b1) + + * Albums are now sorted alphabetically when using the latest + protocol. + * Added a new launcher in the IA project for debug, which + sets the output to a console. + * When IA console is set, the Log will automatically be sent + to stdout. This is to make it easier to have users send + in bug reports that include exceptions. + 2004-02-12 Pierre-Luc Paour (1.3.1) * Re-release... diff --git a/build.xml b/build.xml index b491cf2..960e614 100644 --- a/build.xml +++ b/build.xml @@ -263,7 +263,7 @@ - + diff --git a/com/gallery/GalleryRemote/GalleryComm2.java b/com/gallery/GalleryRemote/GalleryComm2.java index dd9ed39..9da9a00 100644 --- a/com/gallery/GalleryRemote/GalleryComm2.java +++ b/com/gallery/GalleryRemote/GalleryComm2.java @@ -30,6 +30,7 @@ import com.gallery.GalleryRemote.util.GRI18n; import com.gallery.GalleryRemote.util.HTMLEscaper; import com.gallery.GalleryRemote.util.UrlMessageDialog; +import com.gallery.GalleryRemote.util.NaturalOrderComparator; import javax.swing.*; import java.awt.*; @@ -875,7 +876,8 @@ private void list22() throws IOException, ModuleException { Log.log(Log.LEVEL_TRACE, MODULE, "Linked " + name2parentName.size() + " albums to their parents"); // reorder - //Collections.reverse(albums); + Collections.sort(albums, new NaturalOrderComparator()); + Collections.reverse(albums); ArrayList orderedAlbums = new ArrayList(); int depth = 0; while (!albums.isEmpty()) { @@ -886,10 +888,11 @@ private void list22() throws IOException, ModuleException { try { if (a.getAlbumDepth() == depth) { it.remove(); + a.sortSubAlbums(); Album parentAlbum = a.getParentAlbum(); if (parentAlbum == null) { - orderedAlbums.add(a); + orderedAlbums.add(0, a); } else { int i = orderedAlbums.indexOf(parentAlbum); orderedAlbums.add(i + 1, a); diff --git a/com/gallery/GalleryRemote/GalleryRemoteMainFrame.java b/com/gallery/GalleryRemote/GalleryRemoteMainFrame.java index dcee2f4..21a0960 100644 --- a/com/gallery/GalleryRemote/GalleryRemoteMainFrame.java +++ b/com/gallery/GalleryRemote/GalleryRemoteMainFrame.java @@ -49,7 +49,9 @@ public void createProperties() { protected void initializeGR() { super.initializeGR(); - Log.startLog(properties.getIntProperty(PreferenceNames.LOG_LEVEL), properties.getBooleanProperty("toSysOut")); + Log.startLog(properties.getIntProperty(PreferenceNames.LOG_LEVEL), + properties.getBooleanProperty("toSysOut") || + (System.getProperty("lax.stdout.redirect") != null && System.getProperty("lax.stdout.redirect").length() > 0)); try { if (isAppletMode() || !Update.upgrade()) { diff --git a/com/gallery/GalleryRemote/Log.java b/com/gallery/GalleryRemote/Log.java index 3b861c2..32c91cb 100644 --- a/com/gallery/GalleryRemote/Log.java +++ b/com/gallery/GalleryRemote/Log.java @@ -169,6 +169,7 @@ public void run() { BufferedWriter writer = null; running = true; try { + System.out.println("Creating log file in " + System.getProperty("java.io.tmpdir")); writer = new BufferedWriter(new FileWriter(new File(System.getProperty("java.io.tmpdir"), "GalleryRemoteLog.txt"))); while (running) { Thread.sleep(sleepInterval); diff --git a/com/gallery/GalleryRemote/MainFrame.java b/com/gallery/GalleryRemote/MainFrame.java index 78952bb..b66bead 100644 --- a/com/gallery/GalleryRemote/MainFrame.java +++ b/com/gallery/GalleryRemote/MainFrame.java @@ -1405,6 +1405,8 @@ private void saveState(File f) { // We've been saved, we are now clean. setDirtyFlag(false); + + Log.log(Log.LEVEL_TRACE, MODULE, "State saved"); } catch (IOException e) { Log.log(Log.LEVEL_ERROR, MODULE, "Exception while trying to save state"); Log.logException(Log.LEVEL_ERROR, MODULE, e); diff --git a/com/gallery/GalleryRemote/model/Album.java b/com/gallery/GalleryRemote/model/Album.java index ffb5c9d..c7d51f3 100644 --- a/com/gallery/GalleryRemote/model/Album.java +++ b/com/gallery/GalleryRemote/model/Album.java @@ -317,6 +317,10 @@ public void sortPicturesAlphabetically() { notifyListeners(); } + public void sortSubAlbums() { + Collections.sort(subAlbums, new NaturalOrderComparator()); + } + /** * Number of pictures in the album * diff --git a/defaults.properties b/defaults.properties index 4b5785a..fa7a4c7 100644 --- a/defaults.properties +++ b/defaults.properties @@ -178,6 +178,6 @@ updateUrlBeta=http://gallery.sourceforge.net/gallery_remote_version_check_beta.p # # --- Do not edit below this line --- # -version=1.3.1 -releaseDate=2004/02/12 +version=1.3.2-b1 +releaseDate=2004/02/17 aboutText=Gallery Remote\n \n \nA part of the Gallery Open-Source Project\nhttp://gallery.sourceforge.net\n \n \nMaintained by:\n \nPierre-Luc Paour\n \n \nInitial version by Chris Smith\n \n \nContributors:\n \nTim Miller\nDolan Halbrook\nMarkus Cozowicz\nScott Gartner\nAmedeo Paglione\nChris Schwerdt\n \n \nArtwork by Ross A. Reyman\n \n \nBundled software:\n \nImageMagick\nJSX\nJava look and feel Graphics Repository icons\njpegtran, Guido Vollbeding's version\nMetadataExtractor diff --git a/gallery_remote.iap_xml b/gallery_remote.iap_xml index 0ab1388..3ccdaae 100644 --- a/gallery_remote.iap_xml +++ b/gallery_remote.iap_xml @@ -1,8 +1,8 @@ - + DATE: Tue Feb 17 15:55:56 PST 2004 --> + @@ -10,9 +10,9 @@ 12,42,11,90,81,52,54,53,54,68,86,83,81,54,80,74 3,13,71,87,105,110,100,111,119,115,32,88,80,44,32,53,46,49,44,32,120,56,54,59,32,74,97,118,97,32,49,46,51,46,49,95,48,56,44,32,83,117,110,32,77,105,99,114,111,115,121,115,116,101,109,115,32,73,110,99,46,44,32,104,116,116,112,58,47,47,106,97,118,97,46,115,117,110,46,99,111,109,47,59,32,101,110,44,32,85,83,59,32,67,112,49,50,53,50 - 1,0,0,-16,-93,30,-96,-64,80,112,116,103,88,98,113,97,113,65,65,88,74,65,72,71,70,69,64,69,66,69,48,79,87,5,2,6,11,90,108,10,0,0,0 + 1,0,0,-16,-61,-17,48,-16,80,112,116,103,88,98,113,97,113,65,65,88,74,65,72,71,70,69,64,69,66,69,48,79,87,5,2,2,14,88,101,10,0,0,0 - + @@ -179,7 +179,7 @@ it will search for ones in this list]]> - + @@ -263,7 +263,7 @@ and any path to a file to read from that file]]> - 531993 + 532681 false @@ -1637,7 +1637,7 @@ If the commands above do not work, you should download and install these package - + @@ -1685,7 +1685,7 @@ If the commands above do not work, you should download and install these package - + @@ -1900,7 +1900,7 @@ If the commands above do not work, you should download and install these package 3 - 1 + 2 0 @@ -2427,7 +2427,7 @@ and any path to a file to read from that file]]> - 30154 + 31509 false @@ -2966,7 +2966,7 @@ and any path to a file to read from that file]]> - 7904 + 7922 false @@ -3111,7 +3111,7 @@ and any path to a file to read from that file]]> - 5544 + 5825 false @@ -3140,7 +3140,7 @@ and any path to a file to read from that file]]> - 10742 + 10760 false @@ -3397,6 +3397,230 @@ and any path to a file to read from that file]]> + + + + + + false + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4735,6 +4959,7 @@ and any path to a file to read from that file]]> +