Skip to content

Commit

Permalink
2005-05-02 Pierre-Luc Paour <gallery@paour.com> (1.4.2-b16)
Browse files Browse the repository at this point in the history
	* Added support for slideshows of G2 albums, a prelude to
	  adding java-based fullscreen slideshows in G2.
  • Loading branch information
Pierre-Luc Paour committed May 2, 2005
1 parent 920fd04 commit b875f60
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 18 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2005-05-02 Pierre-Luc Paour <gallery@paour.com> (1.4.2-b16)

* Added support for slideshows of G2 albums, a prelude to
adding java-based fullscreen slideshows in G2.

2005-04-27 Pierre-Luc Paour <gallery@paour.com> (1.4.2-b15)

* Added support for an arbitrary number of cookies to be passed
Expand Down
6 changes: 3 additions & 3 deletions com/gallery/GalleryRemote/GalleryFileFilter.java
Expand Up @@ -28,15 +28,15 @@

public class GalleryFileFilter extends FileFilter {
public static String[] ext
= {"gif", "jpeg", "jpg", "avi", "mpg", "mpeg", "moov", "png"};
= {"gif", "jpeg", "jpg", "avi", "mpg", "mpeg", "moov", "png", "jpe"};
public static final List validExtensions = Arrays.asList(ext);

public static String[] ext1
= {"gif", "jpeg", "jpg", "png"};
= {"gif", "jpeg", "jpg", "png", "jpe"};
public static final List manipulateExtensions = Arrays.asList(ext1);

public static String[] ext2
= {"jpg", "jpeg"};
= {"jpg", "jpeg", "jpe"};
public static final List manipulateJpegExtensions = Arrays.asList(ext2);

// Accept all directories and all gif, jpg files.
Expand Down
1 change: 1 addition & 0 deletions com/gallery/GalleryRemote/ThumbnailCache.java
Expand Up @@ -59,6 +59,7 @@ public void run() {

if (!thumbnails.containsKey(p)) {
if (p.isOnline()) {
Log.log(Log.LEVEL_TRACE, MODULE, "Fetching thumbnail " + p.getUrlThumbnail());
i = new ImageIcon(p.getUrlThumbnail());

Image scaled = null;
Expand Down
18 changes: 18 additions & 0 deletions com/gallery/GalleryRemote/model/Picture.java
Expand Up @@ -69,6 +69,8 @@ public class Picture extends GalleryItem implements Serializable, PreferenceName
transient int indexCache = -1;
transient Dimension dimension = null;
transient ExifData exif = null;
transient String forceExtension = null;
transient String uniqueId = null;

/**
* Constructor for the Picture object
Expand Down Expand Up @@ -575,5 +577,21 @@ public ExifData getExifData() {

return exif;
}

public String getForceExtension() {
return forceExtension;
}

public void setForceExtension(String forceExtension) {
this.forceExtension = forceExtension;
}

public String getUniqueId() {
return uniqueId;
}

public void setUniqueId(String uniqueId) {
this.uniqueId = uniqueId;
}
}

31 changes: 18 additions & 13 deletions com/gallery/GalleryRemote/util/ImageUtils.java
Expand Up @@ -628,31 +628,36 @@ public static LocalInfo getLocalFilenameForPicture(Picture p, boolean full) {
d = p.getSizeResized();
}

String name = u.getPath();
String ext;
String uid = p.getUniqueId();
String ext = p.getForceExtension();

if (uid == null || ext == null) {
uid = u.getPath();

int i = name.lastIndexOf('/');
name = name.substring(i + 1);
int i = uid.lastIndexOf('/');
uid = uid.substring(i + 1);

i = uid.lastIndexOf('.');
ext = uid.substring(i + 1);
uid = uid.substring(0, i);
}

i = name.lastIndexOf('.');
ext = name.substring(i + 1);
name = name.substring(0, i);
String filename = name + "." + ext;
String filename = uid + "." + ext;

return new LocalInfo(name, ext, filename,
deterministicTempFile("server", "." + ext, tmpDir, p.getAlbumOnServer().getName() + name + d), u, d);
return new LocalInfo(ext, filename,
deterministicTempFile("server", "." + ext, tmpDir, uid + d), u, d);
}

static class LocalInfo {
String name;
//String name;
String ext;
String filename;
File file;
URL url;
Dimension size;

public LocalInfo(String name, String ext, String filename, File file, URL url, Dimension size) {
this.name = name;
public LocalInfo(String ext, String filename, File file, URL url, Dimension size) {
//this.name = name;
this.ext = ext;
this.filename = filename;
this.file = file;
Expand Down
4 changes: 2 additions & 2 deletions defaults.properties
Expand Up @@ -242,6 +242,6 @@ updateUrlBeta=http://gallery.sourceforge.net/gallery_remote_version_check_beta.p
#
# --- Do not edit below this line ---
#
version=1.4.2-b15
releaseDate=2005/04/27
version=1.4.2-b16
releaseDate=2005/05/02
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\nSeth Ladd\n \n \nArtwork by Ross A. Reyman\n \n \nBundled software:\n \nImageMagick\nJava look and feel Graphics Repository icons\njpegtran, Guido Vollbeding's version\nMetadataExtractor

0 comments on commit b875f60

Please sign in to comment.