Changeset 8634
- Timestamp:
- 2004-11-23T15:16:59+13:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r8629 r8634 384 384 tree.clearSelection(); 385 385 tree.setSelectionPath(path); 386 387 // Validate the preview button388 if (Gatherer.c_man.built() && Configuration.library_url != null) {389 preview_button.setEnabled(true);390 simple_preview_button.setEnabled(true);391 }392 else {393 preview_button.setEnabled(false);394 simple_preview_button.setEnabled(false);395 }396 386 } 397 387 … … 524 514 public void refresh(int refresh_reason, boolean ready) 525 515 { 526 if (Gatherer.c_man == null || !ready) {516 if (Gatherer.c_man == null || !ready) { 527 517 return; 528 518 } … … 552 542 } 553 543 tree.valueChanged(null); 544 545 // Validate the preview button 546 if (Gatherer.c_man.built() && Configuration.library_url != null) { 547 preview_button.setEnabled(true); 548 simple_preview_button.setEnabled(true); 549 } 550 else { 551 preview_button.setEnabled(false); 552 simple_preview_button.setEnabled(false); 553 } 554 554 } 555 555 -
trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java
r8606 r8634 444 444 public void refresh(int refresh_reason, boolean ready) 445 445 { 446 // if (refresh_reason == PREFERENCES_CHANGED) { 447 // valueChanged((TreeSelectionEvent) null); // Refresh metadata table 448 // } 449 446 450 if (ready) { 447 451 // Update label -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r8588 r8634 109 109 110 110 static public final int GUI_REFRESHED = 0; 111 static public final int PREFERENCES_CHANGED = 1; 111 112 112 113 … … 241 242 } 242 243 243 // *****************244 // Metadata Options.245 // *****************246 // else if (esrc == menu_bar.metadata_view) {247 // showMetaAuditBox();248 // }249 250 244 // ************* 251 245 // Help Options. … … 522 516 if (create_pane != null) { 523 517 create_pane.refresh(refresh_reason, ready); 518 } 519 520 if (refresh_reason == PREFERENCES_CHANGED) { 521 // Force both workspace and collection trees to redraw 522 Gatherer.g_man.refreshWorkspaceTree(DragTree.TREE_DISPLAY_CHANGED); 523 Gatherer.g_man.refreshCollectionTree(DragTree.TREE_DISPLAY_CHANGED); 524 524 } 525 525 -
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r8629 r8634 604 604 this.close = close; 605 605 } 606 public void actionPerformed(ActionEvent event) {607 // Submit the various changes606 public void actionPerformed(ActionEvent event) 607 { 608 608 // Connection preferences 609 609 String program_str = program_field.getText(); 610 if (program_str.length() > 0 && program_str.indexOf("%1") == -1) {610 if (program_str.length() > 0 && program_str.indexOf("%1") == -1) { 611 611 program_str = program_str + " %1"; 612 612 } … … 633 633 Configuration.setSiteAndServlet(new_site, (String)servlet_combobox.getSelectedItem()); 634 634 } 635 635 636 636 Configuration.set("general.use_proxy", true, use_proxy_checkbox.isSelected()); 637 637 Configuration.setString("general.proxy_host", true, proxy_host_field.getText()); … … 641 641 // General preferences 642 642 Configuration.setEmail(email_field.getText()); 643 644 643 Configuration.set("general.show_file_size", Configuration.COLLECTION_SPECIFIC, show_file_size_checkbox.isSelected()); 645 // Force both workspace and collection trees to redraw646 if (Gatherer.g_man != null) {647 Gatherer.g_man.refreshWorkspaceTree(DragTree.TREE_DISPLAY_CHANGED);648 Gatherer.g_man.refreshCollectionTree(DragTree.TREE_DISPLAY_CHANGED);649 }650 651 644 Configuration.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, view_extracted_metadata_checkbox.isSelected()); 652 Gatherer.g_man.enrich_pane.valueChanged((TreeSelectionEvent) null); // Refresh metadata table653 645 654 646 String current_lang = Configuration.getLanguage(); … … 664 656 int current_mode = Configuration.getMode(); 665 657 int new_mode; 666 if (assistant_mode_radio_button.isSelected()) {658 if (assistant_mode_radio_button.isSelected()) { 667 659 new_mode = Configuration.ASSISTANT_MODE; 668 660 } 669 else if (systems_mode_radio_button.isSelected()) {661 else if (systems_mode_radio_button.isSelected()) { 670 662 new_mode = Configuration.SYSTEMS_MODE; 671 663 } 672 else if (expert_mode_radio_button.isSelected()) {664 else if (expert_mode_radio_button.isSelected()) { 673 665 new_mode = Configuration.EXPERT_MODE; 674 666 } 675 else 667 else { 676 668 new_mode = Configuration.LIBRARIAN_MODE; 677 669 } 670 678 671 // If there has been a change in modes, update the config, and also inform the persistant gui views that have a need to know 679 if (new_mode != current_mode) {672 if (new_mode != current_mode) { 680 673 Configuration.setMode(new_mode); 681 674 Collection collection = Gatherer.c_man.getCollection(); … … 713 706 // Always save configuration changes immediately (in case the GLI crashes) 714 707 Configuration.save(); 708 709 // Refresh the GLI to account for the configuration changes 710 Gatherer.g_man.refresh(GUIManager.PREFERENCES_CHANGED, Gatherer.c_man.ready()); 715 711 716 712 // Hide dialog
Note:
See TracChangeset
for help on using the changeset viewer.