Changeset 5157
- Timestamp:
- 2003-08-18T14:00:55+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java
r4678 r5157 43 43 import org.greenstone.gatherer.Gatherer; 44 44 import org.greenstone.gatherer.collection.Collection; 45 import org.greenstone.gatherer.collection.CollectionManager; 45 46 import org.greenstone.gatherer.gui.ModalDialog; 46 47 import org.greenstone.gatherer.gui.SimpleMenuBar; 47 48 import org.greenstone.gatherer.util.ArrayTools; 48 49 import org.greenstone.gatherer.util.GSDLSiteConfig; 50 import org.greenstone.gatherer.util.StaticStrings; 49 51 import org.greenstone.gatherer.util.Utility; 50 52 /** This class provides the functionality to delete current collections from the GSDLHOME/collect/ directory. The user chooses the collection from a list, where each entry also displays details about itself, confirms the delete of a collection by checking a checkbox then presses the ok button to actually delete the collection. … … 117 119 /** Destructor. */ 118 120 public void destroy() { 121 list_model.clear(); 122 list_model = null; 119 123 close_button = null; 120 124 confirmation = null; 121 125 details = null; 122 126 details_label = null; 123 list_model.clear();124 list_model = null;125 127 list = null; 126 128 ok_button = null; … … 216 218 ArrayTools.sort(collections); 217 219 for(int i = 0; collections != null && i < collections.length; i++) { 218 File config_file = Utility.findConfigFile(collections[i]); 219 if (config_file != null) { 220 CollectionConfiguration config = new CollectionConfiguration(config_file); 221 if (config != null) { 222 CollectionEntry col = new CollectionEntry(collections[i].getName(), config); 223 list_model.addElement(col); 224 } 220 if(!collections[i].getName().equals(StaticStrings.MODEL_COLLECTION_NAME)) { 221 File config_file = Utility.findConfigFile(collections[i]); 222 if (config_file != null) { 223 CollectionConfiguration config = new CollectionConfiguration(config_file); 224 if (config != null) { 225 CollectionEntry col = new CollectionEntry(collections[i].getName(), config); 226 list_model.addElement(col); 227 } 228 } 225 229 } 226 230 } … … 235 239 */ 236 240 public void actionPerformed(ActionEvent event) { 241 // Ask the collection manager to refresh the 'Greenstone Collections' folder 242 Gatherer.c_man.refreshGreenstoneCollections(); 243 // Done 237 244 prompt.dispose(); 238 245 } … … 243 250 implements ListSelectionListener { 244 251 /** Any implementation of ListSelectionListener must include this method so we can be informed when the list selection changes. 245 * @param event A <strong>ListSelectionEvent</strong> containing all the relevant information garnered from the event itself.246 252 * @param event a <strong>ListSelectionEvent</strong> containing all the relevant information garnered from the event itself 253 */ 247 254 public void valueChanged(ListSelectionEvent event) { 255 ok_button.setEnabled(false); 256 confirmation.setSelected(false); 248 257 if(!list.isSelectionEmpty()) { 249 258 confirmation.setEnabled(true); -
trunk/gli/src/org/greenstone/gatherer/gui/CollectionPane.java
r5057 r5157 239 239 collection_tree_sync.add(collection_tree); 240 240 241 workspace = Gatherer.c_man.getWorkspace(); 242 workspace_tree.setModel(workspace); 243 workspace_tree_sync.add(workspace_tree); 241 refreshWorkspace(); 244 242 245 243 // Enable or disable the control buttons … … 491 489 public void refreshTrees() { 492 490 collection_tree.refresh(null); 491 workspace_tree.refresh(null); 492 } 493 494 public void refreshWorkspace() { 495 workspace = Gatherer.c_man.getWorkspace(); 496 workspace_tree.setModel(workspace); 497 workspace_tree_sync.add(workspace_tree); 493 498 } 494 499 -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r4965 r5157 47 47 import javax.swing.plaf.*; 48 48 import javax.swing.text.*; 49 import org.greenstone.gatherer.Configuration; 49 50 import org.greenstone.gatherer.Gatherer; 50 51 import org.greenstone.gatherer.collection.Collection; … … 177 178 else if(esrc == menu_bar.file_delete) { 178 179 DeleteCollectionPrompt dcp = new DeleteCollectionPrompt(); 179 dcp.display(); 180 if(dcp.display()) { 181 Gatherer.c_man.closeCollection(); 182 } 180 183 dcp.destroy(); 181 184 dcp = null; … … 544 547 // Of course we may not have this tab available. 545 548 if(index != -1) { 546 549 // Some tabs are also dependant on if a collection is ready 547 550 Component component = tab_pane.getComponentAt(index); 548 551 if(component == preview_pane) { … … 569 572 } 570 573 } 574 } 575 // If the rawname was mirror then rebuild workspace tree to remove caches. 576 if(rawname.equals("Mirroring")) { 577 collection_pane.refreshWorkspace(); 571 578 } 572 579 } … … 683 690 Gatherer.c_man.createCollection(ncd_prompt.getDescription(), ncd_prompt.getEmail(), ncd_prompt.getName(), ncd_prompt.getTitle(), null, ncm_prompt.getSets()); 684 691 } 692 // Now that the collection specific settings are loaded we can set the 'view extracted metadata' property 693 Gatherer.config.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, ncd_prompt.viewExtractedMetadata()); 694 685 695 ncd_prompt.dispose(); 686 696 ncd_prompt = null; -
trunk/gli/src/org/greenstone/gatherer/gui/MirrorPane.java
r4675 r5157 347 347 } 348 348 349 public void refreshTrees() { 350 workspace_tree.refresh(null); 351 } 352 349 353 public void setURL(String url) { 350 354 source_url.setText(url);
Note:
See TracChangeset
for help on using the changeset viewer.