Changeset 13453
- Timestamp:
- 2006-12-07T15:51:00+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java
r12748 r13453 92 92 implements Control { 93 93 94 //private boolean has_been_warned = false; 95 private boolean ready = false; 94 private boolean ready = false; 96 95 private CollectionMeta collection_extra_collectionmeta; 97 96 private CollectionMeta collection_name_collectionmeta; … … 264 263 /** Called to refresh the components. */ 265 264 public void gainFocus() { 266 265 // Retrieve all of the elements that are dependant on default language. 267 266 collection_extra_collectionmeta = CollectionDesignManager.collectionmeta_manager.getMetadatum(StaticStrings.COLLECTIONMETADATA_COLLECTIONEXTRA_STR); 268 267 collection_name_collectionmeta = CollectionDesignManager.collectionmeta_manager.getMetadatum(StaticStrings.COLLECTIONMETADATA_COLLECTIONNAME_STR); … … 286 285 small_icon_textfield.setCaretPosition(0); 287 286 public_checkbox.setSelected(public_collectionmeta.getValue(CollectionMeta.TEXT).equals(StaticStrings.TRUE_STR)); 288 287 ready = true; 289 288 } 290 289 … … 292 291 public void loseFocus() { 293 292 // String values. Have to test if this component has actually ever recieved focus anyway. 294 if(ready) { 295 // Boolean values 296 public_collectionmeta.setValue((public_checkbox.isSelected() ? StaticStrings.TRUE_STR : StaticStrings.FALSE_STR)); 297 String creator_email_str = creator_emailfield.getText(); 298 creator_collectionmeta.setValue(creator_email_str); 293 294 if (!ready) return; 295 296 public_collectionmeta.setValue((public_checkbox.isSelected() ? StaticStrings.TRUE_STR : StaticStrings.FALSE_STR)); 297 String creator_email_str = creator_emailfield.getText(); 298 creator_collectionmeta.setValue(creator_email_str); 299 299 // If the email is currently empty, store this email 300 if(Configuration.getEmail() == null) { 301 Configuration.setEmail(creator_email_str); // Store the email address in the configuration 302 } 303 collection_extra_collectionmeta.setValue(description_textarea.getText()); 304 icon_collection_collectionmeta.setValue(icon_textfield.getText()); 305 maintainer_collectionmeta.setValue(maintainer_emailfield.getText()); 306 icon_collection_small_collectionmeta.setValue(small_icon_textfield.getText()); 307 collection_name_collectionmeta.setValue(name_textfield.getText()); 308 ready = false; 309 } 310 311 } 300 if(Configuration.getEmail() == null) { 301 Configuration.setEmail(creator_email_str); // Store the email address in the configuration 302 } 303 collection_extra_collectionmeta.setValue(description_textarea.getText()); 304 icon_collection_collectionmeta.setValue(icon_textfield.getText()); 305 maintainer_collectionmeta.setValue(maintainer_emailfield.getText()); 306 icon_collection_small_collectionmeta.setValue(small_icon_textfield.getText()); 307 collection_name_collectionmeta.setValue(name_textfield.getText()); 308 309 310 } 312 311 313 312 /** Listens for a click on either browse button, and when detected opens a file browser window initially pointed at the images folder of the collection. Once a user has selected a path, does it's best to construct the best address to the resource, such as _httpcollection_/images/about.gif */ … … 364 363 if(event.getSource() == browse_about_icon_button) { 365 364 icon_textfield.setText(path); 365 icon_collection_collectionmeta.setValue(icon_textfield.getText()); 366 366 } 367 367 else { 368 368 small_icon_textfield.setText(path); 369 icon_collection_small_collectionmeta.setValue(small_icon_textfield.getText()); 369 370 } 370 371 path = null; … … 416 417 String collection_name = Gatherer.c_man.getCollection().getName(); 417 418 Gatherer.g_man.setTitle(collection_title, collection_name); 419 collection_name_collectionmeta.setValue(name_textfield.getText()); 418 420 collection_title = null; 419 421 collection_name = null;
Note:
See TracChangeset
for help on using the changeset viewer.