Skip to content

Commit

Permalink
2008-09-09 Pierre-Luc Paour <gallery@paour.com> (1.5.1-b40)
Browse files Browse the repository at this point in the history
	* Fixed issue with copy/paste.
  • Loading branch information
Pierre-Luc Paour committed Sep 9, 2008
1 parent f90fff8 commit 146d229
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 26 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2008-09-09 Pierre-Luc Paour <gallery@paour.com> (1.5.1-b40)

* Fixed issue with copy/paste.

2008-07-31 Pierre-Luc Paour <gallery@paour.com> (1.5.1-b39)

* Users can select Gallery URLs that GR should automatically
Expand Down
32 changes: 22 additions & 10 deletions build.xml
Expand Up @@ -49,17 +49,29 @@
</copy>
</target>

<target name="run" depends="compile"
description="compile then run">
<target name="run" depends="compile"
description="compile then run">

<java classname="com.gallery.GalleryRemote.GalleryRemote" fork="true" maxmemory="256M">
<classpath>
<pathelement location="lib/metadata-extractor-2.1.jar"/>
<pathelement path="${build}"/>
<pathelement path="img"/>
</classpath>
</java>
</target>
<java classname="com.gallery.GalleryRemote.GalleryRemote" fork="true" maxmemory="256M">
<classpath>
<pathelement location="lib/metadata-extractor-2.1.jar"/>
<pathelement path="${build}"/>
<pathelement path="img"/>
</classpath>
</java>
</target>

<target name="debug" depends="compile"
description="compile then run">

<java classname="com.gallery.GalleryRemote.GalleryRemote" fork="true" maxmemory="256M" jvmargs="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005">
<classpath>
<pathelement location="lib/metadata-extractor-2.1.jar"/>
<pathelement path="${build}"/>
<pathelement path="img"/>
</classpath>
</java>
</target>

<target name="jar" depends="clean,compile"
description="create a jar of the source">
Expand Down
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/DroppableList.java
Expand Up @@ -289,7 +289,7 @@ public void dropActionChanged(DragSourceDragEvent dragSourceDragEvent) {
/* ********* DragGestureListener ********** */
public void dragGestureRecognized(DragGestureEvent event) {
Log.log(Log.LEVEL_TRACE, MODULE, "dragGestureRecognized");
PictureSelection ps = new PictureSelection(this);
PictureSelection ps = new PictureSelection(this, false);

//pull out existing pictures
if (!ps.isEmpty()) {
Expand Down
19 changes: 10 additions & 9 deletions com/gallery/GalleryRemote/MainFrame.java
Expand Up @@ -313,7 +313,7 @@ private void setGalleries(DefaultComboBoxModel galleries) {
if (!foundAutoLoad) {
jGalleryCombo.setSelectedIndex(i);
foundAutoLoad = true;
}
}
}
}

Expand Down Expand Up @@ -915,16 +915,18 @@ public void showAboutBox() {
}

public void doCut() {
doCopy();
deleteSelectedPictures();
if (jPicturesList.isEnabled() && jPicturesList.getSelectedIndices().length > 0) {
ps = new PictureSelection(jPicturesList, false);
deleteSelectedPictures();

// We've been modified, we are now dirty.
//setDirtyFlag(true);
// We've been modified, we are now dirty.
//setDirtyFlag(true);
}
}

public void doCopy() {
if (jPicturesList.isEnabled() && jPicturesList.getSelectedIndices().length > 0) {
ps = new PictureSelection(jPicturesList);
ps = new PictureSelection(jPicturesList, true);
}
}

Expand Down Expand Up @@ -1053,7 +1055,6 @@ private void jbInit()
jMenuItemAbout.setText(GRI18n.getString(MODULE, "menuAbout"));
jMenuItemAbout.setIcon(GalleryRemote.iAbout);

//jScrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jNewGalleryButton.setText(GRI18n.getString(MODULE, "newGalleryBtn"));
jNewGalleryButton.setActionCommand("NewGallery");
jNewGalleryButton.setIcon(GalleryRemote.iNewGallery);
Expand All @@ -1076,10 +1077,10 @@ private void jbInit()
jInspectorDivider.add(jInspectorPanel, JSplitPane.RIGHT);
jInspectorDivider.add(jAlbumPictureDivider, JSplitPane.LEFT);
JScrollPane pictureInspectorScroll = new JScrollPane(jPictureInspector);
pictureInspectorScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
pictureInspectorScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
jInspectorPanel.add(pictureInspectorScroll, CARD_PICTURE);
JScrollPane albumInspectorScroll = new JScrollPane(jAlbumInspector);
albumInspectorScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
albumInspectorScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
jInspectorPanel.add(albumInspectorScroll, CARD_ALBUM);
jAlbumPictureDivider.add(jPictureScroll, JSplitPane.RIGHT);
jAlbumPictureDivider.add(jAlbumPanel, JSplitPane.LEFT);
Expand Down
5 changes: 4 additions & 1 deletion com/gallery/GalleryRemote/PictureSelection.java
Expand Up @@ -44,12 +44,15 @@ public class PictureSelection extends ArrayList implements Transferable, Clipboa
public PictureSelection() {
}

public PictureSelection(JList list) {
public PictureSelection(JList list, boolean clone) {
int[] selIndices = list.getSelectedIndices();
for (int i = 0; i < selIndices.length; i++) {
int selIndex = selIndices[i];
if (selIndex != -1) {
Picture p = (Picture) list.getModel().getElementAt(selIndex);
if (clone) {
p = (Picture) p.clone();
}
add(p);
}
}
Expand Down
9 changes: 6 additions & 3 deletions com/gallery/GalleryRemote/model/Picture.java
Expand Up @@ -98,6 +98,8 @@ public Object clone() {
newPicture.source = source;

newPicture.extraFields = extraFields;

newPicture.hidden = hidden;

newPicture.angle = angle;
newPicture.flipped = flipped;
Expand All @@ -110,14 +112,15 @@ public Object clone() {
newPicture.sizeResized = sizeResized;
newPicture.urlThumbnail = urlThumbnail;
newPicture.sizeThumbnail = sizeThumbnail;
newPicture.cropTo = cropTo;

newPicture.albumOnServer = albumOnServer;
newPicture.indexOnServer = indexOnServer;

newPicture.fileSize = fileSize;
newPicture.escapedCaption = escapedCaption;
newPicture.indexCache = indexCache;

newPicture.albumOnServer = albumOnServer;
newPicture.indexOnServer = indexOnServer;

return newPicture;
}

Expand Down
4 changes: 2 additions & 2 deletions defaults.properties
Expand Up @@ -322,6 +322,6 @@ updateUrlBeta=http://gallery.sourceforge.net/gallery_remote_version_check_beta.p
#
# --- Do not edit below this line ---
#
version=1.5.1-b39
releaseDate=2008/07/31
version=1.5.1-b40
releaseDate=2008/09/09
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\nSaverBeans

0 comments on commit 146d229

Please sign in to comment.