Changeset 11700
- Timestamp:
- 2006-04-26T13:12:27+12:00 (18 years ago)
- Location:
- branches/gsdl-2_70-distribution-branch/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsdl-2_70-distribution-branch/gli/src/org/greenstone/gatherer/file/FileManager.java
r11440 r11700 111 111 // Is this the "Downloaded Files" folder? 112 112 if (source_nodes[i].getFile().getAbsolutePath().startsWith(downloaded_files_folder_path)) { 113 // Can only delete from the "Downloaded Files" folder if a collection is open114 if (Gatherer.c_man.ready() == false) {115 return;116 }117 113 read_only_source = false; 118 114 } -
branches/gsdl-2_70-distribution-branch/gli/src/org/greenstone/gatherer/file/FileQueue.java
r11388 r11700 372 372 File source_file = source_node.getFile(); 373 373 374 // If we're deleting a metadata.xml file we must unload it 375 boolean metadata_xml_file = source_file.getName().equals(StaticStrings.METADATA_XML); 376 if (metadata_xml_file) { 377 MetadataXMLFileManager.unloadMetadataXMLFile(source_file); 378 } 379 // Otherwise remove any metadata assigned directly to the file 380 else { 381 ArrayList assigned_metadata = MetadataXMLFileManager.getMetadataAssignedDirectlyToFile(source_file); 382 MetadataXMLFileManager.removeMetadata((CollectionTreeNode) source_node, assigned_metadata); 374 // Almost all files will be deleted from the collection tree (exception: files in "Downloaded Files") 375 if (source_node instanceof CollectionTreeNode) { 376 // If we're deleting a metadata.xml file we must unload it 377 boolean metadata_xml_file = source_file.getName().equals(StaticStrings.METADATA_XML); 378 if (metadata_xml_file) { 379 MetadataXMLFileManager.unloadMetadataXMLFile(source_file); 380 } 381 // Otherwise remove any metadata assigned directly to the file 382 else { 383 ArrayList assigned_metadata = MetadataXMLFileManager.getMetadataAssignedDirectlyToFile(source_file); 384 MetadataXMLFileManager.removeMetadata((CollectionTreeNode) source_node, assigned_metadata); 385 } 383 386 } 384 387 … … 698 701 synchronized(this) { 699 702 // Force both workspace and collection trees to refresh 700 if (Gatherer.g_man != null ) {703 if (Gatherer.g_man != null && Gatherer.c_man.ready()) { 701 704 Gatherer.g_man.refreshWorkspaceTree(DragTree.COLLECTION_CONTENTS_CHANGED); 702 705 // Gatherer.g_man.refreshCollectionTree(DragTree.COLLECTION_CONTENTS_CHANGED); -
branches/gsdl-2_70-distribution-branch/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r11446 r11700 299 299 bin_button = new RecycleBin(); 300 300 bin_button.addActionListener(this); 301 bin_button.setEnabled(false);302 301 bin_button.setMinimumSize(MIN_SIZE); 303 302 bin_button.setPreferredSize(MIN_SIZE); … … 443 442 collection_tree.setEnabled(collection_loaded); 444 443 collection_filter.setEnabled(collection_loaded); 445 bin_button.setEnabled(collection_loaded);446 444 new_folder.setEnabled(collection_loaded); 447 445
Note:
See TracChangeset
for help on using the changeset viewer.