Changeset 11708
- Timestamp:
- 2006-04-26T14:33:24+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gsdl-2_70-distribution-branch/gli/src/org/greenstone/gatherer/gui/WriteCDImagePrompt.java
r11423 r11708 89 89 /** The text area used to display instructions for the cd-rom/dvd export */ 90 90 private JTextArea instructions_textarea; 91 /** A string array used to pass arguments to the phrase retrieval method. */ 92 private JCheckBox netscape_checkbox = null; 93 JLabel netscape_label = null; 91 94 92 private JTextField title_field = null; 95 93 private JTextField estimated_size_field = null; 96 94 private JLabel title_label = null; 97 95 private JLabel estimated_size_label = null; 96 /** A string array used to pass arguments to the exportcol.pl script */ 98 97 private String args[] = null; 99 98 private String cd_title = null; … … 104 103 /** the error message if any */ 105 104 private StringBuffer error_message = null; 106 /** This is the size of the exported stuff on its own without 107 netscape and no collections. */ 108 private long total_exported_size = 16250000; 109 /** the size of netscape */ 110 private long netscape_size = 16500000; 105 /** This is the size of the exported stuff on its own without collections. */ 106 private long total_exported_size = 14000000; 111 107 /** The size of the export prompt screen. */ 112 108 public static final Dimension SIZE = new Dimension(500, 500); … … 151 147 estimated_size_field = new JTextField(); 152 148 estimated_size_field.setEditable(false); 149 150 // work out the size of the images directory - could be large if they 151 // have the classic interface pack installed 152 total_exported_size += getFileSize(new File(LocalGreenstone.getDirectoryPath()+File.separator+"images")); 153 153 estimated_size_field.setText(Utility.formatFileLength(total_exported_size)); 154 154 estimated_size_field.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); … … 156 156 Dictionary.setText(estimated_size_label, "WriteCDImagePrompt.Size_Label"); 157 157 158 netscape_checkbox = new JCheckBox();159 netscape_checkbox.addActionListener(new NetscapeCheckBoxListener());160 netscape_label = new JLabel();161 Dictionary.setText(netscape_label, "WriteCDImagePrompt.Netscape_Compatibility");162 163 158 scanForCollections(); 164 159 list.setListData(all_collections); … … 178 173 //title.getDocument().addDocumentListener(new DocumentListener()); 179 174 180 // work out the size of the extra images needed for netscape 4181 // this assumes that they'll be installed (lang pack).182 //exportcol.pl will crap out if they are not.183 netscape_size += getFileSize(new File(LocalGreenstone.getDirectoryPath()+File.separator+"images"));184 175 } 185 176 … … 215 206 title_pane.add(title_label, BorderLayout.WEST); 216 207 title_pane.add(title_field, BorderLayout.CENTER); 217 // instructions_pane.add(title_pane, BorderLayout.SOUTH); 218 219 JPanel netscape_pane = new JPanel(new BorderLayout()); 220 netscape_pane.add(netscape_checkbox, BorderLayout.WEST); 221 netscape_pane.add(netscape_label, BorderLayout.CENTER); 222 223 JPanel grid_pane = new JPanel(new GridLayout(2,1)); 224 grid_pane.add(title_pane); 225 grid_pane.add(netscape_pane); 226 instructions_pane.add(grid_pane, BorderLayout.SOUTH); 208 instructions_pane.add(title_pane, BorderLayout.SOUTH); 227 209 228 210 // Central pane … … 312 294 cd_title = cd_title.trim(); 313 295 cd_title = cd_title.replaceAll("\"",""); 314 315 boolean use_netscape = false;316 if (netscape_checkbox.isSelected()) {317 use_netscape = true;318 }319 296 320 297 // Generate the exportcol.pl command … … 325 302 } 326 303 command_parts_list.add(LocalGreenstone.getBinScriptDirectoryPath() + "exportcol.pl"); 327 328 //if (Gatherer.isGsdlRemote || !use_netscape) {329 if (!use_netscape) {330 // now we allow remote users to use the netscape version331 command_parts_list.add("-nonetscape");332 }333 304 334 305 command_parts_list.add("-gli"); … … 482 453 } 483 454 484 private class NetscapeCheckBoxListener485 implements ActionListener {486 public void actionPerformed(ActionEvent e) {487 if (netscape_checkbox.isSelected()) {488 total_exported_size += netscape_size;489 } else {490 total_exported_size -= netscape_size;491 }492 // Update the size field493 estimated_size_field.setText(Utility.formatFileLength(total_exported_size));494 }495 }496 455 /** This private class listens for selection events in from the list and then displays the appropriate details for that collection. 497 456 */
Note:
See TracChangeset
for help on using the changeset viewer.