Ignore:
Timestamp:
2005-04-14T13:53:14+12:00 (19 years ago)
Author:
mdewsnip
Message:

Now output from exploding metadata databases is displayed correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/ExplodeMetadataPrompt.java

    r9160 r9677  
    156156    public synchronized void message(GShellEvent event) {
    157157    String message = event.getMessage();
    158     if (message.startsWith("other>")) {
     158    if (message.startsWith("explode_metadata_database.pl>")) {
    159159        message = message.substring(6);
    160160        error_message.append(message);
     
    253253
    254254    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);
    256256    //process.start();
    257257    process.run();
     
    263263    }
    264264
    265     private void resultPrompt(boolean success, String message) {
    266    
    267     String title;
    268     String label;
     265    private void resultPrompt(boolean success, String message)
     266    {
    269267    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
    282281    private class CancelListener
    283282    implements ActionListener {
Note: See TracChangeset for help on using the changeset viewer.