- Timestamp:
- 2006-03-08T17:18:07+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r11246 r11315 122 122 123 123 /** The tree showing the available source workspace. */ 124 p rivateWorkspaceTree workspace_tree = null;124 public WorkspaceTree workspace_tree = null; 125 125 126 126 … … 485 485 private JMenuItem open_externally = null; 486 486 private JMenuItem rename = null; 487 private JMenuItem replace = null; 487 488 488 489 … … 588 589 add(delete); 589 590 590 // Rename option (single selections only)591 if (selection_paths.length == 1) {592 rename = new JMenuItem(Dictionary.get("CollectionPopupMenu.Rename"), KeyEvent.VK_R);593 rename.addActionListener(this);594 add(rename);595 }596 591 } 597 592 … … 601 596 } 602 597 598 // collection tree gets rename option 599 if (tree == collection_tree) { 600 rename = new JMenuItem(Dictionary.get("CollectionPopupMenu.Rename"), KeyEvent.VK_R); 601 rename.addActionListener(this); 602 add(rename); 603 } 604 603 605 TreePath path = selection_paths[0]; 604 606 node = (FileNode) path.getLastPathComponent(); … … 606 608 // ---- Options for file nodes ---- 607 609 if (node.isLeaf()) { 608 // Explode metadata databases, for collection tree only, and for explodable files only 609 if (tree == collection_tree && ((CollectionTreeNode) node).isExplodable()) { 610 explode_metadata_database = new JMenuItem(Dictionary.get("Menu.Explode_Metadata_Database"), KeyEvent.VK_E); 611 explode_metadata_database.addActionListener(this); 612 explode_metadata_database.setEnabled(!Gatherer.isGsdlRemote); 613 add(explode_metadata_database); 614 } 615 610 if (tree == collection_tree) { 611 // Explode metadata databases, for explodable files only 612 if (((CollectionTreeNode) node).isExplodable()) { 613 explode_metadata_database = new JMenuItem(Dictionary.get("Menu.Explode_Metadata_Database"), KeyEvent.VK_E); 614 explode_metadata_database.addActionListener(this); 615 explode_metadata_database.setEnabled(!Gatherer.isGsdlRemote); 616 add(explode_metadata_database); 617 } 618 // replace file 619 replace = new JMenuItem(Dictionary.get("CollectionPopupMenu.Replace"), KeyEvent.VK_P); 620 replace.addActionListener(this); 621 add(replace); 622 } 623 616 624 // Open the file in an external program 617 625 open_externally = new JMenuItem(Dictionary.get("Menu.Open_Externally"), KeyEvent.VK_O); … … 736 744 else if (source == rename) { 737 745 Gatherer.f_man.renameCollectionFile(collection_tree, (CollectionTreeNode) node); 746 } 747 748 // Replace 749 else if (source == replace) { 750 Gatherer.f_man.replaceCollectionFile(collection_tree, (CollectionTreeNode) node); 738 751 } 739 752 }
Note:
See TracChangeset
for help on using the changeset viewer.