Changeset 9677
- Timestamp:
- 2005-04-14T13:53:14+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/ExplodeMetadataPrompt.java
r9160 r9677 156 156 public synchronized void message(GShellEvent event) { 157 157 String message = event.getMessage(); 158 if (message.startsWith(" other>")) {158 if (message.startsWith("explode_metadata_database.pl>")) { 159 159 message = message.substring(6); 160 160 error_message.append(message); … … 253 253 254 254 this.error_message = new StringBuffer(); 255 GShell process = new GShell(args, GShell. OTHER, 3, this, null, GShell.GSHELL_OTHER);255 GShell process = new GShell(args, GShell.EXPLODE, 3, this, null, GShell.GSHELL_EXPLODE); 256 256 //process.start(); 257 257 process.run(); … … 263 263 } 264 264 265 private void resultPrompt(boolean success, String message) { 266 267 String title; 268 String label; 265 private void resultPrompt(boolean success, String message) 266 { 269 267 if (success) { 270 title = Dictionary.get("ExplodeMetadataPrompt.Successful_Title"); 271 label = Dictionary.get("ExplodeMetadataPrompt.Successful_Explode", metadata_file.getName()); 272 } else { 273 title = Dictionary.get("ExplodeMetadataPrompt.Failed_Title"); 274 label = Dictionary.get("ExplodeMetadataPrompt.Failed_Explode", metadata_file.getName()); 275 } 276 SimpleResultDialog result_dialog = new SimpleResultDialog(title, label, message); 277 result_dialog.setVisible(true); // Blocks 278 result_dialog.dispose(); 279 result_dialog = null; 280 281 } 268 // !!! TO DO: Get explode_metadata_database.pl strings translated and use SimpleResultDialog below 269 JOptionPane.showMessageDialog(null, Dictionary.get("ExplodeMetadataPrompt.Successful_Explode", metadata_file.getName()), Dictionary.get("ExplodeMetadataPrompt.Successful_Title"), JOptionPane.INFORMATION_MESSAGE); 270 } 271 else { 272 String title = Dictionary.get("ExplodeMetadataPrompt.Failed_Title"); 273 String label = Dictionary.get("ExplodeMetadataPrompt.Failed_Explode", metadata_file.getName()); 274 SimpleResultDialog result_dialog = new SimpleResultDialog(title, label, message); 275 result_dialog.setVisible(true); // Blocks 276 result_dialog.dispose(); 277 result_dialog = null; 278 } 279 } 280 282 281 private class CancelListener 283 282 implements ActionListener { -
trunk/gli/src/org/greenstone/gatherer/shell/GShell.java
r9348 r9677 77 77 /** Arguments to be given to the process (including the executable you are calling. */ 78 78 private String args[] = null; 79 /** Element in process type enumeration. */79 /** Elements in process type enumeration. */ 80 80 static final public int BUILD = 0; 81 /** Element in process type enumeration. */82 81 static final public int IMPORT = 1; 83 /** Element in process type enumeration. */84 82 static final public int NEW = 2; 85 /** Element in process type enumeration. */86 83 static final public int EXPORTAS = 3; 87 /** Element in process type enumeration. */88 84 static final public int CDIMAGE = 4; 89 /** Element in process type enumeration. */90 85 static final public int CONVERT = 5; 91 /** Element in process type enumeration. */92 static final public int OTHER = 6; 93 /** Element in status type enumeration. */86 static final public int EXPLODE = 6; 87 88 /** Elements in status type enumeration. */ 94 89 static final public int ERROR = 0; 95 /** Element in status type enumeration. */96 90 static final public int OK = 1; 97 91 static final public int CANCELLED = 2; 98 /** Element in process type name enumeration. */ 92 93 /** Elements in process type name enumeration. */ 99 94 static public String GSHELL_BUILD = "gshell_build"; 100 /** Element in process type name enumeration. */101 95 static public String GSHELL_IMPORT = "gshell_import"; 102 /** Element in process type name enumeration. */103 96 static public String GSHELL_NEW = "gshell_new"; 104 /** Element in process type name enumeration */105 97 static public String GSHELL_EXPORTAS = "gshell_exportas"; 106 /** Element in process type name enumeration */107 98 static public String GSHELL_CDIMAGE = "gshell_cdimage"; 108 /** Element in process type name enumeration */109 99 static public String GSHELL_CONVERT = "gshell_convert"; 110 /** Element in process type name enumeration */ 111 static public String GSHELL_OTHER = "gshell_other"; 100 static public String GSHELL_EXPLODE = "gshell_explode"; 112 101 113 102 /** Determine if the given process is still executing. It does this by attempting to throw an exception - not the most efficient way, but the only one as far as I know … … 767 756 name = "convert_coll_from_gs2.pl"; 768 757 break; 758 case EXPLODE: 759 name = "explode_metadata_database.pl"; 760 break; 769 761 default: 770 762 name = "";
Note:
See TracChangeset
for help on using the changeset viewer.