Skip to content

Commit

Permalink
2004-02-26 Pierre-Luc Paour <gallery@paour.com> (1.4-b1)
Browse files Browse the repository at this point in the history
	* Attempt to make the tree render correctly by moving to
	  DefaultTreeModel and DefaultMutableTreeNodes. This is still
	  unsuccessful and I need help.
	* Diabled Protocol 1, since it's incompatible with sophisticated
	  tree handling.
	* Much improved model classes, through a major refactoring.

	Some functionality broken, DO NOT USE THIS VERSION, stay on BRANCH_GR_1_3
  • Loading branch information
Pierre-Luc Paour committed Feb 26, 2004
1 parent 78a5c73 commit ebff852
Show file tree
Hide file tree
Showing 17 changed files with 638 additions and 790 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -1,3 +1,14 @@
2004-02-26 Pierre-Luc Paour <gallery@paour.com> (1.4-b1)

* Attempt to make the tree render correctly by moving to
DefaultTreeModel and DefaultMutableTreeNodes. This is still
unsuccessful and I need help.
* Diabled Protocol 1, since it's incompatible with sophisticated
tree handling.
* Much improved model classes, through a major refactoring.

Some functionality broken, DO NOT USE THIS VERSION, stay on BRANCH_GR_1_3

2004-02-25 Pierre-Luc Paour <gallery@paour.com> (1.3.2-b6)

