Skip to content

Commit

Permalink
Minor cleanups, and fix a bug introduced in the last change that caus…
Browse files Browse the repository at this point in the history
…es private thumbnails not to show up
  • Loading branch information
bharat committed Aug 22, 2010
1 parent bea5f67 commit 88efbd7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gallery3Api/src/org/gallery3/api/GalleryAlbum.as
Expand Up @@ -38,7 +38,7 @@ package org.gallery3.api {
import mx.rpc.events.FaultEvent;
import mx.utils.ArrayUtil;
import mx.utils.ObjectUtil;

use namespace flash_proxy;

[Event(name="collectionChange", type="mx.events.CollectionEvent")]
Expand Down
4 changes: 2 additions & 2 deletions Gallery3Api/src/org/gallery3/api/GalleryItem.as
Expand Up @@ -194,8 +194,8 @@ package org.gallery3.api {
req.requestHeaders = [
new URLRequestHeader("Accept", "*/*"),
new URLRequestHeader("Cache-Control", "no-cache"),
new URLRequestHeader(GalleryRestRequest::X_GALLERY_REQUEST_METHOD, "GET"),
new URLRequestHeader(GalleryRestRequest::X_GALLERY_REQUEST_KEY, GalleryRestRequest.accessKey)
new URLRequestHeader(GalleryRestRequest.METHOD_HEADER, "GET"),
new URLRequestHeader(GalleryRestRequest.KEY_HEADER, GalleryRestRequest.accessKey)
];
var url:URL = new URL(thumbUrl);
var size:String = url.getParamValue("size");
Expand Down
4 changes: 2 additions & 2 deletions Gallery3Api/src/org/gallery3/api/GalleryRestRequest.as
Expand Up @@ -52,8 +52,8 @@ package org.gallery3.api {
"405": "Method Not Allowed",
"500": "Internal Server Error"
}
public static const METHOD_HEADER: String = "X-Gallery-Request-Method";
public static const KEY_HEADER: String = "X-Gallery-Request-Key";
public static const METHOD_HEADER: String = "X-Gallery-Request-Method";
public static const KEY_HEADER: String = "X-Gallery-Request-Key";
private static const MULTIPART_BOUNDARY: String = "----------196f00b77b968397849367c61a2080";
private static const MULTIPART_MARK: String = "--";
private static const LF: String = "\r\n";
Expand Down
12 changes: 6 additions & 6 deletions Gallery3Organize/src/org/gallery3/organize/OrganizeDialog.as
Expand Up @@ -66,8 +66,6 @@ package org.gallery3.organize {
public var imageGrid: ThumbGrid;
public var sortColumn: ComboBox;
public var sortDirection: ComboBox;
public var rotateCCW: Button;
public var rotateCW: Button;
public var addAlbum: Button;
public var addImages: Button;
public var deleteImages: Button;
Expand Down Expand Up @@ -140,12 +138,14 @@ package org.gallery3.organize {
},
function (fault: Object): void {
ErrorDialog.display(fault as Fault);
}));
})
);

imageGrid.addEventListener("ThumbGridItemsDropped", function(event: Event): void {
setSortColumn("weight");
});
});
}

protected function albumsUpdated(event: Event): void {
if (openPath.length > 0) {
for each (var item: GalleryAlbum in event.target) {
Expand Down Expand Up @@ -295,7 +295,7 @@ package org.gallery3.organize {
if (newCount != _selectedCount) {
var album: GalleryAlbum = albumTree.selectedItem as GalleryAlbum;
_selectedCount = newCount;
rotateCW.enabled = rotateCCW.enabled = deleteImages.enabled = _selectedCount > 0 && album.canEdit;
deleteImages.enabled = _selectedCount > 0 && album.canEdit;
}
}

Expand Down
Expand Up @@ -86,7 +86,7 @@ package org.gallery3.organize.components {
} else {
var item:IListItemRenderer = mouseEventToItemRenderer(event);
if (item != _lastHighlightItemRendererAtIndices && _lastHighlightItemRendererAtIndices) {
_updateHightlight(_lastHighlightItemRendererAtIndices, _lastHighlightItemIndices, false);
_updateHighlight(_lastHighlightItemRendererAtIndices, _lastHighlightItemIndices, false);
}
}
}
Expand All @@ -113,7 +113,7 @@ package org.gallery3.organize.components {
drawItem(UIDToItemRenderer(uid), isItemSelected(item.data), true, uid == caretUID);
var pt:Point = itemRendererToIndices(item);
if (pt) { // during tweens, we may get null
_updateHightlight(item, pt, true);
_updateHighlight(item, pt, true);
}
}
}
Expand All @@ -131,11 +131,11 @@ package org.gallery3.organize.components {

override protected function dragExitHandler(event:DragEvent): void {
if (_lastHighlightItemRendererAtIndices) {
_updateHightlight(_lastHighlightItemRendererAtIndices, _lastHighlightItemIndices, false);
_updateHighlight(_lastHighlightItemRendererAtIndices, _lastHighlightItemIndices, false);
}
}

private function _updateHightlight(item:IListItemRenderer, pt:Point, showHighlight:Boolean): void {
private function _updateHighlight(item:IListItemRenderer, pt:Point, showHighlight:Boolean): void {
var uid:String = itemToUID(item.data);
drawItem(UIDToItemRenderer(uid), isItemSelected(item.data), showHighlight, uid == caretUID);
var evt:ListEvent = new ListEvent(showHighlight? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT);
Expand Down

0 comments on commit 88efbd7

Please sign in to comment.