Changeset 12805
- Timestamp:
- 2006-09-21T14:42:34+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r12803 r12805 190 190 } 191 191 192 public void save() {193 save(false);194 }195 192 196 193 /** Cause the current collection configuration to be written out to disk. 197 194 */ 198 public void save (boolean force_save)195 public void saveIfNecessary() 199 196 { 200 general_manager.loseFocus();201 if (!update_collect_cfg_required && !force_save) {202 DebugStream.println("Asked to save the config file, but don't need to");203 return;204 }205 206 DebugStream.println("Saving the collection config file");207 208 197 collect_config.save(); 209 210 // Unset formats changed211 update_collect_cfg_required = false;212 198 } 213 199 -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r12804 r12805 496 496 } 497 497 498 collection.cdm.save(true);498 saveCollection(); 499 499 500 500 // Create a lock file … … 1259 1259 1260 1260 // Write out the collection configuration file 1261 collection.cdm.save ();1261 collection.cdm.saveIfNecessary(); 1262 1262 1263 1263 // Change cursor back to normal -
trunk/gli/src/org/greenstone/gatherer/gui/BaseConfigPane.java
r12804 r12805 101 101 } 102 102 103 public void gainFocus() { 103 104 public void gainFocus() 105 { 104 106 if (cdm == null && Gatherer.c_man.ready()) { 105 107 // Retrieve the new config manager. … … 109 111 view.gainFocus(); 110 112 } 111 112 } 113 114 public void loseFocus() { 115 if (cdm != null) { 116 cdm.save(); 117 } 113 } 114 115 116 public void loseFocus() 117 { 118 118 if (view != null) { 119 119 view.loseFocus(); 120 120 } 121 122 } 121 if (cdm != null) { 122 Gatherer.c_man.saveCollection(); 123 } 124 } 125 123 126 124 127 public void destroy() { 125 128 tree = null; 126 129 view = null; 127 128 130 } 129 131 -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r12739 r12805 136 136 } 137 137 138 139 140 public void windowGainedFocus(WindowEvent e){141 //System.out.println("JPanel windowGainedFocus."); 142 } 143 144 public void windowLostFocus(WindowEvent e) {145 //System.out.println("JPanel windowLostFocus.");146 138 139 public void windowGainedFocus(WindowEvent e) 140 { 141 } 142 143 144 public void windowLostFocus(WindowEvent e) 145 { 146 // Save the loaded collection 147 147 if (Gatherer.c_man != null && Gatherer.c_man.ready() && Gatherer.c_man.getCollection().cdm != null) { 148 Gatherer.c_man.getCollection().cdm.save(); 149 } 150 //Gatherer.g_man.design_pane.saveConfiguration(); 151 152 } 153 148 Gatherer.c_man.saveCollection(); 149 } 150 } 151 154 152 155 153 private class GLIGUIFocusListener -
trunk/gli/src/org/greenstone/gatherer/gui/PreviewButton.java
r12116 r12805 120 120 121 121 public void actionPerformed(ActionEvent event) { 122 Gatherer.c_man. getCollection().cdm.save(); // save the config file just in case122 Gatherer.c_man.saveCollection(); 123 123 124 124 configureHomeURL();
Note:
See TracChangeset
for help on using the changeset viewer.