* Solved a very long-standing problem where I didn't know how
Expand Down
4 changes: 3 additions & 1 deletion com/gallery/GalleryRemote/AlbumInspector.java
Expand Up @@ -241,7 +241,9 @@ public void actionPerformed(ActionEvent e) {
} else if (source == jApply) {
// todo
} else if (source == jMove) {
new MoveAlbumDialog(mf, album.getGallery(), album);
//MoveAlbumDialog mad = new MoveAlbumDialog(mf, album.getGallery(), album);
//album.moveAlbumTo(GalleryRemote._().getCore().getMainStatusUpdate(), mad.getNewParent());
album.moveAlbumTo(null, null);
} else if (source == jSlideshow) {
mf.slideshow();
} else {
Expand Down
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/CoreUtils.java
Expand Up @@ -152,7 +152,7 @@ public Component getListCellRendererComponent(
Picture p = currentAlbum.getPicture(index);

if (p.isOnline()) {
if (p.getAlbum() != p.getAlbumOnServer()
if (p.getParentAlbum() != p.getAlbumOnServer()
|| p.getIndex() != p.getIndexOnServer()) {
setForeground(Color.red);
} else {
Expand Down
4 changes: 2 additions & 2 deletions com/gallery/GalleryRemote/GRAppletMini.java
Expand Up @@ -81,7 +81,7 @@ public void startup() {
album = new Album(gallery);
album.setSuppressEvents(true);
album.setName(info.albumName);
gallery.addAlbum(album);
//gallery.addAlbum(album);

jPicturesList.setModel(album);
jPicturesList.setInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
Expand Down Expand Up @@ -229,7 +229,7 @@ public void actionPerformed(ActionEvent e) {
hasHadPictures = true;
}
} else if (e.getSource() == jUpload) {
gallery.uploadFiles(new UploadProgress(DialogUtil.findParentWindow(this)));
gallery.doUploadFiles(new UploadProgress(DialogUtil.findParentWindow(this)));
}
}
}
16 changes: 8 additions & 8 deletions com/gallery/GalleryRemote/GalleryAbstractListModel.java
Expand Up @@ -89,7 +89,7 @@ public ListDataListener[] getListDataListeners() {
* @see EventListenerList
* @see DefaultListModel
*/
protected void fireContentsChanged(Object source, int index0, int index1) {
public void fireContentsChanged(Object source, int index0, int index1) {
if (listenerList == null) listenerList = new EventListenerList();
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;
Expand Down Expand Up @@ -119,7 +119,7 @@ protected void fireContentsChanged(Object source, int index0, int index1) {
* @see EventListenerList
* @see DefaultListModel
*/
protected void fireIntervalAdded(Object source, int index0, int index1) {
public void fireIntervalAdded(Object source, int index0, int index1) {
if (listenerList == null) listenerList = new EventListenerList();
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;
Expand Down Expand Up @@ -149,7 +149,7 @@ protected void fireIntervalAdded(Object source, int index0, int index1) {
* @see EventListenerList
* @see DefaultListModel
*/
protected void fireIntervalRemoved(Object source, int index0, int index1) {
public void fireIntervalRemoved(Object source, int index0, int index1) {
if (listenerList == null) listenerList = new EventListenerList();
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;
Expand Down Expand Up @@ -259,7 +259,7 @@ public TreeModelListener[] getTreeModelListeners() {
* @param children the changed elements
* @see javax.swing.event.EventListenerList
*/
protected void fireTreeNodesChanged(Object source, Object[] path,
public void fireTreeNodesChanged(Object source, Object[] path,
int[] childIndices,
Object[] children) {
// Guaranteed to return a non-null array
Expand Down Expand Up @@ -290,7 +290,7 @@ protected void fireTreeNodesChanged(Object source, Object[] path,
* @param children the new elements
* @see javax.swing.event.EventListenerList
*/
protected void fireTreeNodesInserted(Object source, Object[] path,
public void fireTreeNodesInserted(Object source, Object[] path,
int[] childIndices,
Object[] children) {
// Guaranteed to return a non-null array
Expand Down Expand Up @@ -321,7 +321,7 @@ protected void fireTreeNodesInserted(Object source, Object[] path,
* @param children the removed elements
* @see javax.swing.event.EventListenerList
*/
protected void fireTreeNodesRemoved(Object source, Object[] path,
public void fireTreeNodesRemoved(Object source, Object[] path,
int[] childIndices,
Object[] children) {
// Guaranteed to return a non-null array
Expand Down Expand Up @@ -352,7 +352,7 @@ protected void fireTreeNodesRemoved(Object source, Object[] path,
* @param children the affected elements
* @see javax.swing.event.EventListenerList
*/
protected void fireTreeStructureChanged(Object source, Object[] path,
public void fireTreeStructureChanged(Object source, Object[] path,
int[] childIndices,
Object[] children) {
// Guaranteed to return a non-null array
Expand Down Expand Up @@ -381,7 +381,7 @@ protected void fireTreeStructureChanged(Object source, Object[] path,
* @param path the path to the root node
* @see EventListenerList
*/
protected void fireTreeStructureChanged(Object source, TreePath path) {
public void fireTreeStructureChanged(Object source, TreePath path) {
// Guaranteed to return a non-null array
Object[] listeners = listenerList.getListenerList();
TreeModelEvent e = null;
Expand Down
8 changes: 5 additions & 3 deletions com/gallery/GalleryRemote/GalleryComm.java
Expand Up @@ -125,7 +125,7 @@ public void fetchAlbumImages(StatusUpdate su, Album a, boolean recusive, boolean
throw new RuntimeException("This method is not available on this protocol");
}

public void moveAlbum(StatusUpdate su, Album a, Album newParent, boolean async) {
public boolean moveAlbum(StatusUpdate su, Album a, Album newParent, boolean async) {
throw new RuntimeException("This method is not available on this protocol");
}

Expand Down Expand Up @@ -203,10 +203,12 @@ public static GalleryComm getCommInstance(StatusUpdate su, URL url, Gallery g) {
Log.log(Log.LEVEL_TRACE, MODULE, "Trying protocol 1 for " + url);
// Test GalleryComm1
// BUT: only if first try was not status code 401 = authorization failure
String urlPath1 = urlPath + ((urlPath.endsWith("/")) ? GalleryComm1.SCRIPT_NAME : "/" + GalleryComm1.SCRIPT_NAME);
String scriptName = "gallery_remote.php";
String urlPath1 = urlPath + ((urlPath.endsWith("/")) ? scriptName : "/" + scriptName);
if (lastRespCode != 401 && tryComm(su, mConnection, urlPath1)) {
Log.log(Log.LEVEL_TRACE, MODULE, "Server has protocol 1");
return new GalleryComm1(g);

// todo: Alert, we don't support protocol 1 any more.
}
} else {
// if Gallery is embedded, only support protocol 2
Expand Down

0 comments on commit ebff852

Please sign in to comment.