Changeset 4539


Ignore:
Timestamp:
2003-06-10T15:16:45+12:00 (21 years ago)
Author:
jmt12
Message:

2030113: Dialogs opened during dnd operations cause the JVM to stagger then hang under WinXP. Have no clue why so I've disabled dialogs in dnd actions.

File:
1 edited

Legend:

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

    r4525 r4539  
    323323            target = (FileNode) target_path.getLastPathComponent();
    324324        }
    325         else {
    326             // Warn that this is an invalid drop.
    327             MessageTask invalid_target_task = new MessageTask(Gatherer.dictionary.get("General.Error"), Gatherer.dictionary.get("FileActions.InvalidTarget"));
    328             invalid_target_task.start();
    329             invalid_target_task = null;
    330         }
     325        //else {
     326        //    // Warn that this is an invalid drop.
     327        //    MessageTask invalid_target_task = new MessageTask(Gatherer.dictionary.get("General.Error"), Gatherer.dictionary.get("FileActions.InvalidTarget"));
     328        //    invalid_target_task.start();
     329        //    invalid_target_task = null;
     330        //}
    331331        }
    332332        else {
     
    356356        }
    357357    }
    358     else {
    359         // Warn that this is an invalid drop.
    360         System.err.println("About to show a modal dialog box from JOptionPane.");
    361         MessageTask read_only_task = new MessageTask(Gatherer.dictionary.get("General.Error"), Gatherer.dictionary.get("FileActions.ReadOnlyTarget"));
    362         read_only_task.start();
    363         read_only_task = null;
    364         System.err.println("Returning from a modal dialog box.");
    365     }
     358    //else {
     359    //    Warn that this is an invalid drop.
     360    //    ///ystem.err.println("About to show a modal dialog box from JOptionPane.");
     361    //    MessageTask read_only_task = new MessageTask(Gatherer.dictionary.get("General.Error"), Gatherer.dictionary.get("FileActions.ReadOnlyTarget"));
     362    //    read_only_task.start();
     363    //    read_only_task = null;
     364    //    ///ystem.err.println("Returning from a modal dialog box.");
     365    //}
    366366    // Clear up the group.image_ghost
    367367    paintImmediately(ra_ghost.getBounds());
     
    369369    }
    370370
    371     private class MessageTask
    372     extends Thread {
    373     private String message;
    374     private String title;
    375 
    376     MessageTask(String title, String message) {
    377         this.message = message;
    378         this.title = title;
    379     }
    380 
    381     public void run() {
    382         JOptionPane.showMessageDialog(Gatherer.g_man, message, title, JOptionPane.ERROR_MESSAGE);
    383     }
    384     }
     371    //private class MessageTask
     372    //  extends Thread {
     373    //  private String message;
     374    //  private String title;
     375    //
     376    //  MessageTask(String title, String message) {
     377    //      this.message = message;
     378    //      this.title = title;
     379    //  }
     380    //
     381    //  public void run() {
     382    //      JOptionPane.showMessageDialog(Gatherer.g_man, message, title, JOptionPane.ERROR_MESSAGE);
     383    //  }
     384    //}
    385385
    386386    /** Any implementation of DragSourceListener must include this method
Note: See TracChangeset for help on using the changeset viewer.