Ignore:
Timestamp:
2004-01-29T17:34:35+13:00 (20 years ago)
Author:
jmt12
Message:

Worked around stupid collection title clash warning dialog crashes spooty program on exit

File:
1 edited

Legend:

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

    r6643 r6662  
    209209    }
    210210    else if(esrc == menu_bar.file_exit) {
    211         menu_bar.exit();
     211        //menu_bar.exit();
    212212        exit();
    213213    }
     
    539539     */
    540540    public void exit() {
    541     // First of all an exit can only happen if no modal dialog is currently being displayed. Something is creating a modal dialog but not disposing of it.
    542     if(Gatherer.current_modal != null) {
    543         System.err.println("There is a modal dialog open.");
    544         Gatherer.current_modal.makeVisible();
    545         Gatherer.current_modal.toFront();
    546         return;
    547     }
    548 
    549     boolean cont = true;
    550     if(Gatherer.c_man.ready() && !Gatherer.c_man.saved()) {
    551         cont = showSaveCollectionBox(false, true);
    552     }
    553     else {
    554         // Deal to help
    555         if(help != null) {
    556             help.destroy();
    557             help = null;
    558         }
    559         Gatherer.self.exit();
     541    // Tell everyone who cares that they are losing focus
     542    if(config_pane.canSave()) {
     543        boolean cont = true;
     544        if(Gatherer.c_man.ready() && !Gatherer.c_man.saved()) {
     545        cont = showSaveCollectionBox(false, true);
     546        }
     547        else {
     548        // Deal to help
     549        if(help != null) {
     550            help.destroy();
     551            help = null;
     552        }
     553        Gatherer.self.exit();
     554        }
    560555    }
    561556    }
     
    852847    //switch(result) {
    853848    //case SaveCollectionBox.SAVE_YES:
     849    Gatherer.c_man.setClosingThread(true);
    854850    Gatherer.c_man.saveCollection(close_after, exit_after);
    855851    // Wait until it is closed.
    856852    try {
    857         synchronized(this) {
     853        synchronized(this) {
    858854            while(Gatherer.c_man.reallyReady()) {
    859             wait(10);
     855            wait(10);
    860856            }
    861         }
     857        }
    862858    }
    863859    catch(Exception error) {
     
    865861        Gatherer.printStackTrace(error);
    866862    }
    867 
     863   
     864    Gatherer.c_man.setClosingThread(false);
     865   
    868866    //content_pane.paintImmediately(bounds);
    869867    return true;
Note: See TracChangeset for help on using the changeset viewer.